blob: 5e32591e71a615d32716544ba9180b59c1e6c442 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson867475c2009-04-29 20:36:25 +00002# From configure.in Revision: 72114 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis174440b2008-10-03 08:59:41 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
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'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
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
Martin v. Löwis174440b2008-10-03 08:59:41 +00001250\`configure' configures python 2.7 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
Martin v. Löwis174440b2008-10-03 08:59:41 +00001311 short | recursive ) echo "Configuration of python 2.7:";;
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
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001327 --enable-big-digits[=BITS]
1328 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001329 --enable-unicode[=ucs[24]]
1330 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001331
1332Optional Packages:
1333 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1334 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001335 --with-universal-archs=ARCH
1336 select architectures for universal build ("32-bit",
1337 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001338 --with-framework-name=FRAMEWORK
1339 specify an alternate name of the framework built
1340 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001342 --with-cxx-main=<compiler>
1343 compile main() and link python executable with C++
1344 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with-suffix=.exe set executable suffix
1346 --with-pydebug build with Py_DEBUG defined
1347 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001348 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001349 --with-dbmliborder=db1:db2:...
1350 order to check db backends for dbm. Valid value is a
1351 colon separated string with the backend names
1352 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001353 --with-signal-module disable/enable signal module
1354 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1355 --with(out)-threads[=DIRECTORY]
1356 disable/enable thread support
1357 --with(out)-thread[=DIRECTORY]
1358 deprecated; use --with(out)-threads
1359 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001361 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-pymalloc disable/enable specialized mallocs
1363 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with-fpectl enable SIGFPE catching
1365 --with-libm=STRING math library
1366 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001367
1368Some influential environment variables:
1369 CC C compiler command
1370 CFLAGS C compiler flags
1371 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1372 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001373 LIBS libraries to pass to the linker, e.g. -l<library>
1374 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1375 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001376 CPP C preprocessor
1377
1378Use these variables to override the choices made by `configure' or to help
1379it to find libraries and programs with nonstandard names/locations.
1380
Martin v. Löwis1d459062005-03-14 21:23:33 +00001381Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001383ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001384fi
1385
1386if test "$ac_init_help" = "recursive"; then
1387 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001389 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 ac_builddir=.
1391
Martin v. Löwiseba40652007-08-30 20:10:57 +00001392case "$ac_dir" in
1393.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1394*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001396 # A ".." for each directory in $ac_dir_suffix.
1397 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1398 case $ac_top_builddir_sub in
1399 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1400 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1401 esac ;;
1402esac
1403ac_abs_top_builddir=$ac_pwd
1404ac_abs_builddir=$ac_pwd$ac_dir_suffix
1405# for backward compatibility:
1406ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001407
1408case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001409 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001410 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411 ac_top_srcdir=$ac_top_builddir_sub
1412 ac_abs_top_srcdir=$ac_pwd ;;
1413 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001415 ac_top_srcdir=$srcdir
1416 ac_abs_top_srcdir=$srcdir ;;
1417 *) # Relative name.
1418 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1419 ac_top_srcdir=$ac_top_build_prefix$srcdir
1420 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001421esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001422ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001423
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424 cd "$ac_dir" || { ac_status=$?; continue; }
1425 # Check for guested configure.
1426 if test -f "$ac_srcdir/configure.gnu"; then
1427 echo &&
1428 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1429 elif test -f "$ac_srcdir/configure"; then
1430 echo &&
1431 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 else
1433 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001434 fi || ac_status=$?
1435 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 done
1437fi
1438
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001440if $ac_init_version; then
1441 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001442python configure 2.7
Martin v. Löwiseba40652007-08-30 20:10:57 +00001443generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001444
Martin v. Löwiseba40652007-08-30 20:10:57 +00001445Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14462002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001447This configure script is free software; the Free Software Foundation
1448gives unlimited permission to copy, distribute and modify it.
1449_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001450 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001453This file contains any messages produced by compilers while
1454running configure, to aid debugging if configure makes a mistake.
1455
Martin v. Löwis174440b2008-10-03 08:59:41 +00001456It was created by python $as_me 2.7, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001457generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001458
1459 $ $0 $@
1460
1461_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001462exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001463{
1464cat <<_ASUNAME
1465## --------- ##
1466## Platform. ##
1467## --------- ##
1468
1469hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1470uname -m = `(uname -m) 2>/dev/null || echo unknown`
1471uname -r = `(uname -r) 2>/dev/null || echo unknown`
1472uname -s = `(uname -s) 2>/dev/null || echo unknown`
1473uname -v = `(uname -v) 2>/dev/null || echo unknown`
1474
1475/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1476/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1477
1478/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1479/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1480/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001481/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001482/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1483/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1484/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1485
1486_ASUNAME
1487
1488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1489for as_dir in $PATH
1490do
1491 IFS=$as_save_IFS
1492 test -z "$as_dir" && as_dir=.
1493 echo "PATH: $as_dir"
1494done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001495IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001496
1497} >&5
1498
1499cat >&5 <<_ACEOF
1500
1501
1502## ----------- ##
1503## Core tests. ##
1504## ----------- ##
1505
1506_ACEOF
1507
1508
1509# Keep a trace of the command line.
1510# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001511# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001512# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001513# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001515ac_configure_args0=
1516ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001517ac_must_keep_next=false
1518for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001519do
Skip Montanaro6dead952003-09-25 14:50:04 +00001520 for ac_arg
1521 do
1522 case $ac_arg in
1523 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1524 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1525 | -silent | --silent | --silen | --sile | --sil)
1526 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001527 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001528 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1529 esac
1530 case $ac_pass in
1531 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1532 2)
1533 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1534 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001535 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001536 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001537 case $ac_arg in
1538 *=* | --config-cache | -C | -disable-* | --disable-* \
1539 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1540 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1541 | -with-* | --with-* | -without-* | --without-* | --x)
1542 case "$ac_configure_args0 " in
1543 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1544 esac
1545 ;;
1546 -* ) ac_must_keep_next=true ;;
1547 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001548 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001549 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001550 ;;
1551 esac
1552 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001553done
Skip Montanaro6dead952003-09-25 14:50:04 +00001554$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1555$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 +00001556
1557# When interrupted or exit'd, cleanup temporary files, and complete
1558# config.log. We remove comments because anyway the quotes in there
1559# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001560# WARNING: Use '\'' to represent an apostrophe within the trap.
1561# 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 +00001562trap 'exit_status=$?
1563 # Save into config.log some information that might help in debugging.
1564 {
1565 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001566
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 cat <<\_ASBOX
1568## ---------------- ##
1569## Cache variables. ##
1570## ---------------- ##
1571_ASBOX
1572 echo
1573 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001574(
1575 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1576 eval ac_val=\$$ac_var
1577 case $ac_val in #(
1578 *${as_nl}*)
1579 case $ac_var in #(
1580 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1581echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1582 esac
1583 case $ac_var in #(
1584 _ | IFS | as_nl) ;; #(
1585 *) $as_unset $ac_var ;;
1586 esac ;;
1587 esac
1588 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001590 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1591 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001593 "s/'\''/'\''\\\\'\'''\''/g;
1594 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1595 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001596 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001597 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001598 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 esac |
1600 sort
1601)
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001603
1604 cat <<\_ASBOX
1605## ----------------- ##
1606## Output variables. ##
1607## ----------------- ##
1608_ASBOX
1609 echo
1610 for ac_var in $ac_subst_vars
1611 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001612 eval ac_val=\$$ac_var
1613 case $ac_val in
1614 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1615 esac
1616 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001617 done | sort
1618 echo
1619
1620 if test -n "$ac_subst_files"; then
1621 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001622## ------------------- ##
1623## File substitutions. ##
1624## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001625_ASBOX
1626 echo
1627 for ac_var in $ac_subst_files
1628 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001629 eval ac_val=\$$ac_var
1630 case $ac_val in
1631 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1632 esac
1633 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001634 done | sort
1635 echo
1636 fi
1637
Martin v. Löwis11437992002-04-12 09:54:03 +00001638 if test -s confdefs.h; then
1639 cat <<\_ASBOX
1640## ----------- ##
1641## confdefs.h. ##
1642## ----------- ##
1643_ASBOX
1644 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001645 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001646 echo
1647 fi
1648 test "$ac_signal" != 0 &&
1649 echo "$as_me: caught signal $ac_signal"
1650 echo "$as_me: exit $exit_status"
1651 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001652 rm -f core *.core core.conftest.* &&
1653 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001654 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001655' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001656for ac_signal in 1 2 13 15; do
1657 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1658done
1659ac_signal=0
1660
1661# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001662rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001663
1664# Predefined preprocessor variables.
1665
1666cat >>confdefs.h <<_ACEOF
1667#define PACKAGE_NAME "$PACKAGE_NAME"
1668_ACEOF
1669
1670
1671cat >>confdefs.h <<_ACEOF
1672#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1673_ACEOF
1674
1675
1676cat >>confdefs.h <<_ACEOF
1677#define PACKAGE_VERSION "$PACKAGE_VERSION"
1678_ACEOF
1679
1680
1681cat >>confdefs.h <<_ACEOF
1682#define PACKAGE_STRING "$PACKAGE_STRING"
1683_ACEOF
1684
1685
1686cat >>confdefs.h <<_ACEOF
1687#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1688_ACEOF
1689
1690
1691# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001692# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001693if test -n "$CONFIG_SITE"; then
1694 set x "$CONFIG_SITE"
1695elif test "x$prefix" != xNONE; then
1696 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1697else
1698 set x "$ac_default_prefix/share/config.site" \
1699 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001701shift
1702for ac_site_file
1703do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001705 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1706echo "$as_me: loading site script $ac_site_file" >&6;}
1707 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708 . "$ac_site_file"
1709 fi
1710done
1711
1712if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001713 # Some versions of bash will fail to source /dev/null (special
1714 # files actually), so we avoid doing that.
1715 if test -f "$cache_file"; then
1716 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1717echo "$as_me: loading cache $cache_file" >&6;}
1718 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001719 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1720 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001721 esac
1722 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001723else
Martin v. Löwis11437992002-04-12 09:54:03 +00001724 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1725echo "$as_me: creating cache $cache_file" >&6;}
1726 >$cache_file
1727fi
1728
1729# Check that the precious variables saved in the cache have kept the same
1730# value.
1731ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001732for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001733 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1734 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001735 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1736 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001737 case $ac_old_set,$ac_new_set in
1738 set,)
1739 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1740echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1741 ac_cache_corrupted=: ;;
1742 ,set)
1743 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1744echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1745 ac_cache_corrupted=: ;;
1746 ,);;
1747 *)
1748 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001749 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001750echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001751 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001752echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001753 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001754echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001755 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001756 fi;;
1757 esac
1758 # Pass precious variables to config.status.
1759 if test "$ac_new_set" = set; then
1760 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001761 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001762 *) ac_arg=$ac_var=$ac_new_val ;;
1763 esac
1764 case " $ac_configure_args " in
1765 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1766 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1767 esac
1768 fi
1769done
1770if $ac_cache_corrupted; then
1771 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1772echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1773 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1774echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1775 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001776fi
1777
Martin v. Löwiseba40652007-08-30 20:10:57 +00001778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
Guido van Rossum7f43da71994-08-01 12:15:30 +00001802ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001803ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001804ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1805ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1806ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807
Guido van Rossum627b2d71993-12-24 10:39:16 +00001808
Michael W. Hudson54241132001-12-07 15:38:26 +00001809
Martin v. Löwiseba40652007-08-30 20:10:57 +00001810ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001811
1812
Martin v. Löwis11437992002-04-12 09:54:03 +00001813
Georg Brandlbcd64a32009-03-31 21:45:18 +00001814if test "$prefix" != "/"; then
1815 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1816fi
1817
1818
Martin v. Löwis11437992002-04-12 09:54:03 +00001819
1820
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001821
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001822
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001823# We don't use PACKAGE_ variables, and they cause conflicts
1824# with other autoconf-based packages that include Python.h
1825grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1826rm confdefs.h
1827mv confdefs.h.new confdefs.h
1828
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001829
Martin v. Löwis174440b2008-10-03 08:59:41 +00001830VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001831
Martin v. Löwis1142de32002-03-29 16:28:31 +00001832
1833SOVERSION=1.0
1834
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001835# The later defininition of _XOPEN_SOURCE disables certain features
1836# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1837
1838cat >>confdefs.h <<\_ACEOF
1839#define _GNU_SOURCE 1
1840_ACEOF
1841
1842
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001843# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1844# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1845# them.
1846
1847cat >>confdefs.h <<\_ACEOF
1848#define _NETBSD_SOURCE 1
1849_ACEOF
1850
1851
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001852# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1853# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1854# them.
1855
1856cat >>confdefs.h <<\_ACEOF
1857#define __BSD_VISIBLE 1
1858_ACEOF
1859
1860
Martin v. Löwisd6320502004-08-12 13:45:08 +00001861# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1862# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1863
1864cat >>confdefs.h <<\_ACEOF
1865#define _BSD_TYPES 1
1866_ACEOF
1867
1868
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001869# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1870# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1871# them.
1872
1873cat >>confdefs.h <<\_ACEOF
1874#define _DARWIN_C_SOURCE 1
1875_ACEOF
1876
1877
1878
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001879define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001880
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001881# Arguments passed to configure.
1882
1883CONFIG_ARGS="$ac_configure_args"
1884
Martin v. Löwiseba40652007-08-30 20:10:57 +00001885# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001886if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001887 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001888 case $enableval in
1889 yes)
1890 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1891 ;;
1892 esac
1893 case $enableval in
1894 no)
1895 UNIVERSALSDK=
1896 enable_universalsdk=
1897 ;;
1898 *)
1899 UNIVERSALSDK=$enableval
1900 ;;
1901 esac
1902
1903else
1904
1905 UNIVERSALSDK=
1906 enable_universalsdk=
1907
Martin v. Löwiseba40652007-08-30 20:10:57 +00001908fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001909
1910
Martin v. Löwiseba40652007-08-30 20:10:57 +00001911
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001912ARCH_RUN_32BIT=
1913
1914
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001915UNIVERSAL_ARCHS="32-bit"
1916{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1917echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
1918
1919# Check whether --with-universal-archs was given.
1920if test "${with_universal_archs+set}" = set; then
1921 withval=$with_universal_archs;
1922 { echo "$as_me:$LINENO: result: $withval" >&5
1923echo "${ECHO_T}$withval" >&6; }
1924 UNIVERSAL_ARCHS="$withval"
1925
1926else
1927
1928 { echo "$as_me:$LINENO: result: 32-bit" >&5
1929echo "${ECHO_T}32-bit" >&6; }
1930
1931fi
1932
1933
1934
1935
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001936
1937# Check whether --with-framework-name was given.
1938if test "${with_framework_name+set}" = set; then
1939 withval=$with_framework_name;
1940 PYTHONFRAMEWORK=${withval}
1941 PYTHONFRAMEWORKDIR=${withval}.framework
1942 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1943
1944else
1945
1946 PYTHONFRAMEWORK=Python
1947 PYTHONFRAMEWORKDIR=Python.framework
1948 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1949
1950fi
1951
Martin v. Löwiseba40652007-08-30 20:10:57 +00001952# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001953if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001954 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001955 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001956 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001957 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001958 esac
1959 case $enableval in
1960 no)
1961 PYTHONFRAMEWORK=
1962 PYTHONFRAMEWORKDIR=no-framework
1963 PYTHONFRAMEWORKPREFIX=
1964 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001965 FRAMEWORKINSTALLFIRST=
1966 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001967 FRAMEWORKALTINSTALLFIRST=
1968 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001969 if test "x${prefix}" = "xNONE"; then
1970 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1971 else
1972 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1973 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001974 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001975 ;;
1976 *)
1977 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001978 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001979 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001980 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1981 if test "$UNIVERSAL_ARCHS" = "all"
1982 then
1983 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001984 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001985 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001986 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001987 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1988 fi
1989
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001990 if test "x${prefix}" = "xNONE" ; then
1991 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1992 else
1993 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1994 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001995 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001996
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001997 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001998 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001999 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002000
Martin v. Löwiseba40652007-08-30 20:10:57 +00002001 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002002
Martin v. Löwiseba40652007-08-30 20:10:57 +00002003 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002004
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002005 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2006
2007 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2008
Jack Jansene578a632001-08-15 01:27:14 +00002009 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002010
Guido van Rossum563e7081996-09-10 18:20:48 +00002011else
Martin v. Löwis11437992002-04-12 09:54:03 +00002012
Jack Jansene578a632001-08-15 01:27:14 +00002013 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002014 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002015 PYTHONFRAMEWORKPREFIX=
2016 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002017 FRAMEWORKINSTALLFIRST=
2018 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002019 FRAMEWORKALTINSTALLFIRST=
2020 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002021 if test "x${prefix}" = "xNONE" ; then
2022 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2023 else
2024 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2025 fi
Jack Jansene578a632001-08-15 01:27:14 +00002026 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002027
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002028 if test "$UNIVERSAL_ARCHS" = "all"
2029 then
2030 FRAMEWORKINSTALLLAST=update4wayuniversal
2031 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2032 fi
2033
Martin v. Löwiseba40652007-08-30 20:10:57 +00002034fi
2035
Michael W. Hudson54241132001-12-07 15:38:26 +00002036
2037
2038
2039
Jack Jansene578a632001-08-15 01:27:14 +00002040
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002041
2042
Ronald Oussoren5b787322006-06-06 19:50:24 +00002043
2044
2045
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002046
Jack Jansene578a632001-08-15 01:27:14 +00002047##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002048## AC_HELP_STRING(--with-dyld,
2049## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002050##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002051# Set name for machine-dependent library files
2052
Martin v. Löwiseba40652007-08-30 20:10:57 +00002053{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2054echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002055if test -z "$MACHDEP"
2056then
Guido van Rossum563e7081996-09-10 18:20:48 +00002057 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002058 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2059 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002060 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002061 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002062 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002064 ac_md_system=`echo $ac_sys_system |
2065 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2066 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002067 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002068 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002069
Guido van Rossum07397971997-04-29 21:49:50 +00002070 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002071 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002072 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002073 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002074 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002075 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002076 esac
2077fi
Guido van Rossum91922671997-10-09 20:24:13 +00002078
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002079# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2080# disable features if it is defined, without any means to access these
2081# features as extensions. For these systems, we skip the definition of
2082# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2083# some feature, make sure there is no alternative way to access this
2084# feature. Also, when using wildcards, make sure you have verified the
2085# need for not defining _XOPEN_SOURCE on all systems matching the
2086# wildcard, and that the wildcard does not include future systems
2087# (which may remove their limitations).
2088case $ac_sys_system/$ac_sys_release in
2089 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2090 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002091 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002092 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002093 define_xopen_source=no
2094 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2095 # also defined. This can be overridden by defining _BSD_SOURCE
2096 # As this has a different meaning on Linux, only define it on OpenBSD
2097
2098cat >>confdefs.h <<\_ACEOF
2099#define _BSD_SOURCE 1
2100_ACEOF
2101
2102 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002103 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2104 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2105 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002106 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002107 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002108 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2109 # of union __?sigval. Reported by Stuart Bishop.
2110 SunOS/5.6)
2111 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002112 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2113 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002114 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002115 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002116 define_xopen_source=no;;
2117 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002118 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002119 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002120 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002121 # On FreeBSD 4, the math functions C89 does not cover are never defined
2122 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2123 FreeBSD/4.*)
2124 define_xopen_source=no;;
2125 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2126 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2127 # identifies itself as Darwin/7.*
2128 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2129 # disables platform specific features beyond repair.
2130 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2131 # has no effect, don't bother defining them
2132 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002133 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002134 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2135 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2136 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002137 AIX/4)
2138 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002139 AIX/5)
2140 if test `uname -r` -eq 1; then
2141 define_xopen_source=no
2142 fi
2143 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002144 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2145 # defining NI_NUMERICHOST.
2146 QNX/6.3.2)
2147 define_xopen_source=no
2148 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002149
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002150esac
2151
2152if test $define_xopen_source = yes
2153then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002154 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2155 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002156 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2157 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002158 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002159 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002160
2161cat >>confdefs.h <<\_ACEOF
2162#define _XOPEN_SOURCE 500
2163_ACEOF
2164
2165 ;;
2166 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002167
2168cat >>confdefs.h <<\_ACEOF
2169#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002170_ACEOF
2171
Skip Montanarof0d5f792004-08-15 14:08:23 +00002172 ;;
2173 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002174
2175 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2176 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2177 # several APIs are not declared. Since this is also needed in some
2178 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002179 # except for Solaris 10, where it must not be defined,
2180 # as it implies XPG4.2
2181 case $ac_sys_system/$ac_sys_release in
2182 SunOS/5.10)
2183 ;;
2184 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002185
2186cat >>confdefs.h <<\_ACEOF
2187#define _XOPEN_SOURCE_EXTENDED 1
2188_ACEOF
2189
Martin v. Löwis7dece662005-11-26 11:38:24 +00002190 ;;
2191 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002192
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002193
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002194cat >>confdefs.h <<\_ACEOF
2195#define _POSIX_C_SOURCE 200112L
2196_ACEOF
2197
2198
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002199fi
2200
Guido van Rossum91922671997-10-09 20:24:13 +00002201#
2202# SGI compilers allow the specification of the both the ABI and the
2203# ISA on the command line. Depending on the values of these switches,
2204# different and often incompatable code will be generated.
2205#
2206# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2207# thus supply support for various ABI/ISA combinations. The MACHDEP
2208# variable is also adjusted.
2209#
2210
2211if test ! -z "$SGI_ABI"
2212then
2213 CC="cc $SGI_ABI"
2214 LDFLAGS="$SGI_ABI $LDFLAGS"
2215 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002217{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2218echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002219
Jack Jansen83f898c2002-12-30 22:23:40 +00002220# And add extra plat-mac for darwin
2221
Jack Jansen7b59b422003-03-17 15:44:10 +00002222
Martin v. Löwiseba40652007-08-30 20:10:57 +00002223{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2224echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002225if test -z "$EXTRAPLATDIR"
2226then
2227 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002228 darwin)
2229 EXTRAPLATDIR="\$(PLATMACDIRS)"
2230 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2231 ;;
2232 *)
2233 EXTRAPLATDIR=""
2234 EXTRAMACHDEPPATH=""
2235 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002236 esac
2237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002238{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2239echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002240
Jack Jansen6b08a402004-06-03 12:41:45 +00002241# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2242# it may influence the way we can build extensions, so distutils
2243# needs to check it
2244
Ronald Oussoren988117f2006-04-29 11:31:35 +00002245
Jack Jansen6b08a402004-06-03 12:41:45 +00002246CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002247EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002248
Mark Dickinson65134662008-04-25 16:11:04 +00002249{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2250echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2251ac_sys_machine=`uname -m`
2252{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2253echo "${ECHO_T}$ac_sys_machine" >&6; }
2254
Guido van Rossum627b2d71993-12-24 10:39:16 +00002255# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002256
2257# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2258# for debug/optimization stuff. BASECFLAGS is for flags that are required
2259# just to get things to compile and link. Users are free to override OPT
2260# when running configure or make. The build should not break if they do.
2261# BASECFLAGS should generally not be messed with, however.
2262
2263# XXX shouldn't some/most/all of this code be merged with the stuff later
2264# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002265{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2266echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002267
Martin v. Löwiseba40652007-08-30 20:10:57 +00002268# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002269if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002270 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002271 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002272 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002273 without_gcc=yes;;
2274 yes) CC=gcc
2275 without_gcc=no;;
2276 *) CC=$withval
2277 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002278 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002279else
Martin v. Löwis11437992002-04-12 09:54:03 +00002280
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002281 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002282 AIX*) CC=cc_r
2283 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002284 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002285 case $BE_HOST_CPU in
2286 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002287 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002288 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002289 BASECFLAGS="$BASECFLAGS -export pragma"
2290 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002291 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002292 ;;
2293 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002294 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002295 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002296 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002297 ;;
2298 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002299 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2300echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2301 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002302 ;;
2303 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002304 AR="\$(srcdir)/Modules/ar_beos"
2305 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002306 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002307 Monterey*)
2308 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002309 without_gcc=;;
2310 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002311 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002312fi
2313
2314{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2315echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002316
Guido van Rossum8b131c51995-03-09 14:10:13 +00002317# If the user switches compilers, we can't believe the cache
2318if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2319then
Martin v. Löwis11437992002-04-12 09:54:03 +00002320 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2321(it is also a good idea to do 'make clean' before compiling)" >&5
2322echo "$as_me: error: cached CC is different -- throw away $cache_file
2323(it is also a good idea to do 'make clean' before compiling)" >&2;}
2324 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002325fi
2326
Martin v. Löwis11437992002-04-12 09:54:03 +00002327ac_ext=c
2328ac_cpp='$CPP $CPPFLAGS'
2329ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2330ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2331ac_compiler_gnu=$ac_cv_c_compiler_gnu
2332if test -n "$ac_tool_prefix"; then
2333 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2334set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002335{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002337if test "${ac_cv_prog_CC+set}" = set; then
2338 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002339else
2340 if test -n "$CC"; then
2341 ac_cv_prog_CC="$CC" # Let the user override the test.
2342else
Martin v. Löwis11437992002-04-12 09:54:03 +00002343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2344for as_dir in $PATH
2345do
2346 IFS=$as_save_IFS
2347 test -z "$as_dir" && as_dir=.
2348 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002349 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 +00002350 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2352 break 2
2353 fi
2354done
2355done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002357
Jack Jansendd19cf82001-12-06 22:36:17 +00002358fi
2359fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002360CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002361if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362 { echo "$as_me:$LINENO: result: $CC" >&5
2363echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002364else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002365 { echo "$as_me:$LINENO: result: no" >&5
2366echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002367fi
2368
Martin v. Löwiseba40652007-08-30 20:10:57 +00002369
Martin v. Löwis11437992002-04-12 09:54:03 +00002370fi
2371if test -z "$ac_cv_prog_CC"; then
2372 ac_ct_CC=$CC
2373 # Extract the first word of "gcc", so it can be a program name with args.
2374set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002375{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002377if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2378 echo $ECHO_N "(cached) $ECHO_C" >&6
2379else
2380 if test -n "$ac_ct_CC"; then
2381 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2382else
2383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2384for as_dir in $PATH
2385do
2386 IFS=$as_save_IFS
2387 test -z "$as_dir" && as_dir=.
2388 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002389 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 +00002390 ac_cv_prog_ac_ct_CC="gcc"
2391 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2392 break 2
2393 fi
2394done
2395done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002396IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002397
2398fi
2399fi
2400ac_ct_CC=$ac_cv_prog_ac_ct_CC
2401if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002402 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2403echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002404else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002405 { echo "$as_me:$LINENO: result: no" >&5
2406echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002407fi
2408
Martin v. Löwiseba40652007-08-30 20:10:57 +00002409 if test "x$ac_ct_CC" = x; then
2410 CC=""
2411 else
2412 case $cross_compiling:$ac_tool_warned in
2413yes:)
2414{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2415whose name does not start with the host triplet. If you think this
2416configuration is useful to you, please write to autoconf@gnu.org." >&5
2417echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2418whose name does not start with the host triplet. If you think this
2419configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2420ac_tool_warned=yes ;;
2421esac
2422 CC=$ac_ct_CC
2423 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002424else
2425 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002426fi
2427
Jack Jansendd19cf82001-12-06 22:36:17 +00002428if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002429 if test -n "$ac_tool_prefix"; then
2430 # 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 +00002431set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002432{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2433echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002434if test "${ac_cv_prog_CC+set}" = set; then
2435 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002436else
2437 if test -n "$CC"; then
2438 ac_cv_prog_CC="$CC" # Let the user override the test.
2439else
Martin v. Löwis11437992002-04-12 09:54:03 +00002440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2441for as_dir in $PATH
2442do
2443 IFS=$as_save_IFS
2444 test -z "$as_dir" && as_dir=.
2445 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002446 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 +00002447 ac_cv_prog_CC="${ac_tool_prefix}cc"
2448 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2449 break 2
2450 fi
2451done
2452done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002453IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455fi
2456fi
2457CC=$ac_cv_prog_CC
2458if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002459 { echo "$as_me:$LINENO: result: $CC" >&5
2460echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002461else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002462 { echo "$as_me:$LINENO: result: no" >&5
2463echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002464fi
2465
Martin v. Löwiseba40652007-08-30 20:10:57 +00002466
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002468fi
2469if test -z "$CC"; then
2470 # Extract the first word of "cc", so it can be a program name with args.
2471set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002472{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2473echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002474if test "${ac_cv_prog_CC+set}" = set; then
2475 echo $ECHO_N "(cached) $ECHO_C" >&6
2476else
2477 if test -n "$CC"; then
2478 ac_cv_prog_CC="$CC" # Let the user override the test.
2479else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002480 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2482for as_dir in $PATH
2483do
2484 IFS=$as_save_IFS
2485 test -z "$as_dir" && as_dir=.
2486 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002487 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 +00002488 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2489 ac_prog_rejected=yes
2490 continue
2491 fi
2492 ac_cv_prog_CC="cc"
2493 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2494 break 2
2495 fi
2496done
2497done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002498IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002499
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002500if test $ac_prog_rejected = yes; then
2501 # We found a bogon in the path, so make sure we never use it.
2502 set dummy $ac_cv_prog_CC
2503 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002505 # We chose a different compiler from the bogus one.
2506 # However, it has the same basename, so the bogon will be chosen
2507 # first if we set CC to just the basename; use the full file name.
2508 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002510 fi
2511fi
2512fi
2513fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002514CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002515if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516 { echo "$as_me:$LINENO: result: $CC" >&5
2517echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002518else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002519 { echo "$as_me:$LINENO: result: no" >&5
2520echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002521fi
2522
Martin v. Löwiseba40652007-08-30 20:10:57 +00002523
Martin v. Löwis11437992002-04-12 09:54:03 +00002524fi
2525if test -z "$CC"; then
2526 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002527 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 do
2529 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2530set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002531{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2532echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002533if test "${ac_cv_prog_CC+set}" = set; then
2534 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002535else
2536 if test -n "$CC"; then
2537 ac_cv_prog_CC="$CC" # Let the user override the test.
2538else
Martin v. Löwis11437992002-04-12 09:54:03 +00002539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2540for as_dir in $PATH
2541do
2542 IFS=$as_save_IFS
2543 test -z "$as_dir" && as_dir=.
2544 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545 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 +00002546 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2547 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2548 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002549 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002550done
2551done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002552IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002553
2554fi
2555fi
2556CC=$ac_cv_prog_CC
2557if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558 { echo "$as_me:$LINENO: result: $CC" >&5
2559echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002560else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002561 { echo "$as_me:$LINENO: result: no" >&5
2562echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002563fi
2564
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 test -n "$CC" && break
2567 done
2568fi
2569if test -z "$CC"; then
2570 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002572do
2573 # Extract the first word of "$ac_prog", so it can be a program name with args.
2574set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002575{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2576echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002577if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2578 echo $ECHO_N "(cached) $ECHO_C" >&6
2579else
2580 if test -n "$ac_ct_CC"; then
2581 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2582else
2583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2584for as_dir in $PATH
2585do
2586 IFS=$as_save_IFS
2587 test -z "$as_dir" && as_dir=.
2588 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589 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 +00002590 ac_cv_prog_ac_ct_CC="$ac_prog"
2591 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2592 break 2
2593 fi
2594done
2595done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002597
Martin v. Löwis11437992002-04-12 09:54:03 +00002598fi
2599fi
2600ac_ct_CC=$ac_cv_prog_ac_ct_CC
2601if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2603echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002604else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002605 { echo "$as_me:$LINENO: result: no" >&5
2606echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002607fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002608
Martin v. Löwiseba40652007-08-30 20:10:57 +00002609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 test -n "$ac_ct_CC" && break
2611done
Michael W. Hudson54241132001-12-07 15:38:26 +00002612
Martin v. Löwiseba40652007-08-30 20:10:57 +00002613 if test "x$ac_ct_CC" = x; then
2614 CC=""
2615 else
2616 case $cross_compiling:$ac_tool_warned in
2617yes:)
2618{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2619whose name does not start with the host triplet. If you think this
2620configuration is useful to you, please write to autoconf@gnu.org." >&5
2621echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2622whose name does not start with the host triplet. If you think this
2623configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2624ac_tool_warned=yes ;;
2625esac
2626 CC=$ac_ct_CC
2627 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002628fi
2629
2630fi
2631
2632
Skip Montanaro6dead952003-09-25 14:50:04 +00002633test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2634See \`config.log' for more details." >&5
2635echo "$as_me: error: no acceptable C compiler found in \$PATH
2636See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 { (exit 1); exit 1; }; }
2638
2639# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002640echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002641ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002642{ (ac_try="$ac_compiler --version >&5"
2643case "(($ac_try" in
2644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2645 *) ac_try_echo=$ac_try;;
2646esac
2647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2648 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_status=$?
2650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2651 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002652{ (ac_try="$ac_compiler -v >&5"
2653case "(($ac_try" in
2654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2655 *) ac_try_echo=$ac_try;;
2656esac
2657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2658 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 ac_status=$?
2660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002662{ (ac_try="$ac_compiler -V >&5"
2663case "(($ac_try" in
2664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2665 *) ac_try_echo=$ac_try;;
2666esac
2667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2668 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 ac_status=$?
2670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2671 (exit $ac_status); }
2672
2673cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002674/* confdefs.h. */
2675_ACEOF
2676cat confdefs.h >>conftest.$ac_ext
2677cat >>conftest.$ac_ext <<_ACEOF
2678/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002679
Martin v. Löwis11437992002-04-12 09:54:03 +00002680int
2681main ()
2682{
2683
2684 ;
2685 return 0;
2686}
2687_ACEOF
2688ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002689ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002690# Try to create an executable without -o first, disregard a.out.
2691# It will help us diagnose broken compilers, and finding out an intuition
2692# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002693{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2694echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002695ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002696#
2697# List of possible output files, starting from the most likely.
2698# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2699# only as a last resort. b.out is created by i960 compilers.
2700ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2701#
2702# The IRIX 6 linker writes into existing files which may not be
2703# executable, retaining their permissions. Remove them first so a
2704# subsequent execution test works.
2705ac_rmfiles=
2706for ac_file in $ac_files
2707do
2708 case $ac_file in
2709 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2710 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2711 esac
2712done
2713rm -f $ac_rmfiles
2714
2715if { (ac_try="$ac_link_default"
2716case "(($ac_try" in
2717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2718 *) ac_try_echo=$ac_try;;
2719esac
2720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2721 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 ac_status=$?
2723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2724 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002725 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2726# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2727# in a Makefile. We should not override ac_cv_exeext if it was cached,
2728# so that the user can short-circuit this test for compilers unknown to
2729# Autoconf.
2730for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002731do
2732 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002734 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002735 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002736 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002737 # We found the default executable, but exeext='' is most
2738 # certainly right.
2739 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002740 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002741 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2742 then :; else
2743 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2744 fi
2745 # We set ac_cv_exeext here because the later test for it is not
2746 # safe: cross compilers may not add the suffix if given an `-o'
2747 # argument, so we may need to know it at that point already.
2748 # Even if this section looks crufty: it has the advantage of
2749 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002750 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002751 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002752 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 esac
2754done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002755test "$ac_cv_exeext" = no && ac_cv_exeext=
2756
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002757else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002758 ac_file=''
2759fi
2760
2761{ echo "$as_me:$LINENO: result: $ac_file" >&5
2762echo "${ECHO_T}$ac_file" >&6; }
2763if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002765sed 's/^/| /' conftest.$ac_ext >&5
2766
2767{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2768See \`config.log' for more details." >&5
2769echo "$as_me: error: C compiler cannot create executables
2770See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002771 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002772fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002773
Martin v. Löwis11437992002-04-12 09:54:03 +00002774ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002775
Martin v. Löwiseba40652007-08-30 20:10:57 +00002776# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002777# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002778{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2779echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002780# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2781# If not cross compiling, check that we can run a simple program.
2782if test "$cross_compiling" != yes; then
2783 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002784 { (case "(($ac_try" in
2785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2786 *) ac_try_echo=$ac_try;;
2787esac
2788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2789 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 ac_status=$?
2791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2792 (exit $ac_status); }; }; then
2793 cross_compiling=no
2794 else
2795 if test "$cross_compiling" = maybe; then
2796 cross_compiling=yes
2797 else
2798 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002799If you meant to cross compile, use \`--host'.
2800See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002801echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002802If you meant to cross compile, use \`--host'.
2803See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002804 { (exit 1); exit 1; }; }
2805 fi
2806 fi
2807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002808{ echo "$as_me:$LINENO: result: yes" >&5
2809echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002810
Skip Montanaro6dead952003-09-25 14:50:04 +00002811rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002812ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002813# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002814# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002815{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2816echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2817{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2818echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002819
Martin v. Löwiseba40652007-08-30 20:10:57 +00002820{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2821echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2822if { (ac_try="$ac_link"
2823case "(($ac_try" in
2824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2825 *) ac_try_echo=$ac_try;;
2826esac
2827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2828 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 ac_status=$?
2830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2831 (exit $ac_status); }; then
2832 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2833# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2834# work properly (i.e., refer to `conftest.exe'), while it won't with
2835# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002836for ac_file in conftest.exe conftest conftest.*; do
2837 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002839 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002841 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 * ) break;;
2843 esac
2844done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002845else
Skip Montanaro6dead952003-09-25 14:50:04 +00002846 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2847See \`config.log' for more details." >&5
2848echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2849See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002851fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002852
Martin v. Löwis11437992002-04-12 09:54:03 +00002853rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002854{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2855echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002856
2857rm -f conftest.$ac_ext
2858EXEEXT=$ac_cv_exeext
2859ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002860{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2861echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002862if test "${ac_cv_objext+set}" = set; then
2863 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002864else
Martin v. Löwis11437992002-04-12 09:54:03 +00002865 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002866/* confdefs.h. */
2867_ACEOF
2868cat confdefs.h >>conftest.$ac_ext
2869cat >>conftest.$ac_ext <<_ACEOF
2870/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002871
Martin v. Löwis11437992002-04-12 09:54:03 +00002872int
2873main ()
2874{
2875
2876 ;
2877 return 0;
2878}
2879_ACEOF
2880rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002881if { (ac_try="$ac_compile"
2882case "(($ac_try" in
2883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2884 *) ac_try_echo=$ac_try;;
2885esac
2886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2887 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002888 ac_status=$?
2889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2890 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002891 for ac_file in conftest.o conftest.obj conftest.*; do
2892 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002893 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002894 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002895 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2896 break;;
2897 esac
2898done
2899else
2900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002901sed 's/^/| /' conftest.$ac_ext >&5
2902
2903{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2904See \`config.log' for more details." >&5
2905echo "$as_me: error: cannot compute suffix of object files: cannot compile
2906See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 { (exit 1); exit 1; }; }
2908fi
2909
2910rm -f conftest.$ac_cv_objext conftest.$ac_ext
2911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002912{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2913echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002914OBJEXT=$ac_cv_objext
2915ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002916{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2917echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002918if test "${ac_cv_c_compiler_gnu+set}" = set; then
2919 echo $ECHO_N "(cached) $ECHO_C" >&6
2920else
2921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002922/* confdefs.h. */
2923_ACEOF
2924cat confdefs.h >>conftest.$ac_ext
2925cat >>conftest.$ac_ext <<_ACEOF
2926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002927
Martin v. Löwis11437992002-04-12 09:54:03 +00002928int
2929main ()
2930{
2931#ifndef __GNUC__
2932 choke me
2933#endif
2934
2935 ;
2936 return 0;
2937}
2938_ACEOF
2939rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002940if { (ac_try="$ac_compile"
2941case "(($ac_try" in
2942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2943 *) ac_try_echo=$ac_try;;
2944esac
2945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002948 grep -v '^ *+' conftest.er1 >conftest.err
2949 rm -f conftest.er1
2950 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002952 (exit $ac_status); } && {
2953 test -z "$ac_c_werror_flag" ||
2954 test ! -s conftest.err
2955 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002956 ac_compiler_gnu=yes
2957else
2958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002959sed 's/^/| /' conftest.$ac_ext >&5
2960
Martin v. Löwiseba40652007-08-30 20:10:57 +00002961 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002963
2964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002965ac_cv_c_compiler_gnu=$ac_compiler_gnu
2966
2967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002968{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2969echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002970GCC=`test $ac_compiler_gnu = yes && echo yes`
2971ac_test_CFLAGS=${CFLAGS+set}
2972ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002973{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2974echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002975if test "${ac_cv_prog_cc_g+set}" = set; then
2976 echo $ECHO_N "(cached) $ECHO_C" >&6
2977else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002978 ac_save_c_werror_flag=$ac_c_werror_flag
2979 ac_c_werror_flag=yes
2980 ac_cv_prog_cc_g=no
2981 CFLAGS="-g"
2982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002983/* confdefs.h. */
2984_ACEOF
2985cat confdefs.h >>conftest.$ac_ext
2986cat >>conftest.$ac_ext <<_ACEOF
2987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002988
Martin v. Löwis11437992002-04-12 09:54:03 +00002989int
2990main ()
2991{
2992
2993 ;
2994 return 0;
2995}
2996_ACEOF
2997rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002998if { (ac_try="$ac_compile"
2999case "(($ac_try" in
3000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3001 *) ac_try_echo=$ac_try;;
3002esac
3003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003006 grep -v '^ *+' conftest.er1 >conftest.err
3007 rm -f conftest.er1
3008 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003010 (exit $ac_status); } && {
3011 test -z "$ac_c_werror_flag" ||
3012 test ! -s conftest.err
3013 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003014 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003015else
Martin v. Löwis11437992002-04-12 09:54:03 +00003016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003017sed 's/^/| /' conftest.$ac_ext >&5
3018
Martin v. Löwiseba40652007-08-30 20:10:57 +00003019 CFLAGS=""
3020 cat >conftest.$ac_ext <<_ACEOF
3021/* confdefs.h. */
3022_ACEOF
3023cat confdefs.h >>conftest.$ac_ext
3024cat >>conftest.$ac_ext <<_ACEOF
3025/* end confdefs.h. */
3026
3027int
3028main ()
3029{
3030
3031 ;
3032 return 0;
3033}
3034_ACEOF
3035rm -f conftest.$ac_objext
3036if { (ac_try="$ac_compile"
3037case "(($ac_try" in
3038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3039 *) ac_try_echo=$ac_try;;
3040esac
3041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3042 (eval "$ac_compile") 2>conftest.er1
3043 ac_status=$?
3044 grep -v '^ *+' conftest.er1 >conftest.err
3045 rm -f conftest.er1
3046 cat conftest.err >&5
3047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3048 (exit $ac_status); } && {
3049 test -z "$ac_c_werror_flag" ||
3050 test ! -s conftest.err
3051 } && test -s conftest.$ac_objext; then
3052 :
3053else
3054 echo "$as_me: failed program was:" >&5
3055sed 's/^/| /' conftest.$ac_ext >&5
3056
3057 ac_c_werror_flag=$ac_save_c_werror_flag
3058 CFLAGS="-g"
3059 cat >conftest.$ac_ext <<_ACEOF
3060/* confdefs.h. */
3061_ACEOF
3062cat confdefs.h >>conftest.$ac_ext
3063cat >>conftest.$ac_ext <<_ACEOF
3064/* end confdefs.h. */
3065
3066int
3067main ()
3068{
3069
3070 ;
3071 return 0;
3072}
3073_ACEOF
3074rm -f conftest.$ac_objext
3075if { (ac_try="$ac_compile"
3076case "(($ac_try" in
3077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3078 *) ac_try_echo=$ac_try;;
3079esac
3080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3081 (eval "$ac_compile") 2>conftest.er1
3082 ac_status=$?
3083 grep -v '^ *+' conftest.er1 >conftest.err
3084 rm -f conftest.er1
3085 cat conftest.err >&5
3086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3087 (exit $ac_status); } && {
3088 test -z "$ac_c_werror_flag" ||
3089 test ! -s conftest.err
3090 } && test -s conftest.$ac_objext; then
3091 ac_cv_prog_cc_g=yes
3092else
3093 echo "$as_me: failed program was:" >&5
3094sed 's/^/| /' conftest.$ac_ext >&5
3095
3096
Guido van Rossum627b2d71993-12-24 10:39:16 +00003097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003098
3099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003101
3102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3103fi
3104
3105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3106 ac_c_werror_flag=$ac_save_c_werror_flag
3107fi
3108{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3109echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003110if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003111 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003112elif test $ac_cv_prog_cc_g = yes; then
3113 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003114 CFLAGS="-g -O2"
3115 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003116 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003117 fi
3118else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003119 if test "$GCC" = yes; then
3120 CFLAGS="-O2"
3121 else
3122 CFLAGS=
3123 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003125{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3126echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3127if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003128 echo $ECHO_N "(cached) $ECHO_C" >&6
3129else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003130 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003131ac_save_CC=$CC
3132cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003133/* confdefs.h. */
3134_ACEOF
3135cat confdefs.h >>conftest.$ac_ext
3136cat >>conftest.$ac_ext <<_ACEOF
3137/* end confdefs.h. */
3138#include <stdarg.h>
3139#include <stdio.h>
3140#include <sys/types.h>
3141#include <sys/stat.h>
3142/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3143struct buf { int x; };
3144FILE * (*rcsopen) (struct buf *, struct stat *, int);
3145static char *e (p, i)
3146 char **p;
3147 int i;
3148{
3149 return p[i];
3150}
3151static char *f (char * (*g) (char **, int), char **p, ...)
3152{
3153 char *s;
3154 va_list v;
3155 va_start (v,p);
3156 s = g (p, va_arg (v,int));
3157 va_end (v);
3158 return s;
3159}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003160
3161/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3162 function prototypes and stuff, but not '\xHH' hex character constants.
3163 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003164 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003165 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3166 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003167 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003168int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3169
Martin v. Löwiseba40652007-08-30 20:10:57 +00003170/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3171 inside strings and character constants. */
3172#define FOO(x) 'x'
3173int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3174
Skip Montanaro6dead952003-09-25 14:50:04 +00003175int test (int i, double x);
3176struct s1 {int (*f) (int a);};
3177struct s2 {int (*f) (double a);};
3178int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3179int argc;
3180char **argv;
3181int
3182main ()
3183{
3184return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3185 ;
3186 return 0;
3187}
3188_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003189for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3190 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003191do
3192 CC="$ac_save_CC $ac_arg"
3193 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003194if { (ac_try="$ac_compile"
3195case "(($ac_try" in
3196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3197 *) ac_try_echo=$ac_try;;
3198esac
3199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3200 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003202 grep -v '^ *+' conftest.er1 >conftest.err
3203 rm -f conftest.er1
3204 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003206 (exit $ac_status); } && {
3207 test -z "$ac_c_werror_flag" ||
3208 test ! -s conftest.err
3209 } && test -s conftest.$ac_objext; then
3210 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003211else
3212 echo "$as_me: failed program was:" >&5
3213sed 's/^/| /' conftest.$ac_ext >&5
3214
Martin v. Löwiseba40652007-08-30 20:10:57 +00003215
Skip Montanaro6dead952003-09-25 14:50:04 +00003216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003217
3218rm -f core conftest.err conftest.$ac_objext
3219 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003220done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003222CC=$ac_save_CC
3223
3224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003225# AC_CACHE_VAL
3226case "x$ac_cv_prog_cc_c89" in
3227 x)
3228 { echo "$as_me:$LINENO: result: none needed" >&5
3229echo "${ECHO_T}none needed" >&6; } ;;
3230 xno)
3231 { echo "$as_me:$LINENO: result: unsupported" >&5
3232echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003233 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003234 CC="$CC $ac_cv_prog_cc_c89"
3235 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3236echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003237esac
3238
Skip Montanaro6dead952003-09-25 14:50:04 +00003239
Martin v. Löwis11437992002-04-12 09:54:03 +00003240ac_ext=c
3241ac_cpp='$CPP $CPPFLAGS'
3242ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3243ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3244ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003245
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003246
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003247
3248
Martin v. Löwiseba40652007-08-30 20:10:57 +00003249{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3250echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003251
Martin v. Löwiseba40652007-08-30 20:10:57 +00003252# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003253if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003254 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003255
3256 case $withval in
3257 no) with_cxx_main=no
3258 MAINCC='$(CC)';;
3259 yes) with_cxx_main=yes
3260 MAINCC='$(CXX)';;
3261 *) with_cxx_main=yes
3262 MAINCC=$withval
3263 if test -z "$CXX"
3264 then
3265 CXX=$withval
3266 fi;;
3267 esac
3268else
3269
3270 with_cxx_main=no
3271 MAINCC='$(CC)'
3272
Martin v. Löwiseba40652007-08-30 20:10:57 +00003273fi
3274
3275{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3276echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003277
3278preset_cxx="$CXX"
3279if test -z "$CXX"
3280then
3281 case "$CC" in
3282 gcc) # Extract the first word of "g++", so it can be a program name with args.
3283set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003284{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3285echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003286if test "${ac_cv_path_CXX+set}" = set; then
3287 echo $ECHO_N "(cached) $ECHO_C" >&6
3288else
3289 case $CXX in
3290 [\\/]* | ?:[\\/]*)
3291 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3292 ;;
3293 *)
3294 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3295for as_dir in notfound
3296do
3297 IFS=$as_save_IFS
3298 test -z "$as_dir" && as_dir=.
3299 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003300 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 +00003301 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3302 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3303 break 2
3304 fi
3305done
3306done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003307IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003308
3309 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3310 ;;
3311esac
3312fi
3313CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003314if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003315 { echo "$as_me:$LINENO: result: $CXX" >&5
3316echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003317else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003318 { echo "$as_me:$LINENO: result: no" >&5
3319echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003321
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003322 ;;
3323 cc) # Extract the first word of "c++", so it can be a program name with args.
3324set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003325{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003327if test "${ac_cv_path_CXX+set}" = set; then
3328 echo $ECHO_N "(cached) $ECHO_C" >&6
3329else
3330 case $CXX in
3331 [\\/]* | ?:[\\/]*)
3332 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3333 ;;
3334 *)
3335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3336for as_dir in notfound
3337do
3338 IFS=$as_save_IFS
3339 test -z "$as_dir" && as_dir=.
3340 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003341 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 +00003342 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3343 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3344 break 2
3345 fi
3346done
3347done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003348IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003349
3350 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3351 ;;
3352esac
3353fi
3354CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003355if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003356 { echo "$as_me:$LINENO: result: $CXX" >&5
3357echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003358else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003359 { echo "$as_me:$LINENO: result: no" >&5
3360echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003362
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003363 ;;
3364 esac
3365 if test "$CXX" = "notfound"
3366 then
3367 CXX=""
3368 fi
3369fi
3370if test -z "$CXX"
3371then
3372 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3373do
3374 # Extract the first word of "$ac_prog", so it can be a program name with args.
3375set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003376{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3377echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003378if test "${ac_cv_prog_CXX+set}" = set; then
3379 echo $ECHO_N "(cached) $ECHO_C" >&6
3380else
3381 if test -n "$CXX"; then
3382 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3383else
3384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3385for as_dir in $PATH
3386do
3387 IFS=$as_save_IFS
3388 test -z "$as_dir" && as_dir=.
3389 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003390 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 +00003391 ac_cv_prog_CXX="$ac_prog"
3392 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3393 break 2
3394 fi
3395done
3396done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003397IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003398
3399fi
3400fi
3401CXX=$ac_cv_prog_CXX
3402if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003403 { echo "$as_me:$LINENO: result: $CXX" >&5
3404echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003405else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003406 { echo "$as_me:$LINENO: result: no" >&5
3407echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003408fi
3409
Martin v. Löwiseba40652007-08-30 20:10:57 +00003410
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003411 test -n "$CXX" && break
3412done
3413test -n "$CXX" || CXX="notfound"
3414
3415 if test "$CXX" = "notfound"
3416 then
3417 CXX=""
3418 fi
3419fi
3420if test "$preset_cxx" != "$CXX"
3421then
3422 { echo "$as_me:$LINENO: WARNING:
3423
3424 By default, distutils will build C++ extension modules with \"$CXX\".
3425 If this is not intended, then set CXX on the configure command line.
3426 " >&5
3427echo "$as_me: WARNING:
3428
3429 By default, distutils will build C++ extension modules with \"$CXX\".
3430 If this is not intended, then set CXX on the configure command line.
3431 " >&2;}
3432fi
3433
3434
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003435# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003436
3437ac_ext=c
3438ac_cpp='$CPP $CPPFLAGS'
3439ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3440ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3441ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003442{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3443echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003444# On Suns, sometimes $CPP names a directory.
3445if test -n "$CPP" && test -d "$CPP"; then
3446 CPP=
3447fi
3448if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003449 if test "${ac_cv_prog_CPP+set}" = set; then
3450 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003451else
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 # Double quotes because CPP needs to be expanded
3453 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3454 do
3455 ac_preproc_ok=false
3456for ac_c_preproc_warn_flag in '' yes
3457do
3458 # Use a header file that comes with gcc, so configuring glibc
3459 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003460 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3461 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003462 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003463 # not just through cpp. "Syntax error" is here to catch this case.
3464 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003465/* confdefs.h. */
3466_ACEOF
3467cat confdefs.h >>conftest.$ac_ext
3468cat >>conftest.$ac_ext <<_ACEOF
3469/* end confdefs.h. */
3470#ifdef __STDC__
3471# include <limits.h>
3472#else
3473# include <assert.h>
3474#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003475 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003476_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003477if { (ac_try="$ac_cpp conftest.$ac_ext"
3478case "(($ac_try" in
3479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3480 *) ac_try_echo=$ac_try;;
3481esac
3482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3483 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003485 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003486 rm -f conftest.er1
3487 cat conftest.err >&5
3488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003489 (exit $ac_status); } >/dev/null && {
3490 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3491 test ! -s conftest.err
3492 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003493 :
3494else
Martin v. Löwis11437992002-04-12 09:54:03 +00003495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003496sed 's/^/| /' conftest.$ac_ext >&5
3497
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 # Broken: fails on valid input.
3499continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003501
Martin v. Löwis11437992002-04-12 09:54:03 +00003502rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003503
Martin v. Löwiseba40652007-08-30 20:10:57 +00003504 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003505 # can be detected and how.
3506 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003507/* confdefs.h. */
3508_ACEOF
3509cat confdefs.h >>conftest.$ac_ext
3510cat >>conftest.$ac_ext <<_ACEOF
3511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003512#include <ac_nonexistent.h>
3513_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003514if { (ac_try="$ac_cpp conftest.$ac_ext"
3515case "(($ac_try" in
3516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3517 *) ac_try_echo=$ac_try;;
3518esac
3519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3520 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003522 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003523 rm -f conftest.er1
3524 cat conftest.err >&5
3525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526 (exit $ac_status); } >/dev/null && {
3527 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3528 test ! -s conftest.err
3529 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 # Broken: success on invalid input.
3531continue
3532else
3533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003534sed 's/^/| /' conftest.$ac_ext >&5
3535
Martin v. Löwis11437992002-04-12 09:54:03 +00003536 # Passes both tests.
3537ac_preproc_ok=:
3538break
3539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003540
Martin v. Löwis11437992002-04-12 09:54:03 +00003541rm -f conftest.err conftest.$ac_ext
3542
3543done
3544# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3545rm -f conftest.err conftest.$ac_ext
3546if $ac_preproc_ok; then
3547 break
3548fi
3549
3550 done
3551 ac_cv_prog_CPP=$CPP
3552
3553fi
3554 CPP=$ac_cv_prog_CPP
3555else
3556 ac_cv_prog_CPP=$CPP
3557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003558{ echo "$as_me:$LINENO: result: $CPP" >&5
3559echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003560ac_preproc_ok=false
3561for ac_c_preproc_warn_flag in '' yes
3562do
3563 # Use a header file that comes with gcc, so configuring glibc
3564 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003565 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3566 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 # On the NeXT, cc -E runs the code through the compiler's parser,
3568 # not just through cpp. "Syntax error" is here to catch this case.
3569 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003570/* confdefs.h. */
3571_ACEOF
3572cat confdefs.h >>conftest.$ac_ext
3573cat >>conftest.$ac_ext <<_ACEOF
3574/* end confdefs.h. */
3575#ifdef __STDC__
3576# include <limits.h>
3577#else
3578# include <assert.h>
3579#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003580 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003581_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003582if { (ac_try="$ac_cpp conftest.$ac_ext"
3583case "(($ac_try" in
3584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3585 *) ac_try_echo=$ac_try;;
3586esac
3587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3588 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003590 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 rm -f conftest.er1
3592 cat conftest.err >&5
3593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594 (exit $ac_status); } >/dev/null && {
3595 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3596 test ! -s conftest.err
3597 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003598 :
3599else
3600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003601sed 's/^/| /' conftest.$ac_ext >&5
3602
Martin v. Löwis11437992002-04-12 09:54:03 +00003603 # Broken: fails on valid input.
3604continue
3605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003606
Martin v. Löwis11437992002-04-12 09:54:03 +00003607rm -f conftest.err conftest.$ac_ext
3608
Martin v. Löwiseba40652007-08-30 20:10:57 +00003609 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 # can be detected and how.
3611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003612/* confdefs.h. */
3613_ACEOF
3614cat confdefs.h >>conftest.$ac_ext
3615cat >>conftest.$ac_ext <<_ACEOF
3616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003617#include <ac_nonexistent.h>
3618_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003619if { (ac_try="$ac_cpp conftest.$ac_ext"
3620case "(($ac_try" in
3621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3622 *) ac_try_echo=$ac_try;;
3623esac
3624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3625 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003627 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 rm -f conftest.er1
3629 cat conftest.err >&5
3630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631 (exit $ac_status); } >/dev/null && {
3632 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3633 test ! -s conftest.err
3634 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 # Broken: success on invalid input.
3636continue
3637else
3638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003639sed 's/^/| /' conftest.$ac_ext >&5
3640
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 # Passes both tests.
3642ac_preproc_ok=:
3643break
3644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646rm -f conftest.err conftest.$ac_ext
3647
3648done
3649# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3650rm -f conftest.err conftest.$ac_ext
3651if $ac_preproc_ok; then
3652 :
3653else
Skip Montanaro6dead952003-09-25 14:50:04 +00003654 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3655See \`config.log' for more details." >&5
3656echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3657See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 { (exit 1); exit 1; }; }
3659fi
3660
3661ac_ext=c
3662ac_cpp='$CPP $CPPFLAGS'
3663ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3664ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3665ac_compiler_gnu=$ac_cv_c_compiler_gnu
3666
3667
Martin v. Löwiseba40652007-08-30 20:10:57 +00003668{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3669echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3670if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003671 echo $ECHO_N "(cached) $ECHO_C" >&6
3672else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003673 # Extract the first word of "grep ggrep" to use in msg output
3674if test -z "$GREP"; then
3675set dummy grep ggrep; ac_prog_name=$2
3676if test "${ac_cv_path_GREP+set}" = set; then
3677 echo $ECHO_N "(cached) $ECHO_C" >&6
3678else
3679 ac_path_GREP_found=false
3680# Loop through the user's path and test for each of PROGNAME-LIST
3681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3682for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3683do
3684 IFS=$as_save_IFS
3685 test -z "$as_dir" && as_dir=.
3686 for ac_prog in grep ggrep; do
3687 for ac_exec_ext in '' $ac_executable_extensions; do
3688 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3689 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3690 # Check for GNU ac_path_GREP and select it if it is found.
3691 # Check for GNU $ac_path_GREP
3692case `"$ac_path_GREP" --version 2>&1` in
3693*GNU*)
3694 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3695*)
3696 ac_count=0
3697 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3698 while :
3699 do
3700 cat "conftest.in" "conftest.in" >"conftest.tmp"
3701 mv "conftest.tmp" "conftest.in"
3702 cp "conftest.in" "conftest.nl"
3703 echo 'GREP' >> "conftest.nl"
3704 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3705 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3706 ac_count=`expr $ac_count + 1`
3707 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3708 # Best one so far, save it but keep looking for a better one
3709 ac_cv_path_GREP="$ac_path_GREP"
3710 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003711 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003712 # 10*(2^10) chars as input seems more than enough
3713 test $ac_count -gt 10 && break
3714 done
3715 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3716esac
3717
3718
3719 $ac_path_GREP_found && break 3
3720 done
3721done
3722
3723done
3724IFS=$as_save_IFS
3725
3726
Skip Montanaro6dead952003-09-25 14:50:04 +00003727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003728
3729GREP="$ac_cv_path_GREP"
3730if test -z "$GREP"; then
3731 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3732echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3733 { (exit 1); exit 1; }; }
3734fi
3735
3736else
3737 ac_cv_path_GREP=$GREP
3738fi
3739
3740
3741fi
3742{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3743echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3744 GREP="$ac_cv_path_GREP"
3745
3746
3747{ echo "$as_me:$LINENO: checking for egrep" >&5
3748echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3749if test "${ac_cv_path_EGREP+set}" = set; then
3750 echo $ECHO_N "(cached) $ECHO_C" >&6
3751else
3752 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3753 then ac_cv_path_EGREP="$GREP -E"
3754 else
3755 # Extract the first word of "egrep" to use in msg output
3756if test -z "$EGREP"; then
3757set dummy egrep; ac_prog_name=$2
3758if test "${ac_cv_path_EGREP+set}" = set; then
3759 echo $ECHO_N "(cached) $ECHO_C" >&6
3760else
3761 ac_path_EGREP_found=false
3762# Loop through the user's path and test for each of PROGNAME-LIST
3763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3764for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3765do
3766 IFS=$as_save_IFS
3767 test -z "$as_dir" && as_dir=.
3768 for ac_prog in egrep; do
3769 for ac_exec_ext in '' $ac_executable_extensions; do
3770 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3771 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3772 # Check for GNU ac_path_EGREP and select it if it is found.
3773 # Check for GNU $ac_path_EGREP
3774case `"$ac_path_EGREP" --version 2>&1` in
3775*GNU*)
3776 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3777*)
3778 ac_count=0
3779 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3780 while :
3781 do
3782 cat "conftest.in" "conftest.in" >"conftest.tmp"
3783 mv "conftest.tmp" "conftest.in"
3784 cp "conftest.in" "conftest.nl"
3785 echo 'EGREP' >> "conftest.nl"
3786 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3787 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3788 ac_count=`expr $ac_count + 1`
3789 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3790 # Best one so far, save it but keep looking for a better one
3791 ac_cv_path_EGREP="$ac_path_EGREP"
3792 ac_path_EGREP_max=$ac_count
3793 fi
3794 # 10*(2^10) chars as input seems more than enough
3795 test $ac_count -gt 10 && break
3796 done
3797 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3798esac
3799
3800
3801 $ac_path_EGREP_found && break 3
3802 done
3803done
3804
3805done
3806IFS=$as_save_IFS
3807
3808
3809fi
3810
3811EGREP="$ac_cv_path_EGREP"
3812if test -z "$EGREP"; then
3813 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3814echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3815 { (exit 1); exit 1; }; }
3816fi
3817
3818else
3819 ac_cv_path_EGREP=$EGREP
3820fi
3821
3822
3823 fi
3824fi
3825{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3826echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3827 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003828
3829
Martin v. Löwis11437992002-04-12 09:54:03 +00003830
Martin v. Löwiseba40652007-08-30 20:10:57 +00003831{ echo "$as_me:$LINENO: checking for AIX" >&5
3832echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003833cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003834/* confdefs.h. */
3835_ACEOF
3836cat confdefs.h >>conftest.$ac_ext
3837cat >>conftest.$ac_ext <<_ACEOF
3838/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003839#ifdef _AIX
3840 yes
3841#endif
3842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003845 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003846 { echo "$as_me:$LINENO: result: yes" >&5
3847echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003849#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003850_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003851
3852else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003853 { echo "$as_me:$LINENO: result: no" >&5
3854echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003855fi
3856rm -f conftest*
3857
Michael W. Hudson54241132001-12-07 15:38:26 +00003858
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003859
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003860# Check for unsupported systems
3861case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003862atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003863 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3864 echo See README for details.
3865 exit 1;;
3866esac
3867
Michael W. Hudson54241132001-12-07 15:38:26 +00003868
Martin v. Löwiseba40652007-08-30 20:10:57 +00003869{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3870echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003871
Martin v. Löwiseba40652007-08-30 20:10:57 +00003872# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003873if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003874 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003875 case $withval in
3876 no) EXEEXT=;;
3877 yes) EXEEXT=.exe;;
3878 *) EXEEXT=$withval;;
3879 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003880fi
3881
3882{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3883echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003884
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003885# Test whether we're running on a non-case-sensitive system, in which
3886# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003887
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3889echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003890if test ! -d CaseSensitiveTestDir; then
3891mkdir CaseSensitiveTestDir
3892fi
3893
3894if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003895then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896 { echo "$as_me:$LINENO: result: yes" >&5
3897echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003898 BUILDEXEEXT=.exe
3899else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003900 { echo "$as_me:$LINENO: result: no" >&5
3901echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003902 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003903fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003904rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003905
Guido van Rossumdd997f71998-10-07 19:58:26 +00003906case $MACHDEP in
3907bsdos*)
3908 case $CC in
3909 gcc) CC="$CC -D_HAVE_BSDI";;
3910 esac;;
3911esac
3912
Guido van Rossum24b1e751997-08-21 02:29:16 +00003913case $ac_sys_system in
3914hp*|HP*)
3915 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003916 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003917 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003918Monterey*)
3919 case $CC in
3920 cc) CC="$CC -Wl,-Bexport";;
3921 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003922SunOS*)
3923 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003924
3925cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003926#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003927_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003928
3929 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003930esac
3931
Michael W. Hudson54241132001-12-07 15:38:26 +00003932
3933
Martin v. Löwiseba40652007-08-30 20:10:57 +00003934{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3935echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003936if test -z "$LIBRARY"
3937then
3938 LIBRARY='libpython$(VERSION).a'
3939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003940{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3941echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003942
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003943# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003944# name of the library into which to insert object files). BLDLIBRARY is also
3945# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3946# is blank as the main program is not linked directly against LDLIBRARY.
3947# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3948# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3949# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3950# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003951#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003952# RUNSHARED is used to run shared python without installed libraries
3953#
3954# INSTSONAME is the name of the shared library that will be use to install
3955# on the system - some systems like version suffix, others don't
3956
3957
Michael W. Hudson54241132001-12-07 15:38:26 +00003958
3959
3960
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003961
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003962LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003963BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003964INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003965DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003966LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003967RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003968
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003969# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003970# If CXX is set, and if it is needed to link a main function that was
3971# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3972# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003973# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003974# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003975
Martin v. Löwiseba40652007-08-30 20:10:57 +00003976{ echo "$as_me:$LINENO: checking LINKCC" >&5
3977echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003978if test -z "$LINKCC"
3979then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003980 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003981 case $ac_sys_system in
3982 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003983 exp_extra="\"\""
3984 if test $ac_sys_release -ge 5 -o \
3985 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3986 exp_extra="."
3987 fi
3988 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003989 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003990 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003991 QNX*)
3992 # qcc must be used because the other compilers do not
3993 # support -N.
3994 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003995 esac
3996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003997{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3998echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003999
Martin v. Löwiseba40652007-08-30 20:10:57 +00004000{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4001echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
4002# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00004003if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004004 enableval=$enable_shared;
4005fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004006
Martin v. Löwis1142de32002-03-29 16:28:31 +00004007
4008if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00004009then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004010 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004011 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004012 enable_shared="yes";;
4013 *)
4014 enable_shared="no";;
4015 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004017{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4018echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004019
Martin v. Löwiseba40652007-08-30 20:10:57 +00004020{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4021echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4022# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004023if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004024 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004025 CC="$CC -pg"
4026 if test "$cross_compiling" = yes; then
4027 ac_enable_profiling="no"
4028else
4029 cat >conftest.$ac_ext <<_ACEOF
4030/* confdefs.h. */
4031_ACEOF
4032cat confdefs.h >>conftest.$ac_ext
4033cat >>conftest.$ac_ext <<_ACEOF
4034/* end confdefs.h. */
4035int main() { return 0; }
4036_ACEOF
4037rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004038if { (ac_try="$ac_link"
4039case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
4043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4044 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004045 ac_status=$?
4046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004048 { (case "(($ac_try" in
4049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4050 *) ac_try_echo=$ac_try;;
4051esac
4052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4053 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004054 ac_status=$?
4055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4056 (exit $ac_status); }; }; then
4057 ac_enable_profiling="yes"
4058else
4059 echo "$as_me: program exited with status $ac_status" >&5
4060echo "$as_me: failed program was:" >&5
4061sed 's/^/| /' conftest.$ac_ext >&5
4062
4063( exit $ac_status )
4064ac_enable_profiling="no"
4065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004066rm -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 +00004067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004068
4069
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004070 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004071fi
4072
4073{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4074echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004075
4076case "$ac_enable_profiling" in
4077 "yes")
4078 BASECFLAGS="-pg $BASECFLAGS"
4079 LDFLAGS="-pg $LDFLAGS"
4080 ;;
4081esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004082
Martin v. Löwiseba40652007-08-30 20:10:57 +00004083{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4084echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004085
Guido van Rossumb8552162001-09-05 14:58:11 +00004086# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4087# library that we build, but we do not want to link against it (we
4088# will find it with a -framework option). For this reason there is an
4089# extra variable BLDLIBRARY against which Python and the extension
4090# modules are linked, BLDLIBRARY. This is normally the same as
4091# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004092if test "$enable_framework"
4093then
4094 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004095 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004096 BLDLIBRARY=''
4097else
4098 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004099fi
Jack Jansene578a632001-08-15 01:27:14 +00004100
Martin v. Löwis1142de32002-03-29 16:28:31 +00004101# Other platforms follow
4102if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004103
4104cat >>confdefs.h <<\_ACEOF
4105#define Py_ENABLE_SHARED 1
4106_ACEOF
4107
Martin v. Löwis1142de32002-03-29 16:28:31 +00004108 case $ac_sys_system in
4109 BeOS*)
4110 LDLIBRARY='libpython$(VERSION).so'
4111 ;;
4112 CYGWIN*)
4113 LDLIBRARY='libpython$(VERSION).dll.a'
4114 DLLLIBRARY='libpython$(VERSION).dll'
4115 ;;
4116 SunOS*)
4117 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004118 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004119 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004120 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004121 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004122 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004123 LDLIBRARY='libpython$(VERSION).so'
4124 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004125 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004126 case $ac_sys_system in
4127 FreeBSD*)
4128 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4129 ;;
4130 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004131 INSTSONAME="$LDLIBRARY".$SOVERSION
4132 ;;
4133 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004134 case `uname -m` in
4135 ia64)
4136 LDLIBRARY='libpython$(VERSION).so'
4137 ;;
4138 *)
4139 LDLIBRARY='libpython$(VERSION).sl'
4140 ;;
4141 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004142 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004143 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004144 ;;
4145 OSF*)
4146 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004147 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004148 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004149 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004150 atheos*)
4151 LDLIBRARY='libpython$(VERSION).so'
4152 BLDLIBRARY='-L. -lpython$(VERSION)'
4153 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4154 ;;
Ronald Oussoren79f90492009-01-02 10:44:46 +00004155 Darwin*)
4156 LDLIBRARY='libpython$(VERSION).dylib'
4157 BLDLIBRARY='-L. -lpython$(VERSION)'
4158 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4159 ;;
4160
Martin v. Löwis1142de32002-03-29 16:28:31 +00004161 esac
Jason Tishler30765592003-09-04 11:04:06 +00004162else # shared is disabled
4163 case $ac_sys_system in
4164 CYGWIN*)
4165 BLDLIBRARY='$(LIBRARY)'
4166 LDLIBRARY='libpython$(VERSION).dll.a'
4167 ;;
4168 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004169fi
4170
Martin v. Löwiseba40652007-08-30 20:10:57 +00004171{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4172echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004173
Martin v. Löwis11437992002-04-12 09:54:03 +00004174if test -n "$ac_tool_prefix"; then
4175 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4176set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004177{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4178echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004179if test "${ac_cv_prog_RANLIB+set}" = set; then
4180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004181else
4182 if test -n "$RANLIB"; then
4183 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4184else
Martin v. Löwis11437992002-04-12 09:54:03 +00004185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4186for as_dir in $PATH
4187do
4188 IFS=$as_save_IFS
4189 test -z "$as_dir" && as_dir=.
4190 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004191 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 +00004192 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4193 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4194 break 2
4195 fi
4196done
4197done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004198IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004199
Guido van Rossum627b2d71993-12-24 10:39:16 +00004200fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004201fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004202RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004204 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4205echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004207 { echo "$as_me:$LINENO: result: no" >&5
4208echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004209fi
4210
Martin v. Löwiseba40652007-08-30 20:10:57 +00004211
Martin v. Löwis11437992002-04-12 09:54:03 +00004212fi
4213if test -z "$ac_cv_prog_RANLIB"; then
4214 ac_ct_RANLIB=$RANLIB
4215 # Extract the first word of "ranlib", so it can be a program name with args.
4216set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004217{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4218echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004219if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4220 echo $ECHO_N "(cached) $ECHO_C" >&6
4221else
4222 if test -n "$ac_ct_RANLIB"; then
4223 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4224else
4225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4226for as_dir in $PATH
4227do
4228 IFS=$as_save_IFS
4229 test -z "$as_dir" && as_dir=.
4230 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004231 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 +00004232 ac_cv_prog_ac_ct_RANLIB="ranlib"
4233 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4234 break 2
4235 fi
4236done
4237done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004239
Martin v. Löwis11437992002-04-12 09:54:03 +00004240fi
4241fi
4242ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4243if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004244 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4245echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004246else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004247 { echo "$as_me:$LINENO: result: no" >&5
4248echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004249fi
4250
Martin v. Löwiseba40652007-08-30 20:10:57 +00004251 if test "x$ac_ct_RANLIB" = x; then
4252 RANLIB=":"
4253 else
4254 case $cross_compiling:$ac_tool_warned in
4255yes:)
4256{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4257whose name does not start with the host triplet. If you think this
4258configuration is useful to you, please write to autoconf@gnu.org." >&5
4259echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4260whose name does not start with the host triplet. If you think this
4261configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4262ac_tool_warned=yes ;;
4263esac
4264 RANLIB=$ac_ct_RANLIB
4265 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004266else
4267 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004269
4270
Guido van Rossum7f43da71994-08-01 12:15:30 +00004271for ac_prog in ar aal
4272do
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004275{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4276echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004277if test "${ac_cv_prog_AR+set}" = set; then
4278 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004279else
4280 if test -n "$AR"; then
4281 ac_cv_prog_AR="$AR" # Let the user override the test.
4282else
Martin v. Löwis11437992002-04-12 09:54:03 +00004283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4284for as_dir in $PATH
4285do
4286 IFS=$as_save_IFS
4287 test -z "$as_dir" && as_dir=.
4288 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004289 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 +00004290 ac_cv_prog_AR="$ac_prog"
4291 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4292 break 2
4293 fi
4294done
4295done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004296IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004297
Guido van Rossum7f43da71994-08-01 12:15:30 +00004298fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004299fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004300AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004301if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004302 { echo "$as_me:$LINENO: result: $AR" >&5
4303echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004305 { echo "$as_me:$LINENO: result: no" >&5
4306echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004307fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004308
Martin v. Löwiseba40652007-08-30 20:10:57 +00004309
Martin v. Löwis11437992002-04-12 09:54:03 +00004310 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004311done
4312test -n "$AR" || AR="ar"
4313
Michael W. Hudson54241132001-12-07 15:38:26 +00004314
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004315
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004316# Extract the first word of "svnversion", so it can be a program name with args.
4317set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004318{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4319echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004320if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4321 echo $ECHO_N "(cached) $ECHO_C" >&6
4322else
4323 if test -n "$SVNVERSION"; then
4324 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4325else
4326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4327for as_dir in $PATH
4328do
4329 IFS=$as_save_IFS
4330 test -z "$as_dir" && as_dir=.
4331 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004332 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 +00004333 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004334 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4335 break 2
4336 fi
4337done
4338done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004339IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004340
Martin v. Löwisff600232006-04-03 19:12:32 +00004341 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004342fi
4343fi
4344SVNVERSION=$ac_cv_prog_SVNVERSION
4345if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004346 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4347echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004348else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004349 { echo "$as_me:$LINENO: result: no" >&5
4350echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004351fi
4352
Martin v. Löwiseba40652007-08-30 20:10:57 +00004353
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004354if test $SVNVERSION = found
4355then
4356 SVNVERSION="svnversion \$(srcdir)"
4357else
4358 SVNVERSION="echo exported"
4359fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004360
Neil Schemenauera42c8272001-03-31 00:01:55 +00004361case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004362bsdos*|hp*|HP*)
4363 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004364 if test -z "$INSTALL"
4365 then
4366 INSTALL="${srcdir}/install-sh -c"
4367 fi
4368esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004369ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004370for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4371 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004372 ac_aux_dir=$ac_dir
4373 ac_install_sh="$ac_aux_dir/install-sh -c"
4374 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004375 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004376 ac_aux_dir=$ac_dir
4377 ac_install_sh="$ac_aux_dir/install.sh -c"
4378 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004379 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004380 ac_aux_dir=$ac_dir
4381 ac_install_sh="$ac_aux_dir/shtool install -c"
4382 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004383 fi
4384done
4385if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004386 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4387echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004388 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004390
4391# These three variables are undocumented and unsupported,
4392# and are intended to be withdrawn in a future Autoconf release.
4393# They can cause serious problems if a builder's source tree is in a directory
4394# whose full name contains unusual characters.
4395ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4396ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4397ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4398
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004399
4400# Find a good install program. We prefer a C program (faster),
4401# so one script is as good as another. But avoid the broken or
4402# incompatible versions:
4403# SysV /etc/install, /usr/sbin/install
4404# SunOS /usr/etc/install
4405# IRIX /sbin/install
4406# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004407# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004408# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4409# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4410# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004411# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004412# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004413{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4414echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004415if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004416if test "${ac_cv_path_install+set}" = set; then
4417 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004418else
Martin v. Löwis11437992002-04-12 09:54:03 +00004419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4420for as_dir in $PATH
4421do
4422 IFS=$as_save_IFS
4423 test -z "$as_dir" && as_dir=.
4424 # Account for people who put trailing slashes in PATH elements.
4425case $as_dir/ in
4426 ./ | .// | /cC/* | \
4427 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004428 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004429 /usr/ucb/* ) ;;
4430 *)
4431 # OSF1 and SCO ODT 3.0 have their own names for install.
4432 # Don't use installbsd from OSF since it installs stuff as root
4433 # by default.
4434 for ac_prog in ginstall scoinst install; do
4435 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004436 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 +00004437 if test $ac_prog = install &&
4438 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4439 # AIX install. It has an incompatible calling convention.
4440 :
4441 elif test $ac_prog = install &&
4442 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4443 # program-specific install script used by HP pwplus--don't use.
4444 :
4445 else
4446 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4447 break 3
4448 fi
4449 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004450 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004451 done
4452 ;;
4453esac
4454done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004456
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004457
4458fi
4459 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004460 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004461 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004462 # As a last resort, use the slow shell script. Don't cache a
4463 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004464 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004465 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004466 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004467 fi
4468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004469{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4470echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004471
4472# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4473# It thinks the first close brace ends the variable substitution.
4474test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4475
Martin v. Löwis11437992002-04-12 09:54:03 +00004476test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004477
4478test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4479
Michael W. Hudson54241132001-12-07 15:38:26 +00004480
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004481# Not every filesystem supports hard links
4482
4483if test -z "$LN" ; then
4484 case $ac_sys_system in
4485 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004486 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004487 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004488 *) LN=ln;;
4489 esac
4490fi
4491
Fred Drake109d9862001-07-11 06:27:56 +00004492# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004493{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4494echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004495
Martin v. Löwiseba40652007-08-30 20:10:57 +00004496# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004497if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004498 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004499if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004500then
4501
4502cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004503#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004504_ACEOF
4505
Martin v. Löwiseba40652007-08-30 20:10:57 +00004506 { echo "$as_me:$LINENO: result: yes" >&5
4507echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004508 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004509else { echo "$as_me:$LINENO: result: no" >&5
4510echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004511fi
4512else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004513 { echo "$as_me:$LINENO: result: no" >&5
4514echo "${ECHO_T}no" >&6; }
4515fi
4516
Fred Drake109d9862001-07-11 06:27:56 +00004517
Skip Montanarodecc6a42003-01-01 20:07:49 +00004518# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4519# merged with this chunk of code?
4520
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004521# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004522# ------------------------
4523# (The following bit of code is complicated enough - please keep things
4524# indented properly. Just pretend you're editing Python code. ;-)
4525
4526# There are two parallel sets of case statements below, one that checks to
4527# see if OPT was set and one that does BASECFLAGS setting based upon
4528# compiler and platform. BASECFLAGS tweaks need to be made even if the
4529# user set OPT.
4530
4531# tweak OPT based on compiler and platform, only if the user didn't set
4532# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004533
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004534if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004535then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004536 case $GCC in
4537 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004538 if test "$CC" != 'g++' ; then
4539 STRICT_PROTO="-Wstrict-prototypes"
4540 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004541 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4542 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4543 WRAP="-fwrapv"
4544 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004545 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004546 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004547 if test "$Py_DEBUG" = 'true' ; then
4548 # Optimization messes up debuggers, so turn it off for
4549 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004550 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004551 else
Thomas Hellere5529592007-12-13 21:20:29 +00004552 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004553 fi
4554 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004555 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004556 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004557 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004558 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004559 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004560 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4561 ;;
4562 esac
Fred Drake109d9862001-07-11 06:27:56 +00004563 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004564
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004565 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004566 OPT="-O"
4567 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004568 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004569
4570 # The current (beta) Monterey compiler dies with optimizations
4571 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004572 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004573 Monterey*)
4574 OPT=""
4575 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004576 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004577
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004578fi
4579
Skip Montanarodecc6a42003-01-01 20:07:49 +00004580
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004581
4582# The -arch flags for universal builds on OSX
4583UNIVERSAL_ARCH_FLAGS=
4584
4585
Skip Montanarodecc6a42003-01-01 20:07:49 +00004586# tweak BASECFLAGS based on compiler and platform
4587case $GCC in
4588yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004589 # Python violates C99 rules, by casting between incompatible
4590 # pointer types. GCC may generate bad code as a result of that,
4591 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004592 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4593echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004594 ac_save_cc="$CC"
4595 CC="$CC -fno-strict-aliasing"
4596 if test "$cross_compiling" = yes; then
4597 ac_cv_no_strict_aliasing_ok=no
4598else
4599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004600/* confdefs.h. */
4601_ACEOF
4602cat confdefs.h >>conftest.$ac_ext
4603cat >>conftest.$ac_ext <<_ACEOF
4604/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004605int main() { return 0; }
4606_ACEOF
4607rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004608if { (ac_try="$ac_link"
4609case "(($ac_try" in
4610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4611 *) ac_try_echo=$ac_try;;
4612esac
4613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4614 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004615 ac_status=$?
4616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004618 { (case "(($ac_try" in
4619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4620 *) ac_try_echo=$ac_try;;
4621esac
4622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4623 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004624 ac_status=$?
4625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4626 (exit $ac_status); }; }; then
4627 ac_cv_no_strict_aliasing_ok=yes
4628else
4629 echo "$as_me: program exited with status $ac_status" >&5
4630echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004631sed 's/^/| /' conftest.$ac_ext >&5
4632
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004633( exit $ac_status )
4634ac_cv_no_strict_aliasing_ok=no
4635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004636rm -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 +00004637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004638
4639
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004640 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004641 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4642echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004643 if test $ac_cv_no_strict_aliasing_ok = yes
4644 then
4645 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4646 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004647
4648 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4649 # support. Without this, treatment of subnormals doesn't follow
4650 # the standard.
4651 case $ac_sys_machine in
4652 alpha*)
4653 BASECFLAGS="$BASECFLAGS -mieee"
4654 ;;
4655 esac
4656
Skip Montanarodecc6a42003-01-01 20:07:49 +00004657 case $ac_sys_system in
4658 SCO_SV*)
4659 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4660 ;;
4661 # is there any other compiler on Darwin besides gcc?
4662 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004663 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4664 # used to be here, but non-Apple gcc doesn't accept them.
Benjamin Peterson4347c442008-07-17 15:59:24 +00004665
4666
Ronald Oussoren988117f2006-04-29 11:31:35 +00004667 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004668 UNIVERSAL_ARCH_FLAGS=""
4669 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4670 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004671 ARCH_RUN_32BIT=""
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004672
4673 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4674 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4675
4676 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4677 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorena4cb4722008-08-12 12:29:13 +00004678 ARCH_RUN_32BIT="arch -i386 -ppc"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004679
4680 else
4681 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4682echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
4683 { (exit 1); exit 1; }; }
4684
4685 fi
4686
4687
4688 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren5a849d42008-07-22 07:06:00 +00004689 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Benjamin Peterson4347c442008-07-17 15:59:24 +00004690 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4691 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4692 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00004693 fi
4694
Benjamin Peterson4347c442008-07-17 15:59:24 +00004695 # Calculate the right deployment target for this build.
4696 #
4697 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4698 if test ${cur_target} '>' 10.2; then
4699 cur_target=10.3
4700 fi
4701 if test "${UNIVERSAL_ARCHS}" = "all"; then
4702 # Ensure that the default platform for a 4-way
4703 # universal build is OSX 10.5, that's the first
4704 # OS release where 4-way builds make sense.
4705 cur_target='10.5'
4706 fi
4707 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4708
4709 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4710 # environment with a value that is the same as what we'll use
4711 # in the Makefile to ensure that we'll get the same compiler
4712 # environment during configure and build time.
4713 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4714 export MACOSX_DEPLOYMENT_TARGET
4715 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4716
Skip Montanarodecc6a42003-01-01 20:07:49 +00004717 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004718 OSF*)
4719 BASECFLAGS="$BASECFLAGS -mieee"
4720 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004721 esac
4722 ;;
4723
4724*)
4725 case $ac_sys_system in
4726 OpenUNIX*|UnixWare*)
4727 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4728 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004729 OSF*)
4730 BASECFLAGS="$BASECFLAGS -ieee -std"
4731 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004732 SCO_SV*)
4733 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4734 ;;
4735 esac
4736 ;;
4737esac
4738
Fred Drakee1ceaa02001-12-04 20:55:47 +00004739if test "$Py_DEBUG" = 'true'; then
4740 :
4741else
4742 OPT="-DNDEBUG $OPT"
4743fi
4744
Guido van Rossum563e7081996-09-10 18:20:48 +00004745if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004746then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004747 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004748fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004749
Neal Norwitz020c46a2006-01-07 21:39:28 +00004750# disable check for icc since it seems to pass, but generates a warning
4751if test "$CC" = icc
4752then
4753 ac_cv_opt_olimit_ok=no
4754fi
4755
Martin v. Löwiseba40652007-08-30 20:10:57 +00004756{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4757echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004758if test "${ac_cv_opt_olimit_ok+set}" = set; then
4759 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004760else
4761 ac_save_cc="$CC"
4762CC="$CC -OPT:Olimit=0"
4763if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004764 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004765else
Martin v. Löwis11437992002-04-12 09:54:03 +00004766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004767/* confdefs.h. */
4768_ACEOF
4769cat confdefs.h >>conftest.$ac_ext
4770cat >>conftest.$ac_ext <<_ACEOF
4771/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004772int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004773_ACEOF
4774rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004775if { (ac_try="$ac_link"
4776case "(($ac_try" in
4777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4778 *) ac_try_echo=$ac_try;;
4779esac
4780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4781 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004782 ac_status=$?
4783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4784 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004785 { (case "(($ac_try" in
4786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4787 *) ac_try_echo=$ac_try;;
4788esac
4789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4790 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004791 ac_status=$?
4792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4793 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004794 ac_cv_opt_olimit_ok=yes
4795else
Martin v. Löwis11437992002-04-12 09:54:03 +00004796 echo "$as_me: program exited with status $ac_status" >&5
4797echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004798sed 's/^/| /' conftest.$ac_ext >&5
4799
Martin v. Löwis11437992002-04-12 09:54:03 +00004800( exit $ac_status )
4801ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004803rm -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 +00004804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004805
4806
Guido van Rossum91922671997-10-09 20:24:13 +00004807CC="$ac_save_cc"
4808fi
4809
Martin v. Löwiseba40652007-08-30 20:10:57 +00004810{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4811echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004812if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004813 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004814 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4815 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4816 # environment?
4817 Darwin*)
4818 ;;
4819 *)
4820 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4821 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004822 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004823else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004824 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4825echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004826 if test "${ac_cv_olimit_ok+set}" = set; then
4827 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004828else
4829 ac_save_cc="$CC"
4830 CC="$CC -Olimit 1500"
4831 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004832 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004833else
Martin v. Löwis11437992002-04-12 09:54:03 +00004834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004835/* confdefs.h. */
4836_ACEOF
4837cat confdefs.h >>conftest.$ac_ext
4838cat >>conftest.$ac_ext <<_ACEOF
4839/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004840int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004841_ACEOF
4842rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004843if { (ac_try="$ac_link"
4844case "(($ac_try" in
4845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4846 *) ac_try_echo=$ac_try;;
4847esac
4848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4849 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004850 ac_status=$?
4851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4852 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004853 { (case "(($ac_try" in
4854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4855 *) ac_try_echo=$ac_try;;
4856esac
4857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4858 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004859 ac_status=$?
4860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4861 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004862 ac_cv_olimit_ok=yes
4863else
Martin v. Löwis11437992002-04-12 09:54:03 +00004864 echo "$as_me: program exited with status $ac_status" >&5
4865echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004866sed 's/^/| /' conftest.$ac_ext >&5
4867
Martin v. Löwis11437992002-04-12 09:54:03 +00004868( exit $ac_status )
4869ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004871rm -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 +00004872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004873
4874
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004875 CC="$ac_save_cc"
4876fi
4877
Martin v. Löwiseba40652007-08-30 20:10:57 +00004878 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4879echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004880 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004881 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004882 fi
4883fi
4884
Martin v. Löwisaac13162006-10-19 10:58:46 +00004885# Check whether GCC supports PyArg_ParseTuple format
4886if test "$GCC" = "yes"
4887then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004888 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4889echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004890 save_CFLAGS=$CFLAGS
4891 CFLAGS="$CFLAGS -Werror"
4892 cat >conftest.$ac_ext <<_ACEOF
4893/* confdefs.h. */
4894_ACEOF
4895cat confdefs.h >>conftest.$ac_ext
4896cat >>conftest.$ac_ext <<_ACEOF
4897/* end confdefs.h. */
4898
4899 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4900
4901int
4902main ()
4903{
4904
4905 ;
4906 return 0;
4907}
4908_ACEOF
4909rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004910if { (ac_try="$ac_compile"
4911case "(($ac_try" in
4912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4913 *) ac_try_echo=$ac_try;;
4914esac
4915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004917 ac_status=$?
4918 grep -v '^ *+' conftest.er1 >conftest.err
4919 rm -f conftest.er1
4920 cat conftest.err >&5
4921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922 (exit $ac_status); } && {
4923 test -z "$ac_c_werror_flag" ||
4924 test ! -s conftest.err
4925 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004926
4927cat >>confdefs.h <<\_ACEOF
4928#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4929_ACEOF
4930
Martin v. Löwiseba40652007-08-30 20:10:57 +00004931 { echo "$as_me:$LINENO: result: yes" >&5
4932echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004933else
4934 echo "$as_me: failed program was:" >&5
4935sed 's/^/| /' conftest.$ac_ext >&5
4936
Martin v. Löwiseba40652007-08-30 20:10:57 +00004937 { echo "$as_me:$LINENO: result: no" >&5
4938echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004939
4940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004941
4942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004943 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004944fi
4945
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004946# On some compilers, pthreads are available without further options
4947# (e.g. MacOS X). On some of these systems, the compiler will not
4948# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4949# So we have to see first whether pthreads are available without
4950# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004951{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4952echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004953if test "${ac_cv_pthread_is_default+set}" = set; then
4954 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004955else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004956 if test "$cross_compiling" = yes; then
4957 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004958else
Martin v. Löwis11437992002-04-12 09:54:03 +00004959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004960/* confdefs.h. */
4961_ACEOF
4962cat confdefs.h >>conftest.$ac_ext
4963cat >>conftest.$ac_ext <<_ACEOF
4964/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004965
Martin v. Löwis130fb172001-07-19 11:00:41 +00004966#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004967
4968void* routine(void* p){return NULL;}
4969
4970int main(){
4971 pthread_t p;
4972 if(pthread_create(&p,NULL,routine,NULL)!=0)
4973 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004974 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004975 return 0;
4976}
4977
Martin v. Löwis11437992002-04-12 09:54:03 +00004978_ACEOF
4979rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004980if { (ac_try="$ac_link"
4981case "(($ac_try" in
4982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4983 *) ac_try_echo=$ac_try;;
4984esac
4985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4986 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004987 ac_status=$?
4988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4989 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004990 { (case "(($ac_try" in
4991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4992 *) ac_try_echo=$ac_try;;
4993esac
4994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4995 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004996 ac_status=$?
4997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4998 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004999
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005000 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00005001 ac_cv_kthread=no
5002 ac_cv_pthread=no
5003
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005004else
Martin v. Löwis11437992002-04-12 09:54:03 +00005005 echo "$as_me: program exited with status $ac_status" >&5
5006echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005007sed 's/^/| /' conftest.$ac_ext >&5
5008
Martin v. Löwis11437992002-04-12 09:54:03 +00005009( exit $ac_status )
5010ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005012rm -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 +00005013fi
5014
Martin v. Löwiseba40652007-08-30 20:10:57 +00005015
5016
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005017fi
5018
Martin v. Löwiseba40652007-08-30 20:10:57 +00005019{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5020echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005021
Michael W. Hudson54241132001-12-07 15:38:26 +00005022
Martin v. Löwis11437992002-04-12 09:54:03 +00005023if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005024then
5025 ac_cv_kpthread=no
5026else
5027# -Kpthread, if available, provides the right #defines
5028# and linker options to make pthread_create available
5029# Some compilers won't report that they do not support -Kpthread,
5030# so we need to run a program to see whether it really made the
5031# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005032{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5033echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005034if test "${ac_cv_kpthread+set}" = set; then
5035 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005036else
5037 ac_save_cc="$CC"
5038CC="$CC -Kpthread"
5039if test "$cross_compiling" = yes; then
5040 ac_cv_kpthread=no
5041else
Martin v. Löwis11437992002-04-12 09:54:03 +00005042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005043/* confdefs.h. */
5044_ACEOF
5045cat confdefs.h >>conftest.$ac_ext
5046cat >>conftest.$ac_ext <<_ACEOF
5047/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005048
5049#include <pthread.h>
5050
5051void* routine(void* p){return NULL;}
5052
5053int main(){
5054 pthread_t p;
5055 if(pthread_create(&p,NULL,routine,NULL)!=0)
5056 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005057 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005058 return 0;
5059}
5060
Martin v. Löwis11437992002-04-12 09:54:03 +00005061_ACEOF
5062rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005063if { (ac_try="$ac_link"
5064case "(($ac_try" in
5065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5066 *) ac_try_echo=$ac_try;;
5067esac
5068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5069 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005070 ac_status=$?
5071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005073 { (case "(($ac_try" in
5074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5075 *) ac_try_echo=$ac_try;;
5076esac
5077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5078 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005079 ac_status=$?
5080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5081 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005082 ac_cv_kpthread=yes
5083else
Martin v. Löwis11437992002-04-12 09:54:03 +00005084 echo "$as_me: program exited with status $ac_status" >&5
5085echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005086sed 's/^/| /' conftest.$ac_ext >&5
5087
Martin v. Löwis11437992002-04-12 09:54:03 +00005088( exit $ac_status )
5089ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005091rm -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 +00005092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005093
5094
Martin v. Löwis130fb172001-07-19 11:00:41 +00005095CC="$ac_save_cc"
5096fi
5097
Martin v. Löwiseba40652007-08-30 20:10:57 +00005098{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5099echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005100fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005101
Skip Montanarod8d39a02003-07-10 20:44:10 +00005102if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005103then
5104# -Kthread, if available, provides the right #defines
5105# and linker options to make pthread_create available
5106# Some compilers won't report that they do not support -Kthread,
5107# so we need to run a program to see whether it really made the
5108# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005109{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5110echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005111if test "${ac_cv_kthread+set}" = set; then
5112 echo $ECHO_N "(cached) $ECHO_C" >&6
5113else
5114 ac_save_cc="$CC"
5115CC="$CC -Kthread"
5116if test "$cross_compiling" = yes; then
5117 ac_cv_kthread=no
5118else
5119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005120/* confdefs.h. */
5121_ACEOF
5122cat confdefs.h >>conftest.$ac_ext
5123cat >>conftest.$ac_ext <<_ACEOF
5124/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005125
5126#include <pthread.h>
5127
5128void* routine(void* p){return NULL;}
5129
5130int main(){
5131 pthread_t p;
5132 if(pthread_create(&p,NULL,routine,NULL)!=0)
5133 return 1;
5134 (void)pthread_detach(p);
5135 return 0;
5136}
5137
5138_ACEOF
5139rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005140if { (ac_try="$ac_link"
5141case "(($ac_try" in
5142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5143 *) ac_try_echo=$ac_try;;
5144esac
5145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5146 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005147 ac_status=$?
5148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5149 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005150 { (case "(($ac_try" in
5151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5152 *) ac_try_echo=$ac_try;;
5153esac
5154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5155 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005156 ac_status=$?
5157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5158 (exit $ac_status); }; }; then
5159 ac_cv_kthread=yes
5160else
5161 echo "$as_me: program exited with status $ac_status" >&5
5162echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005163sed 's/^/| /' conftest.$ac_ext >&5
5164
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005165( exit $ac_status )
5166ac_cv_kthread=no
5167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005168rm -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 +00005169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005170
5171
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005172CC="$ac_save_cc"
5173fi
5174
Martin v. Löwiseba40652007-08-30 20:10:57 +00005175{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5176echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005177fi
5178
Skip Montanarod8d39a02003-07-10 20:44:10 +00005179if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005180then
5181# -pthread, if available, provides the right #defines
5182# and linker options to make pthread_create available
5183# Some compilers won't report that they do not support -pthread,
5184# so we need to run a program to see whether it really made the
5185# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005186{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5187echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005188if test "${ac_cv_thread+set}" = set; then
5189 echo $ECHO_N "(cached) $ECHO_C" >&6
5190else
5191 ac_save_cc="$CC"
5192CC="$CC -pthread"
5193if test "$cross_compiling" = yes; then
5194 ac_cv_pthread=no
5195else
5196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005197/* confdefs.h. */
5198_ACEOF
5199cat confdefs.h >>conftest.$ac_ext
5200cat >>conftest.$ac_ext <<_ACEOF
5201/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005202
5203#include <pthread.h>
5204
5205void* routine(void* p){return NULL;}
5206
5207int main(){
5208 pthread_t p;
5209 if(pthread_create(&p,NULL,routine,NULL)!=0)
5210 return 1;
5211 (void)pthread_detach(p);
5212 return 0;
5213}
5214
5215_ACEOF
5216rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005217if { (ac_try="$ac_link"
5218case "(($ac_try" in
5219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5220 *) ac_try_echo=$ac_try;;
5221esac
5222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5223 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005224 ac_status=$?
5225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5226 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005227 { (case "(($ac_try" in
5228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5229 *) ac_try_echo=$ac_try;;
5230esac
5231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5232 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005233 ac_status=$?
5234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5235 (exit $ac_status); }; }; then
5236 ac_cv_pthread=yes
5237else
5238 echo "$as_me: program exited with status $ac_status" >&5
5239echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005240sed 's/^/| /' conftest.$ac_ext >&5
5241
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005242( exit $ac_status )
5243ac_cv_pthread=no
5244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005245rm -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 +00005246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005247
5248
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005249CC="$ac_save_cc"
5250fi
5251
Martin v. Löwiseba40652007-08-30 20:10:57 +00005252{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5253echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005254fi
5255
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005256# If we have set a CC compiler flag for thread support then
5257# check if it works for CXX, too.
5258ac_cv_cxx_thread=no
5259if test ! -z "$CXX"
5260then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005261{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5262echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005263ac_save_cxx="$CXX"
5264
5265if test "$ac_cv_kpthread" = "yes"
5266then
5267 CXX="$CXX -Kpthread"
5268 ac_cv_cxx_thread=yes
5269elif test "$ac_cv_kthread" = "yes"
5270then
5271 CXX="$CXX -Kthread"
5272 ac_cv_cxx_thread=yes
5273elif test "$ac_cv_pthread" = "yes"
5274then
5275 CXX="$CXX -pthread"
5276 ac_cv_cxx_thread=yes
5277fi
5278
5279if test $ac_cv_cxx_thread = yes
5280then
5281 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5282 $CXX -c conftest.$ac_ext 2>&5
5283 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5284 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5285 then
5286 ac_cv_cxx_thread=yes
5287 else
5288 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005289 fi
5290 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005292{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5293echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005294fi
5295CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005296
Michael W. Hudson54241132001-12-07 15:38:26 +00005297
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005298# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005299{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5300echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005301if test "${ac_cv_header_stdc+set}" = set; then
5302 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005303else
Martin v. Löwis11437992002-04-12 09:54:03 +00005304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005305/* confdefs.h. */
5306_ACEOF
5307cat confdefs.h >>conftest.$ac_ext
5308cat >>conftest.$ac_ext <<_ACEOF
5309/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005310#include <stdlib.h>
5311#include <stdarg.h>
5312#include <string.h>
5313#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005314
Skip Montanaro6dead952003-09-25 14:50:04 +00005315int
5316main ()
5317{
5318
5319 ;
5320 return 0;
5321}
Martin v. Löwis11437992002-04-12 09:54:03 +00005322_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005323rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005324if { (ac_try="$ac_compile"
5325case "(($ac_try" in
5326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5327 *) ac_try_echo=$ac_try;;
5328esac
5329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005332 grep -v '^ *+' conftest.er1 >conftest.err
5333 rm -f conftest.er1
5334 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005336 (exit $ac_status); } && {
5337 test -z "$ac_c_werror_flag" ||
5338 test ! -s conftest.err
5339 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005340 ac_cv_header_stdc=yes
5341else
Martin v. Löwis11437992002-04-12 09:54:03 +00005342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005343sed 's/^/| /' conftest.$ac_ext >&5
5344
Martin v. Löwiseba40652007-08-30 20:10:57 +00005345 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005347
5348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005349
5350if test $ac_cv_header_stdc = yes; then
5351 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005353/* confdefs.h. */
5354_ACEOF
5355cat confdefs.h >>conftest.$ac_ext
5356cat >>conftest.$ac_ext <<_ACEOF
5357/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005358#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005359
5360_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005362 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005363 :
5364else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005365 ac_cv_header_stdc=no
5366fi
5367rm -f conftest*
5368
5369fi
5370
5371if test $ac_cv_header_stdc = yes; then
5372 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005373 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005374/* confdefs.h. */
5375_ACEOF
5376cat confdefs.h >>conftest.$ac_ext
5377cat >>conftest.$ac_ext <<_ACEOF
5378/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005379#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005380
5381_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005383 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005384 :
5385else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005386 ac_cv_header_stdc=no
5387fi
5388rm -f conftest*
5389
5390fi
5391
5392if test $ac_cv_header_stdc = yes; then
5393 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005394 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005395 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005396else
Martin v. Löwis11437992002-04-12 09:54:03 +00005397 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005398/* confdefs.h. */
5399_ACEOF
5400cat confdefs.h >>conftest.$ac_ext
5401cat >>conftest.$ac_ext <<_ACEOF
5402/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005403#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005404#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005405#if ((' ' & 0x0FF) == 0x020)
5406# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5407# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5408#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005409# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005410 (('a' <= (c) && (c) <= 'i') \
5411 || ('j' <= (c) && (c) <= 'r') \
5412 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005413# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5414#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005415
Martin v. Löwis11437992002-04-12 09:54:03 +00005416#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5417int
5418main ()
5419{
5420 int i;
5421 for (i = 0; i < 256; i++)
5422 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005423 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005424 return 2;
5425 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005426}
5427_ACEOF
5428rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005429if { (ac_try="$ac_link"
5430case "(($ac_try" in
5431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5432 *) ac_try_echo=$ac_try;;
5433esac
5434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5435 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005436 ac_status=$?
5437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5438 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005439 { (case "(($ac_try" in
5440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5441 *) ac_try_echo=$ac_try;;
5442esac
5443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5444 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005445 ac_status=$?
5446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5447 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005448 :
5449else
Martin v. Löwis11437992002-04-12 09:54:03 +00005450 echo "$as_me: program exited with status $ac_status" >&5
5451echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005452sed 's/^/| /' conftest.$ac_ext >&5
5453
Martin v. Löwis11437992002-04-12 09:54:03 +00005454( exit $ac_status )
5455ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005457rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5458fi
5459
5460
Michael W. Hudson54241132001-12-07 15:38:26 +00005461fi
5462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005463{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5464echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005465if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005466
5467cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005468#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005469_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005470
5471fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005472
Skip Montanarob9820a32004-01-17 00:16:12 +00005473# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005484 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005485do
5486as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005487{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5488echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5489if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005490 echo $ECHO_N "(cached) $ECHO_C" >&6
5491else
5492 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005493/* confdefs.h. */
5494_ACEOF
5495cat confdefs.h >>conftest.$ac_ext
5496cat >>conftest.$ac_ext <<_ACEOF
5497/* end confdefs.h. */
5498$ac_includes_default
5499
5500#include <$ac_header>
5501_ACEOF
5502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005503if { (ac_try="$ac_compile"
5504case "(($ac_try" in
5505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5506 *) ac_try_echo=$ac_try;;
5507esac
5508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5509 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005511 grep -v '^ *+' conftest.er1 >conftest.err
5512 rm -f conftest.er1
5513 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005515 (exit $ac_status); } && {
5516 test -z "$ac_c_werror_flag" ||
5517 test ! -s conftest.err
5518 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005519 eval "$as_ac_Header=yes"
5520else
5521 echo "$as_me: failed program was:" >&5
5522sed 's/^/| /' conftest.$ac_ext >&5
5523
Martin v. Löwiseba40652007-08-30 20:10:57 +00005524 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005526
5527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005529ac_res=`eval echo '${'$as_ac_Header'}'`
5530 { echo "$as_me:$LINENO: result: $ac_res" >&5
5531echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005532if test `eval echo '${'$as_ac_Header'}'` = yes; then
5533 cat >>confdefs.h <<_ACEOF
5534#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5535_ACEOF
5536
5537fi
5538
5539done
5540
5541
Martin v. Löwis11437992002-04-12 09:54:03 +00005542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
Anthony Baxter8a560de2004-10-13 15:30:56 +00005578
Martin v. Löwisc3001752005-01-23 09:27:24 +00005579
Martin v. Löwis11017b12006-01-14 18:12:57 +00005580
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005581
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005582
5583
5584
5585
5586
5587
5588
5589
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005590
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005591
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005592
5593
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005594
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005595
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005596for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5597fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005598ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005599shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005600unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005601sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5602sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005603sys/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 +00005604sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005605sys/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 +00005606sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005607bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005608do
Martin v. Löwis11437992002-04-12 09:54:03 +00005609as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005610if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5611 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5612echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5613if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005614 echo $ECHO_N "(cached) $ECHO_C" >&6
5615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005616ac_res=`eval echo '${'$as_ac_Header'}'`
5617 { echo "$as_me:$LINENO: result: $ac_res" >&5
5618echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005619else
Martin v. Löwis11437992002-04-12 09:54:03 +00005620 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005621{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5622echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005623cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005624/* confdefs.h. */
5625_ACEOF
5626cat confdefs.h >>conftest.$ac_ext
5627cat >>conftest.$ac_ext <<_ACEOF
5628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005629$ac_includes_default
5630#include <$ac_header>
5631_ACEOF
5632rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005633if { (ac_try="$ac_compile"
5634case "(($ac_try" in
5635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5636 *) ac_try_echo=$ac_try;;
5637esac
5638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005641 grep -v '^ *+' conftest.er1 >conftest.err
5642 rm -f conftest.er1
5643 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005645 (exit $ac_status); } && {
5646 test -z "$ac_c_werror_flag" ||
5647 test ! -s conftest.err
5648 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005649 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005650else
Martin v. Löwis11437992002-04-12 09:54:03 +00005651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005652sed 's/^/| /' conftest.$ac_ext >&5
5653
Martin v. Löwiseba40652007-08-30 20:10:57 +00005654 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005656
5657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5658{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5659echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005660
5661# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005662{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5663echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005664cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005665/* confdefs.h. */
5666_ACEOF
5667cat confdefs.h >>conftest.$ac_ext
5668cat >>conftest.$ac_ext <<_ACEOF
5669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005670#include <$ac_header>
5671_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005672if { (ac_try="$ac_cpp conftest.$ac_ext"
5673case "(($ac_try" in
5674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5675 *) ac_try_echo=$ac_try;;
5676esac
5677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5678 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005680 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005681 rm -f conftest.er1
5682 cat conftest.err >&5
5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005684 (exit $ac_status); } >/dev/null && {
5685 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5686 test ! -s conftest.err
5687 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005688 ac_header_preproc=yes
5689else
5690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005691sed 's/^/| /' conftest.$ac_ext >&5
5692
Martin v. Löwis11437992002-04-12 09:54:03 +00005693 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005695
Martin v. Löwis11437992002-04-12 09:54:03 +00005696rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005697{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5698echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005699
5700# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005701case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5702 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005703 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5704echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005705 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5706echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5707 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005708 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005709 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005710 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5711echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005712 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5713echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5714 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5715echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5716 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5717echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005718 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5719echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005720 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5721echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005722 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005723## ------------------------------------------------ ##
5724## Report this to http://www.python.org/python-bugs ##
5725## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005726_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005727 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005728 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005729esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005730{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5731echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5732if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005733 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005734else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005735 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005737ac_res=`eval echo '${'$as_ac_Header'}'`
5738 { echo "$as_me:$LINENO: result: $ac_res" >&5
5739echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005740
5741fi
5742if test `eval echo '${'$as_ac_Header'}'` = yes; then
5743 cat >>confdefs.h <<_ACEOF
5744#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5745_ACEOF
5746
5747fi
5748
Guido van Rossum627b2d71993-12-24 10:39:16 +00005749done
5750
Martin v. Löwis11437992002-04-12 09:54:03 +00005751
5752
5753
5754
5755
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005756ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005757for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5758 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005759{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5760echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5761if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005762 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005763else
Martin v. Löwis11437992002-04-12 09:54:03 +00005764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005765/* confdefs.h. */
5766_ACEOF
5767cat confdefs.h >>conftest.$ac_ext
5768cat >>conftest.$ac_ext <<_ACEOF
5769/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005770#include <sys/types.h>
5771#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005772
Martin v. Löwis11437992002-04-12 09:54:03 +00005773int
5774main ()
5775{
5776if ((DIR *) 0)
5777return 0;
5778 ;
5779 return 0;
5780}
5781_ACEOF
5782rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005783if { (ac_try="$ac_compile"
5784case "(($ac_try" in
5785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5786 *) ac_try_echo=$ac_try;;
5787esac
5788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005791 grep -v '^ *+' conftest.er1 >conftest.err
5792 rm -f conftest.er1
5793 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005795 (exit $ac_status); } && {
5796 test -z "$ac_c_werror_flag" ||
5797 test ! -s conftest.err
5798 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005799 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005800else
Martin v. Löwis11437992002-04-12 09:54:03 +00005801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005802sed 's/^/| /' conftest.$ac_ext >&5
5803
Martin v. Löwiseba40652007-08-30 20:10:57 +00005804 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005806
5807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005809ac_res=`eval echo '${'$as_ac_Header'}'`
5810 { echo "$as_me:$LINENO: result: $ac_res" >&5
5811echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005812if test `eval echo '${'$as_ac_Header'}'` = yes; then
5813 cat >>confdefs.h <<_ACEOF
5814#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5815_ACEOF
5816
5817ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005818fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005819
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005820done
5821# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5822if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005823 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5824echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005825if test "${ac_cv_search_opendir+set}" = set; then
5826 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005827else
Martin v. Löwis11437992002-04-12 09:54:03 +00005828 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005829cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005830/* confdefs.h. */
5831_ACEOF
5832cat confdefs.h >>conftest.$ac_ext
5833cat >>conftest.$ac_ext <<_ACEOF
5834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005835
Martin v. Löwiseba40652007-08-30 20:10:57 +00005836/* Override any GCC internal prototype to avoid an error.
5837 Use char because int might match the return type of a GCC
5838 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005839#ifdef __cplusplus
5840extern "C"
5841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005842char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005843int
5844main ()
5845{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005846return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005847 ;
5848 return 0;
5849}
5850_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005851for ac_lib in '' dir; do
5852 if test -z "$ac_lib"; then
5853 ac_res="none required"
5854 else
5855 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005856 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005857 fi
5858 rm -f conftest.$ac_objext conftest$ac_exeext
5859if { (ac_try="$ac_link"
5860case "(($ac_try" in
5861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5862 *) ac_try_echo=$ac_try;;
5863esac
5864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5865 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005866 ac_status=$?
5867 grep -v '^ *+' conftest.er1 >conftest.err
5868 rm -f conftest.er1
5869 cat conftest.err >&5
5870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005871 (exit $ac_status); } && {
5872 test -z "$ac_c_werror_flag" ||
5873 test ! -s conftest.err
5874 } && test -s conftest$ac_exeext &&
5875 $as_test_x conftest$ac_exeext; then
5876 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005877else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005878 echo "$as_me: failed program was:" >&5
5879sed 's/^/| /' conftest.$ac_ext >&5
5880
Martin v. Löwiseba40652007-08-30 20:10:57 +00005881
Brett Cannon19fab762007-06-02 03:02:29 +00005882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005883
5884rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5885 conftest$ac_exeext
5886 if test "${ac_cv_search_opendir+set}" = set; then
5887 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005889done
5890if test "${ac_cv_search_opendir+set}" = set; then
5891 :
5892else
5893 ac_cv_search_opendir=no
5894fi
5895rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005896LIBS=$ac_func_search_save_LIBS
5897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005898{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5899echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5900ac_res=$ac_cv_search_opendir
5901if test "$ac_res" != no; then
5902 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005903
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005904fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005905
Michael W. Hudson54241132001-12-07 15:38:26 +00005906else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005907 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5908echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005909if test "${ac_cv_search_opendir+set}" = set; then
5910 echo $ECHO_N "(cached) $ECHO_C" >&6
5911else
5912 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005913cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005914/* confdefs.h. */
5915_ACEOF
5916cat confdefs.h >>conftest.$ac_ext
5917cat >>conftest.$ac_ext <<_ACEOF
5918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005919
Martin v. Löwiseba40652007-08-30 20:10:57 +00005920/* Override any GCC internal prototype to avoid an error.
5921 Use char because int might match the return type of a GCC
5922 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005923#ifdef __cplusplus
5924extern "C"
5925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005926char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005927int
5928main ()
5929{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005930return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005931 ;
5932 return 0;
5933}
5934_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005935for ac_lib in '' x; do
5936 if test -z "$ac_lib"; then
5937 ac_res="none required"
5938 else
5939 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005940 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005941 fi
5942 rm -f conftest.$ac_objext conftest$ac_exeext
5943if { (ac_try="$ac_link"
5944case "(($ac_try" in
5945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5946 *) ac_try_echo=$ac_try;;
5947esac
5948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5949 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005950 ac_status=$?
5951 grep -v '^ *+' conftest.er1 >conftest.err
5952 rm -f conftest.er1
5953 cat conftest.err >&5
5954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005955 (exit $ac_status); } && {
5956 test -z "$ac_c_werror_flag" ||
5957 test ! -s conftest.err
5958 } && test -s conftest$ac_exeext &&
5959 $as_test_x conftest$ac_exeext; then
5960 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005961else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005962 echo "$as_me: failed program was:" >&5
5963sed 's/^/| /' conftest.$ac_ext >&5
5964
Martin v. Löwiseba40652007-08-30 20:10:57 +00005965
Brett Cannon19fab762007-06-02 03:02:29 +00005966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005967
5968rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5969 conftest$ac_exeext
5970 if test "${ac_cv_search_opendir+set}" = set; then
5971 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005973done
5974if test "${ac_cv_search_opendir+set}" = set; then
5975 :
5976else
5977 ac_cv_search_opendir=no
5978fi
5979rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005980LIBS=$ac_func_search_save_LIBS
5981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005982{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5983echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5984ac_res=$ac_cv_search_opendir
5985if test "$ac_res" != no; then
5986 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005987
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005988fi
5989
5990fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005991
Martin v. Löwiseba40652007-08-30 20:10:57 +00005992{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5993echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005994if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5995 echo $ECHO_N "(cached) $ECHO_C" >&6
5996else
5997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005998/* confdefs.h. */
5999_ACEOF
6000cat confdefs.h >>conftest.$ac_ext
6001cat >>conftest.$ac_ext <<_ACEOF
6002/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006003#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006004int
6005main ()
6006{
6007return makedev(0, 0);
6008 ;
6009 return 0;
6010}
6011_ACEOF
6012rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006013if { (ac_try="$ac_link"
6014case "(($ac_try" in
6015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6016 *) ac_try_echo=$ac_try;;
6017esac
6018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6019 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006021 grep -v '^ *+' conftest.er1 >conftest.err
6022 rm -f conftest.er1
6023 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006025 (exit $ac_status); } && {
6026 test -z "$ac_c_werror_flag" ||
6027 test ! -s conftest.err
6028 } && test -s conftest$ac_exeext &&
6029 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006030 ac_cv_header_sys_types_h_makedev=yes
6031else
6032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006033sed 's/^/| /' conftest.$ac_ext >&5
6034
Martin v. Löwiseba40652007-08-30 20:10:57 +00006035 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006037
6038rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006039 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040
6041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006042{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6043echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044
6045if test $ac_cv_header_sys_types_h_makedev = no; then
6046if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006047 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6048echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6050 echo $ECHO_N "(cached) $ECHO_C" >&6
6051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006052{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6053echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006054else
6055 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006056{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6057echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006058cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006059/* confdefs.h. */
6060_ACEOF
6061cat confdefs.h >>conftest.$ac_ext
6062cat >>conftest.$ac_ext <<_ACEOF
6063/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064$ac_includes_default
6065#include <sys/mkdev.h>
6066_ACEOF
6067rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006068if { (ac_try="$ac_compile"
6069case "(($ac_try" in
6070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6071 *) ac_try_echo=$ac_try;;
6072esac
6073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006076 grep -v '^ *+' conftest.er1 >conftest.err
6077 rm -f conftest.er1
6078 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006080 (exit $ac_status); } && {
6081 test -z "$ac_c_werror_flag" ||
6082 test ! -s conftest.err
6083 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084 ac_header_compiler=yes
6085else
6086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006087sed 's/^/| /' conftest.$ac_ext >&5
6088
Martin v. Löwiseba40652007-08-30 20:10:57 +00006089 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006091
6092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6093{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6094echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095
6096# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006097{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6098echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006100/* confdefs.h. */
6101_ACEOF
6102cat confdefs.h >>conftest.$ac_ext
6103cat >>conftest.$ac_ext <<_ACEOF
6104/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105#include <sys/mkdev.h>
6106_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006107if { (ac_try="$ac_cpp conftest.$ac_ext"
6108case "(($ac_try" in
6109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6110 *) ac_try_echo=$ac_try;;
6111esac
6112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6113 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006115 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006116 rm -f conftest.er1
6117 cat conftest.err >&5
6118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006119 (exit $ac_status); } >/dev/null && {
6120 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6121 test ! -s conftest.err
6122 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006123 ac_header_preproc=yes
6124else
6125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006126sed 's/^/| /' conftest.$ac_ext >&5
6127
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006128 ac_header_preproc=no
6129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006130
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006131rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006132{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6133echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134
6135# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006136case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6137 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006138 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6139echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006140 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6141echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6142 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006143 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006144 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006145 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6146echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006147 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6148echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6149 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6150echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6151 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6152echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006153 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6154echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006155 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6156echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006157 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006158## ------------------------------------------------ ##
6159## Report this to http://www.python.org/python-bugs ##
6160## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006161_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006162 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006163 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006165{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6166echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6168 echo $ECHO_N "(cached) $ECHO_C" >&6
6169else
6170 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006172{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6173echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174
6175fi
6176if test $ac_cv_header_sys_mkdev_h = yes; then
6177
6178cat >>confdefs.h <<\_ACEOF
6179#define MAJOR_IN_MKDEV 1
6180_ACEOF
6181
6182fi
6183
6184
6185
6186 if test $ac_cv_header_sys_mkdev_h = no; then
6187 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006188 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6189echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6191 echo $ECHO_N "(cached) $ECHO_C" >&6
6192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006193{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6194echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006195else
6196 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006197{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6198echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006200/* confdefs.h. */
6201_ACEOF
6202cat confdefs.h >>conftest.$ac_ext
6203cat >>conftest.$ac_ext <<_ACEOF
6204/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205$ac_includes_default
6206#include <sys/sysmacros.h>
6207_ACEOF
6208rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006209if { (ac_try="$ac_compile"
6210case "(($ac_try" in
6211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6212 *) ac_try_echo=$ac_try;;
6213esac
6214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006217 grep -v '^ *+' conftest.er1 >conftest.err
6218 rm -f conftest.er1
6219 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006221 (exit $ac_status); } && {
6222 test -z "$ac_c_werror_flag" ||
6223 test ! -s conftest.err
6224 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225 ac_header_compiler=yes
6226else
6227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006228sed 's/^/| /' conftest.$ac_ext >&5
6229
Martin v. Löwiseba40652007-08-30 20:10:57 +00006230 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006232
6233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6234{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6235echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236
6237# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006238{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6239echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006241/* confdefs.h. */
6242_ACEOF
6243cat confdefs.h >>conftest.$ac_ext
6244cat >>conftest.$ac_ext <<_ACEOF
6245/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246#include <sys/sysmacros.h>
6247_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006248if { (ac_try="$ac_cpp conftest.$ac_ext"
6249case "(($ac_try" in
6250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6251 *) ac_try_echo=$ac_try;;
6252esac
6253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6254 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006256 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257 rm -f conftest.er1
6258 cat conftest.err >&5
6259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006260 (exit $ac_status); } >/dev/null && {
6261 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6262 test ! -s conftest.err
6263 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264 ac_header_preproc=yes
6265else
6266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006267sed 's/^/| /' conftest.$ac_ext >&5
6268
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269 ac_header_preproc=no
6270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006271
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006273{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6274echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275
6276# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006277case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6278 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6280echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006281 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6282echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6283 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006284 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006285 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006286 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6287echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006288 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6289echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6290 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6291echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6292 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6293echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006294 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6295echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006296 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6297echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006298 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006299## ------------------------------------------------ ##
6300## Report this to http://www.python.org/python-bugs ##
6301## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006302_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006303 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006304 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006306{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6307echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6309 echo $ECHO_N "(cached) $ECHO_C" >&6
6310else
6311 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006313{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6314echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006315
6316fi
6317if test $ac_cv_header_sys_sysmacros_h = yes; then
6318
6319cat >>confdefs.h <<\_ACEOF
6320#define MAJOR_IN_SYSMACROS 1
6321_ACEOF
6322
6323fi
6324
6325
6326 fi
6327fi
6328
Michael W. Hudson54241132001-12-07 15:38:26 +00006329
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006330# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006331
6332for ac_header in term.h
6333do
6334as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006335{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6336echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6337if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006338 echo $ECHO_N "(cached) $ECHO_C" >&6
6339else
6340 cat >conftest.$ac_ext <<_ACEOF
6341/* confdefs.h. */
6342_ACEOF
6343cat confdefs.h >>conftest.$ac_ext
6344cat >>conftest.$ac_ext <<_ACEOF
6345/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006346
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006347#ifdef HAVE_CURSES_H
6348#include <curses.h>
6349#endif
6350
6351
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006352#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006353_ACEOF
6354rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006355if { (ac_try="$ac_compile"
6356case "(($ac_try" in
6357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6358 *) ac_try_echo=$ac_try;;
6359esac
6360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6361 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006362 ac_status=$?
6363 grep -v '^ *+' conftest.er1 >conftest.err
6364 rm -f conftest.er1
6365 cat conftest.err >&5
6366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006367 (exit $ac_status); } && {
6368 test -z "$ac_c_werror_flag" ||
6369 test ! -s conftest.err
6370 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006371 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006372else
6373 echo "$as_me: failed program was:" >&5
6374sed 's/^/| /' conftest.$ac_ext >&5
6375
Martin v. Löwiseba40652007-08-30 20:10:57 +00006376 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006378
6379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006381ac_res=`eval echo '${'$as_ac_Header'}'`
6382 { echo "$as_me:$LINENO: result: $ac_res" >&5
6383echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006384if test `eval echo '${'$as_ac_Header'}'` = yes; then
6385 cat >>confdefs.h <<_ACEOF
6386#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6387_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006389fi
6390
6391done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006392
6393
Martin v. Löwis11017b12006-01-14 18:12:57 +00006394# On Linux, netlink.h requires asm/types.h
6395
6396for ac_header in linux/netlink.h
6397do
6398as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006399{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6400echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6401if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006402 echo $ECHO_N "(cached) $ECHO_C" >&6
6403else
6404 cat >conftest.$ac_ext <<_ACEOF
6405/* confdefs.h. */
6406_ACEOF
6407cat confdefs.h >>conftest.$ac_ext
6408cat >>conftest.$ac_ext <<_ACEOF
6409/* end confdefs.h. */
6410
6411#ifdef HAVE_ASM_TYPES_H
6412#include <asm/types.h>
6413#endif
6414#ifdef HAVE_SYS_SOCKET_H
6415#include <sys/socket.h>
6416#endif
6417
6418
6419#include <$ac_header>
6420_ACEOF
6421rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006422if { (ac_try="$ac_compile"
6423case "(($ac_try" in
6424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6425 *) ac_try_echo=$ac_try;;
6426esac
6427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6428 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006429 ac_status=$?
6430 grep -v '^ *+' conftest.er1 >conftest.err
6431 rm -f conftest.er1
6432 cat conftest.err >&5
6433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006434 (exit $ac_status); } && {
6435 test -z "$ac_c_werror_flag" ||
6436 test ! -s conftest.err
6437 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438 eval "$as_ac_Header=yes"
6439else
6440 echo "$as_me: failed program was:" >&5
6441sed 's/^/| /' conftest.$ac_ext >&5
6442
Martin v. Löwiseba40652007-08-30 20:10:57 +00006443 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006445
6446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006448ac_res=`eval echo '${'$as_ac_Header'}'`
6449 { echo "$as_me:$LINENO: result: $ac_res" >&5
6450echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006451if test `eval echo '${'$as_ac_Header'}'` = yes; then
6452 cat >>confdefs.h <<_ACEOF
6453#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6454_ACEOF
6455
6456fi
6457
6458done
6459
6460
Guido van Rossum627b2d71993-12-24 10:39:16 +00006461# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006462was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006463{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6464echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006465cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006466/* confdefs.h. */
6467_ACEOF
6468cat confdefs.h >>conftest.$ac_ext
6469cat >>conftest.$ac_ext <<_ACEOF
6470/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006471#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006472
6473_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006475 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006476 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006477else
Martin v. Löwis11437992002-04-12 09:54:03 +00006478
6479
6480cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006482_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006483
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006484
Guido van Rossum627b2d71993-12-24 10:39:16 +00006485fi
6486rm -f conftest*
6487
Martin v. Löwiseba40652007-08-30 20:10:57 +00006488{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6489echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006490
Neal Norwitz11690112002-07-30 01:08:28 +00006491# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006492{ echo "$as_me:$LINENO: checking for makedev" >&5
6493echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006494cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006495/* confdefs.h. */
6496_ACEOF
6497cat confdefs.h >>conftest.$ac_ext
6498cat >>conftest.$ac_ext <<_ACEOF
6499/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006500#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006501int
6502main ()
6503{
6504 makedev(0, 0)
6505 ;
6506 return 0;
6507}
6508_ACEOF
6509rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006510if { (ac_try="$ac_link"
6511case "(($ac_try" in
6512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6513 *) ac_try_echo=$ac_try;;
6514esac
6515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6516 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006518 grep -v '^ *+' conftest.er1 >conftest.err
6519 rm -f conftest.er1
6520 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006522 (exit $ac_status); } && {
6523 test -z "$ac_c_werror_flag" ||
6524 test ! -s conftest.err
6525 } && test -s conftest$ac_exeext &&
6526 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006527 ac_cv_has_makedev=yes
6528else
6529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006530sed 's/^/| /' conftest.$ac_ext >&5
6531
Martin v. Löwiseba40652007-08-30 20:10:57 +00006532 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006534
6535rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006536 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006537if test "$ac_cv_has_makedev" = "no"; then
6538 # we didn't link, try if _OSF_SOURCE will allow us to link
6539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006540/* confdefs.h. */
6541_ACEOF
6542cat confdefs.h >>conftest.$ac_ext
6543cat >>conftest.$ac_ext <<_ACEOF
6544/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006545
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006546#define _OSF_SOURCE 1
6547#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006548
Neal Norwitz11690112002-07-30 01:08:28 +00006549int
6550main ()
6551{
6552 makedev(0, 0)
6553 ;
6554 return 0;
6555}
6556_ACEOF
6557rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006558if { (ac_try="$ac_link"
6559case "(($ac_try" in
6560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6561 *) ac_try_echo=$ac_try;;
6562esac
6563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6564 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006566 grep -v '^ *+' conftest.er1 >conftest.err
6567 rm -f conftest.er1
6568 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006570 (exit $ac_status); } && {
6571 test -z "$ac_c_werror_flag" ||
6572 test ! -s conftest.err
6573 } && test -s conftest$ac_exeext &&
6574 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006575 ac_cv_has_makedev=yes
6576else
6577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006578sed 's/^/| /' conftest.$ac_ext >&5
6579
Martin v. Löwiseba40652007-08-30 20:10:57 +00006580 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006582
6583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006584 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006585 if test "$ac_cv_has_makedev" = "yes"; then
6586
6587cat >>confdefs.h <<\_ACEOF
6588#define _OSF_SOURCE 1
6589_ACEOF
6590
6591 fi
6592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006593{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6594echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006595if test "$ac_cv_has_makedev" = "yes"; then
6596
6597cat >>confdefs.h <<\_ACEOF
6598#define HAVE_MAKEDEV 1
6599_ACEOF
6600
6601fi
6602
Martin v. Löwis399a6892002-10-04 10:22:02 +00006603# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6604# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6605# defined, but the compiler does not support pragma redefine_extname,
6606# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6607# structures (such as rlimit64) without declaring them. As a
6608# work-around, disable LFS on such configurations
6609
6610use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006611{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6612echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006613cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006614/* confdefs.h. */
6615_ACEOF
6616cat confdefs.h >>conftest.$ac_ext
6617cat >>conftest.$ac_ext <<_ACEOF
6618/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006619
6620#define _LARGEFILE_SOURCE 1
6621#define _FILE_OFFSET_BITS 64
6622#include <sys/resource.h>
6623
Martin v. Löwis399a6892002-10-04 10:22:02 +00006624int
6625main ()
6626{
6627struct rlimit foo;
6628 ;
6629 return 0;
6630}
6631_ACEOF
6632rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006633if { (ac_try="$ac_compile"
6634case "(($ac_try" in
6635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6636 *) ac_try_echo=$ac_try;;
6637esac
6638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006641 grep -v '^ *+' conftest.er1 >conftest.err
6642 rm -f conftest.er1
6643 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006645 (exit $ac_status); } && {
6646 test -z "$ac_c_werror_flag" ||
6647 test ! -s conftest.err
6648 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006649 sol_lfs_bug=no
6650else
6651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006652sed 's/^/| /' conftest.$ac_ext >&5
6653
Martin v. Löwiseba40652007-08-30 20:10:57 +00006654 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006656
6657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6658{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6659echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006660if test "$sol_lfs_bug" = "yes"; then
6661 use_lfs=no
6662fi
6663
6664if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006665# Two defines needed to enable largefile support on various platforms
6666# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006667
Martin v. Löwis11437992002-04-12 09:54:03 +00006668cat >>confdefs.h <<\_ACEOF
6669#define _LARGEFILE_SOURCE 1
6670_ACEOF
6671
6672
6673cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006674#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006675_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006676
Martin v. Löwis399a6892002-10-04 10:22:02 +00006677fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006678
Guido van Rossum84e7b241996-08-19 21:59:00 +00006679# Add some code to confdefs.h so that the test for off_t works on SCO
6680cat >> confdefs.h <<\EOF
6681#if defined(SCO_DS)
6682#undef _OFF_T
6683#endif
6684EOF
6685
Guido van Rossumef2255b2000-03-10 22:30:29 +00006686# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006687{ echo "$as_me:$LINENO: checking for mode_t" >&5
6688echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006689if test "${ac_cv_type_mode_t+set}" = set; then
6690 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006691else
Martin v. Löwis11437992002-04-12 09:54:03 +00006692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006693/* confdefs.h. */
6694_ACEOF
6695cat confdefs.h >>conftest.$ac_ext
6696cat >>conftest.$ac_ext <<_ACEOF
6697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006698$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006699typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006700int
6701main ()
6702{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006703if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006704 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006705if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006706 return 0;
6707 ;
6708 return 0;
6709}
6710_ACEOF
6711rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006712if { (ac_try="$ac_compile"
6713case "(($ac_try" in
6714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6715 *) ac_try_echo=$ac_try;;
6716esac
6717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6718 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006720 grep -v '^ *+' conftest.er1 >conftest.err
6721 rm -f conftest.er1
6722 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006724 (exit $ac_status); } && {
6725 test -z "$ac_c_werror_flag" ||
6726 test ! -s conftest.err
6727 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006728 ac_cv_type_mode_t=yes
6729else
Martin v. Löwis11437992002-04-12 09:54:03 +00006730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006731sed 's/^/| /' conftest.$ac_ext >&5
6732
Martin v. Löwiseba40652007-08-30 20:10:57 +00006733 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006735
6736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006738{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6739echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006740if test $ac_cv_type_mode_t = yes; then
6741 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006742else
Martin v. Löwis11437992002-04-12 09:54:03 +00006743
6744cat >>confdefs.h <<_ACEOF
6745#define mode_t int
6746_ACEOF
6747
6748fi
6749
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750{ echo "$as_me:$LINENO: checking for off_t" >&5
6751echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006752if test "${ac_cv_type_off_t+set}" = set; then
6753 echo $ECHO_N "(cached) $ECHO_C" >&6
6754else
6755 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006756/* confdefs.h. */
6757_ACEOF
6758cat confdefs.h >>conftest.$ac_ext
6759cat >>conftest.$ac_ext <<_ACEOF
6760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006761$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006762typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006763int
6764main ()
6765{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006766if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006767 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006768if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006769 return 0;
6770 ;
6771 return 0;
6772}
6773_ACEOF
6774rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006775if { (ac_try="$ac_compile"
6776case "(($ac_try" in
6777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6778 *) ac_try_echo=$ac_try;;
6779esac
6780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006783 grep -v '^ *+' conftest.er1 >conftest.err
6784 rm -f conftest.er1
6785 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006787 (exit $ac_status); } && {
6788 test -z "$ac_c_werror_flag" ||
6789 test ! -s conftest.err
6790 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006791 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006792else
Martin v. Löwis11437992002-04-12 09:54:03 +00006793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006794sed 's/^/| /' conftest.$ac_ext >&5
6795
Martin v. Löwiseba40652007-08-30 20:10:57 +00006796 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006798
6799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006801{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6802echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006803if test $ac_cv_type_off_t = yes; then
6804 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006805else
Martin v. Löwis11437992002-04-12 09:54:03 +00006806
6807cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006808#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006809_ACEOF
6810
6811fi
6812
Martin v. Löwiseba40652007-08-30 20:10:57 +00006813{ echo "$as_me:$LINENO: checking for pid_t" >&5
6814echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006815if test "${ac_cv_type_pid_t+set}" = set; then
6816 echo $ECHO_N "(cached) $ECHO_C" >&6
6817else
6818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006819/* confdefs.h. */
6820_ACEOF
6821cat confdefs.h >>conftest.$ac_ext
6822cat >>conftest.$ac_ext <<_ACEOF
6823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006824$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006825typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006826int
6827main ()
6828{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006829if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006830 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006831if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006832 return 0;
6833 ;
6834 return 0;
6835}
6836_ACEOF
6837rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006838if { (ac_try="$ac_compile"
6839case "(($ac_try" in
6840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6841 *) ac_try_echo=$ac_try;;
6842esac
6843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6844 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006846 grep -v '^ *+' conftest.er1 >conftest.err
6847 rm -f conftest.er1
6848 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006850 (exit $ac_status); } && {
6851 test -z "$ac_c_werror_flag" ||
6852 test ! -s conftest.err
6853 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006854 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006855else
Martin v. Löwis11437992002-04-12 09:54:03 +00006856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006857sed 's/^/| /' conftest.$ac_ext >&5
6858
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006861
6862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006864{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6865echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006866if test $ac_cv_type_pid_t = yes; then
6867 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006868else
Martin v. Löwis11437992002-04-12 09:54:03 +00006869
6870cat >>confdefs.h <<_ACEOF
6871#define pid_t int
6872_ACEOF
6873
6874fi
6875
Martin v. Löwiseba40652007-08-30 20:10:57 +00006876{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6877echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006878if test "${ac_cv_type_signal+set}" = set; then
6879 echo $ECHO_N "(cached) $ECHO_C" >&6
6880else
6881 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006882/* confdefs.h. */
6883_ACEOF
6884cat confdefs.h >>conftest.$ac_ext
6885cat >>conftest.$ac_ext <<_ACEOF
6886/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006887#include <sys/types.h>
6888#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006889
Martin v. Löwis11437992002-04-12 09:54:03 +00006890int
6891main ()
6892{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006893return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006894 ;
6895 return 0;
6896}
6897_ACEOF
6898rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006899if { (ac_try="$ac_compile"
6900case "(($ac_try" in
6901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6902 *) ac_try_echo=$ac_try;;
6903esac
6904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006907 grep -v '^ *+' conftest.er1 >conftest.err
6908 rm -f conftest.er1
6909 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006911 (exit $ac_status); } && {
6912 test -z "$ac_c_werror_flag" ||
6913 test ! -s conftest.err
6914 } && test -s conftest.$ac_objext; then
6915 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006916else
Martin v. Löwis11437992002-04-12 09:54:03 +00006917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006918sed 's/^/| /' conftest.$ac_ext >&5
6919
Martin v. Löwiseba40652007-08-30 20:10:57 +00006920 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006922
6923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006925{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6926echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006927
Martin v. Löwis11437992002-04-12 09:54:03 +00006928cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006929#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006930_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006931
Michael W. Hudson54241132001-12-07 15:38:26 +00006932
Martin v. Löwiseba40652007-08-30 20:10:57 +00006933{ echo "$as_me:$LINENO: checking for size_t" >&5
6934echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006935if test "${ac_cv_type_size_t+set}" = set; then
6936 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006937else
Martin v. Löwis11437992002-04-12 09:54:03 +00006938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006939/* confdefs.h. */
6940_ACEOF
6941cat confdefs.h >>conftest.$ac_ext
6942cat >>conftest.$ac_ext <<_ACEOF
6943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006944$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006945typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006946int
6947main ()
6948{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006949if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006950 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006951if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006952 return 0;
6953 ;
6954 return 0;
6955}
6956_ACEOF
6957rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006958if { (ac_try="$ac_compile"
6959case "(($ac_try" in
6960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6961 *) ac_try_echo=$ac_try;;
6962esac
6963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006966 grep -v '^ *+' conftest.er1 >conftest.err
6967 rm -f conftest.er1
6968 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006970 (exit $ac_status); } && {
6971 test -z "$ac_c_werror_flag" ||
6972 test ! -s conftest.err
6973 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006974 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006975else
Martin v. Löwis11437992002-04-12 09:54:03 +00006976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006977sed 's/^/| /' conftest.$ac_ext >&5
6978
Martin v. Löwiseba40652007-08-30 20:10:57 +00006979 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006981
6982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006984{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6985echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006986if test $ac_cv_type_size_t = yes; then
6987 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006988else
Martin v. Löwis11437992002-04-12 09:54:03 +00006989
6990cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006991#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006992_ACEOF
6993
6994fi
6995
Martin v. Löwiseba40652007-08-30 20:10:57 +00006996{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6997echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006998if test "${ac_cv_type_uid_t+set}" = set; then
6999 echo $ECHO_N "(cached) $ECHO_C" >&6
7000else
7001 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007002/* confdefs.h. */
7003_ACEOF
7004cat confdefs.h >>conftest.$ac_ext
7005cat >>conftest.$ac_ext <<_ACEOF
7006/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007007#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007008
7009_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007010if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007011 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007012 ac_cv_type_uid_t=yes
7013else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007014 ac_cv_type_uid_t=no
7015fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007016rm -f conftest*
7017
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007019{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7020echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007021if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007022
Martin v. Löwis11437992002-04-12 09:54:03 +00007023cat >>confdefs.h <<\_ACEOF
7024#define uid_t int
7025_ACEOF
7026
7027
7028cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007029#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007030_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007031
7032fi
7033
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007034
7035 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7036echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
7037if test "${ac_cv_c_uint32_t+set}" = set; then
7038 echo $ECHO_N "(cached) $ECHO_C" >&6
7039else
7040 ac_cv_c_uint32_t=no
7041 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7042 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7043 cat >conftest.$ac_ext <<_ACEOF
7044/* confdefs.h. */
7045_ACEOF
7046cat confdefs.h >>conftest.$ac_ext
7047cat >>conftest.$ac_ext <<_ACEOF
7048/* end confdefs.h. */
7049$ac_includes_default
7050int
7051main ()
7052{
7053static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7054test_array [0] = 0
7055
7056 ;
7057 return 0;
7058}
7059_ACEOF
7060rm -f conftest.$ac_objext
7061if { (ac_try="$ac_compile"
7062case "(($ac_try" in
7063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7064 *) ac_try_echo=$ac_try;;
7065esac
7066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7067 (eval "$ac_compile") 2>conftest.er1
7068 ac_status=$?
7069 grep -v '^ *+' conftest.er1 >conftest.err
7070 rm -f conftest.er1
7071 cat conftest.err >&5
7072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7073 (exit $ac_status); } && {
7074 test -z "$ac_c_werror_flag" ||
7075 test ! -s conftest.err
7076 } && test -s conftest.$ac_objext; then
7077 case $ac_type in
7078 uint32_t) ac_cv_c_uint32_t=yes ;;
7079 *) ac_cv_c_uint32_t=$ac_type ;;
7080esac
7081
7082else
7083 echo "$as_me: failed program was:" >&5
7084sed 's/^/| /' conftest.$ac_ext >&5
7085
7086
7087fi
7088
7089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7090 test "$ac_cv_c_uint32_t" != no && break
7091 done
7092fi
7093{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7094echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
7095 case $ac_cv_c_uint32_t in #(
7096 no|yes) ;; #(
7097 *)
7098
7099cat >>confdefs.h <<\_ACEOF
7100#define _UINT32_T 1
7101_ACEOF
7102
7103
7104cat >>confdefs.h <<_ACEOF
7105#define uint32_t $ac_cv_c_uint32_t
7106_ACEOF
7107;;
7108 esac
7109
7110
7111 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7112echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
7113if test "${ac_cv_c_uint64_t+set}" = set; then
7114 echo $ECHO_N "(cached) $ECHO_C" >&6
7115else
7116 ac_cv_c_uint64_t=no
7117 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7118 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7119 cat >conftest.$ac_ext <<_ACEOF
7120/* confdefs.h. */
7121_ACEOF
7122cat confdefs.h >>conftest.$ac_ext
7123cat >>conftest.$ac_ext <<_ACEOF
7124/* end confdefs.h. */
7125$ac_includes_default
7126int
7127main ()
7128{
7129static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7130test_array [0] = 0
7131
7132 ;
7133 return 0;
7134}
7135_ACEOF
7136rm -f conftest.$ac_objext
7137if { (ac_try="$ac_compile"
7138case "(($ac_try" in
7139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7140 *) ac_try_echo=$ac_try;;
7141esac
7142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7143 (eval "$ac_compile") 2>conftest.er1
7144 ac_status=$?
7145 grep -v '^ *+' conftest.er1 >conftest.err
7146 rm -f conftest.er1
7147 cat conftest.err >&5
7148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7149 (exit $ac_status); } && {
7150 test -z "$ac_c_werror_flag" ||
7151 test ! -s conftest.err
7152 } && test -s conftest.$ac_objext; then
7153 case $ac_type in
7154 uint64_t) ac_cv_c_uint64_t=yes ;;
7155 *) ac_cv_c_uint64_t=$ac_type ;;
7156esac
7157
7158else
7159 echo "$as_me: failed program was:" >&5
7160sed 's/^/| /' conftest.$ac_ext >&5
7161
7162
7163fi
7164
7165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7166 test "$ac_cv_c_uint64_t" != no && break
7167 done
7168fi
7169{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7170echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
7171 case $ac_cv_c_uint64_t in #(
7172 no|yes) ;; #(
7173 *)
7174
7175cat >>confdefs.h <<\_ACEOF
7176#define _UINT64_T 1
7177_ACEOF
7178
7179
7180cat >>confdefs.h <<_ACEOF
7181#define uint64_t $ac_cv_c_uint64_t
7182_ACEOF
7183;;
7184 esac
7185
7186
7187 { echo "$as_me:$LINENO: checking for int32_t" >&5
7188echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
7189if test "${ac_cv_c_int32_t+set}" = set; then
7190 echo $ECHO_N "(cached) $ECHO_C" >&6
7191else
7192 ac_cv_c_int32_t=no
7193 for ac_type in 'int32_t' 'int' 'long int' \
7194 'long long int' 'short int' 'signed char'; do
7195 cat >conftest.$ac_ext <<_ACEOF
7196/* confdefs.h. */
7197_ACEOF
7198cat confdefs.h >>conftest.$ac_ext
7199cat >>conftest.$ac_ext <<_ACEOF
7200/* end confdefs.h. */
7201$ac_includes_default
7202int
7203main ()
7204{
7205static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7206test_array [0] = 0
7207
7208 ;
7209 return 0;
7210}
7211_ACEOF
7212rm -f conftest.$ac_objext
7213if { (ac_try="$ac_compile"
7214case "(($ac_try" in
7215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7216 *) ac_try_echo=$ac_try;;
7217esac
7218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7219 (eval "$ac_compile") 2>conftest.er1
7220 ac_status=$?
7221 grep -v '^ *+' conftest.er1 >conftest.err
7222 rm -f conftest.er1
7223 cat conftest.err >&5
7224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7225 (exit $ac_status); } && {
7226 test -z "$ac_c_werror_flag" ||
7227 test ! -s conftest.err
7228 } && test -s conftest.$ac_objext; then
7229 cat >conftest.$ac_ext <<_ACEOF
7230/* confdefs.h. */
7231_ACEOF
7232cat confdefs.h >>conftest.$ac_ext
7233cat >>conftest.$ac_ext <<_ACEOF
7234/* end confdefs.h. */
7235$ac_includes_default
7236int
7237main ()
7238{
7239static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
7240 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
7241test_array [0] = 0
7242
7243 ;
7244 return 0;
7245}
7246_ACEOF
7247rm -f conftest.$ac_objext
7248if { (ac_try="$ac_compile"
7249case "(($ac_try" in
7250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7251 *) ac_try_echo=$ac_try;;
7252esac
7253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7254 (eval "$ac_compile") 2>conftest.er1
7255 ac_status=$?
7256 grep -v '^ *+' conftest.er1 >conftest.err
7257 rm -f conftest.er1
7258 cat conftest.err >&5
7259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7260 (exit $ac_status); } && {
7261 test -z "$ac_c_werror_flag" ||
7262 test ! -s conftest.err
7263 } && test -s conftest.$ac_objext; then
7264 :
7265else
7266 echo "$as_me: failed program was:" >&5
7267sed 's/^/| /' conftest.$ac_ext >&5
7268
7269 case $ac_type in
7270 int32_t) ac_cv_c_int32_t=yes ;;
7271 *) ac_cv_c_int32_t=$ac_type ;;
7272esac
7273
7274fi
7275
7276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7277else
7278 echo "$as_me: failed program was:" >&5
7279sed 's/^/| /' conftest.$ac_ext >&5
7280
7281
7282fi
7283
7284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7285 test "$ac_cv_c_int32_t" != no && break
7286 done
7287fi
7288{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7289echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
7290 case $ac_cv_c_int32_t in #(
7291 no|yes) ;; #(
7292 *)
7293
7294cat >>confdefs.h <<_ACEOF
7295#define int32_t $ac_cv_c_int32_t
7296_ACEOF
7297;;
7298 esac
7299
7300
7301 { echo "$as_me:$LINENO: checking for int64_t" >&5
7302echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
7303if test "${ac_cv_c_int64_t+set}" = set; then
7304 echo $ECHO_N "(cached) $ECHO_C" >&6
7305else
7306 ac_cv_c_int64_t=no
7307 for ac_type in 'int64_t' 'int' 'long int' \
7308 'long long int' 'short int' 'signed char'; do
7309 cat >conftest.$ac_ext <<_ACEOF
7310/* confdefs.h. */
7311_ACEOF
7312cat confdefs.h >>conftest.$ac_ext
7313cat >>conftest.$ac_ext <<_ACEOF
7314/* end confdefs.h. */
7315$ac_includes_default
7316int
7317main ()
7318{
7319static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7320test_array [0] = 0
7321
7322 ;
7323 return 0;
7324}
7325_ACEOF
7326rm -f conftest.$ac_objext
7327if { (ac_try="$ac_compile"
7328case "(($ac_try" in
7329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7330 *) ac_try_echo=$ac_try;;
7331esac
7332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7333 (eval "$ac_compile") 2>conftest.er1
7334 ac_status=$?
7335 grep -v '^ *+' conftest.er1 >conftest.err
7336 rm -f conftest.er1
7337 cat conftest.err >&5
7338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7339 (exit $ac_status); } && {
7340 test -z "$ac_c_werror_flag" ||
7341 test ! -s conftest.err
7342 } && test -s conftest.$ac_objext; then
7343 cat >conftest.$ac_ext <<_ACEOF
7344/* confdefs.h. */
7345_ACEOF
7346cat confdefs.h >>conftest.$ac_ext
7347cat >>conftest.$ac_ext <<_ACEOF
7348/* end confdefs.h. */
7349$ac_includes_default
7350int
7351main ()
7352{
7353static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
7354 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
7355test_array [0] = 0
7356
7357 ;
7358 return 0;
7359}
7360_ACEOF
7361rm -f conftest.$ac_objext
7362if { (ac_try="$ac_compile"
7363case "(($ac_try" in
7364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7365 *) ac_try_echo=$ac_try;;
7366esac
7367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7368 (eval "$ac_compile") 2>conftest.er1
7369 ac_status=$?
7370 grep -v '^ *+' conftest.er1 >conftest.err
7371 rm -f conftest.er1
7372 cat conftest.err >&5
7373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7374 (exit $ac_status); } && {
7375 test -z "$ac_c_werror_flag" ||
7376 test ! -s conftest.err
7377 } && test -s conftest.$ac_objext; then
7378 :
7379else
7380 echo "$as_me: failed program was:" >&5
7381sed 's/^/| /' conftest.$ac_ext >&5
7382
7383 case $ac_type in
7384 int64_t) ac_cv_c_int64_t=yes ;;
7385 *) ac_cv_c_int64_t=$ac_type ;;
7386esac
7387
7388fi
7389
7390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7391else
7392 echo "$as_me: failed program was:" >&5
7393sed 's/^/| /' conftest.$ac_ext >&5
7394
7395
7396fi
7397
7398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7399 test "$ac_cv_c_int64_t" != no && break
7400 done
7401fi
7402{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7403echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
7404 case $ac_cv_c_int64_t in #(
7405 no|yes) ;; #(
7406 *)
7407
7408cat >>confdefs.h <<_ACEOF
7409#define int64_t $ac_cv_c_int64_t
7410_ACEOF
7411;;
7412 esac
7413
Martin v. Löwiseba40652007-08-30 20:10:57 +00007414{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7415echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007416if test "${ac_cv_type_ssize_t+set}" = set; then
7417 echo $ECHO_N "(cached) $ECHO_C" >&6
7418else
7419 cat >conftest.$ac_ext <<_ACEOF
7420/* confdefs.h. */
7421_ACEOF
7422cat confdefs.h >>conftest.$ac_ext
7423cat >>conftest.$ac_ext <<_ACEOF
7424/* end confdefs.h. */
7425$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007426typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007427int
7428main ()
7429{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007430if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007431 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007432if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007433 return 0;
7434 ;
7435 return 0;
7436}
7437_ACEOF
7438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007439if { (ac_try="$ac_compile"
7440case "(($ac_try" in
7441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7442 *) ac_try_echo=$ac_try;;
7443esac
7444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007446 ac_status=$?
7447 grep -v '^ *+' conftest.er1 >conftest.err
7448 rm -f conftest.er1
7449 cat conftest.err >&5
7450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007451 (exit $ac_status); } && {
7452 test -z "$ac_c_werror_flag" ||
7453 test ! -s conftest.err
7454 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007455 ac_cv_type_ssize_t=yes
7456else
7457 echo "$as_me: failed program was:" >&5
7458sed 's/^/| /' conftest.$ac_ext >&5
7459
Martin v. Löwiseba40652007-08-30 20:10:57 +00007460 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007462
7463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007465{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7466echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007467if test $ac_cv_type_ssize_t = yes; then
7468
7469cat >>confdefs.h <<\_ACEOF
7470#define HAVE_SSIZE_T 1
7471_ACEOF
7472
7473fi
7474
Jack Jansendd19cf82001-12-06 22:36:17 +00007475
Michael W. Hudson54241132001-12-07 15:38:26 +00007476# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007477# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007478{ echo "$as_me:$LINENO: checking for int" >&5
7479echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007480if test "${ac_cv_type_int+set}" = set; then
7481 echo $ECHO_N "(cached) $ECHO_C" >&6
7482else
7483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007484/* confdefs.h. */
7485_ACEOF
7486cat confdefs.h >>conftest.$ac_ext
7487cat >>conftest.$ac_ext <<_ACEOF
7488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007489$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007490typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007491int
7492main ()
7493{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007494if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007495 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007496if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007497 return 0;
7498 ;
7499 return 0;
7500}
7501_ACEOF
7502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007503if { (ac_try="$ac_compile"
7504case "(($ac_try" in
7505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7506 *) ac_try_echo=$ac_try;;
7507esac
7508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007511 grep -v '^ *+' conftest.er1 >conftest.err
7512 rm -f conftest.er1
7513 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007515 (exit $ac_status); } && {
7516 test -z "$ac_c_werror_flag" ||
7517 test ! -s conftest.err
7518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007519 ac_cv_type_int=yes
7520else
7521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007522sed 's/^/| /' conftest.$ac_ext >&5
7523
Martin v. Löwiseba40652007-08-30 20:10:57 +00007524 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007525fi
Brett Cannon19fab762007-06-02 03:02:29 +00007526
Martin v. Löwiseba40652007-08-30 20:10:57 +00007527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7528fi
7529{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7530echo "${ECHO_T}$ac_cv_type_int" >&6; }
7531
7532# The cast to long int works around a bug in the HP C Compiler
7533# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7534# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7535# This bug is HP SR number 8606223364.
7536{ echo "$as_me:$LINENO: checking size of int" >&5
7537echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007538if test "${ac_cv_sizeof_int+set}" = set; then
7539 echo $ECHO_N "(cached) $ECHO_C" >&6
7540else
Martin v. Löwis11437992002-04-12 09:54:03 +00007541 if test "$cross_compiling" = yes; then
7542 # Depending upon the size, compute the lo and hi bounds.
7543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007544/* confdefs.h. */
7545_ACEOF
7546cat confdefs.h >>conftest.$ac_ext
7547cat >>conftest.$ac_ext <<_ACEOF
7548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007549$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007550 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007551int
7552main ()
7553{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007554static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007555test_array [0] = 0
7556
7557 ;
7558 return 0;
7559}
7560_ACEOF
7561rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007562if { (ac_try="$ac_compile"
7563case "(($ac_try" in
7564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7565 *) ac_try_echo=$ac_try;;
7566esac
7567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007570 grep -v '^ *+' conftest.er1 >conftest.err
7571 rm -f conftest.er1
7572 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007574 (exit $ac_status); } && {
7575 test -z "$ac_c_werror_flag" ||
7576 test ! -s conftest.err
7577 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007578 ac_lo=0 ac_mid=0
7579 while :; do
7580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007581/* confdefs.h. */
7582_ACEOF
7583cat confdefs.h >>conftest.$ac_ext
7584cat >>conftest.$ac_ext <<_ACEOF
7585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007586$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007587 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007588int
7589main ()
7590{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007591static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007592test_array [0] = 0
7593
7594 ;
7595 return 0;
7596}
7597_ACEOF
7598rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007599if { (ac_try="$ac_compile"
7600case "(($ac_try" in
7601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7602 *) ac_try_echo=$ac_try;;
7603esac
7604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007607 grep -v '^ *+' conftest.er1 >conftest.err
7608 rm -f conftest.er1
7609 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007611 (exit $ac_status); } && {
7612 test -z "$ac_c_werror_flag" ||
7613 test ! -s conftest.err
7614 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 ac_hi=$ac_mid; break
7616else
7617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007618sed 's/^/| /' conftest.$ac_ext >&5
7619
Martin v. Löwiseba40652007-08-30 20:10:57 +00007620 ac_lo=`expr $ac_mid + 1`
7621 if test $ac_lo -le $ac_mid; then
7622 ac_lo= ac_hi=
7623 break
7624 fi
7625 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007627
7628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007629 done
7630else
7631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007632sed 's/^/| /' conftest.$ac_ext >&5
7633
Martin v. Löwiseba40652007-08-30 20:10:57 +00007634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007635/* confdefs.h. */
7636_ACEOF
7637cat confdefs.h >>conftest.$ac_ext
7638cat >>conftest.$ac_ext <<_ACEOF
7639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007640$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007641 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007642int
7643main ()
7644{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007645static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007646test_array [0] = 0
7647
7648 ;
7649 return 0;
7650}
7651_ACEOF
7652rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007653if { (ac_try="$ac_compile"
7654case "(($ac_try" in
7655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7656 *) ac_try_echo=$ac_try;;
7657esac
7658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7659 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007661 grep -v '^ *+' conftest.er1 >conftest.err
7662 rm -f conftest.er1
7663 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007665 (exit $ac_status); } && {
7666 test -z "$ac_c_werror_flag" ||
7667 test ! -s conftest.err
7668 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007669 ac_hi=-1 ac_mid=-1
7670 while :; do
7671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007672/* confdefs.h. */
7673_ACEOF
7674cat confdefs.h >>conftest.$ac_ext
7675cat >>conftest.$ac_ext <<_ACEOF
7676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007677$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007678 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007679int
7680main ()
7681{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007683test_array [0] = 0
7684
7685 ;
7686 return 0;
7687}
7688_ACEOF
7689rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007690if { (ac_try="$ac_compile"
7691case "(($ac_try" in
7692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7693 *) ac_try_echo=$ac_try;;
7694esac
7695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007698 grep -v '^ *+' conftest.er1 >conftest.err
7699 rm -f conftest.er1
7700 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007702 (exit $ac_status); } && {
7703 test -z "$ac_c_werror_flag" ||
7704 test ! -s conftest.err
7705 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 ac_lo=$ac_mid; break
7707else
7708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007709sed 's/^/| /' conftest.$ac_ext >&5
7710
Martin v. Löwiseba40652007-08-30 20:10:57 +00007711 ac_hi=`expr '(' $ac_mid ')' - 1`
7712 if test $ac_mid -le $ac_hi; then
7713 ac_lo= ac_hi=
7714 break
7715 fi
7716 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007718
7719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007720 done
7721else
7722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007723sed 's/^/| /' conftest.$ac_ext >&5
7724
Martin v. Löwiseba40652007-08-30 20:10:57 +00007725 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007727
7728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007730
7731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007732# Binary search between lo and hi bounds.
7733while test "x$ac_lo" != "x$ac_hi"; do
7734 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007736/* confdefs.h. */
7737_ACEOF
7738cat confdefs.h >>conftest.$ac_ext
7739cat >>conftest.$ac_ext <<_ACEOF
7740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007741$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007742 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007743int
7744main ()
7745{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007746static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007747test_array [0] = 0
7748
7749 ;
7750 return 0;
7751}
7752_ACEOF
7753rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007754if { (ac_try="$ac_compile"
7755case "(($ac_try" in
7756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7757 *) ac_try_echo=$ac_try;;
7758esac
7759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007762 grep -v '^ *+' conftest.er1 >conftest.err
7763 rm -f conftest.er1
7764 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766 (exit $ac_status); } && {
7767 test -z "$ac_c_werror_flag" ||
7768 test ! -s conftest.err
7769 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 ac_hi=$ac_mid
7771else
7772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007773sed 's/^/| /' conftest.$ac_ext >&5
7774
Martin v. Löwiseba40652007-08-30 20:10:57 +00007775 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007777
7778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007779done
7780case $ac_lo in
7781?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007782'') if test "$ac_cv_type_int" = yes; then
7783 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007784See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007785echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007786See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007787 { (exit 77); exit 77; }; }
7788 else
7789 ac_cv_sizeof_int=0
7790 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007791esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007792else
Martin v. Löwis11437992002-04-12 09:54:03 +00007793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007794/* confdefs.h. */
7795_ACEOF
7796cat confdefs.h >>conftest.$ac_ext
7797cat >>conftest.$ac_ext <<_ACEOF
7798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007799$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007800 typedef int ac__type_sizeof_;
7801static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7802static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007803#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007804#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007805int
7806main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007807{
Martin v. Löwis11437992002-04-12 09:54:03 +00007808
7809 FILE *f = fopen ("conftest.val", "w");
7810 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007811 return 1;
7812 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007814 long int i = longval ();
7815 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7816 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 fprintf (f, "%ld\n", i);
7818 }
7819 else
7820 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007821 unsigned long int i = ulongval ();
7822 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7823 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 fprintf (f, "%lu\n", i);
7825 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007826 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007827
7828 ;
7829 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007830}
Martin v. Löwis11437992002-04-12 09:54:03 +00007831_ACEOF
7832rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007833if { (ac_try="$ac_link"
7834case "(($ac_try" in
7835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7836 *) ac_try_echo=$ac_try;;
7837esac
7838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7839 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007840 ac_status=$?
7841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7842 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007843 { (case "(($ac_try" in
7844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7845 *) ac_try_echo=$ac_try;;
7846esac
7847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7848 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007849 ac_status=$?
7850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851 (exit $ac_status); }; }; then
7852 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007853else
Martin v. Löwis11437992002-04-12 09:54:03 +00007854 echo "$as_me: program exited with status $ac_status" >&5
7855echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007856sed 's/^/| /' conftest.$ac_ext >&5
7857
Martin v. Löwis11437992002-04-12 09:54:03 +00007858( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007859if test "$ac_cv_type_int" = yes; then
7860 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007861See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007862echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007863See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007864 { (exit 77); exit 77; }; }
7865 else
7866 ac_cv_sizeof_int=0
7867 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869rm -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 +00007870fi
7871rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007873{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7874echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7875
7876
7877
Martin v. Löwis11437992002-04-12 09:54:03 +00007878cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007879#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007880_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007881
7882
Martin v. Löwiseba40652007-08-30 20:10:57 +00007883{ echo "$as_me:$LINENO: checking for long" >&5
7884echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007885if test "${ac_cv_type_long+set}" = set; then
7886 echo $ECHO_N "(cached) $ECHO_C" >&6
7887else
7888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007889/* confdefs.h. */
7890_ACEOF
7891cat confdefs.h >>conftest.$ac_ext
7892cat >>conftest.$ac_ext <<_ACEOF
7893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007894$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007895typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007896int
7897main ()
7898{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007899if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007901if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 return 0;
7903 ;
7904 return 0;
7905}
7906_ACEOF
7907rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007908if { (ac_try="$ac_compile"
7909case "(($ac_try" in
7910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7911 *) ac_try_echo=$ac_try;;
7912esac
7913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007916 grep -v '^ *+' conftest.er1 >conftest.err
7917 rm -f conftest.er1
7918 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007920 (exit $ac_status); } && {
7921 test -z "$ac_c_werror_flag" ||
7922 test ! -s conftest.err
7923 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007924 ac_cv_type_long=yes
7925else
7926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007927sed 's/^/| /' conftest.$ac_ext >&5
7928
Martin v. Löwiseba40652007-08-30 20:10:57 +00007929 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007930fi
Brett Cannon19fab762007-06-02 03:02:29 +00007931
Martin v. Löwiseba40652007-08-30 20:10:57 +00007932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7933fi
7934{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7935echo "${ECHO_T}$ac_cv_type_long" >&6; }
7936
7937# The cast to long int works around a bug in the HP C Compiler
7938# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7939# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7940# This bug is HP SR number 8606223364.
7941{ echo "$as_me:$LINENO: checking size of long" >&5
7942echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007943if test "${ac_cv_sizeof_long+set}" = set; then
7944 echo $ECHO_N "(cached) $ECHO_C" >&6
7945else
Martin v. Löwis11437992002-04-12 09:54:03 +00007946 if test "$cross_compiling" = yes; then
7947 # Depending upon the size, compute the lo and hi bounds.
7948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007949/* confdefs.h. */
7950_ACEOF
7951cat confdefs.h >>conftest.$ac_ext
7952cat >>conftest.$ac_ext <<_ACEOF
7953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007954$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007955 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007956int
7957main ()
7958{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007959static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007960test_array [0] = 0
7961
7962 ;
7963 return 0;
7964}
7965_ACEOF
7966rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007967if { (ac_try="$ac_compile"
7968case "(($ac_try" in
7969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7970 *) ac_try_echo=$ac_try;;
7971esac
7972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007975 grep -v '^ *+' conftest.er1 >conftest.err
7976 rm -f conftest.er1
7977 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007979 (exit $ac_status); } && {
7980 test -z "$ac_c_werror_flag" ||
7981 test ! -s conftest.err
7982 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 ac_lo=0 ac_mid=0
7984 while :; do
7985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007986/* confdefs.h. */
7987_ACEOF
7988cat confdefs.h >>conftest.$ac_ext
7989cat >>conftest.$ac_ext <<_ACEOF
7990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007991$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007992 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007993int
7994main ()
7995{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007996static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007997test_array [0] = 0
7998
7999 ;
8000 return 0;
8001}
8002_ACEOF
8003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008004if { (ac_try="$ac_compile"
8005case "(($ac_try" in
8006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8007 *) ac_try_echo=$ac_try;;
8008esac
8009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008012 grep -v '^ *+' conftest.er1 >conftest.err
8013 rm -f conftest.er1
8014 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008016 (exit $ac_status); } && {
8017 test -z "$ac_c_werror_flag" ||
8018 test ! -s conftest.err
8019 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ac_hi=$ac_mid; break
8021else
8022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008023sed 's/^/| /' conftest.$ac_ext >&5
8024
Martin v. Löwiseba40652007-08-30 20:10:57 +00008025 ac_lo=`expr $ac_mid + 1`
8026 if test $ac_lo -le $ac_mid; then
8027 ac_lo= ac_hi=
8028 break
8029 fi
8030 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008032
8033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008034 done
8035else
8036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008037sed 's/^/| /' conftest.$ac_ext >&5
8038
Martin v. Löwiseba40652007-08-30 20:10:57 +00008039 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008040/* confdefs.h. */
8041_ACEOF
8042cat confdefs.h >>conftest.$ac_ext
8043cat >>conftest.$ac_ext <<_ACEOF
8044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008045$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008046 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008047int
8048main ()
8049{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008050static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008051test_array [0] = 0
8052
8053 ;
8054 return 0;
8055}
8056_ACEOF
8057rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008058if { (ac_try="$ac_compile"
8059case "(($ac_try" in
8060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8061 *) ac_try_echo=$ac_try;;
8062esac
8063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008066 grep -v '^ *+' conftest.er1 >conftest.err
8067 rm -f conftest.er1
8068 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008070 (exit $ac_status); } && {
8071 test -z "$ac_c_werror_flag" ||
8072 test ! -s conftest.err
8073 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008074 ac_hi=-1 ac_mid=-1
8075 while :; do
8076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008077/* confdefs.h. */
8078_ACEOF
8079cat confdefs.h >>conftest.$ac_ext
8080cat >>conftest.$ac_ext <<_ACEOF
8081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008082$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008083 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008084int
8085main ()
8086{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008087static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008088test_array [0] = 0
8089
8090 ;
8091 return 0;
8092}
8093_ACEOF
8094rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008095if { (ac_try="$ac_compile"
8096case "(($ac_try" in
8097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8098 *) ac_try_echo=$ac_try;;
8099esac
8100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8101 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008103 grep -v '^ *+' conftest.er1 >conftest.err
8104 rm -f conftest.er1
8105 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008107 (exit $ac_status); } && {
8108 test -z "$ac_c_werror_flag" ||
8109 test ! -s conftest.err
8110 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 ac_lo=$ac_mid; break
8112else
8113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008114sed 's/^/| /' conftest.$ac_ext >&5
8115
Martin v. Löwiseba40652007-08-30 20:10:57 +00008116 ac_hi=`expr '(' $ac_mid ')' - 1`
8117 if test $ac_mid -le $ac_hi; then
8118 ac_lo= ac_hi=
8119 break
8120 fi
8121 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008123
8124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008125 done
8126else
8127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008128sed 's/^/| /' conftest.$ac_ext >&5
8129
Martin v. Löwiseba40652007-08-30 20:10:57 +00008130 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008132
8133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008135
8136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008137# Binary search between lo and hi bounds.
8138while test "x$ac_lo" != "x$ac_hi"; do
8139 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008141/* confdefs.h. */
8142_ACEOF
8143cat confdefs.h >>conftest.$ac_ext
8144cat >>conftest.$ac_ext <<_ACEOF
8145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008146$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008147 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008148int
8149main ()
8150{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008151static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008152test_array [0] = 0
8153
8154 ;
8155 return 0;
8156}
8157_ACEOF
8158rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008159if { (ac_try="$ac_compile"
8160case "(($ac_try" in
8161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8162 *) ac_try_echo=$ac_try;;
8163esac
8164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8165 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008167 grep -v '^ *+' conftest.er1 >conftest.err
8168 rm -f conftest.er1
8169 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171 (exit $ac_status); } && {
8172 test -z "$ac_c_werror_flag" ||
8173 test ! -s conftest.err
8174 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008175 ac_hi=$ac_mid
8176else
8177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008178sed 's/^/| /' conftest.$ac_ext >&5
8179
Martin v. Löwiseba40652007-08-30 20:10:57 +00008180 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008182
8183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008184done
8185case $ac_lo in
8186?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008187'') if test "$ac_cv_type_long" = yes; then
8188 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008189See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008190echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008191See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008192 { (exit 77); exit 77; }; }
8193 else
8194 ac_cv_sizeof_long=0
8195 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008196esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008197else
Martin v. Löwis11437992002-04-12 09:54:03 +00008198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008199/* confdefs.h. */
8200_ACEOF
8201cat confdefs.h >>conftest.$ac_ext
8202cat >>conftest.$ac_ext <<_ACEOF
8203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008204$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008205 typedef long ac__type_sizeof_;
8206static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8207static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008208#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008209#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008210int
8211main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008212{
Martin v. Löwis11437992002-04-12 09:54:03 +00008213
8214 FILE *f = fopen ("conftest.val", "w");
8215 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008216 return 1;
8217 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008219 long int i = longval ();
8220 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8221 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 fprintf (f, "%ld\n", i);
8223 }
8224 else
8225 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008226 unsigned long int i = ulongval ();
8227 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8228 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008229 fprintf (f, "%lu\n", i);
8230 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008231 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008232
8233 ;
8234 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008235}
Martin v. Löwis11437992002-04-12 09:54:03 +00008236_ACEOF
8237rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008238if { (ac_try="$ac_link"
8239case "(($ac_try" in
8240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8241 *) ac_try_echo=$ac_try;;
8242esac
8243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8244 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008245 ac_status=$?
8246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8247 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008248 { (case "(($ac_try" in
8249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8250 *) ac_try_echo=$ac_try;;
8251esac
8252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8253 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008254 ac_status=$?
8255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8256 (exit $ac_status); }; }; then
8257 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008258else
Martin v. Löwis11437992002-04-12 09:54:03 +00008259 echo "$as_me: program exited with status $ac_status" >&5
8260echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008261sed 's/^/| /' conftest.$ac_ext >&5
8262
Martin v. Löwis11437992002-04-12 09:54:03 +00008263( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008264if test "$ac_cv_type_long" = yes; then
8265 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008266See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008267echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008268See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008269 { (exit 77); exit 77; }; }
8270 else
8271 ac_cv_sizeof_long=0
8272 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274rm -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 +00008275fi
8276rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008278{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8279echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
8280
8281
8282
Martin v. Löwis11437992002-04-12 09:54:03 +00008283cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008284#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008285_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008286
8287
Martin v. Löwiseba40652007-08-30 20:10:57 +00008288{ echo "$as_me:$LINENO: checking for void *" >&5
8289echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008290if test "${ac_cv_type_void_p+set}" = set; then
8291 echo $ECHO_N "(cached) $ECHO_C" >&6
8292else
8293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008294/* confdefs.h. */
8295_ACEOF
8296cat confdefs.h >>conftest.$ac_ext
8297cat >>conftest.$ac_ext <<_ACEOF
8298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008299$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008300typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008301int
8302main ()
8303{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008304if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008305 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008306if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008307 return 0;
8308 ;
8309 return 0;
8310}
8311_ACEOF
8312rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008313if { (ac_try="$ac_compile"
8314case "(($ac_try" in
8315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8316 *) ac_try_echo=$ac_try;;
8317esac
8318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008321 grep -v '^ *+' conftest.er1 >conftest.err
8322 rm -f conftest.er1
8323 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008325 (exit $ac_status); } && {
8326 test -z "$ac_c_werror_flag" ||
8327 test ! -s conftest.err
8328 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008329 ac_cv_type_void_p=yes
8330else
8331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008332sed 's/^/| /' conftest.$ac_ext >&5
8333
Martin v. Löwiseba40652007-08-30 20:10:57 +00008334 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008335fi
Brett Cannon19fab762007-06-02 03:02:29 +00008336
Martin v. Löwiseba40652007-08-30 20:10:57 +00008337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8338fi
8339{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8340echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8341
8342# The cast to long int works around a bug in the HP C Compiler
8343# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8344# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8345# This bug is HP SR number 8606223364.
8346{ echo "$as_me:$LINENO: checking size of void *" >&5
8347echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008348if test "${ac_cv_sizeof_void_p+set}" = set; then
8349 echo $ECHO_N "(cached) $ECHO_C" >&6
8350else
Martin v. Löwis11437992002-04-12 09:54:03 +00008351 if test "$cross_compiling" = yes; then
8352 # Depending upon the size, compute the lo and hi bounds.
8353cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008354/* confdefs.h. */
8355_ACEOF
8356cat confdefs.h >>conftest.$ac_ext
8357cat >>conftest.$ac_ext <<_ACEOF
8358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008359$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008360 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008361int
8362main ()
8363{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008364static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008365test_array [0] = 0
8366
8367 ;
8368 return 0;
8369}
8370_ACEOF
8371rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008372if { (ac_try="$ac_compile"
8373case "(($ac_try" in
8374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8375 *) ac_try_echo=$ac_try;;
8376esac
8377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008380 grep -v '^ *+' conftest.er1 >conftest.err
8381 rm -f conftest.er1
8382 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008384 (exit $ac_status); } && {
8385 test -z "$ac_c_werror_flag" ||
8386 test ! -s conftest.err
8387 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008388 ac_lo=0 ac_mid=0
8389 while :; do
8390 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008391/* confdefs.h. */
8392_ACEOF
8393cat confdefs.h >>conftest.$ac_ext
8394cat >>conftest.$ac_ext <<_ACEOF
8395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008396$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008397 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008398int
8399main ()
8400{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008401static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008402test_array [0] = 0
8403
8404 ;
8405 return 0;
8406}
8407_ACEOF
8408rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008409if { (ac_try="$ac_compile"
8410case "(($ac_try" in
8411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8412 *) ac_try_echo=$ac_try;;
8413esac
8414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008417 grep -v '^ *+' conftest.er1 >conftest.err
8418 rm -f conftest.er1
8419 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008421 (exit $ac_status); } && {
8422 test -z "$ac_c_werror_flag" ||
8423 test ! -s conftest.err
8424 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 ac_hi=$ac_mid; break
8426else
8427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008428sed 's/^/| /' conftest.$ac_ext >&5
8429
Martin v. Löwiseba40652007-08-30 20:10:57 +00008430 ac_lo=`expr $ac_mid + 1`
8431 if test $ac_lo -le $ac_mid; then
8432 ac_lo= ac_hi=
8433 break
8434 fi
8435 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008437
8438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008439 done
8440else
8441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008442sed 's/^/| /' conftest.$ac_ext >&5
8443
Martin v. Löwiseba40652007-08-30 20:10:57 +00008444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008445/* confdefs.h. */
8446_ACEOF
8447cat confdefs.h >>conftest.$ac_ext
8448cat >>conftest.$ac_ext <<_ACEOF
8449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008450$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008451 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008452int
8453main ()
8454{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008455static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008456test_array [0] = 0
8457
8458 ;
8459 return 0;
8460}
8461_ACEOF
8462rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008463if { (ac_try="$ac_compile"
8464case "(($ac_try" in
8465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8466 *) ac_try_echo=$ac_try;;
8467esac
8468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8469 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008471 grep -v '^ *+' conftest.er1 >conftest.err
8472 rm -f conftest.er1
8473 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008475 (exit $ac_status); } && {
8476 test -z "$ac_c_werror_flag" ||
8477 test ! -s conftest.err
8478 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 ac_hi=-1 ac_mid=-1
8480 while :; do
8481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008482/* confdefs.h. */
8483_ACEOF
8484cat confdefs.h >>conftest.$ac_ext
8485cat >>conftest.$ac_ext <<_ACEOF
8486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008487$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008488 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008489int
8490main ()
8491{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008492static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008493test_array [0] = 0
8494
8495 ;
8496 return 0;
8497}
8498_ACEOF
8499rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008500if { (ac_try="$ac_compile"
8501case "(($ac_try" in
8502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8503 *) ac_try_echo=$ac_try;;
8504esac
8505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008508 grep -v '^ *+' conftest.er1 >conftest.err
8509 rm -f conftest.er1
8510 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008512 (exit $ac_status); } && {
8513 test -z "$ac_c_werror_flag" ||
8514 test ! -s conftest.err
8515 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 ac_lo=$ac_mid; break
8517else
8518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008519sed 's/^/| /' conftest.$ac_ext >&5
8520
Martin v. Löwiseba40652007-08-30 20:10:57 +00008521 ac_hi=`expr '(' $ac_mid ')' - 1`
8522 if test $ac_mid -le $ac_hi; then
8523 ac_lo= ac_hi=
8524 break
8525 fi
8526 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008528
8529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 done
8531else
8532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008533sed 's/^/| /' conftest.$ac_ext >&5
8534
Martin v. Löwiseba40652007-08-30 20:10:57 +00008535 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008537
8538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008540
8541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008542# Binary search between lo and hi bounds.
8543while test "x$ac_lo" != "x$ac_hi"; do
8544 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008546/* confdefs.h. */
8547_ACEOF
8548cat confdefs.h >>conftest.$ac_ext
8549cat >>conftest.$ac_ext <<_ACEOF
8550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008551$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008552 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008553int
8554main ()
8555{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008557test_array [0] = 0
8558
8559 ;
8560 return 0;
8561}
8562_ACEOF
8563rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008564if { (ac_try="$ac_compile"
8565case "(($ac_try" in
8566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8567 *) ac_try_echo=$ac_try;;
8568esac
8569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008572 grep -v '^ *+' conftest.er1 >conftest.err
8573 rm -f conftest.er1
8574 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576 (exit $ac_status); } && {
8577 test -z "$ac_c_werror_flag" ||
8578 test ! -s conftest.err
8579 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 ac_hi=$ac_mid
8581else
8582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008583sed 's/^/| /' conftest.$ac_ext >&5
8584
Martin v. Löwiseba40652007-08-30 20:10:57 +00008585 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008587
8588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008589done
8590case $ac_lo in
8591?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008592'') if test "$ac_cv_type_void_p" = yes; then
8593 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008594See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008595echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008596See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597 { (exit 77); exit 77; }; }
8598 else
8599 ac_cv_sizeof_void_p=0
8600 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008601esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008602else
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008604/* confdefs.h. */
8605_ACEOF
8606cat confdefs.h >>conftest.$ac_ext
8607cat >>conftest.$ac_ext <<_ACEOF
8608/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008609$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008610 typedef void * ac__type_sizeof_;
8611static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8612static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008613#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008614#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008615int
8616main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008617{
Martin v. Löwis11437992002-04-12 09:54:03 +00008618
8619 FILE *f = fopen ("conftest.val", "w");
8620 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008621 return 1;
8622 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008624 long int i = longval ();
8625 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8626 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008627 fprintf (f, "%ld\n", i);
8628 }
8629 else
8630 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008631 unsigned long int i = ulongval ();
8632 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8633 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 fprintf (f, "%lu\n", i);
8635 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008636 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008637
8638 ;
8639 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008640}
Martin v. Löwis11437992002-04-12 09:54:03 +00008641_ACEOF
8642rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008643if { (ac_try="$ac_link"
8644case "(($ac_try" in
8645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8646 *) ac_try_echo=$ac_try;;
8647esac
8648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8649 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008650 ac_status=$?
8651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8652 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008653 { (case "(($ac_try" in
8654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8655 *) ac_try_echo=$ac_try;;
8656esac
8657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8658 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_status=$?
8660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8661 (exit $ac_status); }; }; then
8662 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008663else
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 echo "$as_me: program exited with status $ac_status" >&5
8665echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008666sed 's/^/| /' conftest.$ac_ext >&5
8667
Martin v. Löwis11437992002-04-12 09:54:03 +00008668( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008669if test "$ac_cv_type_void_p" = yes; then
8670 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008671See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008672echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008673See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008674 { (exit 77); exit 77; }; }
8675 else
8676 ac_cv_sizeof_void_p=0
8677 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679rm -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 +00008680fi
8681rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008683{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8684echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8685
8686
8687
Martin v. Löwis11437992002-04-12 09:54:03 +00008688cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008689#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008690_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008691
8692
Martin v. Löwiseba40652007-08-30 20:10:57 +00008693{ echo "$as_me:$LINENO: checking for short" >&5
8694echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008695if test "${ac_cv_type_short+set}" = set; then
8696 echo $ECHO_N "(cached) $ECHO_C" >&6
8697else
8698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008699/* confdefs.h. */
8700_ACEOF
8701cat confdefs.h >>conftest.$ac_ext
8702cat >>conftest.$ac_ext <<_ACEOF
8703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008704$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008705typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008706int
8707main ()
8708{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008709if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008711if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008712 return 0;
8713 ;
8714 return 0;
8715}
8716_ACEOF
8717rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008718if { (ac_try="$ac_compile"
8719case "(($ac_try" in
8720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8721 *) ac_try_echo=$ac_try;;
8722esac
8723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008726 grep -v '^ *+' conftest.er1 >conftest.err
8727 rm -f conftest.er1
8728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008730 (exit $ac_status); } && {
8731 test -z "$ac_c_werror_flag" ||
8732 test ! -s conftest.err
8733 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008734 ac_cv_type_short=yes
8735else
8736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008737sed 's/^/| /' conftest.$ac_ext >&5
8738
Martin v. Löwiseba40652007-08-30 20:10:57 +00008739 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008740fi
Brett Cannon19fab762007-06-02 03:02:29 +00008741
Martin v. Löwiseba40652007-08-30 20:10:57 +00008742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8743fi
8744{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8745echo "${ECHO_T}$ac_cv_type_short" >&6; }
8746
8747# The cast to long int works around a bug in the HP C Compiler
8748# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8749# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8750# This bug is HP SR number 8606223364.
8751{ echo "$as_me:$LINENO: checking size of short" >&5
8752echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008753if test "${ac_cv_sizeof_short+set}" = set; then
8754 echo $ECHO_N "(cached) $ECHO_C" >&6
8755else
Martin v. Löwis11437992002-04-12 09:54:03 +00008756 if test "$cross_compiling" = yes; then
8757 # Depending upon the size, compute the lo and hi bounds.
8758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008759/* confdefs.h. */
8760_ACEOF
8761cat confdefs.h >>conftest.$ac_ext
8762cat >>conftest.$ac_ext <<_ACEOF
8763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008764$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008765 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008766int
8767main ()
8768{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008769static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008770test_array [0] = 0
8771
8772 ;
8773 return 0;
8774}
8775_ACEOF
8776rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008777if { (ac_try="$ac_compile"
8778case "(($ac_try" in
8779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8780 *) ac_try_echo=$ac_try;;
8781esac
8782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8783 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008785 grep -v '^ *+' conftest.er1 >conftest.err
8786 rm -f conftest.er1
8787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008789 (exit $ac_status); } && {
8790 test -z "$ac_c_werror_flag" ||
8791 test ! -s conftest.err
8792 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 ac_lo=0 ac_mid=0
8794 while :; do
8795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008796/* confdefs.h. */
8797_ACEOF
8798cat confdefs.h >>conftest.$ac_ext
8799cat >>conftest.$ac_ext <<_ACEOF
8800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008801$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008802 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008803int
8804main ()
8805{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008806static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008807test_array [0] = 0
8808
8809 ;
8810 return 0;
8811}
8812_ACEOF
8813rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008814if { (ac_try="$ac_compile"
8815case "(($ac_try" in
8816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8817 *) ac_try_echo=$ac_try;;
8818esac
8819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8820 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008822 grep -v '^ *+' conftest.er1 >conftest.err
8823 rm -f conftest.er1
8824 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008826 (exit $ac_status); } && {
8827 test -z "$ac_c_werror_flag" ||
8828 test ! -s conftest.err
8829 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 ac_hi=$ac_mid; break
8831else
8832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008833sed 's/^/| /' conftest.$ac_ext >&5
8834
Martin v. Löwiseba40652007-08-30 20:10:57 +00008835 ac_lo=`expr $ac_mid + 1`
8836 if test $ac_lo -le $ac_mid; then
8837 ac_lo= ac_hi=
8838 break
8839 fi
8840 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008842
8843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 done
8845else
8846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008847sed 's/^/| /' conftest.$ac_ext >&5
8848
Martin v. Löwiseba40652007-08-30 20:10:57 +00008849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008850/* confdefs.h. */
8851_ACEOF
8852cat confdefs.h >>conftest.$ac_ext
8853cat >>conftest.$ac_ext <<_ACEOF
8854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008855$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008856 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008857int
8858main ()
8859{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008860static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008861test_array [0] = 0
8862
8863 ;
8864 return 0;
8865}
8866_ACEOF
8867rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008868if { (ac_try="$ac_compile"
8869case "(($ac_try" in
8870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8871 *) ac_try_echo=$ac_try;;
8872esac
8873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008876 grep -v '^ *+' conftest.er1 >conftest.err
8877 rm -f conftest.er1
8878 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008880 (exit $ac_status); } && {
8881 test -z "$ac_c_werror_flag" ||
8882 test ! -s conftest.err
8883 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_hi=-1 ac_mid=-1
8885 while :; do
8886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008887/* confdefs.h. */
8888_ACEOF
8889cat confdefs.h >>conftest.$ac_ext
8890cat >>conftest.$ac_ext <<_ACEOF
8891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008892$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008893 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008894int
8895main ()
8896{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008897static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008898test_array [0] = 0
8899
8900 ;
8901 return 0;
8902}
8903_ACEOF
8904rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008905if { (ac_try="$ac_compile"
8906case "(($ac_try" in
8907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8908 *) ac_try_echo=$ac_try;;
8909esac
8910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008913 grep -v '^ *+' conftest.er1 >conftest.err
8914 rm -f conftest.er1
8915 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008917 (exit $ac_status); } && {
8918 test -z "$ac_c_werror_flag" ||
8919 test ! -s conftest.err
8920 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 ac_lo=$ac_mid; break
8922else
8923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008924sed 's/^/| /' conftest.$ac_ext >&5
8925
Martin v. Löwiseba40652007-08-30 20:10:57 +00008926 ac_hi=`expr '(' $ac_mid ')' - 1`
8927 if test $ac_mid -le $ac_hi; then
8928 ac_lo= ac_hi=
8929 break
8930 fi
8931 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008933
8934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 done
8936else
8937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008938sed 's/^/| /' conftest.$ac_ext >&5
8939
Martin v. Löwiseba40652007-08-30 20:10:57 +00008940 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008942
8943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008944fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008945
8946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008947# Binary search between lo and hi bounds.
8948while test "x$ac_lo" != "x$ac_hi"; do
8949 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8950 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008951/* confdefs.h. */
8952_ACEOF
8953cat confdefs.h >>conftest.$ac_ext
8954cat >>conftest.$ac_ext <<_ACEOF
8955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008956$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008957 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008958int
8959main ()
8960{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008961static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008962test_array [0] = 0
8963
8964 ;
8965 return 0;
8966}
8967_ACEOF
8968rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969if { (ac_try="$ac_compile"
8970case "(($ac_try" in
8971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8972 *) ac_try_echo=$ac_try;;
8973esac
8974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8975 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008977 grep -v '^ *+' conftest.er1 >conftest.err
8978 rm -f conftest.er1
8979 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981 (exit $ac_status); } && {
8982 test -z "$ac_c_werror_flag" ||
8983 test ! -s conftest.err
8984 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 ac_hi=$ac_mid
8986else
8987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008988sed 's/^/| /' conftest.$ac_ext >&5
8989
Martin v. Löwiseba40652007-08-30 20:10:57 +00008990 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008992
8993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008994done
8995case $ac_lo in
8996?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008997'') if test "$ac_cv_type_short" = yes; then
8998 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008999See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009000echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009001See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009002 { (exit 77); exit 77; }; }
9003 else
9004 ac_cv_sizeof_short=0
9005 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009006esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009007else
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009009/* confdefs.h. */
9010_ACEOF
9011cat confdefs.h >>conftest.$ac_ext
9012cat >>conftest.$ac_ext <<_ACEOF
9013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009014$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009015 typedef short ac__type_sizeof_;
9016static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9017static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009018#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009019#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009020int
9021main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009022{
Martin v. Löwis11437992002-04-12 09:54:03 +00009023
9024 FILE *f = fopen ("conftest.val", "w");
9025 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009026 return 1;
9027 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009029 long int i = longval ();
9030 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9031 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 fprintf (f, "%ld\n", i);
9033 }
9034 else
9035 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036 unsigned long int i = ulongval ();
9037 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9038 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 fprintf (f, "%lu\n", i);
9040 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009041 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009042
9043 ;
9044 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009045}
Martin v. Löwis11437992002-04-12 09:54:03 +00009046_ACEOF
9047rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009048if { (ac_try="$ac_link"
9049case "(($ac_try" in
9050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9051 *) ac_try_echo=$ac_try;;
9052esac
9053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9054 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009055 ac_status=$?
9056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9057 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009058 { (case "(($ac_try" in
9059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9060 *) ac_try_echo=$ac_try;;
9061esac
9062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9063 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009064 ac_status=$?
9065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9066 (exit $ac_status); }; }; then
9067 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009068else
Martin v. Löwis11437992002-04-12 09:54:03 +00009069 echo "$as_me: program exited with status $ac_status" >&5
9070echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009071sed 's/^/| /' conftest.$ac_ext >&5
9072
Martin v. Löwis11437992002-04-12 09:54:03 +00009073( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009074if test "$ac_cv_type_short" = yes; then
9075 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009076See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009077echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009078See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009079 { (exit 77); exit 77; }; }
9080 else
9081 ac_cv_sizeof_short=0
9082 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084rm -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 +00009085fi
9086rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009088{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9089echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
9090
9091
9092
Martin v. Löwis11437992002-04-12 09:54:03 +00009093cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009094#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009095_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009096
9097
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098{ echo "$as_me:$LINENO: checking for float" >&5
9099echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009100if test "${ac_cv_type_float+set}" = set; then
9101 echo $ECHO_N "(cached) $ECHO_C" >&6
9102else
9103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009104/* confdefs.h. */
9105_ACEOF
9106cat confdefs.h >>conftest.$ac_ext
9107cat >>conftest.$ac_ext <<_ACEOF
9108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009109$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009110typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009111int
9112main ()
9113{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009114if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009116if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 return 0;
9118 ;
9119 return 0;
9120}
9121_ACEOF
9122rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009123if { (ac_try="$ac_compile"
9124case "(($ac_try" in
9125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9126 *) ac_try_echo=$ac_try;;
9127esac
9128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9129 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009131 grep -v '^ *+' conftest.er1 >conftest.err
9132 rm -f conftest.er1
9133 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009135 (exit $ac_status); } && {
9136 test -z "$ac_c_werror_flag" ||
9137 test ! -s conftest.err
9138 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 ac_cv_type_float=yes
9140else
9141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009142sed 's/^/| /' conftest.$ac_ext >&5
9143
Martin v. Löwiseba40652007-08-30 20:10:57 +00009144 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009145fi
Brett Cannon19fab762007-06-02 03:02:29 +00009146
Martin v. Löwiseba40652007-08-30 20:10:57 +00009147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9148fi
9149{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9150echo "${ECHO_T}$ac_cv_type_float" >&6; }
9151
9152# The cast to long int works around a bug in the HP C Compiler
9153# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9154# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9155# This bug is HP SR number 8606223364.
9156{ echo "$as_me:$LINENO: checking size of float" >&5
9157echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009158if test "${ac_cv_sizeof_float+set}" = set; then
9159 echo $ECHO_N "(cached) $ECHO_C" >&6
9160else
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 if test "$cross_compiling" = yes; then
9162 # Depending upon the size, compute the lo and hi bounds.
9163cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009164/* confdefs.h. */
9165_ACEOF
9166cat confdefs.h >>conftest.$ac_ext
9167cat >>conftest.$ac_ext <<_ACEOF
9168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009169$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009170 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009171int
9172main ()
9173{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009174static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009175test_array [0] = 0
9176
9177 ;
9178 return 0;
9179}
9180_ACEOF
9181rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009182if { (ac_try="$ac_compile"
9183case "(($ac_try" in
9184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9185 *) ac_try_echo=$ac_try;;
9186esac
9187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9188 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009190 grep -v '^ *+' conftest.er1 >conftest.err
9191 rm -f conftest.er1
9192 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009194 (exit $ac_status); } && {
9195 test -z "$ac_c_werror_flag" ||
9196 test ! -s conftest.err
9197 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009198 ac_lo=0 ac_mid=0
9199 while :; do
9200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009201/* confdefs.h. */
9202_ACEOF
9203cat confdefs.h >>conftest.$ac_ext
9204cat >>conftest.$ac_ext <<_ACEOF
9205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009206$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009207 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009208int
9209main ()
9210{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009211static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009212test_array [0] = 0
9213
9214 ;
9215 return 0;
9216}
9217_ACEOF
9218rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009219if { (ac_try="$ac_compile"
9220case "(($ac_try" in
9221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9222 *) ac_try_echo=$ac_try;;
9223esac
9224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009227 grep -v '^ *+' conftest.er1 >conftest.err
9228 rm -f conftest.er1
9229 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009231 (exit $ac_status); } && {
9232 test -z "$ac_c_werror_flag" ||
9233 test ! -s conftest.err
9234 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 ac_hi=$ac_mid; break
9236else
9237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009238sed 's/^/| /' conftest.$ac_ext >&5
9239
Martin v. Löwiseba40652007-08-30 20:10:57 +00009240 ac_lo=`expr $ac_mid + 1`
9241 if test $ac_lo -le $ac_mid; then
9242 ac_lo= ac_hi=
9243 break
9244 fi
9245 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009247
9248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 done
9250else
9251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009252sed 's/^/| /' conftest.$ac_ext >&5
9253
Martin v. Löwiseba40652007-08-30 20:10:57 +00009254 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009255/* confdefs.h. */
9256_ACEOF
9257cat confdefs.h >>conftest.$ac_ext
9258cat >>conftest.$ac_ext <<_ACEOF
9259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009260$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009261 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009262int
9263main ()
9264{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009265static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009266test_array [0] = 0
9267
9268 ;
9269 return 0;
9270}
9271_ACEOF
9272rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009273if { (ac_try="$ac_compile"
9274case "(($ac_try" in
9275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9276 *) ac_try_echo=$ac_try;;
9277esac
9278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009281 grep -v '^ *+' conftest.er1 >conftest.err
9282 rm -f conftest.er1
9283 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009285 (exit $ac_status); } && {
9286 test -z "$ac_c_werror_flag" ||
9287 test ! -s conftest.err
9288 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 ac_hi=-1 ac_mid=-1
9290 while :; do
9291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009292/* confdefs.h. */
9293_ACEOF
9294cat confdefs.h >>conftest.$ac_ext
9295cat >>conftest.$ac_ext <<_ACEOF
9296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009297$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009298 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009299int
9300main ()
9301{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009302static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009303test_array [0] = 0
9304
9305 ;
9306 return 0;
9307}
9308_ACEOF
9309rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009310if { (ac_try="$ac_compile"
9311case "(($ac_try" in
9312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9313 *) ac_try_echo=$ac_try;;
9314esac
9315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009318 grep -v '^ *+' conftest.er1 >conftest.err
9319 rm -f conftest.er1
9320 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009322 (exit $ac_status); } && {
9323 test -z "$ac_c_werror_flag" ||
9324 test ! -s conftest.err
9325 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 ac_lo=$ac_mid; break
9327else
9328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009329sed 's/^/| /' conftest.$ac_ext >&5
9330
Martin v. Löwiseba40652007-08-30 20:10:57 +00009331 ac_hi=`expr '(' $ac_mid ')' - 1`
9332 if test $ac_mid -le $ac_hi; then
9333 ac_lo= ac_hi=
9334 break
9335 fi
9336 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009338
9339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 done
9341else
9342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009343sed 's/^/| /' conftest.$ac_ext >&5
9344
Martin v. Löwiseba40652007-08-30 20:10:57 +00009345 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009347
9348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009350
9351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009352# Binary search between lo and hi bounds.
9353while test "x$ac_lo" != "x$ac_hi"; do
9354 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9355 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009356/* confdefs.h. */
9357_ACEOF
9358cat confdefs.h >>conftest.$ac_ext
9359cat >>conftest.$ac_ext <<_ACEOF
9360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009361$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009362 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009363int
9364main ()
9365{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009366static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009367test_array [0] = 0
9368
9369 ;
9370 return 0;
9371}
9372_ACEOF
9373rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009374if { (ac_try="$ac_compile"
9375case "(($ac_try" in
9376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9377 *) ac_try_echo=$ac_try;;
9378esac
9379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9380 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009382 grep -v '^ *+' conftest.er1 >conftest.err
9383 rm -f conftest.er1
9384 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009386 (exit $ac_status); } && {
9387 test -z "$ac_c_werror_flag" ||
9388 test ! -s conftest.err
9389 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009390 ac_hi=$ac_mid
9391else
9392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009393sed 's/^/| /' conftest.$ac_ext >&5
9394
Martin v. Löwiseba40652007-08-30 20:10:57 +00009395 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009397
9398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009399done
9400case $ac_lo in
9401?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009402'') if test "$ac_cv_type_float" = yes; then
9403 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009404See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009405echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009406See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009407 { (exit 77); exit 77; }; }
9408 else
9409 ac_cv_sizeof_float=0
9410 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009411esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009412else
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009414/* confdefs.h. */
9415_ACEOF
9416cat confdefs.h >>conftest.$ac_ext
9417cat >>conftest.$ac_ext <<_ACEOF
9418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009419$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009420 typedef float ac__type_sizeof_;
9421static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9422static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009423#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009424#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009425int
9426main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009427{
Martin v. Löwis11437992002-04-12 09:54:03 +00009428
9429 FILE *f = fopen ("conftest.val", "w");
9430 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009431 return 1;
9432 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009434 long int i = longval ();
9435 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9436 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 fprintf (f, "%ld\n", i);
9438 }
9439 else
9440 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009441 unsigned long int i = ulongval ();
9442 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9443 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 fprintf (f, "%lu\n", i);
9445 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009446 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009447
9448 ;
9449 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009450}
Martin v. Löwis11437992002-04-12 09:54:03 +00009451_ACEOF
9452rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009453if { (ac_try="$ac_link"
9454case "(($ac_try" in
9455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9456 *) ac_try_echo=$ac_try;;
9457esac
9458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9459 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009460 ac_status=$?
9461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9462 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009463 { (case "(($ac_try" in
9464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9465 *) ac_try_echo=$ac_try;;
9466esac
9467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9468 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 ac_status=$?
9470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9471 (exit $ac_status); }; }; then
9472 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009473else
Martin v. Löwis11437992002-04-12 09:54:03 +00009474 echo "$as_me: program exited with status $ac_status" >&5
9475echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009476sed 's/^/| /' conftest.$ac_ext >&5
9477
Martin v. Löwis11437992002-04-12 09:54:03 +00009478( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009479if test "$ac_cv_type_float" = yes; then
9480 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009481See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009483See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009484 { (exit 77); exit 77; }; }
9485 else
9486 ac_cv_sizeof_float=0
9487 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489rm -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 +00009490fi
9491rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009493{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9494echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9495
9496
9497
Martin v. Löwis11437992002-04-12 09:54:03 +00009498cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009499#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009500_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009501
9502
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503{ echo "$as_me:$LINENO: checking for double" >&5
9504echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009505if test "${ac_cv_type_double+set}" = set; then
9506 echo $ECHO_N "(cached) $ECHO_C" >&6
9507else
9508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009509/* confdefs.h. */
9510_ACEOF
9511cat confdefs.h >>conftest.$ac_ext
9512cat >>conftest.$ac_ext <<_ACEOF
9513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009514$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009515typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009516int
9517main ()
9518{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009519if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009521if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 return 0;
9523 ;
9524 return 0;
9525}
9526_ACEOF
9527rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009528if { (ac_try="$ac_compile"
9529case "(($ac_try" in
9530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9531 *) ac_try_echo=$ac_try;;
9532esac
9533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009536 grep -v '^ *+' conftest.er1 >conftest.err
9537 rm -f conftest.er1
9538 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009540 (exit $ac_status); } && {
9541 test -z "$ac_c_werror_flag" ||
9542 test ! -s conftest.err
9543 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009544 ac_cv_type_double=yes
9545else
9546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009547sed 's/^/| /' conftest.$ac_ext >&5
9548
Martin v. Löwiseba40652007-08-30 20:10:57 +00009549 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009550fi
Brett Cannon19fab762007-06-02 03:02:29 +00009551
Martin v. Löwiseba40652007-08-30 20:10:57 +00009552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9553fi
9554{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9555echo "${ECHO_T}$ac_cv_type_double" >&6; }
9556
9557# The cast to long int works around a bug in the HP C Compiler
9558# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9559# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9560# This bug is HP SR number 8606223364.
9561{ echo "$as_me:$LINENO: checking size of double" >&5
9562echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009563if test "${ac_cv_sizeof_double+set}" = set; then
9564 echo $ECHO_N "(cached) $ECHO_C" >&6
9565else
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 if test "$cross_compiling" = yes; then
9567 # Depending upon the size, compute the lo and hi bounds.
9568cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009569/* confdefs.h. */
9570_ACEOF
9571cat confdefs.h >>conftest.$ac_ext
9572cat >>conftest.$ac_ext <<_ACEOF
9573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009574$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009575 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009576int
9577main ()
9578{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009579static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009580test_array [0] = 0
9581
9582 ;
9583 return 0;
9584}
9585_ACEOF
9586rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009587if { (ac_try="$ac_compile"
9588case "(($ac_try" in
9589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9590 *) ac_try_echo=$ac_try;;
9591esac
9592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9593 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009595 grep -v '^ *+' conftest.er1 >conftest.err
9596 rm -f conftest.er1
9597 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009599 (exit $ac_status); } && {
9600 test -z "$ac_c_werror_flag" ||
9601 test ! -s conftest.err
9602 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 ac_lo=0 ac_mid=0
9604 while :; do
9605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009606/* confdefs.h. */
9607_ACEOF
9608cat confdefs.h >>conftest.$ac_ext
9609cat >>conftest.$ac_ext <<_ACEOF
9610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009611$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009612 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009613int
9614main ()
9615{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009616static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009617test_array [0] = 0
9618
9619 ;
9620 return 0;
9621}
9622_ACEOF
9623rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009624if { (ac_try="$ac_compile"
9625case "(($ac_try" in
9626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9627 *) ac_try_echo=$ac_try;;
9628esac
9629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009632 grep -v '^ *+' conftest.er1 >conftest.err
9633 rm -f conftest.er1
9634 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009636 (exit $ac_status); } && {
9637 test -z "$ac_c_werror_flag" ||
9638 test ! -s conftest.err
9639 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ac_hi=$ac_mid; break
9641else
9642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009643sed 's/^/| /' conftest.$ac_ext >&5
9644
Martin v. Löwiseba40652007-08-30 20:10:57 +00009645 ac_lo=`expr $ac_mid + 1`
9646 if test $ac_lo -le $ac_mid; then
9647 ac_lo= ac_hi=
9648 break
9649 fi
9650 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009652
9653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 done
9655else
9656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009657sed 's/^/| /' conftest.$ac_ext >&5
9658
Martin v. Löwiseba40652007-08-30 20:10:57 +00009659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009660/* confdefs.h. */
9661_ACEOF
9662cat confdefs.h >>conftest.$ac_ext
9663cat >>conftest.$ac_ext <<_ACEOF
9664/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009665$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009666 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009667int
9668main ()
9669{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009670static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009671test_array [0] = 0
9672
9673 ;
9674 return 0;
9675}
9676_ACEOF
9677rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009678if { (ac_try="$ac_compile"
9679case "(($ac_try" in
9680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9681 *) ac_try_echo=$ac_try;;
9682esac
9683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9684 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009686 grep -v '^ *+' conftest.er1 >conftest.err
9687 rm -f conftest.er1
9688 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009690 (exit $ac_status); } && {
9691 test -z "$ac_c_werror_flag" ||
9692 test ! -s conftest.err
9693 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ac_hi=-1 ac_mid=-1
9695 while :; do
9696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009697/* confdefs.h. */
9698_ACEOF
9699cat confdefs.h >>conftest.$ac_ext
9700cat >>conftest.$ac_ext <<_ACEOF
9701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009702$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009703 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009704int
9705main ()
9706{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009707static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009708test_array [0] = 0
9709
9710 ;
9711 return 0;
9712}
9713_ACEOF
9714rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009715if { (ac_try="$ac_compile"
9716case "(($ac_try" in
9717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9718 *) ac_try_echo=$ac_try;;
9719esac
9720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009723 grep -v '^ *+' conftest.er1 >conftest.err
9724 rm -f conftest.er1
9725 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009727 (exit $ac_status); } && {
9728 test -z "$ac_c_werror_flag" ||
9729 test ! -s conftest.err
9730 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_lo=$ac_mid; break
9732else
9733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009734sed 's/^/| /' conftest.$ac_ext >&5
9735
Martin v. Löwiseba40652007-08-30 20:10:57 +00009736 ac_hi=`expr '(' $ac_mid ')' - 1`
9737 if test $ac_mid -le $ac_hi; then
9738 ac_lo= ac_hi=
9739 break
9740 fi
9741 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009743
9744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 done
9746else
9747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009748sed 's/^/| /' conftest.$ac_ext >&5
9749
Martin v. Löwiseba40652007-08-30 20:10:57 +00009750 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009752
9753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009755
9756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009757# Binary search between lo and hi bounds.
9758while test "x$ac_lo" != "x$ac_hi"; do
9759 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009761/* confdefs.h. */
9762_ACEOF
9763cat confdefs.h >>conftest.$ac_ext
9764cat >>conftest.$ac_ext <<_ACEOF
9765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009766$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009767 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009768int
9769main ()
9770{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009771static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009772test_array [0] = 0
9773
9774 ;
9775 return 0;
9776}
9777_ACEOF
9778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009779if { (ac_try="$ac_compile"
9780case "(($ac_try" in
9781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9782 *) ac_try_echo=$ac_try;;
9783esac
9784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009787 grep -v '^ *+' conftest.er1 >conftest.err
9788 rm -f conftest.er1
9789 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791 (exit $ac_status); } && {
9792 test -z "$ac_c_werror_flag" ||
9793 test ! -s conftest.err
9794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 ac_hi=$ac_mid
9796else
9797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009798sed 's/^/| /' conftest.$ac_ext >&5
9799
Martin v. Löwiseba40652007-08-30 20:10:57 +00009800 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009802
9803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009804done
9805case $ac_lo in
9806?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009807'') if test "$ac_cv_type_double" = yes; then
9808 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009809See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009810echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009811See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009812 { (exit 77); exit 77; }; }
9813 else
9814 ac_cv_sizeof_double=0
9815 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009816esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009817else
Martin v. Löwis11437992002-04-12 09:54:03 +00009818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009819/* confdefs.h. */
9820_ACEOF
9821cat confdefs.h >>conftest.$ac_ext
9822cat >>conftest.$ac_ext <<_ACEOF
9823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009824$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009825 typedef double ac__type_sizeof_;
9826static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9827static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009828#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009829#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009830int
9831main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009832{
Martin v. Löwis11437992002-04-12 09:54:03 +00009833
9834 FILE *f = fopen ("conftest.val", "w");
9835 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009836 return 1;
9837 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009839 long int i = longval ();
9840 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9841 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 fprintf (f, "%ld\n", i);
9843 }
9844 else
9845 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009846 unsigned long int i = ulongval ();
9847 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9848 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 fprintf (f, "%lu\n", i);
9850 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009851 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009852
9853 ;
9854 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009855}
Martin v. Löwis11437992002-04-12 09:54:03 +00009856_ACEOF
9857rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009858if { (ac_try="$ac_link"
9859case "(($ac_try" in
9860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9861 *) ac_try_echo=$ac_try;;
9862esac
9863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9864 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009865 ac_status=$?
9866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9867 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009868 { (case "(($ac_try" in
9869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9870 *) ac_try_echo=$ac_try;;
9871esac
9872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9873 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ac_status=$?
9875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9876 (exit $ac_status); }; }; then
9877 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009878else
Martin v. Löwis11437992002-04-12 09:54:03 +00009879 echo "$as_me: program exited with status $ac_status" >&5
9880echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009881sed 's/^/| /' conftest.$ac_ext >&5
9882
Martin v. Löwis11437992002-04-12 09:54:03 +00009883( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009884if test "$ac_cv_type_double" = yes; then
9885 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009886See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009888See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009889 { (exit 77); exit 77; }; }
9890 else
9891 ac_cv_sizeof_double=0
9892 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894rm -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 +00009895fi
9896rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009898{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9899echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9900
9901
9902
Martin v. Löwis11437992002-04-12 09:54:03 +00009903cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009904#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009905_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009906
9907
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9909echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009910if test "${ac_cv_type_fpos_t+set}" = set; then
9911 echo $ECHO_N "(cached) $ECHO_C" >&6
9912else
9913 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009914/* confdefs.h. */
9915_ACEOF
9916cat confdefs.h >>conftest.$ac_ext
9917cat >>conftest.$ac_ext <<_ACEOF
9918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009919$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009920typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009921int
9922main ()
9923{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009924if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009926if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009927 return 0;
9928 ;
9929 return 0;
9930}
9931_ACEOF
9932rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933if { (ac_try="$ac_compile"
9934case "(($ac_try" in
9935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9936 *) ac_try_echo=$ac_try;;
9937esac
9938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9939 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009941 grep -v '^ *+' conftest.er1 >conftest.err
9942 rm -f conftest.er1
9943 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945 (exit $ac_status); } && {
9946 test -z "$ac_c_werror_flag" ||
9947 test ! -s conftest.err
9948 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009949 ac_cv_type_fpos_t=yes
9950else
9951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009952sed 's/^/| /' conftest.$ac_ext >&5
9953
Martin v. Löwiseba40652007-08-30 20:10:57 +00009954 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009955fi
Brett Cannon19fab762007-06-02 03:02:29 +00009956
Martin v. Löwiseba40652007-08-30 20:10:57 +00009957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9958fi
9959{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9960echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9961
9962# The cast to long int works around a bug in the HP C Compiler
9963# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9964# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9965# This bug is HP SR number 8606223364.
9966{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9967echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009968if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9969 echo $ECHO_N "(cached) $ECHO_C" >&6
9970else
Martin v. Löwis11437992002-04-12 09:54:03 +00009971 if test "$cross_compiling" = yes; then
9972 # Depending upon the size, compute the lo and hi bounds.
9973cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009974/* confdefs.h. */
9975_ACEOF
9976cat confdefs.h >>conftest.$ac_ext
9977cat >>conftest.$ac_ext <<_ACEOF
9978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009979$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009980 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009981int
9982main ()
9983{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009984static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009985test_array [0] = 0
9986
9987 ;
9988 return 0;
9989}
9990_ACEOF
9991rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009992if { (ac_try="$ac_compile"
9993case "(($ac_try" in
9994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9995 *) ac_try_echo=$ac_try;;
9996esac
9997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9998 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009999 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010000 grep -v '^ *+' conftest.er1 >conftest.err
10001 rm -f conftest.er1
10002 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010004 (exit $ac_status); } && {
10005 test -z "$ac_c_werror_flag" ||
10006 test ! -s conftest.err
10007 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010008 ac_lo=0 ac_mid=0
10009 while :; do
10010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010011/* confdefs.h. */
10012_ACEOF
10013cat confdefs.h >>conftest.$ac_ext
10014cat >>conftest.$ac_ext <<_ACEOF
10015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010016$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010017 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010018int
10019main ()
10020{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010021static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010022test_array [0] = 0
10023
10024 ;
10025 return 0;
10026}
10027_ACEOF
10028rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010029if { (ac_try="$ac_compile"
10030case "(($ac_try" in
10031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10032 *) ac_try_echo=$ac_try;;
10033esac
10034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10035 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010037 grep -v '^ *+' conftest.er1 >conftest.err
10038 rm -f conftest.er1
10039 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010041 (exit $ac_status); } && {
10042 test -z "$ac_c_werror_flag" ||
10043 test ! -s conftest.err
10044 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 ac_hi=$ac_mid; break
10046else
10047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010048sed 's/^/| /' conftest.$ac_ext >&5
10049
Martin v. Löwiseba40652007-08-30 20:10:57 +000010050 ac_lo=`expr $ac_mid + 1`
10051 if test $ac_lo -le $ac_mid; then
10052 ac_lo= ac_hi=
10053 break
10054 fi
10055 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010057
10058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010059 done
10060else
10061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010062sed 's/^/| /' conftest.$ac_ext >&5
10063
Martin v. Löwiseba40652007-08-30 20:10:57 +000010064 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010065/* confdefs.h. */
10066_ACEOF
10067cat confdefs.h >>conftest.$ac_ext
10068cat >>conftest.$ac_ext <<_ACEOF
10069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010070$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010071 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010072int
10073main ()
10074{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010075static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010076test_array [0] = 0
10077
10078 ;
10079 return 0;
10080}
10081_ACEOF
10082rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010083if { (ac_try="$ac_compile"
10084case "(($ac_try" in
10085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10086 *) ac_try_echo=$ac_try;;
10087esac
10088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10089 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010091 grep -v '^ *+' conftest.er1 >conftest.err
10092 rm -f conftest.er1
10093 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010095 (exit $ac_status); } && {
10096 test -z "$ac_c_werror_flag" ||
10097 test ! -s conftest.err
10098 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 ac_hi=-1 ac_mid=-1
10100 while :; do
10101 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010102/* confdefs.h. */
10103_ACEOF
10104cat confdefs.h >>conftest.$ac_ext
10105cat >>conftest.$ac_ext <<_ACEOF
10106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010107$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010108 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010109int
10110main ()
10111{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010112static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010113test_array [0] = 0
10114
10115 ;
10116 return 0;
10117}
10118_ACEOF
10119rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010120if { (ac_try="$ac_compile"
10121case "(($ac_try" in
10122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10123 *) ac_try_echo=$ac_try;;
10124esac
10125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10126 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010128 grep -v '^ *+' conftest.er1 >conftest.err
10129 rm -f conftest.er1
10130 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010132 (exit $ac_status); } && {
10133 test -z "$ac_c_werror_flag" ||
10134 test ! -s conftest.err
10135 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ac_lo=$ac_mid; break
10137else
10138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010139sed 's/^/| /' conftest.$ac_ext >&5
10140
Martin v. Löwiseba40652007-08-30 20:10:57 +000010141 ac_hi=`expr '(' $ac_mid ')' - 1`
10142 if test $ac_mid -le $ac_hi; then
10143 ac_lo= ac_hi=
10144 break
10145 fi
10146 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010148
10149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010150 done
10151else
10152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010153sed 's/^/| /' conftest.$ac_ext >&5
10154
Martin v. Löwiseba40652007-08-30 20:10:57 +000010155 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010157
10158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010160
10161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010162# Binary search between lo and hi bounds.
10163while test "x$ac_lo" != "x$ac_hi"; do
10164 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10165 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010166/* confdefs.h. */
10167_ACEOF
10168cat confdefs.h >>conftest.$ac_ext
10169cat >>conftest.$ac_ext <<_ACEOF
10170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010171$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010172 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010173int
10174main ()
10175{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010176static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010177test_array [0] = 0
10178
10179 ;
10180 return 0;
10181}
10182_ACEOF
10183rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010184if { (ac_try="$ac_compile"
10185case "(($ac_try" in
10186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10187 *) ac_try_echo=$ac_try;;
10188esac
10189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010192 grep -v '^ *+' conftest.er1 >conftest.err
10193 rm -f conftest.er1
10194 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010196 (exit $ac_status); } && {
10197 test -z "$ac_c_werror_flag" ||
10198 test ! -s conftest.err
10199 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 ac_hi=$ac_mid
10201else
10202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010203sed 's/^/| /' conftest.$ac_ext >&5
10204
Martin v. Löwiseba40652007-08-30 20:10:57 +000010205 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010207
10208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010209done
10210case $ac_lo in
10211?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010212'') if test "$ac_cv_type_fpos_t" = yes; then
10213 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010214See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010215echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010216See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010217 { (exit 77); exit 77; }; }
10218 else
10219 ac_cv_sizeof_fpos_t=0
10220 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010221esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010222else
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010224/* confdefs.h. */
10225_ACEOF
10226cat confdefs.h >>conftest.$ac_ext
10227cat >>conftest.$ac_ext <<_ACEOF
10228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010229$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010230 typedef fpos_t ac__type_sizeof_;
10231static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10232static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010233#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010234#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010235int
10236main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010237{
Martin v. Löwis11437992002-04-12 09:54:03 +000010238
10239 FILE *f = fopen ("conftest.val", "w");
10240 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010241 return 1;
10242 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010244 long int i = longval ();
10245 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10246 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 fprintf (f, "%ld\n", i);
10248 }
10249 else
10250 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010251 unsigned long int i = ulongval ();
10252 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10253 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 fprintf (f, "%lu\n", i);
10255 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010256 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010257
10258 ;
10259 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010260}
Martin v. Löwis11437992002-04-12 09:54:03 +000010261_ACEOF
10262rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010263if { (ac_try="$ac_link"
10264case "(($ac_try" in
10265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10266 *) ac_try_echo=$ac_try;;
10267esac
10268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10269 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 ac_status=$?
10271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10272 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010273 { (case "(($ac_try" in
10274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10275 *) ac_try_echo=$ac_try;;
10276esac
10277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10278 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 ac_status=$?
10280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10281 (exit $ac_status); }; }; then
10282 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010283else
Martin v. Löwis11437992002-04-12 09:54:03 +000010284 echo "$as_me: program exited with status $ac_status" >&5
10285echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010286sed 's/^/| /' conftest.$ac_ext >&5
10287
Martin v. Löwis11437992002-04-12 09:54:03 +000010288( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010289if test "$ac_cv_type_fpos_t" = yes; then
10290 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010291See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010292echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010293See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010294 { (exit 77); exit 77; }; }
10295 else
10296 ac_cv_sizeof_fpos_t=0
10297 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010299rm -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 +000010300fi
10301rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010303{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10304echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
10305
10306
10307
Martin v. Löwis11437992002-04-12 09:54:03 +000010308cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010309#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010310_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010311
Michael W. Hudson54241132001-12-07 15:38:26 +000010312
Martin v. Löwiseba40652007-08-30 20:10:57 +000010313{ echo "$as_me:$LINENO: checking for size_t" >&5
10314echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010315if test "${ac_cv_type_size_t+set}" = set; then
10316 echo $ECHO_N "(cached) $ECHO_C" >&6
10317else
10318 cat >conftest.$ac_ext <<_ACEOF
10319/* confdefs.h. */
10320_ACEOF
10321cat confdefs.h >>conftest.$ac_ext
10322cat >>conftest.$ac_ext <<_ACEOF
10323/* end confdefs.h. */
10324$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010325typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010326int
10327main ()
10328{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010329if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010330 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010331if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +000010332 return 0;
10333 ;
10334 return 0;
10335}
10336_ACEOF
10337rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010338if { (ac_try="$ac_compile"
10339case "(($ac_try" in
10340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10341 *) ac_try_echo=$ac_try;;
10342esac
10343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10344 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010345 ac_status=$?
10346 grep -v '^ *+' conftest.er1 >conftest.err
10347 rm -f conftest.er1
10348 cat conftest.err >&5
10349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010350 (exit $ac_status); } && {
10351 test -z "$ac_c_werror_flag" ||
10352 test ! -s conftest.err
10353 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010354 ac_cv_type_size_t=yes
10355else
10356 echo "$as_me: failed program was:" >&5
10357sed 's/^/| /' conftest.$ac_ext >&5
10358
Martin v. Löwiseba40652007-08-30 20:10:57 +000010359 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +000010360fi
Brett Cannon19fab762007-06-02 03:02:29 +000010361
Martin v. Löwiseba40652007-08-30 20:10:57 +000010362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10363fi
10364{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10365echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10366
10367# The cast to long int works around a bug in the HP C Compiler
10368# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10369# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10370# This bug is HP SR number 8606223364.
10371{ echo "$as_me:$LINENO: checking size of size_t" >&5
10372echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010373if test "${ac_cv_sizeof_size_t+set}" = set; then
10374 echo $ECHO_N "(cached) $ECHO_C" >&6
10375else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010376 if test "$cross_compiling" = yes; then
10377 # Depending upon the size, compute the lo and hi bounds.
10378cat >conftest.$ac_ext <<_ACEOF
10379/* confdefs.h. */
10380_ACEOF
10381cat confdefs.h >>conftest.$ac_ext
10382cat >>conftest.$ac_ext <<_ACEOF
10383/* end confdefs.h. */
10384$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010385 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010386int
10387main ()
10388{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010389static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010390test_array [0] = 0
10391
10392 ;
10393 return 0;
10394}
10395_ACEOF
10396rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010397if { (ac_try="$ac_compile"
10398case "(($ac_try" in
10399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10400 *) ac_try_echo=$ac_try;;
10401esac
10402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010404 ac_status=$?
10405 grep -v '^ *+' conftest.er1 >conftest.err
10406 rm -f conftest.er1
10407 cat conftest.err >&5
10408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010409 (exit $ac_status); } && {
10410 test -z "$ac_c_werror_flag" ||
10411 test ! -s conftest.err
10412 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010413 ac_lo=0 ac_mid=0
10414 while :; do
10415 cat >conftest.$ac_ext <<_ACEOF
10416/* confdefs.h. */
10417_ACEOF
10418cat confdefs.h >>conftest.$ac_ext
10419cat >>conftest.$ac_ext <<_ACEOF
10420/* end confdefs.h. */
10421$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010422 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423int
10424main ()
10425{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010426static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010427test_array [0] = 0
10428
10429 ;
10430 return 0;
10431}
10432_ACEOF
10433rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010434if { (ac_try="$ac_compile"
10435case "(($ac_try" in
10436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10437 *) ac_try_echo=$ac_try;;
10438esac
10439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010441 ac_status=$?
10442 grep -v '^ *+' conftest.er1 >conftest.err
10443 rm -f conftest.er1
10444 cat conftest.err >&5
10445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010446 (exit $ac_status); } && {
10447 test -z "$ac_c_werror_flag" ||
10448 test ! -s conftest.err
10449 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450 ac_hi=$ac_mid; break
10451else
10452 echo "$as_me: failed program was:" >&5
10453sed 's/^/| /' conftest.$ac_ext >&5
10454
Martin v. Löwiseba40652007-08-30 20:10:57 +000010455 ac_lo=`expr $ac_mid + 1`
10456 if test $ac_lo -le $ac_mid; then
10457 ac_lo= ac_hi=
10458 break
10459 fi
10460 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010462
10463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010464 done
10465else
10466 echo "$as_me: failed program was:" >&5
10467sed 's/^/| /' conftest.$ac_ext >&5
10468
Martin v. Löwiseba40652007-08-30 20:10:57 +000010469 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010470/* confdefs.h. */
10471_ACEOF
10472cat confdefs.h >>conftest.$ac_ext
10473cat >>conftest.$ac_ext <<_ACEOF
10474/* end confdefs.h. */
10475$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010476 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010477int
10478main ()
10479{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010480static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481test_array [0] = 0
10482
10483 ;
10484 return 0;
10485}
10486_ACEOF
10487rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010488if { (ac_try="$ac_compile"
10489case "(($ac_try" in
10490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10491 *) ac_try_echo=$ac_try;;
10492esac
10493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10494 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010495 ac_status=$?
10496 grep -v '^ *+' conftest.er1 >conftest.err
10497 rm -f conftest.er1
10498 cat conftest.err >&5
10499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010500 (exit $ac_status); } && {
10501 test -z "$ac_c_werror_flag" ||
10502 test ! -s conftest.err
10503 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010504 ac_hi=-1 ac_mid=-1
10505 while :; do
10506 cat >conftest.$ac_ext <<_ACEOF
10507/* confdefs.h. */
10508_ACEOF
10509cat confdefs.h >>conftest.$ac_ext
10510cat >>conftest.$ac_ext <<_ACEOF
10511/* end confdefs.h. */
10512$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010513 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514int
10515main ()
10516{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010517static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518test_array [0] = 0
10519
10520 ;
10521 return 0;
10522}
10523_ACEOF
10524rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010525if { (ac_try="$ac_compile"
10526case "(($ac_try" in
10527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10528 *) ac_try_echo=$ac_try;;
10529esac
10530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10531 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010532 ac_status=$?
10533 grep -v '^ *+' conftest.er1 >conftest.err
10534 rm -f conftest.er1
10535 cat conftest.err >&5
10536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010537 (exit $ac_status); } && {
10538 test -z "$ac_c_werror_flag" ||
10539 test ! -s conftest.err
10540 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541 ac_lo=$ac_mid; break
10542else
10543 echo "$as_me: failed program was:" >&5
10544sed 's/^/| /' conftest.$ac_ext >&5
10545
Martin v. Löwiseba40652007-08-30 20:10:57 +000010546 ac_hi=`expr '(' $ac_mid ')' - 1`
10547 if test $ac_mid -le $ac_hi; then
10548 ac_lo= ac_hi=
10549 break
10550 fi
10551 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010553
10554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010555 done
10556else
10557 echo "$as_me: failed program was:" >&5
10558sed 's/^/| /' conftest.$ac_ext >&5
10559
Martin v. Löwiseba40652007-08-30 20:10:57 +000010560 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010562
10563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010565
10566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010567# Binary search between lo and hi bounds.
10568while test "x$ac_lo" != "x$ac_hi"; do
10569 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10570 cat >conftest.$ac_ext <<_ACEOF
10571/* confdefs.h. */
10572_ACEOF
10573cat confdefs.h >>conftest.$ac_ext
10574cat >>conftest.$ac_ext <<_ACEOF
10575/* end confdefs.h. */
10576$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010577 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578int
10579main ()
10580{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010581static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582test_array [0] = 0
10583
10584 ;
10585 return 0;
10586}
10587_ACEOF
10588rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010589if { (ac_try="$ac_compile"
10590case "(($ac_try" in
10591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10592 *) ac_try_echo=$ac_try;;
10593esac
10594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10595 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596 ac_status=$?
10597 grep -v '^ *+' conftest.er1 >conftest.err
10598 rm -f conftest.er1
10599 cat conftest.err >&5
10600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010601 (exit $ac_status); } && {
10602 test -z "$ac_c_werror_flag" ||
10603 test ! -s conftest.err
10604 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605 ac_hi=$ac_mid
10606else
10607 echo "$as_me: failed program was:" >&5
10608sed 's/^/| /' conftest.$ac_ext >&5
10609
Martin v. Löwiseba40652007-08-30 20:10:57 +000010610 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010612
10613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010614done
10615case $ac_lo in
10616?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010617'') if test "$ac_cv_type_size_t" = yes; then
10618 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010619See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010620echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010621See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010622 { (exit 77); exit 77; }; }
10623 else
10624 ac_cv_sizeof_size_t=0
10625 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626esac
10627else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010628 cat >conftest.$ac_ext <<_ACEOF
10629/* confdefs.h. */
10630_ACEOF
10631cat confdefs.h >>conftest.$ac_ext
10632cat >>conftest.$ac_ext <<_ACEOF
10633/* end confdefs.h. */
10634$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010635 typedef size_t ac__type_sizeof_;
10636static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10637static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010638#include <stdio.h>
10639#include <stdlib.h>
10640int
10641main ()
10642{
10643
10644 FILE *f = fopen ("conftest.val", "w");
10645 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010646 return 1;
10647 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010649 long int i = longval ();
10650 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10651 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652 fprintf (f, "%ld\n", i);
10653 }
10654 else
10655 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010656 unsigned long int i = ulongval ();
10657 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10658 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659 fprintf (f, "%lu\n", i);
10660 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010662
10663 ;
10664 return 0;
10665}
10666_ACEOF
10667rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010668if { (ac_try="$ac_link"
10669case "(($ac_try" in
10670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10671 *) ac_try_echo=$ac_try;;
10672esac
10673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10674 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010675 ac_status=$?
10676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10677 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010678 { (case "(($ac_try" in
10679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10680 *) ac_try_echo=$ac_try;;
10681esac
10682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10683 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684 ac_status=$?
10685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10686 (exit $ac_status); }; }; then
10687 ac_cv_sizeof_size_t=`cat conftest.val`
10688else
10689 echo "$as_me: program exited with status $ac_status" >&5
10690echo "$as_me: failed program was:" >&5
10691sed 's/^/| /' conftest.$ac_ext >&5
10692
10693( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010694if test "$ac_cv_type_size_t" = yes; then
10695 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010697echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010698See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010699 { (exit 77); exit 77; }; }
10700 else
10701 ac_cv_sizeof_size_t=0
10702 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010704rm -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 +000010705fi
10706rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010708{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10709echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10710
10711
10712
Martin v. Löwis18e16552006-02-15 17:27:45 +000010713cat >>confdefs.h <<_ACEOF
10714#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10715_ACEOF
10716
10717
Christian Heimes951cc0f2008-01-31 23:08:23 +000010718{ echo "$as_me:$LINENO: checking for pid_t" >&5
10719echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10720if test "${ac_cv_type_pid_t+set}" = set; then
10721 echo $ECHO_N "(cached) $ECHO_C" >&6
10722else
10723 cat >conftest.$ac_ext <<_ACEOF
10724/* confdefs.h. */
10725_ACEOF
10726cat confdefs.h >>conftest.$ac_ext
10727cat >>conftest.$ac_ext <<_ACEOF
10728/* end confdefs.h. */
10729$ac_includes_default
10730typedef pid_t ac__type_new_;
10731int
10732main ()
10733{
10734if ((ac__type_new_ *) 0)
10735 return 0;
10736if (sizeof (ac__type_new_))
10737 return 0;
10738 ;
10739 return 0;
10740}
10741_ACEOF
10742rm -f conftest.$ac_objext
10743if { (ac_try="$ac_compile"
10744case "(($ac_try" in
10745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10746 *) ac_try_echo=$ac_try;;
10747esac
10748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10749 (eval "$ac_compile") 2>conftest.er1
10750 ac_status=$?
10751 grep -v '^ *+' conftest.er1 >conftest.err
10752 rm -f conftest.er1
10753 cat conftest.err >&5
10754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10755 (exit $ac_status); } && {
10756 test -z "$ac_c_werror_flag" ||
10757 test ! -s conftest.err
10758 } && test -s conftest.$ac_objext; then
10759 ac_cv_type_pid_t=yes
10760else
10761 echo "$as_me: failed program was:" >&5
10762sed 's/^/| /' conftest.$ac_ext >&5
10763
10764 ac_cv_type_pid_t=no
10765fi
10766
10767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10768fi
10769{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10770echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10771
10772# The cast to long int works around a bug in the HP C Compiler
10773# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10774# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10775# This bug is HP SR number 8606223364.
10776{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10777echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10778if test "${ac_cv_sizeof_pid_t+set}" = set; then
10779 echo $ECHO_N "(cached) $ECHO_C" >&6
10780else
10781 if test "$cross_compiling" = yes; then
10782 # Depending upon the size, compute the lo and hi bounds.
10783cat >conftest.$ac_ext <<_ACEOF
10784/* confdefs.h. */
10785_ACEOF
10786cat confdefs.h >>conftest.$ac_ext
10787cat >>conftest.$ac_ext <<_ACEOF
10788/* end confdefs.h. */
10789$ac_includes_default
10790 typedef pid_t ac__type_sizeof_;
10791int
10792main ()
10793{
10794static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10795test_array [0] = 0
10796
10797 ;
10798 return 0;
10799}
10800_ACEOF
10801rm -f conftest.$ac_objext
10802if { (ac_try="$ac_compile"
10803case "(($ac_try" in
10804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10805 *) ac_try_echo=$ac_try;;
10806esac
10807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10808 (eval "$ac_compile") 2>conftest.er1
10809 ac_status=$?
10810 grep -v '^ *+' conftest.er1 >conftest.err
10811 rm -f conftest.er1
10812 cat conftest.err >&5
10813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10814 (exit $ac_status); } && {
10815 test -z "$ac_c_werror_flag" ||
10816 test ! -s conftest.err
10817 } && test -s conftest.$ac_objext; then
10818 ac_lo=0 ac_mid=0
10819 while :; do
10820 cat >conftest.$ac_ext <<_ACEOF
10821/* confdefs.h. */
10822_ACEOF
10823cat confdefs.h >>conftest.$ac_ext
10824cat >>conftest.$ac_ext <<_ACEOF
10825/* end confdefs.h. */
10826$ac_includes_default
10827 typedef pid_t ac__type_sizeof_;
10828int
10829main ()
10830{
10831static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10832test_array [0] = 0
10833
10834 ;
10835 return 0;
10836}
10837_ACEOF
10838rm -f conftest.$ac_objext
10839if { (ac_try="$ac_compile"
10840case "(($ac_try" in
10841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10842 *) ac_try_echo=$ac_try;;
10843esac
10844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10845 (eval "$ac_compile") 2>conftest.er1
10846 ac_status=$?
10847 grep -v '^ *+' conftest.er1 >conftest.err
10848 rm -f conftest.er1
10849 cat conftest.err >&5
10850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10851 (exit $ac_status); } && {
10852 test -z "$ac_c_werror_flag" ||
10853 test ! -s conftest.err
10854 } && test -s conftest.$ac_objext; then
10855 ac_hi=$ac_mid; break
10856else
10857 echo "$as_me: failed program was:" >&5
10858sed 's/^/| /' conftest.$ac_ext >&5
10859
10860 ac_lo=`expr $ac_mid + 1`
10861 if test $ac_lo -le $ac_mid; then
10862 ac_lo= ac_hi=
10863 break
10864 fi
10865 ac_mid=`expr 2 '*' $ac_mid + 1`
10866fi
10867
10868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10869 done
10870else
10871 echo "$as_me: failed program was:" >&5
10872sed 's/^/| /' conftest.$ac_ext >&5
10873
10874 cat >conftest.$ac_ext <<_ACEOF
10875/* confdefs.h. */
10876_ACEOF
10877cat confdefs.h >>conftest.$ac_ext
10878cat >>conftest.$ac_ext <<_ACEOF
10879/* end confdefs.h. */
10880$ac_includes_default
10881 typedef pid_t ac__type_sizeof_;
10882int
10883main ()
10884{
10885static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10886test_array [0] = 0
10887
10888 ;
10889 return 0;
10890}
10891_ACEOF
10892rm -f conftest.$ac_objext
10893if { (ac_try="$ac_compile"
10894case "(($ac_try" in
10895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10896 *) ac_try_echo=$ac_try;;
10897esac
10898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10899 (eval "$ac_compile") 2>conftest.er1
10900 ac_status=$?
10901 grep -v '^ *+' conftest.er1 >conftest.err
10902 rm -f conftest.er1
10903 cat conftest.err >&5
10904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10905 (exit $ac_status); } && {
10906 test -z "$ac_c_werror_flag" ||
10907 test ! -s conftest.err
10908 } && test -s conftest.$ac_objext; then
10909 ac_hi=-1 ac_mid=-1
10910 while :; do
10911 cat >conftest.$ac_ext <<_ACEOF
10912/* confdefs.h. */
10913_ACEOF
10914cat confdefs.h >>conftest.$ac_ext
10915cat >>conftest.$ac_ext <<_ACEOF
10916/* end confdefs.h. */
10917$ac_includes_default
10918 typedef pid_t ac__type_sizeof_;
10919int
10920main ()
10921{
10922static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10923test_array [0] = 0
10924
10925 ;
10926 return 0;
10927}
10928_ACEOF
10929rm -f conftest.$ac_objext
10930if { (ac_try="$ac_compile"
10931case "(($ac_try" in
10932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10933 *) ac_try_echo=$ac_try;;
10934esac
10935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10936 (eval "$ac_compile") 2>conftest.er1
10937 ac_status=$?
10938 grep -v '^ *+' conftest.er1 >conftest.err
10939 rm -f conftest.er1
10940 cat conftest.err >&5
10941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10942 (exit $ac_status); } && {
10943 test -z "$ac_c_werror_flag" ||
10944 test ! -s conftest.err
10945 } && test -s conftest.$ac_objext; then
10946 ac_lo=$ac_mid; break
10947else
10948 echo "$as_me: failed program was:" >&5
10949sed 's/^/| /' conftest.$ac_ext >&5
10950
10951 ac_hi=`expr '(' $ac_mid ')' - 1`
10952 if test $ac_mid -le $ac_hi; then
10953 ac_lo= ac_hi=
10954 break
10955 fi
10956 ac_mid=`expr 2 '*' $ac_mid`
10957fi
10958
10959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10960 done
10961else
10962 echo "$as_me: failed program was:" >&5
10963sed 's/^/| /' conftest.$ac_ext >&5
10964
10965 ac_lo= ac_hi=
10966fi
10967
10968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10969fi
10970
10971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10972# Binary search between lo and hi bounds.
10973while test "x$ac_lo" != "x$ac_hi"; do
10974 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10975 cat >conftest.$ac_ext <<_ACEOF
10976/* confdefs.h. */
10977_ACEOF
10978cat confdefs.h >>conftest.$ac_ext
10979cat >>conftest.$ac_ext <<_ACEOF
10980/* end confdefs.h. */
10981$ac_includes_default
10982 typedef pid_t ac__type_sizeof_;
10983int
10984main ()
10985{
10986static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10987test_array [0] = 0
10988
10989 ;
10990 return 0;
10991}
10992_ACEOF
10993rm -f conftest.$ac_objext
10994if { (ac_try="$ac_compile"
10995case "(($ac_try" in
10996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10997 *) ac_try_echo=$ac_try;;
10998esac
10999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11000 (eval "$ac_compile") 2>conftest.er1
11001 ac_status=$?
11002 grep -v '^ *+' conftest.er1 >conftest.err
11003 rm -f conftest.er1
11004 cat conftest.err >&5
11005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11006 (exit $ac_status); } && {
11007 test -z "$ac_c_werror_flag" ||
11008 test ! -s conftest.err
11009 } && test -s conftest.$ac_objext; then
11010 ac_hi=$ac_mid
11011else
11012 echo "$as_me: failed program was:" >&5
11013sed 's/^/| /' conftest.$ac_ext >&5
11014
11015 ac_lo=`expr '(' $ac_mid ')' + 1`
11016fi
11017
11018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11019done
11020case $ac_lo in
11021?*) ac_cv_sizeof_pid_t=$ac_lo;;
11022'') if test "$ac_cv_type_pid_t" = yes; then
11023 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
11024See \`config.log' for more details." >&5
11025echo "$as_me: error: cannot compute sizeof (pid_t)
11026See \`config.log' for more details." >&2;}
11027 { (exit 77); exit 77; }; }
11028 else
11029 ac_cv_sizeof_pid_t=0
11030 fi ;;
11031esac
11032else
11033 cat >conftest.$ac_ext <<_ACEOF
11034/* confdefs.h. */
11035_ACEOF
11036cat confdefs.h >>conftest.$ac_ext
11037cat >>conftest.$ac_ext <<_ACEOF
11038/* end confdefs.h. */
11039$ac_includes_default
11040 typedef pid_t ac__type_sizeof_;
11041static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11042static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11043#include <stdio.h>
11044#include <stdlib.h>
11045int
11046main ()
11047{
11048
11049 FILE *f = fopen ("conftest.val", "w");
11050 if (! f)
11051 return 1;
11052 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11053 {
11054 long int i = longval ();
11055 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11056 return 1;
11057 fprintf (f, "%ld\n", i);
11058 }
11059 else
11060 {
11061 unsigned long int i = ulongval ();
11062 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11063 return 1;
11064 fprintf (f, "%lu\n", i);
11065 }
11066 return ferror (f) || fclose (f) != 0;
11067
11068 ;
11069 return 0;
11070}
11071_ACEOF
11072rm -f conftest$ac_exeext
11073if { (ac_try="$ac_link"
11074case "(($ac_try" in
11075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11076 *) ac_try_echo=$ac_try;;
11077esac
11078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11079 (eval "$ac_link") 2>&5
11080 ac_status=$?
11081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11082 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11083 { (case "(($ac_try" in
11084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11085 *) ac_try_echo=$ac_try;;
11086esac
11087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11088 (eval "$ac_try") 2>&5
11089 ac_status=$?
11090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11091 (exit $ac_status); }; }; then
11092 ac_cv_sizeof_pid_t=`cat conftest.val`
11093else
11094 echo "$as_me: program exited with status $ac_status" >&5
11095echo "$as_me: failed program was:" >&5
11096sed 's/^/| /' conftest.$ac_ext >&5
11097
11098( exit $ac_status )
11099if test "$ac_cv_type_pid_t" = yes; then
11100 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
11101See \`config.log' for more details." >&5
11102echo "$as_me: error: cannot compute sizeof (pid_t)
11103See \`config.log' for more details." >&2;}
11104 { (exit 77); exit 77; }; }
11105 else
11106 ac_cv_sizeof_pid_t=0
11107 fi
11108fi
11109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11110fi
11111rm -f conftest.val
11112fi
11113{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11114echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
11115
11116
11117
11118cat >>confdefs.h <<_ACEOF
11119#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11120_ACEOF
11121
11122
Michael W. Hudson54241132001-12-07 15:38:26 +000011123
Martin v. Löwiseba40652007-08-30 20:10:57 +000011124{ echo "$as_me:$LINENO: checking for long long support" >&5
11125echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011126have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011127cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011128/* confdefs.h. */
11129_ACEOF
11130cat confdefs.h >>conftest.$ac_ext
11131cat >>conftest.$ac_ext <<_ACEOF
11132/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011133
Martin v. Löwis11437992002-04-12 09:54:03 +000011134int
11135main ()
11136{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011137long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 ;
11139 return 0;
11140}
11141_ACEOF
11142rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011143if { (ac_try="$ac_compile"
11144case "(($ac_try" in
11145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11146 *) ac_try_echo=$ac_try;;
11147esac
11148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11149 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011151 grep -v '^ *+' conftest.er1 >conftest.err
11152 rm -f conftest.er1
11153 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011155 (exit $ac_status); } && {
11156 test -z "$ac_c_werror_flag" ||
11157 test ! -s conftest.err
11158 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011159
11160
11161cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011162#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011163_ACEOF
11164
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011165 have_long_long=yes
11166
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011167else
Martin v. Löwis11437992002-04-12 09:54:03 +000011168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011169sed 's/^/| /' conftest.$ac_ext >&5
11170
Martin v. Löwiseba40652007-08-30 20:10:57 +000011171
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011173
11174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11175{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11176echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011177if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011178{ echo "$as_me:$LINENO: checking for long long" >&5
11179echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011180if test "${ac_cv_type_long_long+set}" = set; then
11181 echo $ECHO_N "(cached) $ECHO_C" >&6
11182else
11183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011184/* confdefs.h. */
11185_ACEOF
11186cat confdefs.h >>conftest.$ac_ext
11187cat >>conftest.$ac_ext <<_ACEOF
11188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011189$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011190typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011191int
11192main ()
11193{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011194if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011196if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 return 0;
11198 ;
11199 return 0;
11200}
11201_ACEOF
11202rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011203if { (ac_try="$ac_compile"
11204case "(($ac_try" in
11205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11206 *) ac_try_echo=$ac_try;;
11207esac
11208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011211 grep -v '^ *+' conftest.er1 >conftest.err
11212 rm -f conftest.er1
11213 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011215 (exit $ac_status); } && {
11216 test -z "$ac_c_werror_flag" ||
11217 test ! -s conftest.err
11218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011219 ac_cv_type_long_long=yes
11220else
11221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011222sed 's/^/| /' conftest.$ac_ext >&5
11223
Martin v. Löwiseba40652007-08-30 20:10:57 +000011224 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011225fi
Brett Cannon19fab762007-06-02 03:02:29 +000011226
Martin v. Löwiseba40652007-08-30 20:10:57 +000011227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11228fi
11229{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11230echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11231
11232# The cast to long int works around a bug in the HP C Compiler
11233# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11234# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11235# This bug is HP SR number 8606223364.
11236{ echo "$as_me:$LINENO: checking size of long long" >&5
11237echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011238if test "${ac_cv_sizeof_long_long+set}" = set; then
11239 echo $ECHO_N "(cached) $ECHO_C" >&6
11240else
Martin v. Löwis11437992002-04-12 09:54:03 +000011241 if test "$cross_compiling" = yes; then
11242 # Depending upon the size, compute the lo and hi bounds.
11243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011244/* confdefs.h. */
11245_ACEOF
11246cat confdefs.h >>conftest.$ac_ext
11247cat >>conftest.$ac_ext <<_ACEOF
11248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011249$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011250 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011251int
11252main ()
11253{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011255test_array [0] = 0
11256
11257 ;
11258 return 0;
11259}
11260_ACEOF
11261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011262if { (ac_try="$ac_compile"
11263case "(($ac_try" in
11264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11265 *) ac_try_echo=$ac_try;;
11266esac
11267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011270 grep -v '^ *+' conftest.er1 >conftest.err
11271 rm -f conftest.er1
11272 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011274 (exit $ac_status); } && {
11275 test -z "$ac_c_werror_flag" ||
11276 test ! -s conftest.err
11277 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011278 ac_lo=0 ac_mid=0
11279 while :; do
11280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011281/* confdefs.h. */
11282_ACEOF
11283cat confdefs.h >>conftest.$ac_ext
11284cat >>conftest.$ac_ext <<_ACEOF
11285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011286$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011287 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011288int
11289main ()
11290{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011292test_array [0] = 0
11293
11294 ;
11295 return 0;
11296}
11297_ACEOF
11298rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011299if { (ac_try="$ac_compile"
11300case "(($ac_try" in
11301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11302 *) ac_try_echo=$ac_try;;
11303esac
11304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11305 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011307 grep -v '^ *+' conftest.er1 >conftest.err
11308 rm -f conftest.er1
11309 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311 (exit $ac_status); } && {
11312 test -z "$ac_c_werror_flag" ||
11313 test ! -s conftest.err
11314 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 ac_hi=$ac_mid; break
11316else
11317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011318sed 's/^/| /' conftest.$ac_ext >&5
11319
Martin v. Löwiseba40652007-08-30 20:10:57 +000011320 ac_lo=`expr $ac_mid + 1`
11321 if test $ac_lo -le $ac_mid; then
11322 ac_lo= ac_hi=
11323 break
11324 fi
11325 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011327
11328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011329 done
11330else
11331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011332sed 's/^/| /' conftest.$ac_ext >&5
11333
Martin v. Löwiseba40652007-08-30 20:10:57 +000011334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011335/* confdefs.h. */
11336_ACEOF
11337cat confdefs.h >>conftest.$ac_ext
11338cat >>conftest.$ac_ext <<_ACEOF
11339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011340$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011341 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011342int
11343main ()
11344{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011345static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011346test_array [0] = 0
11347
11348 ;
11349 return 0;
11350}
11351_ACEOF
11352rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011353if { (ac_try="$ac_compile"
11354case "(($ac_try" in
11355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11356 *) ac_try_echo=$ac_try;;
11357esac
11358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011361 grep -v '^ *+' conftest.er1 >conftest.err
11362 rm -f conftest.er1
11363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011365 (exit $ac_status); } && {
11366 test -z "$ac_c_werror_flag" ||
11367 test ! -s conftest.err
11368 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 ac_hi=-1 ac_mid=-1
11370 while :; do
11371 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011372/* confdefs.h. */
11373_ACEOF
11374cat confdefs.h >>conftest.$ac_ext
11375cat >>conftest.$ac_ext <<_ACEOF
11376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011377$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011378 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011379int
11380main ()
11381{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011382static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011383test_array [0] = 0
11384
11385 ;
11386 return 0;
11387}
11388_ACEOF
11389rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011390if { (ac_try="$ac_compile"
11391case "(($ac_try" in
11392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11393 *) ac_try_echo=$ac_try;;
11394esac
11395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11396 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011398 grep -v '^ *+' conftest.er1 >conftest.err
11399 rm -f conftest.er1
11400 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011402 (exit $ac_status); } && {
11403 test -z "$ac_c_werror_flag" ||
11404 test ! -s conftest.err
11405 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 ac_lo=$ac_mid; break
11407else
11408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011409sed 's/^/| /' conftest.$ac_ext >&5
11410
Martin v. Löwiseba40652007-08-30 20:10:57 +000011411 ac_hi=`expr '(' $ac_mid ')' - 1`
11412 if test $ac_mid -le $ac_hi; then
11413 ac_lo= ac_hi=
11414 break
11415 fi
11416 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011418
11419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011420 done
11421else
11422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011423sed 's/^/| /' conftest.$ac_ext >&5
11424
Martin v. Löwiseba40652007-08-30 20:10:57 +000011425 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011427
11428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011430
11431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011432# Binary search between lo and hi bounds.
11433while test "x$ac_lo" != "x$ac_hi"; do
11434 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011436/* confdefs.h. */
11437_ACEOF
11438cat confdefs.h >>conftest.$ac_ext
11439cat >>conftest.$ac_ext <<_ACEOF
11440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011441$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011442 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011443int
11444main ()
11445{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011446static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011447test_array [0] = 0
11448
11449 ;
11450 return 0;
11451}
11452_ACEOF
11453rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011454if { (ac_try="$ac_compile"
11455case "(($ac_try" in
11456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11457 *) ac_try_echo=$ac_try;;
11458esac
11459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011462 grep -v '^ *+' conftest.er1 >conftest.err
11463 rm -f conftest.er1
11464 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011466 (exit $ac_status); } && {
11467 test -z "$ac_c_werror_flag" ||
11468 test ! -s conftest.err
11469 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 ac_hi=$ac_mid
11471else
11472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011473sed 's/^/| /' conftest.$ac_ext >&5
11474
Martin v. Löwiseba40652007-08-30 20:10:57 +000011475 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011477
11478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011479done
11480case $ac_lo in
11481?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011482'') if test "$ac_cv_type_long_long" = yes; then
11483 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011484See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011485echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011486See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011487 { (exit 77); exit 77; }; }
11488 else
11489 ac_cv_sizeof_long_long=0
11490 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011491esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011492else
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011494/* confdefs.h. */
11495_ACEOF
11496cat confdefs.h >>conftest.$ac_ext
11497cat >>conftest.$ac_ext <<_ACEOF
11498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011499$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011500 typedef long long ac__type_sizeof_;
11501static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11502static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011503#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011504#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011505int
11506main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011507{
Martin v. Löwis11437992002-04-12 09:54:03 +000011508
11509 FILE *f = fopen ("conftest.val", "w");
11510 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011511 return 1;
11512 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011514 long int i = longval ();
11515 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11516 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 fprintf (f, "%ld\n", i);
11518 }
11519 else
11520 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011521 unsigned long int i = ulongval ();
11522 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11523 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 fprintf (f, "%lu\n", i);
11525 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011526 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011527
11528 ;
11529 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011530}
Martin v. Löwis11437992002-04-12 09:54:03 +000011531_ACEOF
11532rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011533if { (ac_try="$ac_link"
11534case "(($ac_try" in
11535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11536 *) ac_try_echo=$ac_try;;
11537esac
11538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11539 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 ac_status=$?
11541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11542 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011543 { (case "(($ac_try" in
11544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11545 *) ac_try_echo=$ac_try;;
11546esac
11547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11548 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011549 ac_status=$?
11550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11551 (exit $ac_status); }; }; then
11552 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011553else
Martin v. Löwis11437992002-04-12 09:54:03 +000011554 echo "$as_me: program exited with status $ac_status" >&5
11555echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011556sed 's/^/| /' conftest.$ac_ext >&5
11557
Martin v. Löwis11437992002-04-12 09:54:03 +000011558( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011559if test "$ac_cv_type_long_long" = yes; then
11560 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011561See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011562echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011563See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011564 { (exit 77); exit 77; }; }
11565 else
11566 ac_cv_sizeof_long_long=0
11567 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569rm -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 +000011570fi
11571rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011573{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11574echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11575
11576
11577
Martin v. Löwis11437992002-04-12 09:54:03 +000011578cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011579#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011580_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011581
Michael W. Hudson54241132001-12-07 15:38:26 +000011582
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011583fi
11584
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011585{ echo "$as_me:$LINENO: checking for long double support" >&5
11586echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11587have_long_double=no
11588cat >conftest.$ac_ext <<_ACEOF
11589/* confdefs.h. */
11590_ACEOF
11591cat confdefs.h >>conftest.$ac_ext
11592cat >>conftest.$ac_ext <<_ACEOF
11593/* end confdefs.h. */
11594
11595int
11596main ()
11597{
11598long double x; x = (long double)0.;
11599 ;
11600 return 0;
11601}
11602_ACEOF
11603rm -f conftest.$ac_objext
11604if { (ac_try="$ac_compile"
11605case "(($ac_try" in
11606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11607 *) ac_try_echo=$ac_try;;
11608esac
11609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11610 (eval "$ac_compile") 2>conftest.er1
11611 ac_status=$?
11612 grep -v '^ *+' conftest.er1 >conftest.err
11613 rm -f conftest.er1
11614 cat conftest.err >&5
11615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11616 (exit $ac_status); } && {
11617 test -z "$ac_c_werror_flag" ||
11618 test ! -s conftest.err
11619 } && test -s conftest.$ac_objext; then
11620
11621
11622cat >>confdefs.h <<\_ACEOF
11623#define HAVE_LONG_DOUBLE 1
11624_ACEOF
11625
11626 have_long_double=yes
11627
11628else
11629 echo "$as_me: failed program was:" >&5
11630sed 's/^/| /' conftest.$ac_ext >&5
11631
11632
11633fi
11634
11635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11636{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11637echo "${ECHO_T}$have_long_double" >&6; }
11638if test "$have_long_double" = yes ; then
11639{ echo "$as_me:$LINENO: checking for long double" >&5
11640echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11641if test "${ac_cv_type_long_double+set}" = set; then
11642 echo $ECHO_N "(cached) $ECHO_C" >&6
11643else
11644 cat >conftest.$ac_ext <<_ACEOF
11645/* confdefs.h. */
11646_ACEOF
11647cat confdefs.h >>conftest.$ac_ext
11648cat >>conftest.$ac_ext <<_ACEOF
11649/* end confdefs.h. */
11650$ac_includes_default
11651typedef long double ac__type_new_;
11652int
11653main ()
11654{
11655if ((ac__type_new_ *) 0)
11656 return 0;
11657if (sizeof (ac__type_new_))
11658 return 0;
11659 ;
11660 return 0;
11661}
11662_ACEOF
11663rm -f conftest.$ac_objext
11664if { (ac_try="$ac_compile"
11665case "(($ac_try" in
11666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11667 *) ac_try_echo=$ac_try;;
11668esac
11669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11670 (eval "$ac_compile") 2>conftest.er1
11671 ac_status=$?
11672 grep -v '^ *+' conftest.er1 >conftest.err
11673 rm -f conftest.er1
11674 cat conftest.err >&5
11675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11676 (exit $ac_status); } && {
11677 test -z "$ac_c_werror_flag" ||
11678 test ! -s conftest.err
11679 } && test -s conftest.$ac_objext; then
11680 ac_cv_type_long_double=yes
11681else
11682 echo "$as_me: failed program was:" >&5
11683sed 's/^/| /' conftest.$ac_ext >&5
11684
11685 ac_cv_type_long_double=no
11686fi
11687
11688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11689fi
11690{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11691echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11692
11693# The cast to long int works around a bug in the HP C Compiler
11694# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11695# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11696# This bug is HP SR number 8606223364.
11697{ echo "$as_me:$LINENO: checking size of long double" >&5
11698echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11699if test "${ac_cv_sizeof_long_double+set}" = set; then
11700 echo $ECHO_N "(cached) $ECHO_C" >&6
11701else
11702 if test "$cross_compiling" = yes; then
11703 # Depending upon the size, compute the lo and hi bounds.
11704cat >conftest.$ac_ext <<_ACEOF
11705/* confdefs.h. */
11706_ACEOF
11707cat confdefs.h >>conftest.$ac_ext
11708cat >>conftest.$ac_ext <<_ACEOF
11709/* end confdefs.h. */
11710$ac_includes_default
11711 typedef long double ac__type_sizeof_;
11712int
11713main ()
11714{
11715static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11716test_array [0] = 0
11717
11718 ;
11719 return 0;
11720}
11721_ACEOF
11722rm -f conftest.$ac_objext
11723if { (ac_try="$ac_compile"
11724case "(($ac_try" in
11725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11726 *) ac_try_echo=$ac_try;;
11727esac
11728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11729 (eval "$ac_compile") 2>conftest.er1
11730 ac_status=$?
11731 grep -v '^ *+' conftest.er1 >conftest.err
11732 rm -f conftest.er1
11733 cat conftest.err >&5
11734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11735 (exit $ac_status); } && {
11736 test -z "$ac_c_werror_flag" ||
11737 test ! -s conftest.err
11738 } && test -s conftest.$ac_objext; then
11739 ac_lo=0 ac_mid=0
11740 while :; do
11741 cat >conftest.$ac_ext <<_ACEOF
11742/* confdefs.h. */
11743_ACEOF
11744cat confdefs.h >>conftest.$ac_ext
11745cat >>conftest.$ac_ext <<_ACEOF
11746/* end confdefs.h. */
11747$ac_includes_default
11748 typedef long double ac__type_sizeof_;
11749int
11750main ()
11751{
11752static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11753test_array [0] = 0
11754
11755 ;
11756 return 0;
11757}
11758_ACEOF
11759rm -f conftest.$ac_objext
11760if { (ac_try="$ac_compile"
11761case "(($ac_try" in
11762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11763 *) ac_try_echo=$ac_try;;
11764esac
11765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11766 (eval "$ac_compile") 2>conftest.er1
11767 ac_status=$?
11768 grep -v '^ *+' conftest.er1 >conftest.err
11769 rm -f conftest.er1
11770 cat conftest.err >&5
11771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11772 (exit $ac_status); } && {
11773 test -z "$ac_c_werror_flag" ||
11774 test ! -s conftest.err
11775 } && test -s conftest.$ac_objext; then
11776 ac_hi=$ac_mid; break
11777else
11778 echo "$as_me: failed program was:" >&5
11779sed 's/^/| /' conftest.$ac_ext >&5
11780
11781 ac_lo=`expr $ac_mid + 1`
11782 if test $ac_lo -le $ac_mid; then
11783 ac_lo= ac_hi=
11784 break
11785 fi
11786 ac_mid=`expr 2 '*' $ac_mid + 1`
11787fi
11788
11789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11790 done
11791else
11792 echo "$as_me: failed program was:" >&5
11793sed 's/^/| /' conftest.$ac_ext >&5
11794
11795 cat >conftest.$ac_ext <<_ACEOF
11796/* confdefs.h. */
11797_ACEOF
11798cat confdefs.h >>conftest.$ac_ext
11799cat >>conftest.$ac_ext <<_ACEOF
11800/* end confdefs.h. */
11801$ac_includes_default
11802 typedef long double ac__type_sizeof_;
11803int
11804main ()
11805{
11806static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11807test_array [0] = 0
11808
11809 ;
11810 return 0;
11811}
11812_ACEOF
11813rm -f conftest.$ac_objext
11814if { (ac_try="$ac_compile"
11815case "(($ac_try" in
11816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11817 *) ac_try_echo=$ac_try;;
11818esac
11819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11820 (eval "$ac_compile") 2>conftest.er1
11821 ac_status=$?
11822 grep -v '^ *+' conftest.er1 >conftest.err
11823 rm -f conftest.er1
11824 cat conftest.err >&5
11825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11826 (exit $ac_status); } && {
11827 test -z "$ac_c_werror_flag" ||
11828 test ! -s conftest.err
11829 } && test -s conftest.$ac_objext; then
11830 ac_hi=-1 ac_mid=-1
11831 while :; do
11832 cat >conftest.$ac_ext <<_ACEOF
11833/* confdefs.h. */
11834_ACEOF
11835cat confdefs.h >>conftest.$ac_ext
11836cat >>conftest.$ac_ext <<_ACEOF
11837/* end confdefs.h. */
11838$ac_includes_default
11839 typedef long double ac__type_sizeof_;
11840int
11841main ()
11842{
11843static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11844test_array [0] = 0
11845
11846 ;
11847 return 0;
11848}
11849_ACEOF
11850rm -f conftest.$ac_objext
11851if { (ac_try="$ac_compile"
11852case "(($ac_try" in
11853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11854 *) ac_try_echo=$ac_try;;
11855esac
11856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11857 (eval "$ac_compile") 2>conftest.er1
11858 ac_status=$?
11859 grep -v '^ *+' conftest.er1 >conftest.err
11860 rm -f conftest.er1
11861 cat conftest.err >&5
11862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11863 (exit $ac_status); } && {
11864 test -z "$ac_c_werror_flag" ||
11865 test ! -s conftest.err
11866 } && test -s conftest.$ac_objext; then
11867 ac_lo=$ac_mid; break
11868else
11869 echo "$as_me: failed program was:" >&5
11870sed 's/^/| /' conftest.$ac_ext >&5
11871
11872 ac_hi=`expr '(' $ac_mid ')' - 1`
11873 if test $ac_mid -le $ac_hi; then
11874 ac_lo= ac_hi=
11875 break
11876 fi
11877 ac_mid=`expr 2 '*' $ac_mid`
11878fi
11879
11880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11881 done
11882else
11883 echo "$as_me: failed program was:" >&5
11884sed 's/^/| /' conftest.$ac_ext >&5
11885
11886 ac_lo= ac_hi=
11887fi
11888
11889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11890fi
11891
11892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11893# Binary search between lo and hi bounds.
11894while test "x$ac_lo" != "x$ac_hi"; do
11895 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11896 cat >conftest.$ac_ext <<_ACEOF
11897/* confdefs.h. */
11898_ACEOF
11899cat confdefs.h >>conftest.$ac_ext
11900cat >>conftest.$ac_ext <<_ACEOF
11901/* end confdefs.h. */
11902$ac_includes_default
11903 typedef long double ac__type_sizeof_;
11904int
11905main ()
11906{
11907static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11908test_array [0] = 0
11909
11910 ;
11911 return 0;
11912}
11913_ACEOF
11914rm -f conftest.$ac_objext
11915if { (ac_try="$ac_compile"
11916case "(($ac_try" in
11917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11918 *) ac_try_echo=$ac_try;;
11919esac
11920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11921 (eval "$ac_compile") 2>conftest.er1
11922 ac_status=$?
11923 grep -v '^ *+' conftest.er1 >conftest.err
11924 rm -f conftest.er1
11925 cat conftest.err >&5
11926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11927 (exit $ac_status); } && {
11928 test -z "$ac_c_werror_flag" ||
11929 test ! -s conftest.err
11930 } && test -s conftest.$ac_objext; then
11931 ac_hi=$ac_mid
11932else
11933 echo "$as_me: failed program was:" >&5
11934sed 's/^/| /' conftest.$ac_ext >&5
11935
11936 ac_lo=`expr '(' $ac_mid ')' + 1`
11937fi
11938
11939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11940done
11941case $ac_lo in
11942?*) ac_cv_sizeof_long_double=$ac_lo;;
11943'') if test "$ac_cv_type_long_double" = yes; then
11944 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11945See \`config.log' for more details." >&5
11946echo "$as_me: error: cannot compute sizeof (long double)
11947See \`config.log' for more details." >&2;}
11948 { (exit 77); exit 77; }; }
11949 else
11950 ac_cv_sizeof_long_double=0
11951 fi ;;
11952esac
11953else
11954 cat >conftest.$ac_ext <<_ACEOF
11955/* confdefs.h. */
11956_ACEOF
11957cat confdefs.h >>conftest.$ac_ext
11958cat >>conftest.$ac_ext <<_ACEOF
11959/* end confdefs.h. */
11960$ac_includes_default
11961 typedef long double ac__type_sizeof_;
11962static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11963static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11964#include <stdio.h>
11965#include <stdlib.h>
11966int
11967main ()
11968{
11969
11970 FILE *f = fopen ("conftest.val", "w");
11971 if (! f)
11972 return 1;
11973 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11974 {
11975 long int i = longval ();
11976 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11977 return 1;
11978 fprintf (f, "%ld\n", i);
11979 }
11980 else
11981 {
11982 unsigned long int i = ulongval ();
11983 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11984 return 1;
11985 fprintf (f, "%lu\n", i);
11986 }
11987 return ferror (f) || fclose (f) != 0;
11988
11989 ;
11990 return 0;
11991}
11992_ACEOF
11993rm -f conftest$ac_exeext
11994if { (ac_try="$ac_link"
11995case "(($ac_try" in
11996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11997 *) ac_try_echo=$ac_try;;
11998esac
11999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12000 (eval "$ac_link") 2>&5
12001 ac_status=$?
12002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12004 { (case "(($ac_try" in
12005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12006 *) ac_try_echo=$ac_try;;
12007esac
12008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12009 (eval "$ac_try") 2>&5
12010 ac_status=$?
12011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12012 (exit $ac_status); }; }; then
12013 ac_cv_sizeof_long_double=`cat conftest.val`
12014else
12015 echo "$as_me: program exited with status $ac_status" >&5
12016echo "$as_me: failed program was:" >&5
12017sed 's/^/| /' conftest.$ac_ext >&5
12018
12019( exit $ac_status )
12020if test "$ac_cv_type_long_double" = yes; then
12021 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
12022See \`config.log' for more details." >&5
12023echo "$as_me: error: cannot compute sizeof (long double)
12024See \`config.log' for more details." >&2;}
12025 { (exit 77); exit 77; }; }
12026 else
12027 ac_cv_sizeof_long_double=0
12028 fi
12029fi
12030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12031fi
12032rm -f conftest.val
12033fi
12034{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12035echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
12036
12037
12038
12039cat >>confdefs.h <<_ACEOF
12040#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12041_ACEOF
12042
12043
12044fi
12045
Martin v. Löwiseba40652007-08-30 20:10:57 +000012046{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12047echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012048have_c99_bool=no
12049cat >conftest.$ac_ext <<_ACEOF
12050/* confdefs.h. */
12051_ACEOF
12052cat confdefs.h >>conftest.$ac_ext
12053cat >>conftest.$ac_ext <<_ACEOF
12054/* end confdefs.h. */
12055
12056int
12057main ()
12058{
12059_Bool x; x = (_Bool)0;
12060 ;
12061 return 0;
12062}
12063_ACEOF
12064rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012065if { (ac_try="$ac_compile"
12066case "(($ac_try" in
12067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12068 *) ac_try_echo=$ac_try;;
12069esac
12070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12071 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012072 ac_status=$?
12073 grep -v '^ *+' conftest.er1 >conftest.err
12074 rm -f conftest.er1
12075 cat conftest.err >&5
12076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012077 (exit $ac_status); } && {
12078 test -z "$ac_c_werror_flag" ||
12079 test ! -s conftest.err
12080 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012081
12082
12083cat >>confdefs.h <<\_ACEOF
12084#define HAVE_C99_BOOL 1
12085_ACEOF
12086
12087 have_c99_bool=yes
12088
12089else
12090 echo "$as_me: failed program was:" >&5
12091sed 's/^/| /' conftest.$ac_ext >&5
12092
Martin v. Löwiseba40652007-08-30 20:10:57 +000012093
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012095
12096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12097{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12098echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012099if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012100{ echo "$as_me:$LINENO: checking for _Bool" >&5
12101echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012102if test "${ac_cv_type__Bool+set}" = set; then
12103 echo $ECHO_N "(cached) $ECHO_C" >&6
12104else
12105 cat >conftest.$ac_ext <<_ACEOF
12106/* confdefs.h. */
12107_ACEOF
12108cat confdefs.h >>conftest.$ac_ext
12109cat >>conftest.$ac_ext <<_ACEOF
12110/* end confdefs.h. */
12111$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012112typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012113int
12114main ()
12115{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012116if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012117 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012118if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012119 return 0;
12120 ;
12121 return 0;
12122}
12123_ACEOF
12124rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012125if { (ac_try="$ac_compile"
12126case "(($ac_try" in
12127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12128 *) ac_try_echo=$ac_try;;
12129esac
12130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12131 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012132 ac_status=$?
12133 grep -v '^ *+' conftest.er1 >conftest.err
12134 rm -f conftest.er1
12135 cat conftest.err >&5
12136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012137 (exit $ac_status); } && {
12138 test -z "$ac_c_werror_flag" ||
12139 test ! -s conftest.err
12140 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012141 ac_cv_type__Bool=yes
12142else
12143 echo "$as_me: failed program was:" >&5
12144sed 's/^/| /' conftest.$ac_ext >&5
12145
Martin v. Löwiseba40652007-08-30 20:10:57 +000012146 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012147fi
Brett Cannon19fab762007-06-02 03:02:29 +000012148
Martin v. Löwiseba40652007-08-30 20:10:57 +000012149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12150fi
12151{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12152echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12153
12154# The cast to long int works around a bug in the HP C Compiler
12155# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12156# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12157# This bug is HP SR number 8606223364.
12158{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12159echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012160if test "${ac_cv_sizeof__Bool+set}" = set; then
12161 echo $ECHO_N "(cached) $ECHO_C" >&6
12162else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012163 if test "$cross_compiling" = yes; then
12164 # Depending upon the size, compute the lo and hi bounds.
12165cat >conftest.$ac_ext <<_ACEOF
12166/* confdefs.h. */
12167_ACEOF
12168cat confdefs.h >>conftest.$ac_ext
12169cat >>conftest.$ac_ext <<_ACEOF
12170/* end confdefs.h. */
12171$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012172 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012173int
12174main ()
12175{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012176static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012177test_array [0] = 0
12178
12179 ;
12180 return 0;
12181}
12182_ACEOF
12183rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012184if { (ac_try="$ac_compile"
12185case "(($ac_try" in
12186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12187 *) ac_try_echo=$ac_try;;
12188esac
12189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012191 ac_status=$?
12192 grep -v '^ *+' conftest.er1 >conftest.err
12193 rm -f conftest.er1
12194 cat conftest.err >&5
12195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012196 (exit $ac_status); } && {
12197 test -z "$ac_c_werror_flag" ||
12198 test ! -s conftest.err
12199 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012200 ac_lo=0 ac_mid=0
12201 while :; do
12202 cat >conftest.$ac_ext <<_ACEOF
12203/* confdefs.h. */
12204_ACEOF
12205cat confdefs.h >>conftest.$ac_ext
12206cat >>conftest.$ac_ext <<_ACEOF
12207/* end confdefs.h. */
12208$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012209 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012210int
12211main ()
12212{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012214test_array [0] = 0
12215
12216 ;
12217 return 0;
12218}
12219_ACEOF
12220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012221if { (ac_try="$ac_compile"
12222case "(($ac_try" in
12223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12224 *) ac_try_echo=$ac_try;;
12225esac
12226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012228 ac_status=$?
12229 grep -v '^ *+' conftest.er1 >conftest.err
12230 rm -f conftest.er1
12231 cat conftest.err >&5
12232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012233 (exit $ac_status); } && {
12234 test -z "$ac_c_werror_flag" ||
12235 test ! -s conftest.err
12236 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012237 ac_hi=$ac_mid; break
12238else
12239 echo "$as_me: failed program was:" >&5
12240sed 's/^/| /' conftest.$ac_ext >&5
12241
Martin v. Löwiseba40652007-08-30 20:10:57 +000012242 ac_lo=`expr $ac_mid + 1`
12243 if test $ac_lo -le $ac_mid; then
12244 ac_lo= ac_hi=
12245 break
12246 fi
12247 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012249
12250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012251 done
12252else
12253 echo "$as_me: failed program was:" >&5
12254sed 's/^/| /' conftest.$ac_ext >&5
12255
Martin v. Löwiseba40652007-08-30 20:10:57 +000012256 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012257/* confdefs.h. */
12258_ACEOF
12259cat confdefs.h >>conftest.$ac_ext
12260cat >>conftest.$ac_ext <<_ACEOF
12261/* end confdefs.h. */
12262$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012263 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012264int
12265main ()
12266{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012267static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012268test_array [0] = 0
12269
12270 ;
12271 return 0;
12272}
12273_ACEOF
12274rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012275if { (ac_try="$ac_compile"
12276case "(($ac_try" in
12277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12278 *) ac_try_echo=$ac_try;;
12279esac
12280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012282 ac_status=$?
12283 grep -v '^ *+' conftest.er1 >conftest.err
12284 rm -f conftest.er1
12285 cat conftest.err >&5
12286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012287 (exit $ac_status); } && {
12288 test -z "$ac_c_werror_flag" ||
12289 test ! -s conftest.err
12290 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012291 ac_hi=-1 ac_mid=-1
12292 while :; do
12293 cat >conftest.$ac_ext <<_ACEOF
12294/* confdefs.h. */
12295_ACEOF
12296cat confdefs.h >>conftest.$ac_ext
12297cat >>conftest.$ac_ext <<_ACEOF
12298/* end confdefs.h. */
12299$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012300 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012301int
12302main ()
12303{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012304static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012305test_array [0] = 0
12306
12307 ;
12308 return 0;
12309}
12310_ACEOF
12311rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012312if { (ac_try="$ac_compile"
12313case "(($ac_try" in
12314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12315 *) ac_try_echo=$ac_try;;
12316esac
12317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12318 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012319 ac_status=$?
12320 grep -v '^ *+' conftest.er1 >conftest.err
12321 rm -f conftest.er1
12322 cat conftest.err >&5
12323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012324 (exit $ac_status); } && {
12325 test -z "$ac_c_werror_flag" ||
12326 test ! -s conftest.err
12327 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012328 ac_lo=$ac_mid; break
12329else
12330 echo "$as_me: failed program was:" >&5
12331sed 's/^/| /' conftest.$ac_ext >&5
12332
Martin v. Löwiseba40652007-08-30 20:10:57 +000012333 ac_hi=`expr '(' $ac_mid ')' - 1`
12334 if test $ac_mid -le $ac_hi; then
12335 ac_lo= ac_hi=
12336 break
12337 fi
12338 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012340
12341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012342 done
12343else
12344 echo "$as_me: failed program was:" >&5
12345sed 's/^/| /' conftest.$ac_ext >&5
12346
Martin v. Löwiseba40652007-08-30 20:10:57 +000012347 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012349
12350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012352
12353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012354# Binary search between lo and hi bounds.
12355while test "x$ac_lo" != "x$ac_hi"; do
12356 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12357 cat >conftest.$ac_ext <<_ACEOF
12358/* confdefs.h. */
12359_ACEOF
12360cat confdefs.h >>conftest.$ac_ext
12361cat >>conftest.$ac_ext <<_ACEOF
12362/* end confdefs.h. */
12363$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012364 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012365int
12366main ()
12367{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012368static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012369test_array [0] = 0
12370
12371 ;
12372 return 0;
12373}
12374_ACEOF
12375rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012376if { (ac_try="$ac_compile"
12377case "(($ac_try" in
12378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12379 *) ac_try_echo=$ac_try;;
12380esac
12381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012383 ac_status=$?
12384 grep -v '^ *+' conftest.er1 >conftest.err
12385 rm -f conftest.er1
12386 cat conftest.err >&5
12387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012388 (exit $ac_status); } && {
12389 test -z "$ac_c_werror_flag" ||
12390 test ! -s conftest.err
12391 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012392 ac_hi=$ac_mid
12393else
12394 echo "$as_me: failed program was:" >&5
12395sed 's/^/| /' conftest.$ac_ext >&5
12396
Martin v. Löwiseba40652007-08-30 20:10:57 +000012397 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012399
12400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012401done
12402case $ac_lo in
12403?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012404'') if test "$ac_cv_type__Bool" = yes; then
12405 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012406See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012407echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012408See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012409 { (exit 77); exit 77; }; }
12410 else
12411 ac_cv_sizeof__Bool=0
12412 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012413esac
12414else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012415 cat >conftest.$ac_ext <<_ACEOF
12416/* confdefs.h. */
12417_ACEOF
12418cat confdefs.h >>conftest.$ac_ext
12419cat >>conftest.$ac_ext <<_ACEOF
12420/* end confdefs.h. */
12421$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012422 typedef _Bool ac__type_sizeof_;
12423static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12424static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012425#include <stdio.h>
12426#include <stdlib.h>
12427int
12428main ()
12429{
12430
12431 FILE *f = fopen ("conftest.val", "w");
12432 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012433 return 1;
12434 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012435 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012436 long int i = longval ();
12437 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12438 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012439 fprintf (f, "%ld\n", i);
12440 }
12441 else
12442 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012443 unsigned long int i = ulongval ();
12444 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12445 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012446 fprintf (f, "%lu\n", i);
12447 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012449
12450 ;
12451 return 0;
12452}
12453_ACEOF
12454rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012455if { (ac_try="$ac_link"
12456case "(($ac_try" in
12457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12458 *) ac_try_echo=$ac_try;;
12459esac
12460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12461 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012462 ac_status=$?
12463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12464 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012465 { (case "(($ac_try" in
12466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12467 *) ac_try_echo=$ac_try;;
12468esac
12469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12470 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012471 ac_status=$?
12472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12473 (exit $ac_status); }; }; then
12474 ac_cv_sizeof__Bool=`cat conftest.val`
12475else
12476 echo "$as_me: program exited with status $ac_status" >&5
12477echo "$as_me: failed program was:" >&5
12478sed 's/^/| /' conftest.$ac_ext >&5
12479
12480( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012481if test "$ac_cv_type__Bool" = yes; then
12482 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012483See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012484echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012485See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012486 { (exit 77); exit 77; }; }
12487 else
12488 ac_cv_sizeof__Bool=0
12489 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012491rm -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 +000012492fi
12493rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012495{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12496echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12497
12498
12499
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012500cat >>confdefs.h <<_ACEOF
12501#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12502_ACEOF
12503
12504
12505fi
12506
Martin v. Löwiseba40652007-08-30 20:10:57 +000012507{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12508echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012509if test "${ac_cv_type_uintptr_t+set}" = set; then
12510 echo $ECHO_N "(cached) $ECHO_C" >&6
12511else
12512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012513/* confdefs.h. */
12514_ACEOF
12515cat confdefs.h >>conftest.$ac_ext
12516cat >>conftest.$ac_ext <<_ACEOF
12517/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012518#ifdef HAVE_STDINT_H
12519 #include <stdint.h>
12520 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012521
Martin v. Löwiseba40652007-08-30 20:10:57 +000012522typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012523int
12524main ()
12525{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012526if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012527 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012528if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012529 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012530 ;
12531 return 0;
12532}
12533_ACEOF
12534rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012535if { (ac_try="$ac_compile"
12536case "(($ac_try" in
12537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12538 *) ac_try_echo=$ac_try;;
12539esac
12540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012543 grep -v '^ *+' conftest.er1 >conftest.err
12544 rm -f conftest.er1
12545 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012547 (exit $ac_status); } && {
12548 test -z "$ac_c_werror_flag" ||
12549 test ! -s conftest.err
12550 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012551 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012552else
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012554sed 's/^/| /' conftest.$ac_ext >&5
12555
Martin v. Löwiseba40652007-08-30 20:10:57 +000012556 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012558
12559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012561{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12562echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012563if test $ac_cv_type_uintptr_t = yes; then
12564
12565cat >>confdefs.h <<_ACEOF
12566#define HAVE_UINTPTR_T 1
12567_ACEOF
12568
Martin v. Löwiseba40652007-08-30 20:10:57 +000012569{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12570echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012571if test "${ac_cv_type_uintptr_t+set}" = set; then
12572 echo $ECHO_N "(cached) $ECHO_C" >&6
12573else
12574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012575/* confdefs.h. */
12576_ACEOF
12577cat confdefs.h >>conftest.$ac_ext
12578cat >>conftest.$ac_ext <<_ACEOF
12579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012580$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012581typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012582int
12583main ()
12584{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012585if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012587if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 return 0;
12589 ;
12590 return 0;
12591}
12592_ACEOF
12593rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012594if { (ac_try="$ac_compile"
12595case "(($ac_try" in
12596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12597 *) ac_try_echo=$ac_try;;
12598esac
12599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012602 grep -v '^ *+' conftest.er1 >conftest.err
12603 rm -f conftest.er1
12604 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012606 (exit $ac_status); } && {
12607 test -z "$ac_c_werror_flag" ||
12608 test ! -s conftest.err
12609 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012610 ac_cv_type_uintptr_t=yes
12611else
12612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012613sed 's/^/| /' conftest.$ac_ext >&5
12614
Martin v. Löwiseba40652007-08-30 20:10:57 +000012615 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012616fi
Brett Cannon19fab762007-06-02 03:02:29 +000012617
Martin v. Löwiseba40652007-08-30 20:10:57 +000012618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12619fi
12620{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12621echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12622
12623# The cast to long int works around a bug in the HP C Compiler
12624# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12625# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12626# This bug is HP SR number 8606223364.
12627{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12628echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012629if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12630 echo $ECHO_N "(cached) $ECHO_C" >&6
12631else
Martin v. Löwis11437992002-04-12 09:54:03 +000012632 if test "$cross_compiling" = yes; then
12633 # Depending upon the size, compute the lo and hi bounds.
12634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012635/* confdefs.h. */
12636_ACEOF
12637cat confdefs.h >>conftest.$ac_ext
12638cat >>conftest.$ac_ext <<_ACEOF
12639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012640$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012641 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012642int
12643main ()
12644{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012645static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012646test_array [0] = 0
12647
12648 ;
12649 return 0;
12650}
12651_ACEOF
12652rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012653if { (ac_try="$ac_compile"
12654case "(($ac_try" in
12655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12656 *) ac_try_echo=$ac_try;;
12657esac
12658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12659 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012661 grep -v '^ *+' conftest.er1 >conftest.err
12662 rm -f conftest.er1
12663 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012665 (exit $ac_status); } && {
12666 test -z "$ac_c_werror_flag" ||
12667 test ! -s conftest.err
12668 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 ac_lo=0 ac_mid=0
12670 while :; do
12671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012672/* confdefs.h. */
12673_ACEOF
12674cat confdefs.h >>conftest.$ac_ext
12675cat >>conftest.$ac_ext <<_ACEOF
12676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012677$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012678 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012679int
12680main ()
12681{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012682static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012683test_array [0] = 0
12684
12685 ;
12686 return 0;
12687}
12688_ACEOF
12689rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012690if { (ac_try="$ac_compile"
12691case "(($ac_try" in
12692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12693 *) ac_try_echo=$ac_try;;
12694esac
12695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012698 grep -v '^ *+' conftest.er1 >conftest.err
12699 rm -f conftest.er1
12700 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012702 (exit $ac_status); } && {
12703 test -z "$ac_c_werror_flag" ||
12704 test ! -s conftest.err
12705 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 ac_hi=$ac_mid; break
12707else
12708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012709sed 's/^/| /' conftest.$ac_ext >&5
12710
Martin v. Löwiseba40652007-08-30 20:10:57 +000012711 ac_lo=`expr $ac_mid + 1`
12712 if test $ac_lo -le $ac_mid; then
12713 ac_lo= ac_hi=
12714 break
12715 fi
12716 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012718
12719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012720 done
12721else
12722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012723sed 's/^/| /' conftest.$ac_ext >&5
12724
Martin v. Löwiseba40652007-08-30 20:10:57 +000012725 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012726/* confdefs.h. */
12727_ACEOF
12728cat confdefs.h >>conftest.$ac_ext
12729cat >>conftest.$ac_ext <<_ACEOF
12730/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012731$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012732 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012733int
12734main ()
12735{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012736static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012737test_array [0] = 0
12738
12739 ;
12740 return 0;
12741}
12742_ACEOF
12743rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012744if { (ac_try="$ac_compile"
12745case "(($ac_try" in
12746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12747 *) ac_try_echo=$ac_try;;
12748esac
12749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12750 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012752 grep -v '^ *+' conftest.er1 >conftest.err
12753 rm -f conftest.er1
12754 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012756 (exit $ac_status); } && {
12757 test -z "$ac_c_werror_flag" ||
12758 test ! -s conftest.err
12759 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012760 ac_hi=-1 ac_mid=-1
12761 while :; do
12762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012763/* confdefs.h. */
12764_ACEOF
12765cat confdefs.h >>conftest.$ac_ext
12766cat >>conftest.$ac_ext <<_ACEOF
12767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012768$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012769 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012770int
12771main ()
12772{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012773static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012774test_array [0] = 0
12775
12776 ;
12777 return 0;
12778}
12779_ACEOF
12780rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012781if { (ac_try="$ac_compile"
12782case "(($ac_try" in
12783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12784 *) ac_try_echo=$ac_try;;
12785esac
12786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012789 grep -v '^ *+' conftest.er1 >conftest.err
12790 rm -f conftest.er1
12791 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012793 (exit $ac_status); } && {
12794 test -z "$ac_c_werror_flag" ||
12795 test ! -s conftest.err
12796 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012797 ac_lo=$ac_mid; break
12798else
12799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012800sed 's/^/| /' conftest.$ac_ext >&5
12801
Martin v. Löwiseba40652007-08-30 20:10:57 +000012802 ac_hi=`expr '(' $ac_mid ')' - 1`
12803 if test $ac_mid -le $ac_hi; then
12804 ac_lo= ac_hi=
12805 break
12806 fi
12807 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012809
12810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012811 done
12812else
12813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012814sed 's/^/| /' conftest.$ac_ext >&5
12815
Martin v. Löwiseba40652007-08-30 20:10:57 +000012816 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012818
12819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012821
12822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012823# Binary search between lo and hi bounds.
12824while test "x$ac_lo" != "x$ac_hi"; do
12825 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012827/* confdefs.h. */
12828_ACEOF
12829cat confdefs.h >>conftest.$ac_ext
12830cat >>conftest.$ac_ext <<_ACEOF
12831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012832$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012833 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012834int
12835main ()
12836{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012837static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012838test_array [0] = 0
12839
12840 ;
12841 return 0;
12842}
12843_ACEOF
12844rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012845if { (ac_try="$ac_compile"
12846case "(($ac_try" in
12847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12848 *) ac_try_echo=$ac_try;;
12849esac
12850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012853 grep -v '^ *+' conftest.er1 >conftest.err
12854 rm -f conftest.er1
12855 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012857 (exit $ac_status); } && {
12858 test -z "$ac_c_werror_flag" ||
12859 test ! -s conftest.err
12860 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 ac_hi=$ac_mid
12862else
12863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012864sed 's/^/| /' conftest.$ac_ext >&5
12865
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012868
12869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012870done
12871case $ac_lo in
12872?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012873'') if test "$ac_cv_type_uintptr_t" = yes; then
12874 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012875See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012876echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012877See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012878 { (exit 77); exit 77; }; }
12879 else
12880 ac_cv_sizeof_uintptr_t=0
12881 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012882esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012883else
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012885/* confdefs.h. */
12886_ACEOF
12887cat confdefs.h >>conftest.$ac_ext
12888cat >>conftest.$ac_ext <<_ACEOF
12889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012890$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012891 typedef uintptr_t ac__type_sizeof_;
12892static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12893static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012894#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012895#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012896int
12897main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012898{
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
12900 FILE *f = fopen ("conftest.val", "w");
12901 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012902 return 1;
12903 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012905 long int i = longval ();
12906 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12907 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012908 fprintf (f, "%ld\n", i);
12909 }
12910 else
12911 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012912 unsigned long int i = ulongval ();
12913 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12914 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 fprintf (f, "%lu\n", i);
12916 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012918
12919 ;
12920 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012921}
Martin v. Löwis11437992002-04-12 09:54:03 +000012922_ACEOF
12923rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012924if { (ac_try="$ac_link"
12925case "(($ac_try" in
12926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12927 *) ac_try_echo=$ac_try;;
12928esac
12929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12930 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 ac_status=$?
12932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12933 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012934 { (case "(($ac_try" in
12935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12936 *) ac_try_echo=$ac_try;;
12937esac
12938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12939 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 ac_status=$?
12941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12942 (exit $ac_status); }; }; then
12943 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012944else
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 echo "$as_me: program exited with status $ac_status" >&5
12946echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012947sed 's/^/| /' conftest.$ac_ext >&5
12948
Martin v. Löwis11437992002-04-12 09:54:03 +000012949( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012950if test "$ac_cv_type_uintptr_t" = yes; then
12951 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012952See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012953echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012954See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012955 { (exit 77); exit 77; }; }
12956 else
12957 ac_cv_sizeof_uintptr_t=0
12958 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012960rm -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 +000012961fi
12962rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012964{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12965echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12966
12967
12968
Martin v. Löwis11437992002-04-12 09:54:03 +000012969cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012970#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012971_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012972
Michael W. Hudson54241132001-12-07 15:38:26 +000012973
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012974fi
12975
Martin v. Löwisebe26702006-10-02 14:55:51 +000012976
12977
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012978# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012979{ echo "$as_me:$LINENO: checking size of off_t" >&5
12980echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012981if test "${ac_cv_sizeof_off_t+set}" = set; then
12982 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012983else
12984 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012985 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012986else
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012988/* confdefs.h. */
12989_ACEOF
12990cat confdefs.h >>conftest.$ac_ext
12991cat >>conftest.$ac_ext <<_ACEOF
12992/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012993#include <stdio.h>
12994#include <sys/types.h>
12995main()
12996{
12997 FILE *f=fopen("conftestval", "w");
12998 if (!f) exit(1);
12999 fprintf(f, "%d\n", sizeof(off_t));
13000 exit(0);
13001}
Martin v. Löwis11437992002-04-12 09:54:03 +000013002_ACEOF
13003rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013004if { (ac_try="$ac_link"
13005case "(($ac_try" in
13006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13007 *) ac_try_echo=$ac_try;;
13008esac
13009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13010 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 ac_status=$?
13012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13013 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013014 { (case "(($ac_try" in
13015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13016 *) ac_try_echo=$ac_try;;
13017esac
13018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13019 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013020 ac_status=$?
13021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13022 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013023 ac_cv_sizeof_off_t=`cat conftestval`
13024else
Martin v. Löwis11437992002-04-12 09:54:03 +000013025 echo "$as_me: program exited with status $ac_status" >&5
13026echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013027sed 's/^/| /' conftest.$ac_ext >&5
13028
Martin v. Löwis11437992002-04-12 09:54:03 +000013029( exit $ac_status )
13030ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013032rm -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 +000013033fi
13034
Martin v. Löwiseba40652007-08-30 20:10:57 +000013035
13036
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013037fi
13038
Martin v. Löwiseba40652007-08-30 20:10:57 +000013039{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13040echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013041
13042cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013043#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013044_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013045
Michael W. Hudson54241132001-12-07 15:38:26 +000013046
Martin v. Löwiseba40652007-08-30 20:10:57 +000013047{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13048echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013049if test "$have_long_long" = yes -a \
13050 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13051 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013052
Martin v. Löwis11437992002-04-12 09:54:03 +000013053cat >>confdefs.h <<\_ACEOF
13054#define HAVE_LARGEFILE_SUPPORT 1
13055_ACEOF
13056
Martin v. Löwiseba40652007-08-30 20:10:57 +000013057 { echo "$as_me:$LINENO: result: yes" >&5
13058echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013059else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013060 { echo "$as_me:$LINENO: result: no" >&5
13061echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013062fi
13063
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013064# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013065{ echo "$as_me:$LINENO: checking size of time_t" >&5
13066echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013067if test "${ac_cv_sizeof_time_t+set}" = set; then
13068 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013069else
13070 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013071 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013072else
Martin v. Löwis11437992002-04-12 09:54:03 +000013073 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013074/* confdefs.h. */
13075_ACEOF
13076cat confdefs.h >>conftest.$ac_ext
13077cat >>conftest.$ac_ext <<_ACEOF
13078/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013079#include <stdio.h>
13080#include <time.h>
13081main()
13082{
13083 FILE *f=fopen("conftestval", "w");
13084 if (!f) exit(1);
13085 fprintf(f, "%d\n", sizeof(time_t));
13086 exit(0);
13087}
Martin v. Löwis11437992002-04-12 09:54:03 +000013088_ACEOF
13089rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013090if { (ac_try="$ac_link"
13091case "(($ac_try" in
13092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13093 *) ac_try_echo=$ac_try;;
13094esac
13095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13096 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 ac_status=$?
13098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013100 { (case "(($ac_try" in
13101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13102 *) ac_try_echo=$ac_try;;
13103esac
13104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13105 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013106 ac_status=$?
13107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13108 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013109 ac_cv_sizeof_time_t=`cat conftestval`
13110else
Martin v. Löwis11437992002-04-12 09:54:03 +000013111 echo "$as_me: program exited with status $ac_status" >&5
13112echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013113sed 's/^/| /' conftest.$ac_ext >&5
13114
Martin v. Löwis11437992002-04-12 09:54:03 +000013115( exit $ac_status )
13116ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013118rm -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 +000013119fi
13120
Martin v. Löwiseba40652007-08-30 20:10:57 +000013121
13122
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013123fi
13124
Martin v. Löwiseba40652007-08-30 20:10:57 +000013125{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13126echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013127
13128cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013129#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013130_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013131
Michael W. Hudson54241132001-12-07 15:38:26 +000013132
13133
Trent Mick635f6fb2000-08-23 21:33:05 +000013134# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013135ac_save_cc="$CC"
13136if test "$ac_cv_kpthread" = "yes"
13137then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013138elif test "$ac_cv_kthread" = "yes"
13139then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013140elif test "$ac_cv_pthread" = "yes"
13141then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013143{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13144echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013145have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013146cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013147/* confdefs.h. */
13148_ACEOF
13149cat confdefs.h >>conftest.$ac_ext
13150cat >>conftest.$ac_ext <<_ACEOF
13151/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013152#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013153int
13154main ()
13155{
Guido van Rossum12580492000-09-24 16:47:19 +000013156pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013157 ;
13158 return 0;
13159}
13160_ACEOF
13161rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013162if { (ac_try="$ac_compile"
13163case "(($ac_try" in
13164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13165 *) ac_try_echo=$ac_try;;
13166esac
13167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013170 grep -v '^ *+' conftest.er1 >conftest.err
13171 rm -f conftest.er1
13172 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013174 (exit $ac_status); } && {
13175 test -z "$ac_c_werror_flag" ||
13176 test ! -s conftest.err
13177 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013178 have_pthread_t=yes
13179else
Martin v. Löwis11437992002-04-12 09:54:03 +000013180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013181sed 's/^/| /' conftest.$ac_ext >&5
13182
Martin v. Löwiseba40652007-08-30 20:10:57 +000013183
Trent Mick635f6fb2000-08-23 21:33:05 +000013184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013185
13186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13187{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13188echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013189if test "$have_pthread_t" = yes ; then
13190 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013191 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13192echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
13194 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013195else
13196 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013197 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013198else
Martin v. Löwis11437992002-04-12 09:54:03 +000013199 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013200/* confdefs.h. */
13201_ACEOF
13202cat confdefs.h >>conftest.$ac_ext
13203cat >>conftest.$ac_ext <<_ACEOF
13204/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013205#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013206#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013207 main()
13208 {
13209 FILE *f=fopen("conftestval", "w");
13210 if (!f) exit(1);
13211 fprintf(f, "%d\n", sizeof(pthread_t));
13212 exit(0);
13213 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013214_ACEOF
13215rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013216if { (ac_try="$ac_link"
13217case "(($ac_try" in
13218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13219 *) ac_try_echo=$ac_try;;
13220esac
13221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13222 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013223 ac_status=$?
13224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13225 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013226 { (case "(($ac_try" in
13227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13228 *) ac_try_echo=$ac_try;;
13229esac
13230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13231 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 ac_status=$?
13233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13234 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013235 ac_cv_sizeof_pthread_t=`cat conftestval`
13236else
Martin v. Löwis11437992002-04-12 09:54:03 +000013237 echo "$as_me: program exited with status $ac_status" >&5
13238echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013239sed 's/^/| /' conftest.$ac_ext >&5
13240
Martin v. Löwis11437992002-04-12 09:54:03 +000013241( exit $ac_status )
13242ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013244rm -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 +000013245fi
13246
Martin v. Löwiseba40652007-08-30 20:10:57 +000013247
13248
Trent Mick635f6fb2000-08-23 21:33:05 +000013249fi
13250
Martin v. Löwiseba40652007-08-30 20:10:57 +000013251 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13252echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013253
13254cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013255#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013256_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013257
13258fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013259CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013260
Martin v. Löwiseba40652007-08-30 20:10:57 +000013261{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
13262echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
13263# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000013264if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013265 enableval=$enable_toolbox_glue;
13266fi
Jack Jansene578a632001-08-15 01:27:14 +000013267
13268
13269if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000013270then
Jack Jansene578a632001-08-15 01:27:14 +000013271 case $ac_sys_system/$ac_sys_release in
13272 Darwin/*)
13273 enable_toolbox_glue="yes";;
13274 *)
13275 enable_toolbox_glue="no";;
13276 esac
13277fi
13278case "$enable_toolbox_glue" in
13279yes)
Jack Jansene578a632001-08-15 01:27:14 +000013280 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013281 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000013282
13283cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013284#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013285_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013286
13287 ;;
13288*)
Jack Jansene578a632001-08-15 01:27:14 +000013289 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000013290 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000013291 ;;
13292esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013293{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
13294echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013295
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013296
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013297
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013298case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013299 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013300 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13301 ;;
13302 Darwin/*)
13303 OTHER_LIBTOOL_OPT=""
13304 ;;
13305esac
13306
13307
13308case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013309 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000013310 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13311 if test "${enable_universalsdk}"; then
13312 :
13313 else
13314 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
13315 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013316 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013317 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013318 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013319 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
13320 if test ${gcc_version} '<' 4.0
13321 then
13322 LIBTOOL_CRUFT="-lcc_dynamic"
13323 else
13324 LIBTOOL_CRUFT=""
13325 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000013326 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000013327 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013328 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013329esac
13330
Martin v. Löwiseba40652007-08-30 20:10:57 +000013331{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13332echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013333if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013334then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013335 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013336 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013337 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013338
Martin v. Löwis11437992002-04-12 09:54:03 +000013339cat >>confdefs.h <<\_ACEOF
13340#define WITH_NEXT_FRAMEWORK 1
13341_ACEOF
13342
Martin v. Löwiseba40652007-08-30 20:10:57 +000013343 { echo "$as_me:$LINENO: result: yes" >&5
13344echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013345else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013346 { echo "$as_me:$LINENO: result: no" >&5
13347echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013348fi
13349
Martin v. Löwiseba40652007-08-30 20:10:57 +000013350{ echo "$as_me:$LINENO: checking for dyld" >&5
13351echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013352case $ac_sys_system/$ac_sys_release in
13353 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013354
Martin v. Löwis11437992002-04-12 09:54:03 +000013355cat >>confdefs.h <<\_ACEOF
13356#define WITH_DYLD 1
13357_ACEOF
13358
Martin v. Löwiseba40652007-08-30 20:10:57 +000013359 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13360echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013361 ;;
13362 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013363 { echo "$as_me:$LINENO: result: no" >&5
13364echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013365 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013366esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013367
Guido van Rossum0a516c91994-09-12 10:58:40 +000013368# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013369
Michael W. Hudson54241132001-12-07 15:38:26 +000013370
13371
13372
13373
Guido van Rossum0a516c91994-09-12 10:58:40 +000013374# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013375# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000013376{ echo "$as_me:$LINENO: checking SO" >&5
13377echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013378if test -z "$SO"
13379then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013380 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000013381 hp*|HP*)
13382 case `uname -m` in
13383 ia64) SO=.so;;
13384 *) SO=.sl;;
13385 esac
13386 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013387 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013388 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013389 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013390else
13391 # this might also be a termcap variable, see #610332
13392 echo
13393 echo '====================================================================='
13394 echo '+ +'
13395 echo '+ WARNING: You have set SO in your environment. +'
13396 echo '+ Do you really mean to change the extension for shared libraries? +'
13397 echo '+ Continuing in 10 seconds to let you to ponder. +'
13398 echo '+ +'
13399 echo '====================================================================='
13400 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013402{ echo "$as_me:$LINENO: result: $SO" >&5
13403echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013404
Ronald Oussoren79f90492009-01-02 10:44:46 +000013405
Neal Norwitz58e28882006-05-19 07:00:58 +000013406cat >>confdefs.h <<_ACEOF
13407#define SHLIB_EXT "$SO"
13408_ACEOF
13409
Guido van Rossum0a516c91994-09-12 10:58:40 +000013410# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013411# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013412# (Shared libraries in this instance are shared modules to be loaded into
13413# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013414{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13415echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013416if test -z "$LDSHARED"
13417then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013419 AIX*)
13420 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013421 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013422 ;;
13423 BeOS*)
13424 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013425 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013426 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013427 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013428 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013430 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013431 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013432 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013433 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013434 hp*|HP*)
13435 if test "$GCC" = "yes"
13436 then LDSHARED='$(CC) -shared'
13437 else LDSHARED='ld -b';
13438 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013439 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013440 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013441 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13442 if test "$enable_framework" ; then
13443 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013444 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13445 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013446 else
13447 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013448 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013449 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013450 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013451 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13452 if test "$enable_framework" ; then
13453 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013454 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13455 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013456 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013457 # No framework, use the Python app as bundle-loader
13458 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013459 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013460 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013461 Darwin/*)
13462 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13463 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013464
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013465 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013466 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013467 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013468 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013469 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013470 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13471 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013472 else
13473 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13474 if test "$enable_framework" ; then
13475 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013476 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13477 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013478 else
13479 # No framework, use the Python app as bundle-loader
13480 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13481 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13482 fi
13483 fi
13484 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013485 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013486 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013487 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013488 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013489 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013490 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013491 else
13492 LDSHARED="ld -Bshareable ${LDFLAGS}"
13493 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013494 OpenBSD*)
13495 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13496 then
13497 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13498 else
13499 case `uname -r` in
13500 [01].* | 2.[0-7] | 2.[0-7].*)
13501 LDSHARED="ld -Bshareable ${LDFLAGS}"
13502 ;;
13503 *)
13504 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13505 ;;
13506 esac
13507 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013508 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013509 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013510 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013511 then LDSHARED='$(CC) -shared'
13512 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013513 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013514 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013515 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013516 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013517 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013518 *) LDSHARED="ld";;
13519 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013521{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13522echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013523BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013524# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013525# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013526{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13527echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013528if test -z "$CCSHARED"
13529then
Guido van Rossum07397971997-04-29 21:49:50 +000013530 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013531 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013532 then CCSHARED="-fPIC";
13533 elif test `uname -p` = sparc;
13534 then CCSHARED="-xcode=pic32";
13535 else CCSHARED="-Kpic";
13536 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013537 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013538 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013539 else CCSHARED="+z";
13540 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013541 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013542 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013543 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013544 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013545 if test "$GCC" = "yes"
13546 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013547 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013548 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013549 SCO_SV*)
13550 if test "$GCC" = "yes"
13551 then CCSHARED="-fPIC"
13552 else CCSHARED="-Kpic -belf"
13553 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013554 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013555 IRIX*/6*) case $CC in
13556 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013557 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013558 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013559 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013560 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013562{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13563echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013564# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013565# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013566{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13567echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013568if test -z "$LINKFORSHARED"
13569then
Guido van Rossum07397971997-04-29 21:49:50 +000013570 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013571 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013572 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013573 LINKFORSHARED="-Wl,-E -Wl,+s";;
13574# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013575 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013576 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013577 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013578 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013579 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13580 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013581 # not used by the core itself but which needs to be in the core so
13582 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013583 # -prebind is no longer used, because it actually seems to give a
13584 # slowdown in stead of a speedup, maybe due to the large number of
13585 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013586
13587 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013588 if test "$enable_framework"
13589 then
Jack Jansenda49e192005-01-07 13:08:22 +000013590 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013591 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013592 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013593 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013594 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013595 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013596 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013597 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13598 then
13599 LINKFORSHARED="-Wl,--export-dynamic"
13600 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013601 SunOS/5*) case $CC in
13602 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013603 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013604 then
13605 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013606 fi;;
13607 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013608 CYGWIN*)
13609 if test $enable_shared = "no"
13610 then
13611 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13612 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013613 QNX*)
13614 # -Wl,-E causes the symbols to be added to the dynamic
13615 # symbol table so that they can be found when a module
13616 # is loaded. -N 2048K causes the stack size to be set
13617 # to 2048 kilobytes so that the stack doesn't overflow
13618 # when running test_compile.py.
13619 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013620 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013622{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13623echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013624
Michael W. Hudson54241132001-12-07 15:38:26 +000013625
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013626
Martin v. Löwiseba40652007-08-30 20:10:57 +000013627{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13628echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013629if test ! "$LIBRARY" = "$LDLIBRARY"
13630then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013631 case $ac_sys_system in
13632 CYGWIN*)
13633 # Cygwin needs CCSHARED when building extension DLLs
13634 # but not when building the interpreter DLL.
13635 CFLAGSFORSHARED='';;
13636 *)
13637 CFLAGSFORSHARED='$(CCSHARED)'
13638 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013640{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13641echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013642
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013643# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13644# library (with --enable-shared).
13645# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013646# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13647# if it is not required, since it creates a dependency of the shared library
13648# to LIBS. This, in turn, means that applications linking the shared libpython
13649# don't need to link LIBS explicitly. The default should be only changed
13650# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013651
Martin v. Löwiseba40652007-08-30 20:10:57 +000013652{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13653echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013654case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013655 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013656 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013657esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013658{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13659echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013660
13661
Guido van Rossum627b2d71993-12-24 10:39:16 +000013662# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013663
Martin v. Löwiseba40652007-08-30 20:10:57 +000013664{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13665echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013666if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13667 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013668else
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013670LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013672/* confdefs.h. */
13673_ACEOF
13674cat confdefs.h >>conftest.$ac_ext
13675cat >>conftest.$ac_ext <<_ACEOF
13676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013677
Martin v. Löwiseba40652007-08-30 20:10:57 +000013678/* Override any GCC internal prototype to avoid an error.
13679 Use char because int might match the return type of a GCC
13680 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013681#ifdef __cplusplus
13682extern "C"
13683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013684char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013685int
13686main ()
13687{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013688return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 ;
13690 return 0;
13691}
13692_ACEOF
13693rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013694if { (ac_try="$ac_link"
13695case "(($ac_try" in
13696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13697 *) ac_try_echo=$ac_try;;
13698esac
13699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13700 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013702 grep -v '^ *+' conftest.er1 >conftest.err
13703 rm -f conftest.er1
13704 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013706 (exit $ac_status); } && {
13707 test -z "$ac_c_werror_flag" ||
13708 test ! -s conftest.err
13709 } && test -s conftest$ac_exeext &&
13710 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013712else
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013714sed 's/^/| /' conftest.$ac_ext >&5
13715
Martin v. Löwiseba40652007-08-30 20:10:57 +000013716 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013718
13719rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013721LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013723{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13724echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013725if test $ac_cv_lib_dl_dlopen = yes; then
13726 cat >>confdefs.h <<_ACEOF
13727#define HAVE_LIBDL 1
13728_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013729
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013730 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013731
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013732fi
13733 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013734
Martin v. Löwiseba40652007-08-30 20:10:57 +000013735{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13736echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013737if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13738 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013739else
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013741LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013743/* confdefs.h. */
13744_ACEOF
13745cat confdefs.h >>conftest.$ac_ext
13746cat >>conftest.$ac_ext <<_ACEOF
13747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013748
Martin v. Löwiseba40652007-08-30 20:10:57 +000013749/* Override any GCC internal prototype to avoid an error.
13750 Use char because int might match the return type of a GCC
13751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013752#ifdef __cplusplus
13753extern "C"
13754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013755char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013756int
13757main ()
13758{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013759return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 ;
13761 return 0;
13762}
13763_ACEOF
13764rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013765if { (ac_try="$ac_link"
13766case "(($ac_try" in
13767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13768 *) ac_try_echo=$ac_try;;
13769esac
13770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13771 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013773 grep -v '^ *+' conftest.er1 >conftest.err
13774 rm -f conftest.er1
13775 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013777 (exit $ac_status); } && {
13778 test -z "$ac_c_werror_flag" ||
13779 test ! -s conftest.err
13780 } && test -s conftest$ac_exeext &&
13781 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013782 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013783else
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013785sed 's/^/| /' conftest.$ac_ext >&5
13786
Martin v. Löwiseba40652007-08-30 20:10:57 +000013787 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013789
13790rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013792LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013794{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13795echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013796if test $ac_cv_lib_dld_shl_load = yes; then
13797 cat >>confdefs.h <<_ACEOF
13798#define HAVE_LIBDLD 1
13799_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013800
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013801 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013803fi
13804 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013805
Ronald Oussoren79f90492009-01-02 10:44:46 +000013806# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013807if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013808 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13809echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013810if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013812else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013813 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013814cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013815/* confdefs.h. */
13816_ACEOF
13817cat confdefs.h >>conftest.$ac_ext
13818cat >>conftest.$ac_ext <<_ACEOF
13819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
Martin v. Löwiseba40652007-08-30 20:10:57 +000013821/* Override any GCC internal prototype to avoid an error.
13822 Use char because int might match the return type of a GCC
13823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013824#ifdef __cplusplus
13825extern "C"
13826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013827char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013828int
13829main ()
13830{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013831return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 ;
13833 return 0;
13834}
13835_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013836for ac_lib in '' pthread rt posix4; do
13837 if test -z "$ac_lib"; then
13838 ac_res="none required"
13839 else
13840 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013841 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013842 fi
13843 rm -f conftest.$ac_objext conftest$ac_exeext
13844if { (ac_try="$ac_link"
13845case "(($ac_try" in
13846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13847 *) ac_try_echo=$ac_try;;
13848esac
13849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13850 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013851 ac_status=$?
13852 grep -v '^ *+' conftest.er1 >conftest.err
13853 rm -f conftest.er1
13854 cat conftest.err >&5
13855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013856 (exit $ac_status); } && {
13857 test -z "$ac_c_werror_flag" ||
13858 test ! -s conftest.err
13859 } && test -s conftest$ac_exeext &&
13860 $as_test_x conftest$ac_exeext; then
13861 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013862else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013863 echo "$as_me: failed program was:" >&5
13864sed 's/^/| /' conftest.$ac_ext >&5
13865
Martin v. Löwiseba40652007-08-30 20:10:57 +000013866
Brett Cannon19fab762007-06-02 03:02:29 +000013867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013868
13869rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13870 conftest$ac_exeext
13871 if test "${ac_cv_search_sem_init+set}" = set; then
13872 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013874done
13875if test "${ac_cv_search_sem_init+set}" = set; then
13876 :
13877else
13878 ac_cv_search_sem_init=no
13879fi
13880rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013881LIBS=$ac_func_search_save_LIBS
13882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013883{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13884echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13885ac_res=$ac_cv_search_sem_init
13886if test "$ac_res" != no; then
13887 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013888
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013889fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013890 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013891 # posix4 on Solaris 2.6
13892 # pthread (first!) on Linux
13893fi
13894
Martin v. Löwis19d17342003-06-14 21:03:05 +000013895# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013896{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13897echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013898if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13899 echo $ECHO_N "(cached) $ECHO_C" >&6
13900else
13901 ac_check_lib_save_LIBS=$LIBS
13902LIBS="-lintl $LIBS"
13903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013904/* confdefs.h. */
13905_ACEOF
13906cat confdefs.h >>conftest.$ac_ext
13907cat >>conftest.$ac_ext <<_ACEOF
13908/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013909
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910/* Override any GCC internal prototype to avoid an error.
13911 Use char because int might match the return type of a GCC
13912 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013913#ifdef __cplusplus
13914extern "C"
13915#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013916char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013917int
13918main ()
13919{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013920return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013921 ;
13922 return 0;
13923}
13924_ACEOF
13925rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013926if { (ac_try="$ac_link"
13927case "(($ac_try" in
13928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13929 *) ac_try_echo=$ac_try;;
13930esac
13931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13932 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013934 grep -v '^ *+' conftest.er1 >conftest.err
13935 rm -f conftest.er1
13936 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013938 (exit $ac_status); } && {
13939 test -z "$ac_c_werror_flag" ||
13940 test ! -s conftest.err
13941 } && test -s conftest$ac_exeext &&
13942 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013943 ac_cv_lib_intl_textdomain=yes
13944else
13945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013946sed 's/^/| /' conftest.$ac_ext >&5
13947
Martin v. Löwiseba40652007-08-30 20:10:57 +000013948 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013950
13951rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013952 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013953LIBS=$ac_check_lib_save_LIBS
13954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013955{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13956echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013957if test $ac_cv_lib_intl_textdomain = yes; then
13958
13959cat >>confdefs.h <<\_ACEOF
13960#define WITH_LIBINTL 1
13961_ACEOF
13962
13963fi
13964
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013965
13966# checks for system dependent C++ extensions support
13967case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013968 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13969echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013971/* confdefs.h. */
13972_ACEOF
13973cat confdefs.h >>conftest.$ac_ext
13974cat >>conftest.$ac_ext <<_ACEOF
13975/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013976#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013977int
13978main ()
13979{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013980loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013981 ;
13982 return 0;
13983}
13984_ACEOF
13985rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013986if { (ac_try="$ac_link"
13987case "(($ac_try" in
13988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13989 *) ac_try_echo=$ac_try;;
13990esac
13991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13992 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013994 grep -v '^ *+' conftest.er1 >conftest.err
13995 rm -f conftest.er1
13996 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013998 (exit $ac_status); } && {
13999 test -z "$ac_c_werror_flag" ||
14000 test ! -s conftest.err
14001 } && test -s conftest$ac_exeext &&
14002 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014003
Martin v. Löwis11437992002-04-12 09:54:03 +000014004cat >>confdefs.h <<\_ACEOF
14005#define AIX_GENUINE_CPLUSPLUS 1
14006_ACEOF
14007
Martin v. Löwiseba40652007-08-30 20:10:57 +000014008 { echo "$as_me:$LINENO: result: yes" >&5
14009echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014010else
Martin v. Löwis11437992002-04-12 09:54:03 +000014011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014012sed 's/^/| /' conftest.$ac_ext >&5
14013
Martin v. Löwiseba40652007-08-30 20:10:57 +000014014 { echo "$as_me:$LINENO: result: no" >&5
14015echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014017
14018rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014019 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014020 *) ;;
14021esac
14022
Guido van Rossum70c7f481998-03-26 18:44:10 +000014023# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014024# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014025{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14026echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014027if test "${ac_cv_lib_nsl_t_open+set}" = set; then
14028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014029else
Martin v. Löwis11437992002-04-12 09:54:03 +000014030 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014031LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014032cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014033/* confdefs.h. */
14034_ACEOF
14035cat confdefs.h >>conftest.$ac_ext
14036cat >>conftest.$ac_ext <<_ACEOF
14037/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014038
Martin v. Löwiseba40652007-08-30 20:10:57 +000014039/* Override any GCC internal prototype to avoid an error.
14040 Use char because int might match the return type of a GCC
14041 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014042#ifdef __cplusplus
14043extern "C"
14044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014045char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014046int
14047main ()
14048{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014049return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014050 ;
14051 return 0;
14052}
14053_ACEOF
14054rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014055if { (ac_try="$ac_link"
14056case "(($ac_try" in
14057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14058 *) ac_try_echo=$ac_try;;
14059esac
14060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14061 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014063 grep -v '^ *+' conftest.er1 >conftest.err
14064 rm -f conftest.er1
14065 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067 (exit $ac_status); } && {
14068 test -z "$ac_c_werror_flag" ||
14069 test ! -s conftest.err
14070 } && test -s conftest$ac_exeext &&
14071 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014073else
Martin v. Löwis11437992002-04-12 09:54:03 +000014074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014075sed 's/^/| /' conftest.$ac_ext >&5
14076
Martin v. Löwiseba40652007-08-30 20:10:57 +000014077 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014079
14080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014081 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014082LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014084{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14085echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014086if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014087 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014088fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014089 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000014090{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14091echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014092if test "${ac_cv_lib_socket_socket+set}" = set; then
14093 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014094else
Martin v. Löwis11437992002-04-12 09:54:03 +000014095 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014096LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014097cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014098/* confdefs.h. */
14099_ACEOF
14100cat confdefs.h >>conftest.$ac_ext
14101cat >>conftest.$ac_ext <<_ACEOF
14102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014103
Martin v. Löwiseba40652007-08-30 20:10:57 +000014104/* Override any GCC internal prototype to avoid an error.
14105 Use char because int might match the return type of a GCC
14106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014107#ifdef __cplusplus
14108extern "C"
14109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014110char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014111int
14112main ()
14113{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014114return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014115 ;
14116 return 0;
14117}
14118_ACEOF
14119rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014120if { (ac_try="$ac_link"
14121case "(($ac_try" in
14122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14123 *) ac_try_echo=$ac_try;;
14124esac
14125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14126 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014128 grep -v '^ *+' conftest.er1 >conftest.err
14129 rm -f conftest.er1
14130 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014132 (exit $ac_status); } && {
14133 test -z "$ac_c_werror_flag" ||
14134 test ! -s conftest.err
14135 } && test -s conftest$ac_exeext &&
14136 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014138else
Martin v. Löwis11437992002-04-12 09:54:03 +000014139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014140sed 's/^/| /' conftest.$ac_ext >&5
14141
Martin v. Löwiseba40652007-08-30 20:10:57 +000014142 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014144
14145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014146 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014147LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014149{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14150echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014151if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014152 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014153fi
14154 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014155
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000014156case "$ac_sys_system" in
14157BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014158{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
14159echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014160if test "${ac_cv_lib_net_socket+set}" = set; then
14161 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014162else
Martin v. Löwis11437992002-04-12 09:54:03 +000014163 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014164LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014165cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014166/* confdefs.h. */
14167_ACEOF
14168cat confdefs.h >>conftest.$ac_ext
14169cat >>conftest.$ac_ext <<_ACEOF
14170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014171
Martin v. Löwiseba40652007-08-30 20:10:57 +000014172/* Override any GCC internal prototype to avoid an error.
14173 Use char because int might match the return type of a GCC
14174 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014175#ifdef __cplusplus
14176extern "C"
14177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014178char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014179int
14180main ()
14181{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014182return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014183 ;
14184 return 0;
14185}
14186_ACEOF
14187rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014188if { (ac_try="$ac_link"
14189case "(($ac_try" in
14190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14191 *) ac_try_echo=$ac_try;;
14192esac
14193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14194 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014196 grep -v '^ *+' conftest.er1 >conftest.err
14197 rm -f conftest.er1
14198 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014200 (exit $ac_status); } && {
14201 test -z "$ac_c_werror_flag" ||
14202 test ! -s conftest.err
14203 } && test -s conftest$ac_exeext &&
14204 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014205 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014206else
Martin v. Löwis11437992002-04-12 09:54:03 +000014207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014208sed 's/^/| /' conftest.$ac_ext >&5
14209
Martin v. Löwiseba40652007-08-30 20:10:57 +000014210 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014212
14213rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014214 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014215LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014217{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
14218echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014219if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014220 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014221fi
14222 # BeOS
14223;;
14224esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000014225
Martin v. Löwiseba40652007-08-30 20:10:57 +000014226{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14227echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014228
Martin v. Löwiseba40652007-08-30 20:10:57 +000014229# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014230if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014231 withval=$with_libs;
14232{ echo "$as_me:$LINENO: result: $withval" >&5
14233echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014234LIBS="$withval $LIBS"
14235
14236else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014237 { echo "$as_me:$LINENO: result: no" >&5
14238echo "${ECHO_T}no" >&6; }
14239fi
14240
Guido van Rossum7f43da71994-08-01 12:15:30 +000014241
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014242# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000014243{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14244echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014245
Martin v. Löwiseba40652007-08-30 20:10:57 +000014246# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014247if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014248 withval=$with_system_ffi;
14249fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014250
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014251
Martin v. Löwiseba40652007-08-30 20:10:57 +000014252{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14253echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014254
Benjamin Peterson867475c2009-04-29 20:36:25 +000014255# Check for --with-dbmliborder
14256{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14257echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
14258
14259# Check whether --with-dbmliborder was given.
14260if test "${with_dbmliborder+set}" = set; then
14261 withval=$with_dbmliborder;
14262if test x$with_dbmliborder = xyes
14263then
14264{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14265echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
14266 { (exit 1); exit 1; }; }
14267else
14268 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14269 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14270 then
14271 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14272echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
14273 { (exit 1); exit 1; }; }
14274 fi
14275 done
14276fi
14277fi
14278
14279{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14280echo "${ECHO_T}$with_dbmliborder" >&6; }
14281
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014282# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014283
14284
Martin v. Löwiseba40652007-08-30 20:10:57 +000014285{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14286echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014287
Martin v. Löwiseba40652007-08-30 20:10:57 +000014288# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014289if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014290 withval=$with_signal_module;
14291fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014292
14293
14294if test -z "$with_signal_module"
14295then with_signal_module="yes"
14296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014297{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14298echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014299
14300if test "${with_signal_module}" = "yes"; then
14301 USE_SIGNAL_MODULE=""
14302 SIGNAL_OBJS=""
14303else
14304 USE_SIGNAL_MODULE="#"
14305 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14306fi
14307
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014308# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014309
Barry Warsawc0d24d82000-06-29 16:12:00 +000014310USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014311
Martin v. Löwiseba40652007-08-30 20:10:57 +000014312{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14313echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014314
Guido van Rossumec2f0731997-01-22 20:54:01 +000014315
Martin v. Löwiseba40652007-08-30 20:10:57 +000014316# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014317if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014318 withval=$with_dec_threads;
14319{ echo "$as_me:$LINENO: result: $withval" >&5
14320echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014321LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014322if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014323 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014324fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014325else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014326 { echo "$as_me:$LINENO: result: no" >&5
14327echo "${ECHO_T}no" >&6; }
14328fi
14329
Martin v. Löwis11437992002-04-12 09:54:03 +000014330
14331# Templates for things AC_DEFINEd more than once.
14332# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014333
14334
Martin v. Löwis11437992002-04-12 09:54:03 +000014335
14336
14337
14338
14339
Martin v. Löwiseba40652007-08-30 20:10:57 +000014340{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14341echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014342
Martin v. Löwiseba40652007-08-30 20:10:57 +000014343# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014344if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014345 withval=$with_threads;
14346fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014347
14348
Barry Warsawc0d24d82000-06-29 16:12:00 +000014349# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014350
Martin v. Löwiseba40652007-08-30 20:10:57 +000014351# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014352if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014353 withval=$with_thread; with_threads=$with_thread
14354fi
14355
Barry Warsawc0d24d82000-06-29 16:12:00 +000014356
14357if test -z "$with_threads"
14358then with_threads="yes"
14359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014360{ echo "$as_me:$LINENO: result: $with_threads" >&5
14361echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000014362
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014363
Barry Warsawc0d24d82000-06-29 16:12:00 +000014364if test "$with_threads" = "no"
14365then
14366 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014367elif test "$ac_cv_pthread_is_default" = yes
14368then
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014370#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014371_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014372
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014373 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014375#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014376_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014377
14378 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014380elif test "$ac_cv_kpthread" = "yes"
14381then
14382 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014383 if test "$ac_cv_cxx_thread" = "yes"; then
14384 CXX="$CXX -Kpthread"
14385 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014386 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014387#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014388_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014389
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014390 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014391 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014392elif test "$ac_cv_kthread" = "yes"
14393then
14394 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014395 if test "$ac_cv_cxx_thread" = "yes"; then
14396 CXX="$CXX -Kthread"
14397 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014398 cat >>confdefs.h <<\_ACEOF
14399#define WITH_THREAD 1
14400_ACEOF
14401
14402 posix_threads=yes
14403 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014404elif test "$ac_cv_pthread" = "yes"
14405then
14406 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014407 if test "$ac_cv_cxx_thread" = "yes"; then
14408 CXX="$CXX -pthread"
14409 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014410 cat >>confdefs.h <<\_ACEOF
14411#define WITH_THREAD 1
14412_ACEOF
14413
14414 posix_threads=yes
14415 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014416else
14417 if test ! -z "$with_threads" -a -d "$with_threads"
14418 then LDFLAGS="$LDFLAGS -L$with_threads"
14419 fi
14420 if test ! -z "$withval" -a -d "$withval"
14421 then LDFLAGS="$LDFLAGS -L$withval"
14422 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014423
14424 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014425 # define _POSIX_THREADS in unistd.h. Some apparently don't
14426 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014427 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14428echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014430/* confdefs.h. */
14431_ACEOF
14432cat confdefs.h >>conftest.$ac_ext
14433cat >>conftest.$ac_ext <<_ACEOF
14434/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014435
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014436#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014437#ifdef _POSIX_THREADS
14438yes
14439#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
14441_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014443 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014444 unistd_defines_pthreads=yes
14445else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014446 unistd_defines_pthreads=no
14447fi
14448rm -f conftest*
14449
Martin v. Löwiseba40652007-08-30 20:10:57 +000014450 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14451echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014452
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014454#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014455_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014456
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014458 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14459echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014460if test "${ac_cv_header_cthreads_h+set}" = set; then
14461 echo $ECHO_N "(cached) $ECHO_C" >&6
14462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014463{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14464echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014465else
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014467{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14468echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014470/* confdefs.h. */
14471_ACEOF
14472cat confdefs.h >>conftest.$ac_ext
14473cat >>conftest.$ac_ext <<_ACEOF
14474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014475$ac_includes_default
14476#include <cthreads.h>
14477_ACEOF
14478rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014479if { (ac_try="$ac_compile"
14480case "(($ac_try" in
14481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14482 *) ac_try_echo=$ac_try;;
14483esac
14484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14485 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014487 grep -v '^ *+' conftest.er1 >conftest.err
14488 rm -f conftest.er1
14489 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014491 (exit $ac_status); } && {
14492 test -z "$ac_c_werror_flag" ||
14493 test ! -s conftest.err
14494 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 ac_header_compiler=yes
14496else
14497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014498sed 's/^/| /' conftest.$ac_ext >&5
14499
Martin v. Löwiseba40652007-08-30 20:10:57 +000014500 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014502
14503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14504{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14505echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014506
14507# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014508{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14509echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014510cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014511/* confdefs.h. */
14512_ACEOF
14513cat confdefs.h >>conftest.$ac_ext
14514cat >>conftest.$ac_ext <<_ACEOF
14515/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014516#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014517_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014518if { (ac_try="$ac_cpp conftest.$ac_ext"
14519case "(($ac_try" in
14520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14521 *) ac_try_echo=$ac_try;;
14522esac
14523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14524 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014525 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014526 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014527 rm -f conftest.er1
14528 cat conftest.err >&5
14529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014530 (exit $ac_status); } >/dev/null && {
14531 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14532 test ! -s conftest.err
14533 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014534 ac_header_preproc=yes
14535else
14536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014537sed 's/^/| /' conftest.$ac_ext >&5
14538
Martin v. Löwis11437992002-04-12 09:54:03 +000014539 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014541
Martin v. Löwis11437992002-04-12 09:54:03 +000014542rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014543{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14544echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014545
14546# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014547case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14548 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014549 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14550echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014551 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14552echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14553 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014554 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014555 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014556 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14557echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014558 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14559echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14560 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14561echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14562 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14563echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014564 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14565echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014566 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14567echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014568 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014569## ------------------------------------------------ ##
14570## Report this to http://www.python.org/python-bugs ##
14571## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014572_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014573 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014574 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014575esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014576{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14577echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014578if test "${ac_cv_header_cthreads_h+set}" = set; then
14579 echo $ECHO_N "(cached) $ECHO_C" >&6
14580else
14581 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014583{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14584echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014585
14586fi
14587if test $ac_cv_header_cthreads_h = yes; then
14588 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014589#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014590_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014591
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014593#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014594_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014595
Martin v. Löwis11437992002-04-12 09:54:03 +000014596
14597cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014598#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014599_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014600
14601 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014602 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014603else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014604
Martin v. Löwis11437992002-04-12 09:54:03 +000014605 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014606 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14607echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014608if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14609 echo $ECHO_N "(cached) $ECHO_C" >&6
14610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014611{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14612echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014613else
Martin v. Löwis11437992002-04-12 09:54:03 +000014614 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014615{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14616echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014618/* confdefs.h. */
14619_ACEOF
14620cat confdefs.h >>conftest.$ac_ext
14621cat >>conftest.$ac_ext <<_ACEOF
14622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014623$ac_includes_default
14624#include <mach/cthreads.h>
14625_ACEOF
14626rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014627if { (ac_try="$ac_compile"
14628case "(($ac_try" in
14629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14630 *) ac_try_echo=$ac_try;;
14631esac
14632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014635 grep -v '^ *+' conftest.er1 >conftest.err
14636 rm -f conftest.er1
14637 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014639 (exit $ac_status); } && {
14640 test -z "$ac_c_werror_flag" ||
14641 test ! -s conftest.err
14642 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014643 ac_header_compiler=yes
14644else
14645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014646sed 's/^/| /' conftest.$ac_ext >&5
14647
Martin v. Löwiseba40652007-08-30 20:10:57 +000014648 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014649fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014650
14651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14652{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14653echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014654
14655# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014656{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14657echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014659/* confdefs.h. */
14660_ACEOF
14661cat confdefs.h >>conftest.$ac_ext
14662cat >>conftest.$ac_ext <<_ACEOF
14663/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014664#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014665_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014666if { (ac_try="$ac_cpp conftest.$ac_ext"
14667case "(($ac_try" in
14668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14669 *) ac_try_echo=$ac_try;;
14670esac
14671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14672 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014673 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014674 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 rm -f conftest.er1
14676 cat conftest.err >&5
14677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014678 (exit $ac_status); } >/dev/null && {
14679 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14680 test ! -s conftest.err
14681 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014682 ac_header_preproc=yes
14683else
14684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014685sed 's/^/| /' conftest.$ac_ext >&5
14686
Martin v. Löwis11437992002-04-12 09:54:03 +000014687 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014689
Martin v. Löwis11437992002-04-12 09:54:03 +000014690rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014691{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14692echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014693
14694# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014695case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14696 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014697 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14698echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014699 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14700echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14701 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014702 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014703 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014704 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14705echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014706 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14707echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14708 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14709echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14710 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14711echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014712 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14713echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014714 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14715echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014716 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014717## ------------------------------------------------ ##
14718## Report this to http://www.python.org/python-bugs ##
14719## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014720_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014721 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014722 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014723esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014724{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14725echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014726if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14727 echo $ECHO_N "(cached) $ECHO_C" >&6
14728else
14729 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014731{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14732echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014733
14734fi
14735if test $ac_cv_header_mach_cthreads_h = yes; then
14736 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014737#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014738_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014739
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014741#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014742_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014743
Martin v. Löwis11437992002-04-12 09:54:03 +000014744
14745cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014746#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014747_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014748
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014749 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014750else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014751
Martin v. Löwiseba40652007-08-30 20:10:57 +000014752 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14753echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014754
Martin v. Löwiseba40652007-08-30 20:10:57 +000014755# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014756if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014757 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14758echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014759 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014760#define WITH_THREAD 1
14761_ACEOF
14762
14763
14764cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014765#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014766_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014767
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014768 LIBS="-lpth $LIBS"
14769 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014770else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014771 { echo "$as_me:$LINENO: result: no" >&5
14772echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014773
14774 # Just looking for pthread_create in libpthread is not enough:
14775 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14776 # So we really have to include pthread.h, and then link.
14777 _libs=$LIBS
14778 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014779 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14780echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014782/* confdefs.h. */
14783_ACEOF
14784cat confdefs.h >>conftest.$ac_ext
14785cat >>conftest.$ac_ext <<_ACEOF
14786/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014787#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014788
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014789void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014790int
14791main ()
14792{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014793
14794pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014795 ;
14796 return 0;
14797}
14798_ACEOF
14799rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014800if { (ac_try="$ac_link"
14801case "(($ac_try" in
14802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14803 *) ac_try_echo=$ac_try;;
14804esac
14805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14806 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014808 grep -v '^ *+' conftest.er1 >conftest.err
14809 rm -f conftest.er1
14810 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014812 (exit $ac_status); } && {
14813 test -z "$ac_c_werror_flag" ||
14814 test ! -s conftest.err
14815 } && test -s conftest$ac_exeext &&
14816 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014817
Martin v. Löwiseba40652007-08-30 20:10:57 +000014818 { echo "$as_me:$LINENO: result: yes" >&5
14819echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014820 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014821#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014822_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014823
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014824 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014825 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014826else
Martin v. Löwis11437992002-04-12 09:54:03 +000014827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014828sed 's/^/| /' conftest.$ac_ext >&5
14829
Martin v. Löwis11437992002-04-12 09:54:03 +000014830
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014831 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014832 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14833echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014834if test "${ac_cv_func_pthread_detach+set}" = set; then
14835 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014836else
Martin v. Löwis11437992002-04-12 09:54:03 +000014837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014838/* confdefs.h. */
14839_ACEOF
14840cat confdefs.h >>conftest.$ac_ext
14841cat >>conftest.$ac_ext <<_ACEOF
14842/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014843/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14844 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14845#define pthread_detach innocuous_pthread_detach
14846
Guido van Rossumad678af1998-10-02 14:42:15 +000014847/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014848 which can conflict with char pthread_detach (); below.
14849 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014850 <limits.h> exists even on freestanding compilers. */
14851
14852#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014853# include <limits.h>
14854#else
14855# include <assert.h>
14856#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014857
14858#undef pthread_detach
14859
Martin v. Löwiseba40652007-08-30 20:10:57 +000014860/* Override any GCC internal prototype to avoid an error.
14861 Use char because int might match the return type of a GCC
14862 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014863#ifdef __cplusplus
14864extern "C"
14865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014866char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014867/* The GNU C library defines this for functions which it implements
14868 to always fail with ENOSYS. Some functions are actually named
14869 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014870#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014871choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014872#endif
14873
Skip Montanaro6dead952003-09-25 14:50:04 +000014874int
14875main ()
14876{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014877return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014878 ;
14879 return 0;
14880}
14881_ACEOF
14882rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014883if { (ac_try="$ac_link"
14884case "(($ac_try" in
14885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14886 *) ac_try_echo=$ac_try;;
14887esac
14888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14889 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014891 grep -v '^ *+' conftest.er1 >conftest.err
14892 rm -f conftest.er1
14893 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014895 (exit $ac_status); } && {
14896 test -z "$ac_c_werror_flag" ||
14897 test ! -s conftest.err
14898 } && test -s conftest$ac_exeext &&
14899 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014900 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014901else
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014903sed 's/^/| /' conftest.$ac_ext >&5
14904
Martin v. Löwiseba40652007-08-30 20:10:57 +000014905 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014907
14908rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014909 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014911{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14912echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014913if test $ac_cv_func_pthread_detach = yes; then
14914 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014915#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014916_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014917
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014918 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014919 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014920else
Guido van Rossumad678af1998-10-02 14:42:15 +000014921
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014922 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014923 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14924echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014925if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14926 echo $ECHO_N "(cached) $ECHO_C" >&6
14927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014928{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14929echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014930else
14931 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014932{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14933echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014934cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014935/* confdefs.h. */
14936_ACEOF
14937cat confdefs.h >>conftest.$ac_ext
14938cat >>conftest.$ac_ext <<_ACEOF
14939/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014940$ac_includes_default
14941#include <atheos/threads.h>
14942_ACEOF
14943rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014944if { (ac_try="$ac_compile"
14945case "(($ac_try" in
14946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14947 *) ac_try_echo=$ac_try;;
14948esac
14949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014952 grep -v '^ *+' conftest.er1 >conftest.err
14953 rm -f conftest.er1
14954 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014956 (exit $ac_status); } && {
14957 test -z "$ac_c_werror_flag" ||
14958 test ! -s conftest.err
14959 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014960 ac_header_compiler=yes
14961else
14962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014963sed 's/^/| /' conftest.$ac_ext >&5
14964
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014967
14968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14969{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14970echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014971
14972# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014973{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14974echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014975cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014976/* confdefs.h. */
14977_ACEOF
14978cat confdefs.h >>conftest.$ac_ext
14979cat >>conftest.$ac_ext <<_ACEOF
14980/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014981#include <atheos/threads.h>
14982_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014983if { (ac_try="$ac_cpp conftest.$ac_ext"
14984case "(($ac_try" in
14985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14986 *) ac_try_echo=$ac_try;;
14987esac
14988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14989 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014990 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014991 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014992 rm -f conftest.er1
14993 cat conftest.err >&5
14994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014995 (exit $ac_status); } >/dev/null && {
14996 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14997 test ! -s conftest.err
14998 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014999 ac_header_preproc=yes
15000else
15001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015002sed 's/^/| /' conftest.$ac_ext >&5
15003
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015004 ac_header_preproc=no
15005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015006
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015007rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015008{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15009echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015010
15011# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015012case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15013 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015014 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15015echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015016 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15017echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
15018 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015019 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015020 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015021 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15022echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015023 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15024echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15025 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15026echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15027 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15028echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015029 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15030echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015031 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15032echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015033 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000015034## ------------------------------------------------ ##
15035## Report this to http://www.python.org/python-bugs ##
15036## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015037_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015038 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015039 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015040esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015041{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15042echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015043if test "${ac_cv_header_atheos_threads_h+set}" = set; then
15044 echo $ECHO_N "(cached) $ECHO_C" >&6
15045else
15046 ac_cv_header_atheos_threads_h=$ac_header_preproc
15047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15049echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015050
15051fi
15052if test $ac_cv_header_atheos_threads_h = yes; then
15053 cat >>confdefs.h <<\_ACEOF
15054#define WITH_THREAD 1
15055_ACEOF
15056
15057
15058cat >>confdefs.h <<\_ACEOF
15059#define ATHEOS_THREADS 1
15060_ACEOF
15061
15062 THREADOBJ="Python/thread.o"
15063else
15064
Martin v. Löwis11437992002-04-12 09:54:03 +000015065 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015066 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15067echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015068if test "${ac_cv_header_kernel_OS_h+set}" = set; then
15069 echo $ECHO_N "(cached) $ECHO_C" >&6
15070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015071{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15072echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015073else
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000015075{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
15076echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015077cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015078/* confdefs.h. */
15079_ACEOF
15080cat confdefs.h >>conftest.$ac_ext
15081cat >>conftest.$ac_ext <<_ACEOF
15082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015083$ac_includes_default
15084#include <kernel/OS.h>
15085_ACEOF
15086rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015087if { (ac_try="$ac_compile"
15088case "(($ac_try" in
15089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15090 *) ac_try_echo=$ac_try;;
15091esac
15092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15093 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015095 grep -v '^ *+' conftest.er1 >conftest.err
15096 rm -f conftest.er1
15097 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015099 (exit $ac_status); } && {
15100 test -z "$ac_c_werror_flag" ||
15101 test ! -s conftest.err
15102 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 ac_header_compiler=yes
15104else
15105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015106sed 's/^/| /' conftest.$ac_ext >&5
15107
Martin v. Löwiseba40652007-08-30 20:10:57 +000015108 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015110
15111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15112{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15113echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015114
15115# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000015116{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
15117echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015119/* confdefs.h. */
15120_ACEOF
15121cat confdefs.h >>conftest.$ac_ext
15122cat >>conftest.$ac_ext <<_ACEOF
15123/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015124#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015125_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015126if { (ac_try="$ac_cpp conftest.$ac_ext"
15127case "(($ac_try" in
15128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15129 *) ac_try_echo=$ac_try;;
15130esac
15131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15132 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015134 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 rm -f conftest.er1
15136 cat conftest.err >&5
15137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015138 (exit $ac_status); } >/dev/null && {
15139 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15140 test ! -s conftest.err
15141 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 ac_header_preproc=yes
15143else
15144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015145sed 's/^/| /' conftest.$ac_ext >&5
15146
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015149
Martin v. Löwis11437992002-04-12 09:54:03 +000015150rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015151{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15152echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015153
Martin v. Löwis11437992002-04-12 09:54:03 +000015154# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015155case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15156 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
15158echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015159 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
15160echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
15161 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015162 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015163 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015164 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
15165echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015166 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
15167echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
15168 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
15169echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
15170 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
15171echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015172 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
15173echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015174 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
15175echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015176 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000015177## ------------------------------------------------ ##
15178## Report this to http://www.python.org/python-bugs ##
15179## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015180_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015181 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015182 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015183esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015184{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15185echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015186if test "${ac_cv_header_kernel_OS_h+set}" = set; then
15187 echo $ECHO_N "(cached) $ECHO_C" >&6
15188else
15189 ac_cv_header_kernel_OS_h=$ac_header_preproc
15190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015191{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15192echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015193
15194fi
15195if test $ac_cv_header_kernel_OS_h = yes; then
15196 cat >>confdefs.h <<\_ACEOF
15197#define WITH_THREAD 1
15198_ACEOF
15199
15200
15201cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015202#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015203_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015204
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015205 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015206else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015207
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15209echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015210if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
15211 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015212else
Martin v. Löwis11437992002-04-12 09:54:03 +000015213 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015214LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015215cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015216/* confdefs.h. */
15217_ACEOF
15218cat confdefs.h >>conftest.$ac_ext
15219cat >>conftest.$ac_ext <<_ACEOF
15220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015221
Martin v. Löwiseba40652007-08-30 20:10:57 +000015222/* Override any GCC internal prototype to avoid an error.
15223 Use char because int might match the return type of a GCC
15224 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015225#ifdef __cplusplus
15226extern "C"
15227#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015228char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015229int
15230main ()
15231{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015232return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015233 ;
15234 return 0;
15235}
15236_ACEOF
15237rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015238if { (ac_try="$ac_link"
15239case "(($ac_try" in
15240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15241 *) ac_try_echo=$ac_try;;
15242esac
15243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15244 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015246 grep -v '^ *+' conftest.er1 >conftest.err
15247 rm -f conftest.er1
15248 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015250 (exit $ac_status); } && {
15251 test -z "$ac_c_werror_flag" ||
15252 test ! -s conftest.err
15253 } && test -s conftest$ac_exeext &&
15254 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015256else
Martin v. Löwis11437992002-04-12 09:54:03 +000015257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015258sed 's/^/| /' conftest.$ac_ext >&5
15259
Martin v. Löwiseba40652007-08-30 20:10:57 +000015260 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015262
15263rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015264 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015265LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015267{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15268echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015269if test $ac_cv_lib_pthreads_pthread_create = yes; then
15270 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015271#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015272_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015273
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015274 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015275 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015276 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015277else
Greg Steinadf63d62000-07-05 10:38:09 +000015278
Martin v. Löwiseba40652007-08-30 20:10:57 +000015279 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15280echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015281if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
15282 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015283else
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015285LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015287/* confdefs.h. */
15288_ACEOF
15289cat confdefs.h >>conftest.$ac_ext
15290cat >>conftest.$ac_ext <<_ACEOF
15291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015292
Martin v. Löwiseba40652007-08-30 20:10:57 +000015293/* Override any GCC internal prototype to avoid an error.
15294 Use char because int might match the return type of a GCC
15295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015296#ifdef __cplusplus
15297extern "C"
15298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015299char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015300int
15301main ()
15302{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 ;
15305 return 0;
15306}
15307_ACEOF
15308rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015309if { (ac_try="$ac_link"
15310case "(($ac_try" in
15311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15312 *) ac_try_echo=$ac_try;;
15313esac
15314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15315 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015317 grep -v '^ *+' conftest.er1 >conftest.err
15318 rm -f conftest.er1
15319 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321 (exit $ac_status); } && {
15322 test -z "$ac_c_werror_flag" ||
15323 test ! -s conftest.err
15324 } && test -s conftest$ac_exeext &&
15325 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015327else
Martin v. Löwis11437992002-04-12 09:54:03 +000015328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015329sed 's/^/| /' conftest.$ac_ext >&5
15330
Martin v. Löwiseba40652007-08-30 20:10:57 +000015331 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015333
15334rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015336LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15339echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015340if test $ac_cv_lib_c_r_pthread_create = yes; then
15341 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015342#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015343_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015344
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015345 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015346 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015347 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015348else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015349
Martin v. Löwiseba40652007-08-30 20:10:57 +000015350 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15351echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015352if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
15353 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015354else
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015356LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015357cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015358/* confdefs.h. */
15359_ACEOF
15360cat confdefs.h >>conftest.$ac_ext
15361cat >>conftest.$ac_ext <<_ACEOF
15362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015363
Martin v. Löwiseba40652007-08-30 20:10:57 +000015364/* Override any GCC internal prototype to avoid an error.
15365 Use char because int might match the return type of a GCC
15366 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015367#ifdef __cplusplus
15368extern "C"
15369#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015370char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015371int
15372main ()
15373{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015374return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015375 ;
15376 return 0;
15377}
15378_ACEOF
15379rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015380if { (ac_try="$ac_link"
15381case "(($ac_try" in
15382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15383 *) ac_try_echo=$ac_try;;
15384esac
15385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15386 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015388 grep -v '^ *+' conftest.er1 >conftest.err
15389 rm -f conftest.er1
15390 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015392 (exit $ac_status); } && {
15393 test -z "$ac_c_werror_flag" ||
15394 test ! -s conftest.err
15395 } && test -s conftest$ac_exeext &&
15396 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015397 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015398else
Martin v. Löwis11437992002-04-12 09:54:03 +000015399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015400sed 's/^/| /' conftest.$ac_ext >&5
15401
Martin v. Löwiseba40652007-08-30 20:10:57 +000015402 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404
15405rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015406 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015407LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015409{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15410echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015411if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15412 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015413#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015414_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015415
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015416 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015417 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015418 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015419else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015420
Martin v. Löwiseba40652007-08-30 20:10:57 +000015421 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15422echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015423if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15424 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015425else
Martin v. Löwis11437992002-04-12 09:54:03 +000015426 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015427LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015428cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015429/* confdefs.h. */
15430_ACEOF
15431cat confdefs.h >>conftest.$ac_ext
15432cat >>conftest.$ac_ext <<_ACEOF
15433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015434
Martin v. Löwiseba40652007-08-30 20:10:57 +000015435/* Override any GCC internal prototype to avoid an error.
15436 Use char because int might match the return type of a GCC
15437 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015438#ifdef __cplusplus
15439extern "C"
15440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015441char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015442int
15443main ()
15444{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015445return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015446 ;
15447 return 0;
15448}
15449_ACEOF
15450rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015451if { (ac_try="$ac_link"
15452case "(($ac_try" in
15453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15454 *) ac_try_echo=$ac_try;;
15455esac
15456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15457 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015459 grep -v '^ *+' conftest.er1 >conftest.err
15460 rm -f conftest.er1
15461 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015463 (exit $ac_status); } && {
15464 test -z "$ac_c_werror_flag" ||
15465 test ! -s conftest.err
15466 } && test -s conftest$ac_exeext &&
15467 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015468 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015469else
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015471sed 's/^/| /' conftest.$ac_ext >&5
15472
Martin v. Löwiseba40652007-08-30 20:10:57 +000015473 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015475
15476rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015477 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015478LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015480{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15481echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015482if test $ac_cv_lib_cma_pthread_create = yes; then
15483 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015484#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015485_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015486
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015487 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015488 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015489 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015490else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015491
Martin v. Löwis130fb172001-07-19 11:00:41 +000015492 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015493fi
15494
Guido van Rossum627b2d71993-12-24 10:39:16 +000015495
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015496fi
15497
Guido van Rossum0be3e491997-05-22 20:33:33 +000015498fi
15499
Guido van Rossum49545951997-12-02 19:28:29 +000015500fi
15501
Guido van Rossumb93a8621998-05-07 13:27:32 +000015502fi
15503
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015504
Michael W. Hudson54241132001-12-07 15:38:26 +000015505fi
15506
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015507
15508fi
15509
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015511
15512rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015513 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015514fi
15515
Martin v. Löwis11437992002-04-12 09:54:03 +000015516fi
15517
15518
15519fi
15520
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015521
Michael W. Hudson54241132001-12-07 15:38:26 +000015522
Martin v. Löwiseba40652007-08-30 20:10:57 +000015523 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15524echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015525if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15526 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015527else
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015529LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015530cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015531/* confdefs.h. */
15532_ACEOF
15533cat confdefs.h >>conftest.$ac_ext
15534cat >>conftest.$ac_ext <<_ACEOF
15535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015536
Martin v. Löwiseba40652007-08-30 20:10:57 +000015537/* Override any GCC internal prototype to avoid an error.
15538 Use char because int might match the return type of a GCC
15539 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015540#ifdef __cplusplus
15541extern "C"
15542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015543char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015544int
15545main ()
15546{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015547return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015548 ;
15549 return 0;
15550}
15551_ACEOF
15552rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015553if { (ac_try="$ac_link"
15554case "(($ac_try" in
15555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15556 *) ac_try_echo=$ac_try;;
15557esac
15558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15559 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015561 grep -v '^ *+' conftest.er1 >conftest.err
15562 rm -f conftest.er1
15563 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565 (exit $ac_status); } && {
15566 test -z "$ac_c_werror_flag" ||
15567 test ! -s conftest.err
15568 } && test -s conftest$ac_exeext &&
15569 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015571else
Martin v. Löwis11437992002-04-12 09:54:03 +000015572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015573sed 's/^/| /' conftest.$ac_ext >&5
15574
Martin v. Löwiseba40652007-08-30 20:10:57 +000015575 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577
15578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015579 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015580LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015582{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15583echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015584if test $ac_cv_lib_mpc_usconfig = yes; then
15585 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015586#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015587_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015588
Martin v. Löwis130fb172001-07-19 11:00:41 +000015589 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015590 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015591 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015592fi
15593
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015594
Neal Norwitza978ab02002-11-02 16:58:05 +000015595 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015596 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15597echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015598if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15599 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015600else
Martin v. Löwis11437992002-04-12 09:54:03 +000015601 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015602LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015604/* confdefs.h. */
15605_ACEOF
15606cat confdefs.h >>conftest.$ac_ext
15607cat >>conftest.$ac_ext <<_ACEOF
15608/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015609
Martin v. Löwiseba40652007-08-30 20:10:57 +000015610/* Override any GCC internal prototype to avoid an error.
15611 Use char because int might match the return type of a GCC
15612 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015613#ifdef __cplusplus
15614extern "C"
15615#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015616char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015617int
15618main ()
15619{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015620return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015621 ;
15622 return 0;
15623}
15624_ACEOF
15625rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015626if { (ac_try="$ac_link"
15627case "(($ac_try" in
15628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15629 *) ac_try_echo=$ac_try;;
15630esac
15631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15632 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015634 grep -v '^ *+' conftest.er1 >conftest.err
15635 rm -f conftest.er1
15636 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015638 (exit $ac_status); } && {
15639 test -z "$ac_c_werror_flag" ||
15640 test ! -s conftest.err
15641 } && test -s conftest$ac_exeext &&
15642 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015643 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015644else
Martin v. Löwis11437992002-04-12 09:54:03 +000015645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015646sed 's/^/| /' conftest.$ac_ext >&5
15647
Martin v. Löwiseba40652007-08-30 20:10:57 +000015648 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015649fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015650
15651rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015652 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015653LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015655{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15656echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015657if test $ac_cv_lib_thread_thr_create = yes; then
15658 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015659#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015660_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015661
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015662 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015663 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015664 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015665fi
15666
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015667 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015668
Martin v. Löwis130fb172001-07-19 11:00:41 +000015669 if test "$USE_THREAD_MODULE" != "#"
15670 then
15671 # If the above checks didn't disable threads, (at least) OSF1
15672 # needs this '-threads' argument during linking.
15673 case $ac_sys_system in
15674 OSF1) LDLAST=-threads;;
15675 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015676 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015677fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015678
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015679if test "$posix_threads" = "yes"; then
15680 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015681
15682cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015683#define _POSIX_THREADS 1
15684_ACEOF
15685
15686 fi
15687
15688 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15689 case $ac_sys_system/$ac_sys_release in
15690 SunOS/5.6)
15691cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015692#define HAVE_PTHREAD_DESTRUCTOR 1
15693_ACEOF
15694
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015695 ;;
15696 SunOS/5.8)
15697cat >>confdefs.h <<\_ACEOF
15698#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15699_ACEOF
15700
15701 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015702 AIX/5)
15703cat >>confdefs.h <<\_ACEOF
15704#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15705_ACEOF
15706
15707 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015708 esac
15709
Martin v. Löwiseba40652007-08-30 20:10:57 +000015710 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15711echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015712 if test "${ac_cv_pthread_system_supported+set}" = set; then
15713 echo $ECHO_N "(cached) $ECHO_C" >&6
15714else
15715 if test "$cross_compiling" = yes; then
15716 ac_cv_pthread_system_supported=no
15717else
15718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015719/* confdefs.h. */
15720_ACEOF
15721cat confdefs.h >>conftest.$ac_ext
15722cat >>conftest.$ac_ext <<_ACEOF
15723/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015724#include <pthread.h>
15725 void *foo(void *parm) {
15726 return NULL;
15727 }
15728 main() {
15729 pthread_attr_t attr;
15730 pthread_t id;
15731 if (pthread_attr_init(&attr)) exit(-1);
15732 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15733 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15734 exit(0);
15735 }
15736_ACEOF
15737rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015738if { (ac_try="$ac_link"
15739case "(($ac_try" in
15740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15741 *) ac_try_echo=$ac_try;;
15742esac
15743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15744 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015745 ac_status=$?
15746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15747 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015748 { (case "(($ac_try" in
15749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15750 *) ac_try_echo=$ac_try;;
15751esac
15752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15753 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015754 ac_status=$?
15755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15756 (exit $ac_status); }; }; then
15757 ac_cv_pthread_system_supported=yes
15758else
15759 echo "$as_me: program exited with status $ac_status" >&5
15760echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015761sed 's/^/| /' conftest.$ac_ext >&5
15762
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015763( exit $ac_status )
15764ac_cv_pthread_system_supported=no
15765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015766rm -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 +000015767fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015768
Martin v. Löwiseba40652007-08-30 20:10:57 +000015769
15770
Guido van Rossum627b2d71993-12-24 10:39:16 +000015771fi
15772
Martin v. Löwiseba40652007-08-30 20:10:57 +000015773 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15774echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015775 if test "$ac_cv_pthread_system_supported" = "yes"; then
15776
15777cat >>confdefs.h <<\_ACEOF
15778#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15779_ACEOF
15780
15781 fi
15782
15783for ac_func in pthread_sigmask
15784do
15785as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015786{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15787echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15788if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015789 echo $ECHO_N "(cached) $ECHO_C" >&6
15790else
15791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015792/* confdefs.h. */
15793_ACEOF
15794cat confdefs.h >>conftest.$ac_ext
15795cat >>conftest.$ac_ext <<_ACEOF
15796/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015797/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15798 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15799#define $ac_func innocuous_$ac_func
15800
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015801/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015802 which can conflict with char $ac_func (); below.
15803 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015804 <limits.h> exists even on freestanding compilers. */
15805
15806#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015807# include <limits.h>
15808#else
15809# include <assert.h>
15810#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015811
15812#undef $ac_func
15813
Martin v. Löwiseba40652007-08-30 20:10:57 +000015814/* Override any GCC internal prototype to avoid an error.
15815 Use char because int might match the return type of a GCC
15816 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015817#ifdef __cplusplus
15818extern "C"
15819#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015820char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015821/* The GNU C library defines this for functions which it implements
15822 to always fail with ENOSYS. Some functions are actually named
15823 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015824#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015825choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015826#endif
15827
Skip Montanaro6dead952003-09-25 14:50:04 +000015828int
15829main ()
15830{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015831return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015832 ;
15833 return 0;
15834}
15835_ACEOF
15836rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015837if { (ac_try="$ac_link"
15838case "(($ac_try" in
15839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15840 *) ac_try_echo=$ac_try;;
15841esac
15842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15843 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015845 grep -v '^ *+' conftest.er1 >conftest.err
15846 rm -f conftest.er1
15847 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015849 (exit $ac_status); } && {
15850 test -z "$ac_c_werror_flag" ||
15851 test ! -s conftest.err
15852 } && test -s conftest$ac_exeext &&
15853 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015854 eval "$as_ac_var=yes"
15855else
15856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015857sed 's/^/| /' conftest.$ac_ext >&5
15858
Martin v. Löwiseba40652007-08-30 20:10:57 +000015859 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015861
15862rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015863 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865ac_res=`eval echo '${'$as_ac_var'}'`
15866 { echo "$as_me:$LINENO: result: $ac_res" >&5
15867echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015868if test `eval echo '${'$as_ac_var'}'` = yes; then
15869 cat >>confdefs.h <<_ACEOF
15870#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15871_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015872 case $ac_sys_system in
15873 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015874
Jason Tishlerfac083d2003-07-22 15:20:49 +000015875cat >>confdefs.h <<\_ACEOF
15876#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15877_ACEOF
15878
15879 ;;
15880 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015881fi
15882done
15883
15884fi
15885
15886
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015887# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015888
15889
Martin v. Löwiseba40652007-08-30 20:10:57 +000015890{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15891echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15892# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015893if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015894 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015895 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015896 { echo "$as_me:$LINENO: result: no" >&5
15897echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015898 ipv6=no
15899 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015900 *) { echo "$as_me:$LINENO: result: yes" >&5
15901echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015902 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015903#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015904_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015905
15906 ipv6=yes
15907 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015909else
Martin v. Löwis11437992002-04-12 09:54:03 +000015910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015911 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015912 { echo "$as_me:$LINENO: result: no" >&5
15913echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015914 ipv6=no
15915
15916else
Martin v. Löwis11437992002-04-12 09:54:03 +000015917 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015918/* confdefs.h. */
15919_ACEOF
15920cat confdefs.h >>conftest.$ac_ext
15921cat >>conftest.$ac_ext <<_ACEOF
15922/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015923 /* AF_INET6 available check */
15924#include <sys/types.h>
15925#include <sys/socket.h>
15926main()
15927{
15928 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15929 exit(1);
15930 else
15931 exit(0);
15932}
15933
Martin v. Löwis11437992002-04-12 09:54:03 +000015934_ACEOF
15935rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015936if { (ac_try="$ac_link"
15937case "(($ac_try" in
15938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15939 *) ac_try_echo=$ac_try;;
15940esac
15941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15942 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015943 ac_status=$?
15944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15945 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015946 { (case "(($ac_try" in
15947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15948 *) ac_try_echo=$ac_try;;
15949esac
15950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15951 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 ac_status=$?
15953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15954 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015955 { echo "$as_me:$LINENO: result: yes" >&5
15956echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015957 ipv6=yes
15958else
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 echo "$as_me: program exited with status $ac_status" >&5
15960echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015961sed 's/^/| /' conftest.$ac_ext >&5
15962
Martin v. Löwis11437992002-04-12 09:54:03 +000015963( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015964{ echo "$as_me:$LINENO: result: no" >&5
15965echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015966 ipv6=no
15967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015968rm -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 +000015969fi
15970
Martin v. Löwiseba40652007-08-30 20:10:57 +000015971
15972
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015973if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015974 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15975echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015977/* confdefs.h. */
15978_ACEOF
15979cat confdefs.h >>conftest.$ac_ext
15980cat >>conftest.$ac_ext <<_ACEOF
15981/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015982#include <sys/types.h>
15983#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015984int
15985main ()
15986{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015987struct sockaddr_in6 x;
15988x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015989 ;
15990 return 0;
15991}
15992_ACEOF
15993rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015994if { (ac_try="$ac_compile"
15995case "(($ac_try" in
15996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15997 *) ac_try_echo=$ac_try;;
15998esac
15999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16000 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016002 grep -v '^ *+' conftest.er1 >conftest.err
16003 rm -f conftest.er1
16004 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016006 (exit $ac_status); } && {
16007 test -z "$ac_c_werror_flag" ||
16008 test ! -s conftest.err
16009 } && test -s conftest.$ac_objext; then
16010 { echo "$as_me:$LINENO: result: yes" >&5
16011echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016012 ipv6=yes
16013else
Martin v. Löwis11437992002-04-12 09:54:03 +000016014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016015sed 's/^/| /' conftest.$ac_ext >&5
16016
Martin v. Löwiseba40652007-08-30 20:10:57 +000016017 { echo "$as_me:$LINENO: result: no" >&5
16018echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016019 ipv6=no
16020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016021
16022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016023fi
16024
16025if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016027#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016028_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016029
16030fi
16031
Martin v. Löwiseba40652007-08-30 20:10:57 +000016032fi
16033
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016034
16035ipv6type=unknown
16036ipv6lib=none
16037ipv6trylibc=no
16038
16039if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016040 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16041echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016042 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16043 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016044 case $i in
16045 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016047/* confdefs.h. */
16048_ACEOF
16049cat confdefs.h >>conftest.$ac_ext
16050cat >>conftest.$ac_ext <<_ACEOF
16051/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016052
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016053#include <netinet/in.h>
16054#ifdef IPV6_INRIA_VERSION
16055yes
16056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016057_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016059 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016060 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016061fi
16062rm -f conftest*
16063
16064 ;;
16065 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016067/* confdefs.h. */
16068_ACEOF
16069cat confdefs.h >>conftest.$ac_ext
16070cat >>conftest.$ac_ext <<_ACEOF
16071/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016072
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016073#include <netinet/in.h>
16074#ifdef __KAME__
16075yes
16076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016077_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016079 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016080 ipv6type=$i;
16081 ipv6lib=inet6
16082 ipv6libdir=/usr/local/v6/lib
16083 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016084fi
16085rm -f conftest*
16086
16087 ;;
16088 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016090/* confdefs.h. */
16091_ACEOF
16092cat confdefs.h >>conftest.$ac_ext
16093cat >>conftest.$ac_ext <<_ACEOF
16094/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016095
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016096#include <features.h>
16097#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16098yes
16099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016100_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016102 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016103 ipv6type=$i;
16104 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016105fi
16106rm -f conftest*
16107
16108 ;;
16109 linux-inet6)
16110 if test -d /usr/inet6; then
16111 ipv6type=$i
16112 ipv6lib=inet6
16113 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016114 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016115 fi
16116 ;;
16117 solaris)
16118 if test -f /etc/netconfig; then
16119 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16120 ipv6type=$i
16121 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016122 fi
16123 fi
16124 ;;
16125 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016126 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016127/* confdefs.h. */
16128_ACEOF
16129cat confdefs.h >>conftest.$ac_ext
16130cat >>conftest.$ac_ext <<_ACEOF
16131/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016132
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016133#include <sys/param.h>
16134#ifdef _TOSHIBA_INET6
16135yes
16136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016137_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016139 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016140 ipv6type=$i;
16141 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016142 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016143fi
16144rm -f conftest*
16145
16146 ;;
16147 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016149/* confdefs.h. */
16150_ACEOF
16151cat confdefs.h >>conftest.$ac_ext
16152cat >>conftest.$ac_ext <<_ACEOF
16153/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016154
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016155#include </usr/local/v6/include/sys/v6config.h>
16156#ifdef __V6D__
16157yes
16158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016159_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016161 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016162 ipv6type=$i;
16163 ipv6lib=v6;
16164 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016165 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016166fi
16167rm -f conftest*
16168
16169 ;;
16170 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016172/* confdefs.h. */
16173_ACEOF
16174cat confdefs.h >>conftest.$ac_ext
16175cat >>conftest.$ac_ext <<_ACEOF
16176/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016177
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016178#include <sys/param.h>
16179#ifdef _ZETA_MINAMI_INET6
16180yes
16181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016182_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016183if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016184 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016185 ipv6type=$i;
16186 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016187 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016188fi
16189rm -f conftest*
16190
16191 ;;
16192 esac
16193 if test "$ipv6type" != "unknown"; then
16194 break
16195 fi
16196 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016197 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16198echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016199fi
16200
16201if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16202 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16203 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16204 echo "using lib$ipv6lib"
16205 else
16206 if test $ipv6trylibc = "yes"; then
16207 echo "using libc"
16208 else
16209 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16210 echo "You need to fetch lib$ipv6lib.a from appropriate"
16211 echo 'ipv6 kit and compile beforehand.'
16212 exit 1
16213 fi
16214 fi
16215fi
16216
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000016217{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16218echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
16219cat >conftest.$ac_ext <<_ACEOF
16220/* confdefs.h. */
16221_ACEOF
16222cat confdefs.h >>conftest.$ac_ext
16223cat >>conftest.$ac_ext <<_ACEOF
16224/* end confdefs.h. */
16225#include <Carbon/Carbon.h>
16226int
16227main ()
16228{
16229FSIORefNum fRef = 0
16230 ;
16231 return 0;
16232}
16233_ACEOF
16234rm -f conftest.$ac_objext
16235if { (ac_try="$ac_compile"
16236case "(($ac_try" in
16237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16238 *) ac_try_echo=$ac_try;;
16239esac
16240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16241 (eval "$ac_compile") 2>conftest.er1
16242 ac_status=$?
16243 grep -v '^ *+' conftest.er1 >conftest.err
16244 rm -f conftest.er1
16245 cat conftest.err >&5
16246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16247 (exit $ac_status); } && {
16248 test -z "$ac_c_werror_flag" ||
16249 test ! -s conftest.err
16250 } && test -s conftest.$ac_objext; then
16251
16252cat >>confdefs.h <<\_ACEOF
16253#define HAVE_OSX105_SDK 1
16254_ACEOF
16255
16256 { echo "$as_me:$LINENO: result: yes" >&5
16257echo "${ECHO_T}yes" >&6; }
16258else
16259 echo "$as_me: failed program was:" >&5
16260sed 's/^/| /' conftest.$ac_ext >&5
16261
16262 { echo "$as_me:$LINENO: result: no" >&5
16263echo "${ECHO_T}no" >&6; }
16264
16265fi
16266
16267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16268
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016269# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000016270{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16271echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016272
Martin v. Löwiseba40652007-08-30 20:10:57 +000016273# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016274if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016275 withval=$with_doc_strings;
16276fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016277
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016278
16279if test -z "$with_doc_strings"
16280then with_doc_strings="yes"
16281fi
16282if test "$with_doc_strings" != "no"
16283then
16284
16285cat >>confdefs.h <<\_ACEOF
16286#define WITH_DOC_STRINGS 1
16287_ACEOF
16288
16289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016290{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16291echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016292
Neil Schemenauera35c6882001-02-27 04:45:05 +000016293# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016294{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16295echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016296
Martin v. Löwiseba40652007-08-30 20:10:57 +000016297# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016298if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016299 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016300if test "$withval" != no
16301then
16302
16303cat >>confdefs.h <<\_ACEOF
16304#define WITH_TSC 1
16305_ACEOF
16306
Martin v. Löwiseba40652007-08-30 20:10:57 +000016307 { echo "$as_me:$LINENO: result: yes" >&5
16308echo "${ECHO_T}yes" >&6; }
16309else { echo "$as_me:$LINENO: result: no" >&5
16310echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016311fi
16312else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016313 { echo "$as_me:$LINENO: result: no" >&5
16314echo "${ECHO_T}no" >&6; }
16315fi
16316
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016317
16318# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016319{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16320echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016321
Martin v. Löwiseba40652007-08-30 20:10:57 +000016322# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016323if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016324 withval=$with_pymalloc;
16325fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016326
Neil Schemenauera35c6882001-02-27 04:45:05 +000016327
Neil Schemenauer16c22972002-03-22 15:34:49 +000016328if test -z "$with_pymalloc"
16329then with_pymalloc="yes"
16330fi
16331if test "$with_pymalloc" != "no"
16332then
Martin v. Löwis11437992002-04-12 09:54:03 +000016333
16334cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016335#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016336_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016337
16338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016339{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16340echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016341
Barry Warsawef82cd72000-06-30 16:21:01 +000016342# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000016343{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16344echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016345
Martin v. Löwiseba40652007-08-30 20:10:57 +000016346# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016347if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016348 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016349if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016350then
16351
16352cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016353#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016354_ACEOF
16355
Martin v. Löwiseba40652007-08-30 20:10:57 +000016356 { echo "$as_me:$LINENO: result: yes" >&5
16357echo "${ECHO_T}yes" >&6; }
16358else { echo "$as_me:$LINENO: result: no" >&5
16359echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016360fi
16361else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016362 { echo "$as_me:$LINENO: result: no" >&5
16363echo "${ECHO_T}no" >&6; }
16364fi
16365
Barry Warsawef82cd72000-06-30 16:21:01 +000016366
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016367# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016368
Guido van Rossum98935bf2001-09-05 19:13:16 +000016369DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016370
Guido van Rossume97ee181999-12-20 21:27:22 +000016371# the dlopen() function means we might want to use dynload_shlib.o. some
16372# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016373
Thomas Wouters3a584202000-08-05 23:28:51 +000016374for ac_func in dlopen
16375do
Martin v. Löwis11437992002-04-12 09:54:03 +000016376as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016377{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16378echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16379if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016380 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016381else
Martin v. Löwis11437992002-04-12 09:54:03 +000016382 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016383/* confdefs.h. */
16384_ACEOF
16385cat confdefs.h >>conftest.$ac_ext
16386cat >>conftest.$ac_ext <<_ACEOF
16387/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016388/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16389 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16390#define $ac_func innocuous_$ac_func
16391
Guido van Rossume97ee181999-12-20 21:27:22 +000016392/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016393 which can conflict with char $ac_func (); below.
16394 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016395 <limits.h> exists even on freestanding compilers. */
16396
16397#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016398# include <limits.h>
16399#else
16400# include <assert.h>
16401#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016402
16403#undef $ac_func
16404
Martin v. Löwiseba40652007-08-30 20:10:57 +000016405/* Override any GCC internal prototype to avoid an error.
16406 Use char because int might match the return type of a GCC
16407 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016408#ifdef __cplusplus
16409extern "C"
16410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016411char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016412/* The GNU C library defines this for functions which it implements
16413 to always fail with ENOSYS. Some functions are actually named
16414 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016415#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016416choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016417#endif
16418
Skip Montanaro6dead952003-09-25 14:50:04 +000016419int
16420main ()
16421{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016422return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016423 ;
16424 return 0;
16425}
16426_ACEOF
16427rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016428if { (ac_try="$ac_link"
16429case "(($ac_try" in
16430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16431 *) ac_try_echo=$ac_try;;
16432esac
16433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16434 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016436 grep -v '^ *+' conftest.er1 >conftest.err
16437 rm -f conftest.er1
16438 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016440 (exit $ac_status); } && {
16441 test -z "$ac_c_werror_flag" ||
16442 test ! -s conftest.err
16443 } && test -s conftest$ac_exeext &&
16444 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016445 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016446else
Martin v. Löwis11437992002-04-12 09:54:03 +000016447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016448sed 's/^/| /' conftest.$ac_ext >&5
16449
Martin v. Löwiseba40652007-08-30 20:10:57 +000016450 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016452
16453rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016454 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016456ac_res=`eval echo '${'$as_ac_var'}'`
16457 { echo "$as_me:$LINENO: result: $ac_res" >&5
16458echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016459if test `eval echo '${'$as_ac_var'}'` = yes; then
16460 cat >>confdefs.h <<_ACEOF
16461#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16462_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016463
Guido van Rossume97ee181999-12-20 21:27:22 +000016464fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016465done
Guido van Rossume97ee181999-12-20 21:27:22 +000016466
Michael W. Hudson54241132001-12-07 15:38:26 +000016467
Guido van Rossume97ee181999-12-20 21:27:22 +000016468# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16469# loading of modules.
16470
Martin v. Löwiseba40652007-08-30 20:10:57 +000016471{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16472echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016473if test -z "$DYNLOADFILE"
16474then
16475 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016476 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16477 if test "$ac_cv_func_dlopen" = yes
16478 then DYNLOADFILE="dynload_shlib.o"
16479 else DYNLOADFILE="dynload_aix.o"
16480 fi
16481 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016482 BeOS*) DYNLOADFILE="dynload_beos.o";;
16483 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016484 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16485 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016486 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016487 *)
16488 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16489 # out any dynamic loading
16490 if test "$ac_cv_func_dlopen" = yes
16491 then DYNLOADFILE="dynload_shlib.o"
16492 else DYNLOADFILE="dynload_stub.o"
16493 fi
16494 ;;
16495 esac
16496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016497{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16498echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016499if test "$DYNLOADFILE" != "dynload_stub.o"
16500then
Martin v. Löwis11437992002-04-12 09:54:03 +000016501
16502cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016503#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016504_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016505
16506fi
16507
Neil Schemenauer4e425612001-06-19 15:44:15 +000016508# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16509
Michael W. Hudson54241132001-12-07 15:38:26 +000016510
Martin v. Löwiseba40652007-08-30 20:10:57 +000016511{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16512echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016513if test -z "$MACHDEP_OBJS"
16514then
Jack Jansene578a632001-08-15 01:27:14 +000016515 MACHDEP_OBJS=$extra_machdep_objs
16516else
16517 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016519{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16520echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016521
Guido van Rossum627b2d71993-12-24 10:39:16 +000016522# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
Martin v. Löwisd6320502004-08-12 13:45:08 +000016594
Martin v. Löwisc3001752005-01-23 09:27:24 +000016595
16596
Neal Norwitz05a45592006-03-20 06:30:08 +000016597
16598
Martin v. Löwis382abef2007-02-19 10:55:19 +000016599
16600
Christian Heimes36281872007-11-30 21:11:28 +000016601
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016602
16603
Jesse Noller355b1262009-04-02 00:03:28 +000016604
16605
16606
16607
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016608for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16609 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016610 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016611 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016612 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016613 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016614 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000016615 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16616 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016617 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016618 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016619 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016620 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016621do
Martin v. Löwis11437992002-04-12 09:54:03 +000016622as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016623{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16624echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16625if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016626 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016627else
Martin v. Löwis11437992002-04-12 09:54:03 +000016628 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016629/* confdefs.h. */
16630_ACEOF
16631cat confdefs.h >>conftest.$ac_ext
16632cat >>conftest.$ac_ext <<_ACEOF
16633/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016634/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16635 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16636#define $ac_func innocuous_$ac_func
16637
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016638/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016639 which can conflict with char $ac_func (); below.
16640 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016641 <limits.h> exists even on freestanding compilers. */
16642
16643#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016644# include <limits.h>
16645#else
16646# include <assert.h>
16647#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016648
16649#undef $ac_func
16650
Martin v. Löwiseba40652007-08-30 20:10:57 +000016651/* Override any GCC internal prototype to avoid an error.
16652 Use char because int might match the return type of a GCC
16653 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016654#ifdef __cplusplus
16655extern "C"
16656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016657char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016658/* The GNU C library defines this for functions which it implements
16659 to always fail with ENOSYS. Some functions are actually named
16660 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016661#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016662choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016663#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016664
Skip Montanaro6dead952003-09-25 14:50:04 +000016665int
16666main ()
16667{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016668return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016669 ;
16670 return 0;
16671}
16672_ACEOF
16673rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016674if { (ac_try="$ac_link"
16675case "(($ac_try" in
16676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16677 *) ac_try_echo=$ac_try;;
16678esac
16679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16680 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016682 grep -v '^ *+' conftest.er1 >conftest.err
16683 rm -f conftest.er1
16684 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016686 (exit $ac_status); } && {
16687 test -z "$ac_c_werror_flag" ||
16688 test ! -s conftest.err
16689 } && test -s conftest$ac_exeext &&
16690 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016691 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016692else
Martin v. Löwis11437992002-04-12 09:54:03 +000016693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016694sed 's/^/| /' conftest.$ac_ext >&5
16695
Martin v. Löwiseba40652007-08-30 20:10:57 +000016696 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016698
16699rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016700 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016702ac_res=`eval echo '${'$as_ac_var'}'`
16703 { echo "$as_me:$LINENO: result: $ac_res" >&5
16704echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016705if test `eval echo '${'$as_ac_var'}'` = yes; then
16706 cat >>confdefs.h <<_ACEOF
16707#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16708_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016709
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016710fi
16711done
16712
Michael W. Hudson54241132001-12-07 15:38:26 +000016713
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016714# For some functions, having a definition is not sufficient, since
16715# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016716{ echo "$as_me:$LINENO: checking for chroot" >&5
16717echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016719/* confdefs.h. */
16720_ACEOF
16721cat confdefs.h >>conftest.$ac_ext
16722cat >>conftest.$ac_ext <<_ACEOF
16723/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016724#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016725int
16726main ()
16727{
16728void *x=chroot
16729 ;
16730 return 0;
16731}
16732_ACEOF
16733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016734if { (ac_try="$ac_compile"
16735case "(($ac_try" in
16736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16737 *) ac_try_echo=$ac_try;;
16738esac
16739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016742 grep -v '^ *+' conftest.er1 >conftest.err
16743 rm -f conftest.er1
16744 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016746 (exit $ac_status); } && {
16747 test -z "$ac_c_werror_flag" ||
16748 test ! -s conftest.err
16749 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016750
16751cat >>confdefs.h <<\_ACEOF
16752#define HAVE_CHROOT 1
16753_ACEOF
16754
Martin v. Löwiseba40652007-08-30 20:10:57 +000016755 { echo "$as_me:$LINENO: result: yes" >&5
16756echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016757else
16758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016759sed 's/^/| /' conftest.$ac_ext >&5
16760
Martin v. Löwiseba40652007-08-30 20:10:57 +000016761 { echo "$as_me:$LINENO: result: no" >&5
16762echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016763
16764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016765
16766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16767{ echo "$as_me:$LINENO: checking for link" >&5
16768echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016769cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016770/* confdefs.h. */
16771_ACEOF
16772cat confdefs.h >>conftest.$ac_ext
16773cat >>conftest.$ac_ext <<_ACEOF
16774/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016775#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016776int
16777main ()
16778{
16779void *x=link
16780 ;
16781 return 0;
16782}
16783_ACEOF
16784rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016785if { (ac_try="$ac_compile"
16786case "(($ac_try" in
16787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16788 *) ac_try_echo=$ac_try;;
16789esac
16790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16791 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016793 grep -v '^ *+' conftest.er1 >conftest.err
16794 rm -f conftest.er1
16795 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016797 (exit $ac_status); } && {
16798 test -z "$ac_c_werror_flag" ||
16799 test ! -s conftest.err
16800 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016801
16802cat >>confdefs.h <<\_ACEOF
16803#define HAVE_LINK 1
16804_ACEOF
16805
Martin v. Löwiseba40652007-08-30 20:10:57 +000016806 { echo "$as_me:$LINENO: result: yes" >&5
16807echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016808else
16809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016810sed 's/^/| /' conftest.$ac_ext >&5
16811
Martin v. Löwiseba40652007-08-30 20:10:57 +000016812 { echo "$as_me:$LINENO: result: no" >&5
16813echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016814
16815fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016816
16817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16818{ echo "$as_me:$LINENO: checking for symlink" >&5
16819echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016820cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016821/* confdefs.h. */
16822_ACEOF
16823cat confdefs.h >>conftest.$ac_ext
16824cat >>conftest.$ac_ext <<_ACEOF
16825/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016826#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016827int
16828main ()
16829{
16830void *x=symlink
16831 ;
16832 return 0;
16833}
16834_ACEOF
16835rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016836if { (ac_try="$ac_compile"
16837case "(($ac_try" in
16838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16839 *) ac_try_echo=$ac_try;;
16840esac
16841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016843 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016844 grep -v '^ *+' conftest.er1 >conftest.err
16845 rm -f conftest.er1
16846 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016848 (exit $ac_status); } && {
16849 test -z "$ac_c_werror_flag" ||
16850 test ! -s conftest.err
16851 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016852
16853cat >>confdefs.h <<\_ACEOF
16854#define HAVE_SYMLINK 1
16855_ACEOF
16856
Martin v. Löwiseba40652007-08-30 20:10:57 +000016857 { echo "$as_me:$LINENO: result: yes" >&5
16858echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016859else
16860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016861sed 's/^/| /' conftest.$ac_ext >&5
16862
Martin v. Löwiseba40652007-08-30 20:10:57 +000016863 { echo "$as_me:$LINENO: result: no" >&5
16864echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016865
16866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016867
16868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16869{ echo "$as_me:$LINENO: checking for fchdir" >&5
16870echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016871cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016872/* confdefs.h. */
16873_ACEOF
16874cat confdefs.h >>conftest.$ac_ext
16875cat >>conftest.$ac_ext <<_ACEOF
16876/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016877#include <unistd.h>
16878int
16879main ()
16880{
16881void *x=fchdir
16882 ;
16883 return 0;
16884}
16885_ACEOF
16886rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016887if { (ac_try="$ac_compile"
16888case "(($ac_try" in
16889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16890 *) ac_try_echo=$ac_try;;
16891esac
16892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016895 grep -v '^ *+' conftest.er1 >conftest.err
16896 rm -f conftest.er1
16897 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016899 (exit $ac_status); } && {
16900 test -z "$ac_c_werror_flag" ||
16901 test ! -s conftest.err
16902 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016903
16904cat >>confdefs.h <<\_ACEOF
16905#define HAVE_FCHDIR 1
16906_ACEOF
16907
Martin v. Löwiseba40652007-08-30 20:10:57 +000016908 { echo "$as_me:$LINENO: result: yes" >&5
16909echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016910else
16911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016912sed 's/^/| /' conftest.$ac_ext >&5
16913
Martin v. Löwiseba40652007-08-30 20:10:57 +000016914 { echo "$as_me:$LINENO: result: no" >&5
16915echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016916
16917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016918
16919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16920{ echo "$as_me:$LINENO: checking for fsync" >&5
16921echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016922cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016923/* confdefs.h. */
16924_ACEOF
16925cat confdefs.h >>conftest.$ac_ext
16926cat >>conftest.$ac_ext <<_ACEOF
16927/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016928#include <unistd.h>
16929int
16930main ()
16931{
16932void *x=fsync
16933 ;
16934 return 0;
16935}
16936_ACEOF
16937rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016938if { (ac_try="$ac_compile"
16939case "(($ac_try" in
16940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16941 *) ac_try_echo=$ac_try;;
16942esac
16943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16944 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016946 grep -v '^ *+' conftest.er1 >conftest.err
16947 rm -f conftest.er1
16948 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016950 (exit $ac_status); } && {
16951 test -z "$ac_c_werror_flag" ||
16952 test ! -s conftest.err
16953 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016954
16955cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016956#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016957_ACEOF
16958
Martin v. Löwiseba40652007-08-30 20:10:57 +000016959 { echo "$as_me:$LINENO: result: yes" >&5
16960echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016961else
16962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016963sed 's/^/| /' conftest.$ac_ext >&5
16964
Martin v. Löwiseba40652007-08-30 20:10:57 +000016965 { echo "$as_me:$LINENO: result: no" >&5
16966echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016967
16968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016969
16970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16971{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16972echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016973cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016974/* confdefs.h. */
16975_ACEOF
16976cat confdefs.h >>conftest.$ac_ext
16977cat >>conftest.$ac_ext <<_ACEOF
16978/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016979#include <unistd.h>
16980int
16981main ()
16982{
16983void *x=fdatasync
16984 ;
16985 return 0;
16986}
16987_ACEOF
16988rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016989if { (ac_try="$ac_compile"
16990case "(($ac_try" in
16991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16992 *) ac_try_echo=$ac_try;;
16993esac
16994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16995 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016997 grep -v '^ *+' conftest.er1 >conftest.err
16998 rm -f conftest.er1
16999 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017001 (exit $ac_status); } && {
17002 test -z "$ac_c_werror_flag" ||
17003 test ! -s conftest.err
17004 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017005
17006cat >>confdefs.h <<\_ACEOF
17007#define HAVE_FDATASYNC 1
17008_ACEOF
17009
Martin v. Löwiseba40652007-08-30 20:10:57 +000017010 { echo "$as_me:$LINENO: result: yes" >&5
17011echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017012else
17013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017014sed 's/^/| /' conftest.$ac_ext >&5
17015
Martin v. Löwiseba40652007-08-30 20:10:57 +000017016 { echo "$as_me:$LINENO: result: no" >&5
17017echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017018
17019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017020
17021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017022{ echo "$as_me:$LINENO: checking for epoll" >&5
17023echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
17024cat >conftest.$ac_ext <<_ACEOF
17025/* confdefs.h. */
17026_ACEOF
17027cat confdefs.h >>conftest.$ac_ext
17028cat >>conftest.$ac_ext <<_ACEOF
17029/* end confdefs.h. */
17030#include <sys/epoll.h>
17031int
17032main ()
17033{
17034void *x=epoll_create
17035 ;
17036 return 0;
17037}
17038_ACEOF
17039rm -f conftest.$ac_objext
17040if { (ac_try="$ac_compile"
17041case "(($ac_try" in
17042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17043 *) ac_try_echo=$ac_try;;
17044esac
17045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17046 (eval "$ac_compile") 2>conftest.er1
17047 ac_status=$?
17048 grep -v '^ *+' conftest.er1 >conftest.err
17049 rm -f conftest.er1
17050 cat conftest.err >&5
17051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17052 (exit $ac_status); } && {
17053 test -z "$ac_c_werror_flag" ||
17054 test ! -s conftest.err
17055 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017056
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017057cat >>confdefs.h <<\_ACEOF
17058#define HAVE_EPOLL 1
17059_ACEOF
17060
17061 { echo "$as_me:$LINENO: result: yes" >&5
17062echo "${ECHO_T}yes" >&6; }
17063else
17064 echo "$as_me: failed program was:" >&5
17065sed 's/^/| /' conftest.$ac_ext >&5
17066
17067 { echo "$as_me:$LINENO: result: no" >&5
17068echo "${ECHO_T}no" >&6; }
17069
17070fi
17071
17072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17073{ echo "$as_me:$LINENO: checking for kqueue" >&5
17074echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
17075cat >conftest.$ac_ext <<_ACEOF
17076/* confdefs.h. */
17077_ACEOF
17078cat confdefs.h >>conftest.$ac_ext
17079cat >>conftest.$ac_ext <<_ACEOF
17080/* end confdefs.h. */
17081
17082#include <sys/types.h>
17083#include <sys/event.h>
17084
17085int
17086main ()
17087{
17088int x=kqueue()
17089 ;
17090 return 0;
17091}
17092_ACEOF
17093rm -f conftest.$ac_objext
17094if { (ac_try="$ac_compile"
17095case "(($ac_try" in
17096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17097 *) ac_try_echo=$ac_try;;
17098esac
17099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17100 (eval "$ac_compile") 2>conftest.er1
17101 ac_status=$?
17102 grep -v '^ *+' conftest.er1 >conftest.err
17103 rm -f conftest.er1
17104 cat conftest.err >&5
17105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17106 (exit $ac_status); } && {
17107 test -z "$ac_c_werror_flag" ||
17108 test ! -s conftest.err
17109 } && test -s conftest.$ac_objext; then
17110
17111cat >>confdefs.h <<\_ACEOF
17112#define HAVE_KQUEUE 1
17113_ACEOF
17114
17115 { echo "$as_me:$LINENO: result: yes" >&5
17116echo "${ECHO_T}yes" >&6; }
17117else
17118 echo "$as_me: failed program was:" >&5
17119sed 's/^/| /' conftest.$ac_ext >&5
17120
17121 { echo "$as_me:$LINENO: result: no" >&5
17122echo "${ECHO_T}no" >&6; }
17123
17124fi
17125
17126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017127# On some systems (eg. FreeBSD 5), we would find a definition of the
17128# functions ctermid_r, setgroups in the library, but no prototype
17129# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17130# address to avoid compiler warnings and potential miscompilations
17131# because of the missing prototypes.
17132
Martin v. Löwiseba40652007-08-30 20:10:57 +000017133{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17134echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017135cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017136/* confdefs.h. */
17137_ACEOF
17138cat confdefs.h >>conftest.$ac_ext
17139cat >>conftest.$ac_ext <<_ACEOF
17140/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017141
17142#include "confdefs.h"
17143#include <stdio.h>
17144
Martin v. Löwisd5843682002-11-21 20:41:28 +000017145int
17146main ()
17147{
17148void* p = ctermid_r
17149 ;
17150 return 0;
17151}
17152_ACEOF
17153rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017154if { (ac_try="$ac_compile"
17155case "(($ac_try" in
17156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17157 *) ac_try_echo=$ac_try;;
17158esac
17159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17160 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017162 grep -v '^ *+' conftest.er1 >conftest.err
17163 rm -f conftest.er1
17164 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017166 (exit $ac_status); } && {
17167 test -z "$ac_c_werror_flag" ||
17168 test ! -s conftest.err
17169 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017170
17171cat >>confdefs.h <<\_ACEOF
17172#define HAVE_CTERMID_R 1
17173_ACEOF
17174
Martin v. Löwiseba40652007-08-30 20:10:57 +000017175 { echo "$as_me:$LINENO: result: yes" >&5
17176echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017177else
17178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017179sed 's/^/| /' conftest.$ac_ext >&5
17180
Martin v. Löwiseba40652007-08-30 20:10:57 +000017181 { echo "$as_me:$LINENO: result: no" >&5
17182echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017183
17184fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000017185
Martin v. Löwiseba40652007-08-30 20:10:57 +000017186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17187
17188{ echo "$as_me:$LINENO: checking for flock" >&5
17189echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017191/* confdefs.h. */
17192_ACEOF
17193cat confdefs.h >>conftest.$ac_ext
17194cat >>conftest.$ac_ext <<_ACEOF
17195/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017196
17197#include "confdefs.h"
17198#include <sys/file.h>
17199
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017200int
17201main ()
17202{
17203void* p = flock
17204 ;
17205 return 0;
17206}
17207_ACEOF
17208rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017209if { (ac_try="$ac_compile"
17210case "(($ac_try" in
17211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17212 *) ac_try_echo=$ac_try;;
17213esac
17214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017217 grep -v '^ *+' conftest.er1 >conftest.err
17218 rm -f conftest.er1
17219 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017221 (exit $ac_status); } && {
17222 test -z "$ac_c_werror_flag" ||
17223 test ! -s conftest.err
17224 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017225
17226cat >>confdefs.h <<\_ACEOF
17227#define HAVE_FLOCK 1
17228_ACEOF
17229
Martin v. Löwiseba40652007-08-30 20:10:57 +000017230 { echo "$as_me:$LINENO: result: yes" >&5
17231echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017232else
17233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017234sed 's/^/| /' conftest.$ac_ext >&5
17235
Martin v. Löwiseba40652007-08-30 20:10:57 +000017236 { echo "$as_me:$LINENO: result: no" >&5
17237echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017238
17239fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017240
Martin v. Löwiseba40652007-08-30 20:10:57 +000017241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17242
17243{ echo "$as_me:$LINENO: checking for getpagesize" >&5
17244echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017246/* confdefs.h. */
17247_ACEOF
17248cat confdefs.h >>conftest.$ac_ext
17249cat >>conftest.$ac_ext <<_ACEOF
17250/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017251
17252#include "confdefs.h"
17253#include <unistd.h>
17254
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017255int
17256main ()
17257{
17258void* p = getpagesize
17259 ;
17260 return 0;
17261}
17262_ACEOF
17263rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017264if { (ac_try="$ac_compile"
17265case "(($ac_try" in
17266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17267 *) ac_try_echo=$ac_try;;
17268esac
17269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17270 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017272 grep -v '^ *+' conftest.er1 >conftest.err
17273 rm -f conftest.er1
17274 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017276 (exit $ac_status); } && {
17277 test -z "$ac_c_werror_flag" ||
17278 test ! -s conftest.err
17279 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017280
17281cat >>confdefs.h <<\_ACEOF
17282#define HAVE_GETPAGESIZE 1
17283_ACEOF
17284
Martin v. Löwiseba40652007-08-30 20:10:57 +000017285 { echo "$as_me:$LINENO: result: yes" >&5
17286echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017287else
17288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017289sed 's/^/| /' conftest.$ac_ext >&5
17290
Martin v. Löwiseba40652007-08-30 20:10:57 +000017291 { echo "$as_me:$LINENO: result: no" >&5
17292echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017293
17294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017295
17296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017297
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017298for ac_prog in true
17299do
17300 # Extract the first word of "$ac_prog", so it can be a program name with args.
17301set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000017302{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17303echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017304if test "${ac_cv_prog_TRUE+set}" = set; then
17305 echo $ECHO_N "(cached) $ECHO_C" >&6
17306else
17307 if test -n "$TRUE"; then
17308 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17309else
17310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17311for as_dir in $PATH
17312do
17313 IFS=$as_save_IFS
17314 test -z "$as_dir" && as_dir=.
17315 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000017316 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 +000017317 ac_cv_prog_TRUE="$ac_prog"
17318 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17319 break 2
17320 fi
17321done
17322done
Martin v. Löwiseba40652007-08-30 20:10:57 +000017323IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017324
17325fi
17326fi
17327TRUE=$ac_cv_prog_TRUE
17328if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017329 { echo "$as_me:$LINENO: result: $TRUE" >&5
17330echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017331else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017332 { echo "$as_me:$LINENO: result: no" >&5
17333echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017334fi
17335
Martin v. Löwiseba40652007-08-30 20:10:57 +000017336
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017337 test -n "$TRUE" && break
17338done
17339test -n "$TRUE" || TRUE="/bin/true"
17340
17341
Martin v. Löwiseba40652007-08-30 20:10:57 +000017342{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17343echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017344if test "${ac_cv_lib_c_inet_aton+set}" = set; then
17345 echo $ECHO_N "(cached) $ECHO_C" >&6
17346else
17347 ac_check_lib_save_LIBS=$LIBS
17348LIBS="-lc $LIBS"
17349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017350/* confdefs.h. */
17351_ACEOF
17352cat confdefs.h >>conftest.$ac_ext
17353cat >>conftest.$ac_ext <<_ACEOF
17354/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017355
Martin v. Löwiseba40652007-08-30 20:10:57 +000017356/* Override any GCC internal prototype to avoid an error.
17357 Use char because int might match the return type of a GCC
17358 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017359#ifdef __cplusplus
17360extern "C"
17361#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017362char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017363int
17364main ()
17365{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017366return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017367 ;
17368 return 0;
17369}
17370_ACEOF
17371rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017372if { (ac_try="$ac_link"
17373case "(($ac_try" in
17374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17375 *) ac_try_echo=$ac_try;;
17376esac
17377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17378 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017380 grep -v '^ *+' conftest.er1 >conftest.err
17381 rm -f conftest.er1
17382 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017384 (exit $ac_status); } && {
17385 test -z "$ac_c_werror_flag" ||
17386 test ! -s conftest.err
17387 } && test -s conftest$ac_exeext &&
17388 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017389 ac_cv_lib_c_inet_aton=yes
17390else
17391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017392sed 's/^/| /' conftest.$ac_ext >&5
17393
Martin v. Löwiseba40652007-08-30 20:10:57 +000017394 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017396
17397rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017398 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017399LIBS=$ac_check_lib_save_LIBS
17400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017401{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17402echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017403if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017404 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017405else
17406
Martin v. Löwiseba40652007-08-30 20:10:57 +000017407{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17408echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017409if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
17410 echo $ECHO_N "(cached) $ECHO_C" >&6
17411else
17412 ac_check_lib_save_LIBS=$LIBS
17413LIBS="-lresolv $LIBS"
17414cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017415/* confdefs.h. */
17416_ACEOF
17417cat confdefs.h >>conftest.$ac_ext
17418cat >>conftest.$ac_ext <<_ACEOF
17419/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017420
Martin v. Löwiseba40652007-08-30 20:10:57 +000017421/* Override any GCC internal prototype to avoid an error.
17422 Use char because int might match the return type of a GCC
17423 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017424#ifdef __cplusplus
17425extern "C"
17426#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017427char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017428int
17429main ()
17430{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017431return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017432 ;
17433 return 0;
17434}
17435_ACEOF
17436rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017437if { (ac_try="$ac_link"
17438case "(($ac_try" in
17439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17440 *) ac_try_echo=$ac_try;;
17441esac
17442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17443 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017445 grep -v '^ *+' conftest.er1 >conftest.err
17446 rm -f conftest.er1
17447 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017449 (exit $ac_status); } && {
17450 test -z "$ac_c_werror_flag" ||
17451 test ! -s conftest.err
17452 } && test -s conftest$ac_exeext &&
17453 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017454 ac_cv_lib_resolv_inet_aton=yes
17455else
17456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017457sed 's/^/| /' conftest.$ac_ext >&5
17458
Martin v. Löwiseba40652007-08-30 20:10:57 +000017459 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017461
17462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017464LIBS=$ac_check_lib_save_LIBS
17465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017466{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17467echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017468if test $ac_cv_lib_resolv_inet_aton = yes; then
17469 cat >>confdefs.h <<_ACEOF
17470#define HAVE_LIBRESOLV 1
17471_ACEOF
17472
17473 LIBS="-lresolv $LIBS"
17474
17475fi
17476
17477
17478fi
17479
17480
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017481# On Tru64, chflags seems to be present, but calling it will
17482# exit Python
17483{ echo "$as_me:$LINENO: checking for chflags" >&5
17484echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17485if test "$cross_compiling" = yes; then
17486 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17487See \`config.log' for more details." >&5
17488echo "$as_me: error: cannot run test program while cross compiling
17489See \`config.log' for more details." >&2;}
17490 { (exit 1); exit 1; }; }
17491else
17492 cat >conftest.$ac_ext <<_ACEOF
17493/* confdefs.h. */
17494_ACEOF
17495cat confdefs.h >>conftest.$ac_ext
17496cat >>conftest.$ac_ext <<_ACEOF
17497/* end confdefs.h. */
17498
17499#include <sys/stat.h>
17500#include <unistd.h>
17501int main(int argc, char*argv[])
17502{
17503 if(chflags(argv[0], 0) != 0)
17504 return 1;
17505 return 0;
17506}
17507
17508_ACEOF
17509rm -f conftest$ac_exeext
17510if { (ac_try="$ac_link"
17511case "(($ac_try" in
17512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17513 *) ac_try_echo=$ac_try;;
17514esac
17515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17516 (eval "$ac_link") 2>&5
17517 ac_status=$?
17518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17519 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17520 { (case "(($ac_try" in
17521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17522 *) ac_try_echo=$ac_try;;
17523esac
17524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17525 (eval "$ac_try") 2>&5
17526 ac_status=$?
17527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17528 (exit $ac_status); }; }; then
17529
17530cat >>confdefs.h <<\_ACEOF
17531#define HAVE_CHFLAGS 1
17532_ACEOF
17533
17534 { echo "$as_me:$LINENO: result: yes" >&5
17535echo "${ECHO_T}yes" >&6; }
17536else
17537 echo "$as_me: program exited with status $ac_status" >&5
17538echo "$as_me: failed program was:" >&5
17539sed 's/^/| /' conftest.$ac_ext >&5
17540
17541( exit $ac_status )
17542{ echo "$as_me:$LINENO: result: no" >&5
17543echo "${ECHO_T}no" >&6; }
17544
17545fi
17546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17547fi
17548
17549
17550
17551{ echo "$as_me:$LINENO: checking for lchflags" >&5
17552echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17553if test "$cross_compiling" = yes; then
17554 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17555See \`config.log' for more details." >&5
17556echo "$as_me: error: cannot run test program while cross compiling
17557See \`config.log' for more details." >&2;}
17558 { (exit 1); exit 1; }; }
17559else
17560 cat >conftest.$ac_ext <<_ACEOF
17561/* confdefs.h. */
17562_ACEOF
17563cat confdefs.h >>conftest.$ac_ext
17564cat >>conftest.$ac_ext <<_ACEOF
17565/* end confdefs.h. */
17566
17567#include <sys/stat.h>
17568#include <unistd.h>
17569int main(int argc, char*argv[])
17570{
17571 if(lchflags(argv[0], 0) != 0)
17572 return 1;
17573 return 0;
17574}
17575
17576_ACEOF
17577rm -f conftest$ac_exeext
17578if { (ac_try="$ac_link"
17579case "(($ac_try" in
17580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17581 *) ac_try_echo=$ac_try;;
17582esac
17583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17584 (eval "$ac_link") 2>&5
17585 ac_status=$?
17586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17587 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17588 { (case "(($ac_try" in
17589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17590 *) ac_try_echo=$ac_try;;
17591esac
17592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17593 (eval "$ac_try") 2>&5
17594 ac_status=$?
17595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17596 (exit $ac_status); }; }; then
17597
17598cat >>confdefs.h <<\_ACEOF
17599#define HAVE_LCHFLAGS 1
17600_ACEOF
17601
17602 { echo "$as_me:$LINENO: result: yes" >&5
17603echo "${ECHO_T}yes" >&6; }
17604else
17605 echo "$as_me: program exited with status $ac_status" >&5
17606echo "$as_me: failed program was:" >&5
17607sed 's/^/| /' conftest.$ac_ext >&5
17608
17609( exit $ac_status )
17610{ echo "$as_me:$LINENO: result: no" >&5
17611echo "${ECHO_T}no" >&6; }
17612
17613fi
17614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17615fi
17616
17617
17618
Ronald Oussorenf8752642006-07-06 10:13:35 +000017619case $ac_sys_system/$ac_sys_release in
17620Darwin/*)
17621 _CUR_CFLAGS="${CFLAGS}"
17622 _CUR_LDFLAGS="${LDFLAGS}"
17623 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17624 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17625 ;;
17626esac
17627
Martin v. Löwiseba40652007-08-30 20:10:57 +000017628{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17629echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017630if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17631 echo $ECHO_N "(cached) $ECHO_C" >&6
17632else
17633 ac_check_lib_save_LIBS=$LIBS
17634LIBS="-lz $LIBS"
17635cat >conftest.$ac_ext <<_ACEOF
17636/* confdefs.h. */
17637_ACEOF
17638cat confdefs.h >>conftest.$ac_ext
17639cat >>conftest.$ac_ext <<_ACEOF
17640/* end confdefs.h. */
17641
Martin v. Löwiseba40652007-08-30 20:10:57 +000017642/* Override any GCC internal prototype to avoid an error.
17643 Use char because int might match the return type of a GCC
17644 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017645#ifdef __cplusplus
17646extern "C"
17647#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017648char inflateCopy ();
17649int
17650main ()
17651{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017652return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017653 ;
17654 return 0;
17655}
17656_ACEOF
17657rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017658if { (ac_try="$ac_link"
17659case "(($ac_try" in
17660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17661 *) ac_try_echo=$ac_try;;
17662esac
17663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17664 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017665 ac_status=$?
17666 grep -v '^ *+' conftest.er1 >conftest.err
17667 rm -f conftest.er1
17668 cat conftest.err >&5
17669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017670 (exit $ac_status); } && {
17671 test -z "$ac_c_werror_flag" ||
17672 test ! -s conftest.err
17673 } && test -s conftest$ac_exeext &&
17674 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017675 ac_cv_lib_z_inflateCopy=yes
17676else
17677 echo "$as_me: failed program was:" >&5
17678sed 's/^/| /' conftest.$ac_ext >&5
17679
Martin v. Löwiseba40652007-08-30 20:10:57 +000017680 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017682
17683rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017684 conftest$ac_exeext conftest.$ac_ext
17685LIBS=$ac_check_lib_save_LIBS
17686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017687{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17688echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017689if test $ac_cv_lib_z_inflateCopy = yes; then
17690
17691cat >>confdefs.h <<\_ACEOF
17692#define HAVE_ZLIB_COPY 1
17693_ACEOF
17694
17695fi
17696
17697
Ronald Oussorenf8752642006-07-06 10:13:35 +000017698case $ac_sys_system/$ac_sys_release in
17699Darwin/*)
17700 CFLAGS="${_CUR_CFLAGS}"
17701 LDFLAGS="${_CUR_LDFLAGS}"
17702 ;;
17703esac
17704
Martin v. Löwiseba40652007-08-30 20:10:57 +000017705{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17706echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017707cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017708/* confdefs.h. */
17709_ACEOF
17710cat confdefs.h >>conftest.$ac_ext
17711cat >>conftest.$ac_ext <<_ACEOF
17712/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017713
17714#include "confdefs.h"
17715#include <netdb.h>
17716
Martin v. Löwise9416172003-05-03 10:12:45 +000017717int
17718main ()
17719{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017720void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017721 ;
17722 return 0;
17723}
17724_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017725rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017726if { (ac_try="$ac_link"
17727case "(($ac_try" in
17728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17729 *) ac_try_echo=$ac_try;;
17730esac
17731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17732 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017734 grep -v '^ *+' conftest.er1 >conftest.err
17735 rm -f conftest.er1
17736 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017738 (exit $ac_status); } && {
17739 test -z "$ac_c_werror_flag" ||
17740 test ! -s conftest.err
17741 } && test -s conftest$ac_exeext &&
17742 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017743
17744cat >>confdefs.h <<\_ACEOF
17745#define HAVE_HSTRERROR 1
17746_ACEOF
17747
Martin v. Löwiseba40652007-08-30 20:10:57 +000017748 { echo "$as_me:$LINENO: result: yes" >&5
17749echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017750else
17751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017752sed 's/^/| /' conftest.$ac_ext >&5
17753
Martin v. Löwiseba40652007-08-30 20:10:57 +000017754 { echo "$as_me:$LINENO: result: no" >&5
17755echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017756
17757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017758
17759rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017760 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017761
Martin v. Löwiseba40652007-08-30 20:10:57 +000017762{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17763echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017764cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017765/* confdefs.h. */
17766_ACEOF
17767cat confdefs.h >>conftest.$ac_ext
17768cat >>conftest.$ac_ext <<_ACEOF
17769/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017770
17771#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017772#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017773#include <sys/socket.h>
17774#include <netinet/in.h>
17775#include <arpa/inet.h>
17776
Martin v. Löwise9416172003-05-03 10:12:45 +000017777int
17778main ()
17779{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017780void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017781 ;
17782 return 0;
17783}
17784_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017785rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017786if { (ac_try="$ac_link"
17787case "(($ac_try" in
17788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17789 *) ac_try_echo=$ac_try;;
17790esac
17791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17792 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017794 grep -v '^ *+' conftest.er1 >conftest.err
17795 rm -f conftest.er1
17796 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017798 (exit $ac_status); } && {
17799 test -z "$ac_c_werror_flag" ||
17800 test ! -s conftest.err
17801 } && test -s conftest$ac_exeext &&
17802 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017803
17804cat >>confdefs.h <<\_ACEOF
17805#define HAVE_INET_ATON 1
17806_ACEOF
17807
Martin v. Löwiseba40652007-08-30 20:10:57 +000017808 { echo "$as_me:$LINENO: result: yes" >&5
17809echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017810else
17811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017812sed 's/^/| /' conftest.$ac_ext >&5
17813
Martin v. Löwiseba40652007-08-30 20:10:57 +000017814 { echo "$as_me:$LINENO: result: no" >&5
17815echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017816
17817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017818
17819rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017821
Martin v. Löwiseba40652007-08-30 20:10:57 +000017822{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17823echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017824cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017825/* confdefs.h. */
17826_ACEOF
17827cat confdefs.h >>conftest.$ac_ext
17828cat >>conftest.$ac_ext <<_ACEOF
17829/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017830
17831#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017832#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017833#include <sys/socket.h>
17834#include <netinet/in.h>
17835#include <arpa/inet.h>
17836
Martin v. Löwise9416172003-05-03 10:12:45 +000017837int
17838main ()
17839{
17840void* p = inet_pton
17841 ;
17842 return 0;
17843}
17844_ACEOF
17845rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017846if { (ac_try="$ac_compile"
17847case "(($ac_try" in
17848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17849 *) ac_try_echo=$ac_try;;
17850esac
17851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17852 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017854 grep -v '^ *+' conftest.er1 >conftest.err
17855 rm -f conftest.er1
17856 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017858 (exit $ac_status); } && {
17859 test -z "$ac_c_werror_flag" ||
17860 test ! -s conftest.err
17861 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017862
17863cat >>confdefs.h <<\_ACEOF
17864#define HAVE_INET_PTON 1
17865_ACEOF
17866
Martin v. Löwiseba40652007-08-30 20:10:57 +000017867 { echo "$as_me:$LINENO: result: yes" >&5
17868echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017869else
17870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017871sed 's/^/| /' conftest.$ac_ext >&5
17872
Martin v. Löwiseba40652007-08-30 20:10:57 +000017873 { echo "$as_me:$LINENO: result: no" >&5
17874echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017875
17876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017877
17878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017879
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017880# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017881{ echo "$as_me:$LINENO: checking for setgroups" >&5
17882echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017883cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017884/* confdefs.h. */
17885_ACEOF
17886cat confdefs.h >>conftest.$ac_ext
17887cat >>conftest.$ac_ext <<_ACEOF
17888/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017889
17890#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017891#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017892#ifdef HAVE_GRP_H
17893#include <grp.h>
17894#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017895
Martin v. Löwisd5843682002-11-21 20:41:28 +000017896int
17897main ()
17898{
17899void* p = setgroups
17900 ;
17901 return 0;
17902}
17903_ACEOF
17904rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017905if { (ac_try="$ac_compile"
17906case "(($ac_try" in
17907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17908 *) ac_try_echo=$ac_try;;
17909esac
17910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017913 grep -v '^ *+' conftest.er1 >conftest.err
17914 rm -f conftest.er1
17915 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017917 (exit $ac_status); } && {
17918 test -z "$ac_c_werror_flag" ||
17919 test ! -s conftest.err
17920 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017921
17922cat >>confdefs.h <<\_ACEOF
17923#define HAVE_SETGROUPS 1
17924_ACEOF
17925
Martin v. Löwiseba40652007-08-30 20:10:57 +000017926 { echo "$as_me:$LINENO: result: yes" >&5
17927echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017928else
17929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017930sed 's/^/| /' conftest.$ac_ext >&5
17931
Martin v. Löwiseba40652007-08-30 20:10:57 +000017932 { echo "$as_me:$LINENO: result: no" >&5
17933echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017934
17935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017936
17937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017938
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017939# check for openpty and forkpty
17940
Martin v. Löwis11437992002-04-12 09:54:03 +000017941
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017942for ac_func in openpty
17943do
Martin v. Löwis11437992002-04-12 09:54:03 +000017944as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017945{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17946echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17947if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017948 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017949else
Martin v. Löwis11437992002-04-12 09:54:03 +000017950 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017951/* confdefs.h. */
17952_ACEOF
17953cat confdefs.h >>conftest.$ac_ext
17954cat >>conftest.$ac_ext <<_ACEOF
17955/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017956/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17957 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17958#define $ac_func innocuous_$ac_func
17959
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017960/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017961 which can conflict with char $ac_func (); below.
17962 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017963 <limits.h> exists even on freestanding compilers. */
17964
17965#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017966# include <limits.h>
17967#else
17968# include <assert.h>
17969#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017970
17971#undef $ac_func
17972
Martin v. Löwiseba40652007-08-30 20:10:57 +000017973/* Override any GCC internal prototype to avoid an error.
17974 Use char because int might match the return type of a GCC
17975 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017976#ifdef __cplusplus
17977extern "C"
17978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017979char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017980/* The GNU C library defines this for functions which it implements
17981 to always fail with ENOSYS. Some functions are actually named
17982 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017983#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017984choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017985#endif
17986
Skip Montanaro6dead952003-09-25 14:50:04 +000017987int
17988main ()
17989{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017990return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017991 ;
17992 return 0;
17993}
17994_ACEOF
17995rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017996if { (ac_try="$ac_link"
17997case "(($ac_try" in
17998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17999 *) ac_try_echo=$ac_try;;
18000esac
18001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18002 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018004 grep -v '^ *+' conftest.er1 >conftest.err
18005 rm -f conftest.er1
18006 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018008 (exit $ac_status); } && {
18009 test -z "$ac_c_werror_flag" ||
18010 test ! -s conftest.err
18011 } && test -s conftest$ac_exeext &&
18012 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018013 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018014else
Martin v. Löwis11437992002-04-12 09:54:03 +000018015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018016sed 's/^/| /' conftest.$ac_ext >&5
18017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018018 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018020
18021rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018022 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018024ac_res=`eval echo '${'$as_ac_var'}'`
18025 { echo "$as_me:$LINENO: result: $ac_res" >&5
18026echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018027if test `eval echo '${'$as_ac_var'}'` = yes; then
18028 cat >>confdefs.h <<_ACEOF
18029#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18030_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018031
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018032else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018033 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18034echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018035if test "${ac_cv_lib_util_openpty+set}" = set; then
18036 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018037else
Martin v. Löwis11437992002-04-12 09:54:03 +000018038 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018039LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018040cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018041/* confdefs.h. */
18042_ACEOF
18043cat confdefs.h >>conftest.$ac_ext
18044cat >>conftest.$ac_ext <<_ACEOF
18045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018046
Martin v. Löwiseba40652007-08-30 20:10:57 +000018047/* Override any GCC internal prototype to avoid an error.
18048 Use char because int might match the return type of a GCC
18049 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018050#ifdef __cplusplus
18051extern "C"
18052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018053char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018054int
18055main ()
18056{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018057return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018058 ;
18059 return 0;
18060}
18061_ACEOF
18062rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018063if { (ac_try="$ac_link"
18064case "(($ac_try" in
18065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18066 *) ac_try_echo=$ac_try;;
18067esac
18068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18069 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018071 grep -v '^ *+' conftest.er1 >conftest.err
18072 rm -f conftest.er1
18073 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018075 (exit $ac_status); } && {
18076 test -z "$ac_c_werror_flag" ||
18077 test ! -s conftest.err
18078 } && test -s conftest$ac_exeext &&
18079 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018080 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018081else
Martin v. Löwis11437992002-04-12 09:54:03 +000018082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018083sed 's/^/| /' conftest.$ac_ext >&5
18084
Martin v. Löwiseba40652007-08-30 20:10:57 +000018085 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018087
18088rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018090LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018092{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18093echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018094if test $ac_cv_lib_util_openpty = yes; then
18095 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018096#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018097_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018098 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018099else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018100 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18101echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018102if test "${ac_cv_lib_bsd_openpty+set}" = set; then
18103 echo $ECHO_N "(cached) $ECHO_C" >&6
18104else
18105 ac_check_lib_save_LIBS=$LIBS
18106LIBS="-lbsd $LIBS"
18107cat >conftest.$ac_ext <<_ACEOF
18108/* confdefs.h. */
18109_ACEOF
18110cat confdefs.h >>conftest.$ac_ext
18111cat >>conftest.$ac_ext <<_ACEOF
18112/* end confdefs.h. */
18113
Martin v. Löwiseba40652007-08-30 20:10:57 +000018114/* Override any GCC internal prototype to avoid an error.
18115 Use char because int might match the return type of a GCC
18116 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018117#ifdef __cplusplus
18118extern "C"
18119#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018120char openpty ();
18121int
18122main ()
18123{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018124return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018125 ;
18126 return 0;
18127}
18128_ACEOF
18129rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018130if { (ac_try="$ac_link"
18131case "(($ac_try" in
18132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18133 *) ac_try_echo=$ac_try;;
18134esac
18135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18136 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018137 ac_status=$?
18138 grep -v '^ *+' conftest.er1 >conftest.err
18139 rm -f conftest.er1
18140 cat conftest.err >&5
18141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018142 (exit $ac_status); } && {
18143 test -z "$ac_c_werror_flag" ||
18144 test ! -s conftest.err
18145 } && test -s conftest$ac_exeext &&
18146 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018147 ac_cv_lib_bsd_openpty=yes
18148else
18149 echo "$as_me: failed program was:" >&5
18150sed 's/^/| /' conftest.$ac_ext >&5
18151
Martin v. Löwiseba40652007-08-30 20:10:57 +000018152 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018154
18155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018156 conftest$ac_exeext conftest.$ac_ext
18157LIBS=$ac_check_lib_save_LIBS
18158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018159{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18160echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018161if test $ac_cv_lib_bsd_openpty = yes; then
18162 cat >>confdefs.h <<\_ACEOF
18163#define HAVE_OPENPTY 1
18164_ACEOF
18165 LIBS="$LIBS -lbsd"
18166fi
18167
18168
18169fi
18170
Fred Drake8cef4cf2000-06-28 16:40:38 +000018171
18172fi
18173done
18174
Martin v. Löwis11437992002-04-12 09:54:03 +000018175
Fred Drake8cef4cf2000-06-28 16:40:38 +000018176for ac_func in forkpty
18177do
Martin v. Löwis11437992002-04-12 09:54:03 +000018178as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018179{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18180echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18181if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018182 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018183else
Martin v. Löwis11437992002-04-12 09:54:03 +000018184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018185/* confdefs.h. */
18186_ACEOF
18187cat confdefs.h >>conftest.$ac_ext
18188cat >>conftest.$ac_ext <<_ACEOF
18189/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018190/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18191 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18192#define $ac_func innocuous_$ac_func
18193
Fred Drake8cef4cf2000-06-28 16:40:38 +000018194/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018195 which can conflict with char $ac_func (); below.
18196 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018197 <limits.h> exists even on freestanding compilers. */
18198
18199#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018200# include <limits.h>
18201#else
18202# include <assert.h>
18203#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018204
18205#undef $ac_func
18206
Martin v. Löwiseba40652007-08-30 20:10:57 +000018207/* Override any GCC internal prototype to avoid an error.
18208 Use char because int might match the return type of a GCC
18209 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018210#ifdef __cplusplus
18211extern "C"
18212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018213char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018214/* The GNU C library defines this for functions which it implements
18215 to always fail with ENOSYS. Some functions are actually named
18216 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018217#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018218choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018219#endif
18220
Skip Montanaro6dead952003-09-25 14:50:04 +000018221int
18222main ()
18223{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018224return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018225 ;
18226 return 0;
18227}
18228_ACEOF
18229rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018230if { (ac_try="$ac_link"
18231case "(($ac_try" in
18232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18233 *) ac_try_echo=$ac_try;;
18234esac
18235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18236 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018238 grep -v '^ *+' conftest.er1 >conftest.err
18239 rm -f conftest.er1
18240 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018242 (exit $ac_status); } && {
18243 test -z "$ac_c_werror_flag" ||
18244 test ! -s conftest.err
18245 } && test -s conftest$ac_exeext &&
18246 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018247 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018248else
Martin v. Löwis11437992002-04-12 09:54:03 +000018249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018250sed 's/^/| /' conftest.$ac_ext >&5
18251
Martin v. Löwiseba40652007-08-30 20:10:57 +000018252 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018254
18255rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018256 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018258ac_res=`eval echo '${'$as_ac_var'}'`
18259 { echo "$as_me:$LINENO: result: $ac_res" >&5
18260echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018261if test `eval echo '${'$as_ac_var'}'` = yes; then
18262 cat >>confdefs.h <<_ACEOF
18263#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18264_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018265
Fred Drake8cef4cf2000-06-28 16:40:38 +000018266else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018267 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18268echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018269if test "${ac_cv_lib_util_forkpty+set}" = set; then
18270 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018271else
Martin v. Löwis11437992002-04-12 09:54:03 +000018272 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018273LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018274cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018275/* confdefs.h. */
18276_ACEOF
18277cat confdefs.h >>conftest.$ac_ext
18278cat >>conftest.$ac_ext <<_ACEOF
18279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018280
Martin v. Löwiseba40652007-08-30 20:10:57 +000018281/* Override any GCC internal prototype to avoid an error.
18282 Use char because int might match the return type of a GCC
18283 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018284#ifdef __cplusplus
18285extern "C"
18286#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018287char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018288int
18289main ()
18290{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018291return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018292 ;
18293 return 0;
18294}
18295_ACEOF
18296rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018297if { (ac_try="$ac_link"
18298case "(($ac_try" in
18299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18300 *) ac_try_echo=$ac_try;;
18301esac
18302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18303 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018305 grep -v '^ *+' conftest.er1 >conftest.err
18306 rm -f conftest.er1
18307 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018309 (exit $ac_status); } && {
18310 test -z "$ac_c_werror_flag" ||
18311 test ! -s conftest.err
18312 } && test -s conftest$ac_exeext &&
18313 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018314 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018315else
Martin v. Löwis11437992002-04-12 09:54:03 +000018316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018317sed 's/^/| /' conftest.$ac_ext >&5
18318
Martin v. Löwiseba40652007-08-30 20:10:57 +000018319 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018321
18322rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018324LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018326{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18327echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018328if test $ac_cv_lib_util_forkpty = yes; then
18329 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018330#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018331_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018332 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018333else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018334 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18335echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018336if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
18337 echo $ECHO_N "(cached) $ECHO_C" >&6
18338else
18339 ac_check_lib_save_LIBS=$LIBS
18340LIBS="-lbsd $LIBS"
18341cat >conftest.$ac_ext <<_ACEOF
18342/* confdefs.h. */
18343_ACEOF
18344cat confdefs.h >>conftest.$ac_ext
18345cat >>conftest.$ac_ext <<_ACEOF
18346/* end confdefs.h. */
18347
Martin v. Löwiseba40652007-08-30 20:10:57 +000018348/* Override any GCC internal prototype to avoid an error.
18349 Use char because int might match the return type of a GCC
18350 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018351#ifdef __cplusplus
18352extern "C"
18353#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018354char forkpty ();
18355int
18356main ()
18357{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018358return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018359 ;
18360 return 0;
18361}
18362_ACEOF
18363rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018364if { (ac_try="$ac_link"
18365case "(($ac_try" in
18366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18367 *) ac_try_echo=$ac_try;;
18368esac
18369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18370 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018371 ac_status=$?
18372 grep -v '^ *+' conftest.er1 >conftest.err
18373 rm -f conftest.er1
18374 cat conftest.err >&5
18375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018376 (exit $ac_status); } && {
18377 test -z "$ac_c_werror_flag" ||
18378 test ! -s conftest.err
18379 } && test -s conftest$ac_exeext &&
18380 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018381 ac_cv_lib_bsd_forkpty=yes
18382else
18383 echo "$as_me: failed program was:" >&5
18384sed 's/^/| /' conftest.$ac_ext >&5
18385
Martin v. Löwiseba40652007-08-30 20:10:57 +000018386 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018388
18389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018390 conftest$ac_exeext conftest.$ac_ext
18391LIBS=$ac_check_lib_save_LIBS
18392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018393{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18394echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018395if test $ac_cv_lib_bsd_forkpty = yes; then
18396 cat >>confdefs.h <<\_ACEOF
18397#define HAVE_FORKPTY 1
18398_ACEOF
18399 LIBS="$LIBS -lbsd"
18400fi
18401
18402
18403fi
18404
Fred Drake8cef4cf2000-06-28 16:40:38 +000018405
18406fi
18407done
18408
Jack Jansendd19cf82001-12-06 22:36:17 +000018409
Brett Cannonaa5778d2008-03-18 04:09:00 +000018410# Stuff for expat.
18411
18412for ac_func in memmove
18413do
18414as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18415{ 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
18418 echo $ECHO_N "(cached) $ECHO_C" >&6
18419else
18420 cat >conftest.$ac_ext <<_ACEOF
18421/* confdefs.h. */
18422_ACEOF
18423cat confdefs.h >>conftest.$ac_ext
18424cat >>conftest.$ac_ext <<_ACEOF
18425/* end confdefs.h. */
18426/* 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
18430/* System header to define __stub macros and hopefully few prototypes,
18431 which can conflict with char $ac_func (); below.
18432 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18433 <limits.h> exists even on freestanding compilers. */
18434
18435#ifdef __STDC__
18436# include <limits.h>
18437#else
18438# include <assert.h>
18439#endif
18440
18441#undef $ac_func
18442
18443/* 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. */
18446#ifdef __cplusplus
18447extern "C"
18448#endif
18449char $ac_func ();
18450/* 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. */
18453#if defined __stub_$ac_func || defined __stub___$ac_func
18454choke me
18455#endif
18456
18457int
18458main ()
18459{
18460return $ac_func ();
18461 ;
18462 return 0;
18463}
18464_ACEOF
18465rm -f conftest.$ac_objext conftest$ac_exeext
18466if { (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
18473 ac_status=$?
18474 grep -v '^ *+' conftest.er1 >conftest.err
18475 rm -f conftest.er1
18476 cat conftest.err >&5
18477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18478 (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
18483 eval "$as_ac_var=yes"
18484else
18485 echo "$as_me: failed program was:" >&5
18486sed 's/^/| /' conftest.$ac_ext >&5
18487
18488 eval "$as_ac_var=no"
18489fi
18490
18491rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18492 conftest$ac_exeext conftest.$ac_ext
18493fi
18494ac_res=`eval echo '${'$as_ac_var'}'`
18495 { echo "$as_me:$LINENO: result: $ac_res" >&5
18496echo "${ECHO_T}$ac_res" >&6; }
18497if 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
18502fi
18503done
18504
18505
Michael W. Hudson54241132001-12-07 15:38:26 +000018506# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018507
18508
18509
18510
18511
18512
Fred Drake8cef4cf2000-06-28 16:40:38 +000018513for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18514do
Martin v. Löwis11437992002-04-12 09:54:03 +000018515as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018516{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18517echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18518if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018519 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018520else
Martin v. Löwis11437992002-04-12 09:54:03 +000018521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018522/* confdefs.h. */
18523_ACEOF
18524cat confdefs.h >>conftest.$ac_ext
18525cat >>conftest.$ac_ext <<_ACEOF
18526/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018527/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18528 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18529#define $ac_func innocuous_$ac_func
18530
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018531/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018532 which can conflict with char $ac_func (); below.
18533 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018534 <limits.h> exists even on freestanding compilers. */
18535
18536#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018537# include <limits.h>
18538#else
18539# include <assert.h>
18540#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018541
18542#undef $ac_func
18543
Martin v. Löwiseba40652007-08-30 20:10:57 +000018544/* Override any GCC internal prototype to avoid an error.
18545 Use char because int might match the return type of a GCC
18546 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018547#ifdef __cplusplus
18548extern "C"
18549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018550char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018551/* The GNU C library defines this for functions which it implements
18552 to always fail with ENOSYS. Some functions are actually named
18553 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018554#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018555choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018556#endif
18557
Skip Montanaro6dead952003-09-25 14:50:04 +000018558int
18559main ()
18560{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018561return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018562 ;
18563 return 0;
18564}
18565_ACEOF
18566rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018567if { (ac_try="$ac_link"
18568case "(($ac_try" in
18569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18570 *) ac_try_echo=$ac_try;;
18571esac
18572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18573 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018575 grep -v '^ *+' conftest.er1 >conftest.err
18576 rm -f conftest.er1
18577 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018579 (exit $ac_status); } && {
18580 test -z "$ac_c_werror_flag" ||
18581 test ! -s conftest.err
18582 } && test -s conftest$ac_exeext &&
18583 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018584 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018585else
Martin v. Löwis11437992002-04-12 09:54:03 +000018586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018587sed 's/^/| /' conftest.$ac_ext >&5
18588
Martin v. Löwiseba40652007-08-30 20:10:57 +000018589 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018590fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018591
18592rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018593 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018595ac_res=`eval echo '${'$as_ac_var'}'`
18596 { echo "$as_me:$LINENO: result: $ac_res" >&5
18597echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018598if test `eval echo '${'$as_ac_var'}'` = yes; then
18599 cat >>confdefs.h <<_ACEOF
18600#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18601_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018602
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018603fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018604done
18605
Michael W. Hudson54241132001-12-07 15:38:26 +000018606
Martin v. Löwis11437992002-04-12 09:54:03 +000018607
18608
18609
Brett Cannonaa5778d2008-03-18 04:09:00 +000018610for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018611do
Martin v. Löwis11437992002-04-12 09:54:03 +000018612as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018613{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18614echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18615if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018616 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018617else
Martin v. Löwis11437992002-04-12 09:54:03 +000018618 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018619/* confdefs.h. */
18620_ACEOF
18621cat confdefs.h >>conftest.$ac_ext
18622cat >>conftest.$ac_ext <<_ACEOF
18623/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018624/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18625 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18626#define $ac_func innocuous_$ac_func
18627
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018628/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018629 which can conflict with char $ac_func (); below.
18630 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018631 <limits.h> exists even on freestanding compilers. */
18632
18633#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018634# include <limits.h>
18635#else
18636# include <assert.h>
18637#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018638
18639#undef $ac_func
18640
Martin v. Löwiseba40652007-08-30 20:10:57 +000018641/* Override any GCC internal prototype to avoid an error.
18642 Use char because int might match the return type of a GCC
18643 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018644#ifdef __cplusplus
18645extern "C"
18646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018647char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018648/* The GNU C library defines this for functions which it implements
18649 to always fail with ENOSYS. Some functions are actually named
18650 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018651#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018652choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018653#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018654
Skip Montanaro6dead952003-09-25 14:50:04 +000018655int
18656main ()
18657{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018658return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018659 ;
18660 return 0;
18661}
18662_ACEOF
18663rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018664if { (ac_try="$ac_link"
18665case "(($ac_try" in
18666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18667 *) ac_try_echo=$ac_try;;
18668esac
18669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18670 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018672 grep -v '^ *+' conftest.er1 >conftest.err
18673 rm -f conftest.er1
18674 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018676 (exit $ac_status); } && {
18677 test -z "$ac_c_werror_flag" ||
18678 test ! -s conftest.err
18679 } && test -s conftest$ac_exeext &&
18680 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018681 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018682else
Martin v. Löwis11437992002-04-12 09:54:03 +000018683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018684sed 's/^/| /' conftest.$ac_ext >&5
18685
Martin v. Löwiseba40652007-08-30 20:10:57 +000018686 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018688
18689rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018692ac_res=`eval echo '${'$as_ac_var'}'`
18693 { echo "$as_me:$LINENO: result: $ac_res" >&5
18694echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018695if test `eval echo '${'$as_ac_var'}'` = yes; then
18696 cat >>confdefs.h <<_ACEOF
18697#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18698_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018699
Martin v. Löwis1142de32002-03-29 16:28:31 +000018700else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018701 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018702 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018703 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18704 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018705esac
18706
Martin v. Löwis1142de32002-03-29 16:28:31 +000018707fi
18708done
18709
18710
Martin v. Löwis11437992002-04-12 09:54:03 +000018711
Martin v. Löwis1142de32002-03-29 16:28:31 +000018712for ac_func in getpgrp
18713do
Martin v. Löwis11437992002-04-12 09:54:03 +000018714as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018715{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18716echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18717if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018718 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018719else
Martin v. Löwis11437992002-04-12 09:54:03 +000018720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018721/* confdefs.h. */
18722_ACEOF
18723cat confdefs.h >>conftest.$ac_ext
18724cat >>conftest.$ac_ext <<_ACEOF
18725/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018726/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18727 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18728#define $ac_func innocuous_$ac_func
18729
Martin v. Löwis1142de32002-03-29 16:28:31 +000018730/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018731 which can conflict with char $ac_func (); below.
18732 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018733 <limits.h> exists even on freestanding compilers. */
18734
18735#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018736# include <limits.h>
18737#else
18738# include <assert.h>
18739#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018740
18741#undef $ac_func
18742
Martin v. Löwiseba40652007-08-30 20:10:57 +000018743/* Override any GCC internal prototype to avoid an error.
18744 Use char because int might match the return type of a GCC
18745 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018746#ifdef __cplusplus
18747extern "C"
18748#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018749char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018750/* The GNU C library defines this for functions which it implements
18751 to always fail with ENOSYS. Some functions are actually named
18752 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018753#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018754choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018755#endif
18756
Skip Montanaro6dead952003-09-25 14:50:04 +000018757int
18758main ()
18759{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018760return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018761 ;
18762 return 0;
18763}
18764_ACEOF
18765rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018766if { (ac_try="$ac_link"
18767case "(($ac_try" in
18768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18769 *) ac_try_echo=$ac_try;;
18770esac
18771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18772 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018774 grep -v '^ *+' conftest.er1 >conftest.err
18775 rm -f conftest.er1
18776 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018778 (exit $ac_status); } && {
18779 test -z "$ac_c_werror_flag" ||
18780 test ! -s conftest.err
18781 } && test -s conftest$ac_exeext &&
18782 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018783 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018784else
Martin v. Löwis11437992002-04-12 09:54:03 +000018785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018786sed 's/^/| /' conftest.$ac_ext >&5
18787
Martin v. Löwiseba40652007-08-30 20:10:57 +000018788 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018790
18791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018792 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018794ac_res=`eval echo '${'$as_ac_var'}'`
18795 { echo "$as_me:$LINENO: result: $ac_res" >&5
18796echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018797if test `eval echo '${'$as_ac_var'}'` = yes; then
18798 cat >>confdefs.h <<_ACEOF
18799#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18800_ACEOF
18801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018802/* confdefs.h. */
18803_ACEOF
18804cat confdefs.h >>conftest.$ac_ext
18805cat >>conftest.$ac_ext <<_ACEOF
18806/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018807#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018808int
18809main ()
18810{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018811getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018812 ;
18813 return 0;
18814}
18815_ACEOF
18816rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018817if { (ac_try="$ac_compile"
18818case "(($ac_try" in
18819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18820 *) ac_try_echo=$ac_try;;
18821esac
18822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18823 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018825 grep -v '^ *+' conftest.er1 >conftest.err
18826 rm -f conftest.er1
18827 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018829 (exit $ac_status); } && {
18830 test -z "$ac_c_werror_flag" ||
18831 test ! -s conftest.err
18832 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018833
18834cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018835#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018836_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018837
Martin v. Löwis11437992002-04-12 09:54:03 +000018838
Guido van Rossumf78abae1997-01-21 22:02:36 +000018839else
Martin v. Löwis11437992002-04-12 09:54:03 +000018840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018841sed 's/^/| /' conftest.$ac_ext >&5
18842
Martin v. Löwiseba40652007-08-30 20:10:57 +000018843
Guido van Rossum627b2d71993-12-24 10:39:16 +000018844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018845
18846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018847
Guido van Rossum627b2d71993-12-24 10:39:16 +000018848fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018849done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018850
Jack Jansen150753c2003-03-29 22:07:47 +000018851
18852for ac_func in setpgrp
18853do
18854as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018855{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18856echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18857if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018858 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018859else
Martin v. Löwis11437992002-04-12 09:54:03 +000018860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018861/* confdefs.h. */
18862_ACEOF
18863cat confdefs.h >>conftest.$ac_ext
18864cat >>conftest.$ac_ext <<_ACEOF
18865/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018866/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18867 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18868#define $ac_func innocuous_$ac_func
18869
Jack Jansen150753c2003-03-29 22:07:47 +000018870/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018871 which can conflict with char $ac_func (); below.
18872 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018873 <limits.h> exists even on freestanding compilers. */
18874
18875#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018876# include <limits.h>
18877#else
18878# include <assert.h>
18879#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018880
18881#undef $ac_func
18882
Martin v. Löwiseba40652007-08-30 20:10:57 +000018883/* Override any GCC internal prototype to avoid an error.
18884 Use char because int might match the return type of a GCC
18885 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018886#ifdef __cplusplus
18887extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018888#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018889char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018890/* The GNU C library defines this for functions which it implements
18891 to always fail with ENOSYS. Some functions are actually named
18892 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018893#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018894choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018895#endif
18896
Skip Montanaro6dead952003-09-25 14:50:04 +000018897int
18898main ()
18899{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018900return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018901 ;
18902 return 0;
18903}
18904_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018905rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018906if { (ac_try="$ac_link"
18907case "(($ac_try" in
18908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18909 *) ac_try_echo=$ac_try;;
18910esac
18911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18912 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018914 grep -v '^ *+' conftest.er1 >conftest.err
18915 rm -f conftest.er1
18916 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018918 (exit $ac_status); } && {
18919 test -z "$ac_c_werror_flag" ||
18920 test ! -s conftest.err
18921 } && test -s conftest$ac_exeext &&
18922 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018923 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018924else
Jack Jansen150753c2003-03-29 22:07:47 +000018925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018926sed 's/^/| /' conftest.$ac_ext >&5
18927
Martin v. Löwiseba40652007-08-30 20:10:57 +000018928 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018930
18931rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018932 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018934ac_res=`eval echo '${'$as_ac_var'}'`
18935 { echo "$as_me:$LINENO: result: $ac_res" >&5
18936echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018937if test `eval echo '${'$as_ac_var'}'` = yes; then
18938 cat >>confdefs.h <<_ACEOF
18939#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18940_ACEOF
18941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018942/* confdefs.h. */
18943_ACEOF
18944cat confdefs.h >>conftest.$ac_ext
18945cat >>conftest.$ac_ext <<_ACEOF
18946/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018947#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018948int
18949main ()
18950{
18951setpgrp(0,0);
18952 ;
18953 return 0;
18954}
18955_ACEOF
18956rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018957if { (ac_try="$ac_compile"
18958case "(($ac_try" in
18959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18960 *) ac_try_echo=$ac_try;;
18961esac
18962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18963 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018965 grep -v '^ *+' conftest.er1 >conftest.err
18966 rm -f conftest.er1
18967 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018969 (exit $ac_status); } && {
18970 test -z "$ac_c_werror_flag" ||
18971 test ! -s conftest.err
18972 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018973
18974cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018975#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018976_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018977
Jack Jansen150753c2003-03-29 22:07:47 +000018978
18979else
18980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018981sed 's/^/| /' conftest.$ac_ext >&5
18982
Martin v. Löwiseba40652007-08-30 20:10:57 +000018983
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018985
18986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018987
18988fi
18989done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018990
Martin v. Löwis11437992002-04-12 09:54:03 +000018991
Thomas Wouters3a584202000-08-05 23:28:51 +000018992for ac_func in gettimeofday
18993do
Martin v. Löwis11437992002-04-12 09:54:03 +000018994as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018995{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18996echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18997if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018998 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018999else
Martin v. Löwis11437992002-04-12 09:54:03 +000019000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019001/* confdefs.h. */
19002_ACEOF
19003cat confdefs.h >>conftest.$ac_ext
19004cat >>conftest.$ac_ext <<_ACEOF
19005/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019006/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19007 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19008#define $ac_func innocuous_$ac_func
19009
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019010/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019011 which can conflict with char $ac_func (); below.
19012 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019013 <limits.h> exists even on freestanding compilers. */
19014
19015#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019016# include <limits.h>
19017#else
19018# include <assert.h>
19019#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019020
19021#undef $ac_func
19022
Martin v. Löwiseba40652007-08-30 20:10:57 +000019023/* Override any GCC internal prototype to avoid an error.
19024 Use char because int might match the return type of a GCC
19025 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019026#ifdef __cplusplus
19027extern "C"
19028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019029char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019030/* The GNU C library defines this for functions which it implements
19031 to always fail with ENOSYS. Some functions are actually named
19032 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019033#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019034choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019035#endif
19036
Skip Montanaro6dead952003-09-25 14:50:04 +000019037int
19038main ()
19039{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019040return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019041 ;
19042 return 0;
19043}
19044_ACEOF
19045rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019046if { (ac_try="$ac_link"
19047case "(($ac_try" in
19048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19049 *) ac_try_echo=$ac_try;;
19050esac
19051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019054 grep -v '^ *+' conftest.er1 >conftest.err
19055 rm -f conftest.er1
19056 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019058 (exit $ac_status); } && {
19059 test -z "$ac_c_werror_flag" ||
19060 test ! -s conftest.err
19061 } && test -s conftest$ac_exeext &&
19062 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019063 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019064else
Martin v. Löwis11437992002-04-12 09:54:03 +000019065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019066sed 's/^/| /' conftest.$ac_ext >&5
19067
Martin v. Löwiseba40652007-08-30 20:10:57 +000019068 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019070
19071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019072 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019074ac_res=`eval echo '${'$as_ac_var'}'`
19075 { echo "$as_me:$LINENO: result: $ac_res" >&5
19076echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019077if test `eval echo '${'$as_ac_var'}'` = yes; then
19078 cat >>confdefs.h <<_ACEOF
19079#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19080_ACEOF
19081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019082/* confdefs.h. */
19083_ACEOF
19084cat confdefs.h >>conftest.$ac_ext
19085cat >>conftest.$ac_ext <<_ACEOF
19086/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019087#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019088int
19089main ()
19090{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019091gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019092 ;
19093 return 0;
19094}
19095_ACEOF
19096rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019097if { (ac_try="$ac_compile"
19098case "(($ac_try" in
19099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19100 *) ac_try_echo=$ac_try;;
19101esac
19102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019105 grep -v '^ *+' conftest.er1 >conftest.err
19106 rm -f conftest.er1
19107 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019109 (exit $ac_status); } && {
19110 test -z "$ac_c_werror_flag" ||
19111 test ! -s conftest.err
19112 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019113 :
19114else
Martin v. Löwis11437992002-04-12 09:54:03 +000019115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019116sed 's/^/| /' conftest.$ac_ext >&5
19117
Martin v. Löwis11437992002-04-12 09:54:03 +000019118
19119cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019120#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019121_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019122
Martin v. Löwis11437992002-04-12 09:54:03 +000019123
Guido van Rossum627b2d71993-12-24 10:39:16 +000019124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019125
19126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019127
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019128fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019129done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019130
Michael W. Hudson54241132001-12-07 15:38:26 +000019131
Martin v. Löwiseba40652007-08-30 20:10:57 +000019132{ echo "$as_me:$LINENO: checking for major" >&5
19133echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019135/* confdefs.h. */
19136_ACEOF
19137cat confdefs.h >>conftest.$ac_ext
19138cat >>conftest.$ac_ext <<_ACEOF
19139/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019140
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019141#if defined(MAJOR_IN_MKDEV)
19142#include <sys/mkdev.h>
19143#elif defined(MAJOR_IN_SYSMACROS)
19144#include <sys/sysmacros.h>
19145#else
19146#include <sys/types.h>
19147#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019148
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019149int
19150main ()
19151{
19152
19153 makedev(major(0),minor(0));
19154
19155 ;
19156 return 0;
19157}
19158_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019159rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019160if { (ac_try="$ac_link"
19161case "(($ac_try" in
19162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19163 *) ac_try_echo=$ac_try;;
19164esac
19165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19166 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019168 grep -v '^ *+' conftest.er1 >conftest.err
19169 rm -f conftest.er1
19170 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019172 (exit $ac_status); } && {
19173 test -z "$ac_c_werror_flag" ||
19174 test ! -s conftest.err
19175 } && test -s conftest$ac_exeext &&
19176 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019177
19178
19179cat >>confdefs.h <<\_ACEOF
19180#define HAVE_DEVICE_MACROS 1
19181_ACEOF
19182
Martin v. Löwiseba40652007-08-30 20:10:57 +000019183 { echo "$as_me:$LINENO: result: yes" >&5
19184echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019185
19186else
19187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019188sed 's/^/| /' conftest.$ac_ext >&5
19189
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019190
Martin v. Löwiseba40652007-08-30 20:10:57 +000019191 { echo "$as_me:$LINENO: result: no" >&5
19192echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019193
19194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019195
19196rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019197 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019198
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019199# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019200# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000019201{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19202echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019203cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019204/* confdefs.h. */
19205_ACEOF
19206cat confdefs.h >>conftest.$ac_ext
19207cat >>conftest.$ac_ext <<_ACEOF
19208/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019209
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019210#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019211#include <sys/socket.h>
19212#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019213#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019214
Martin v. Löwis11437992002-04-12 09:54:03 +000019215int
19216main ()
19217{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019218
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019219getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019220
Martin v. Löwis11437992002-04-12 09:54:03 +000019221 ;
19222 return 0;
19223}
19224_ACEOF
19225rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019226if { (ac_try="$ac_link"
19227case "(($ac_try" in
19228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19229 *) ac_try_echo=$ac_try;;
19230esac
19231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19232 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019234 grep -v '^ *+' conftest.er1 >conftest.err
19235 rm -f conftest.er1
19236 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019238 (exit $ac_status); } && {
19239 test -z "$ac_c_werror_flag" ||
19240 test ! -s conftest.err
19241 } && test -s conftest$ac_exeext &&
19242 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019243
Martin v. Löwiseba40652007-08-30 20:10:57 +000019244{ echo "$as_me:$LINENO: result: yes" >&5
19245echo "${ECHO_T}yes" >&6; }
19246{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19247echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019248if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019249 { echo "$as_me:$LINENO: result: buggy" >&5
19250echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019251buggygetaddrinfo=yes
19252else
Martin v. Löwis11437992002-04-12 09:54:03 +000019253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019254/* confdefs.h. */
19255_ACEOF
19256cat confdefs.h >>conftest.$ac_ext
19257cat >>conftest.$ac_ext <<_ACEOF
19258/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019259
19260#include <sys/types.h>
19261#include <netdb.h>
19262#include <string.h>
19263#include <sys/socket.h>
19264#include <netinet/in.h>
19265
19266main()
19267{
19268 int passive, gaierr, inet4 = 0, inet6 = 0;
19269 struct addrinfo hints, *ai, *aitop;
19270 char straddr[INET6_ADDRSTRLEN], strport[16];
19271
19272 for (passive = 0; passive <= 1; passive++) {
19273 memset(&hints, 0, sizeof(hints));
19274 hints.ai_family = AF_UNSPEC;
19275 hints.ai_flags = passive ? AI_PASSIVE : 0;
19276 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019277 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019278 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19279 (void)gai_strerror(gaierr);
19280 goto bad;
19281 }
19282 for (ai = aitop; ai; ai = ai->ai_next) {
19283 if (ai->ai_addr == NULL ||
19284 ai->ai_addrlen == 0 ||
19285 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19286 straddr, sizeof(straddr), strport, sizeof(strport),
19287 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19288 goto bad;
19289 }
19290 switch (ai->ai_family) {
19291 case AF_INET:
19292 if (strcmp(strport, "54321") != 0) {
19293 goto bad;
19294 }
19295 if (passive) {
19296 if (strcmp(straddr, "0.0.0.0") != 0) {
19297 goto bad;
19298 }
19299 } else {
19300 if (strcmp(straddr, "127.0.0.1") != 0) {
19301 goto bad;
19302 }
19303 }
19304 inet4++;
19305 break;
19306 case AF_INET6:
19307 if (strcmp(strport, "54321") != 0) {
19308 goto bad;
19309 }
19310 if (passive) {
19311 if (strcmp(straddr, "::") != 0) {
19312 goto bad;
19313 }
19314 } else {
19315 if (strcmp(straddr, "::1") != 0) {
19316 goto bad;
19317 }
19318 }
19319 inet6++;
19320 break;
19321 case AF_UNSPEC:
19322 goto bad;
19323 break;
19324 default:
19325 /* another family support? */
19326 break;
19327 }
19328 }
19329 }
19330
19331 if (!(inet4 == 0 || inet4 == 2))
19332 goto bad;
19333 if (!(inet6 == 0 || inet6 == 2))
19334 goto bad;
19335
19336 if (aitop)
19337 freeaddrinfo(aitop);
19338 exit(0);
19339
19340 bad:
19341 if (aitop)
19342 freeaddrinfo(aitop);
19343 exit(1);
19344}
19345
Martin v. Löwis11437992002-04-12 09:54:03 +000019346_ACEOF
19347rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019348if { (ac_try="$ac_link"
19349case "(($ac_try" in
19350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19351 *) ac_try_echo=$ac_try;;
19352esac
19353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19354 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019355 ac_status=$?
19356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19357 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000019358 { (case "(($ac_try" in
19359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19360 *) ac_try_echo=$ac_try;;
19361esac
19362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19363 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019364 ac_status=$?
19365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19366 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019367 { echo "$as_me:$LINENO: result: good" >&5
19368echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019369buggygetaddrinfo=no
19370else
Martin v. Löwis11437992002-04-12 09:54:03 +000019371 echo "$as_me: program exited with status $ac_status" >&5
19372echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019373sed 's/^/| /' conftest.$ac_ext >&5
19374
Martin v. Löwis11437992002-04-12 09:54:03 +000019375( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000019376{ echo "$as_me:$LINENO: result: buggy" >&5
19377echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019378buggygetaddrinfo=yes
19379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019380rm -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 +000019381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019382
19383
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019384else
Martin v. Löwis11437992002-04-12 09:54:03 +000019385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019386sed 's/^/| /' conftest.$ac_ext >&5
19387
Martin v. Löwis11437992002-04-12 09:54:03 +000019388
Martin v. Löwiseba40652007-08-30 20:10:57 +000019389{ echo "$as_me:$LINENO: result: no" >&5
19390echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019391buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019392
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019394
19395rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019396 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019397
19398if test "$buggygetaddrinfo" = "yes"; then
19399 if test "$ipv6" = "yes"; then
19400 echo 'Fatal: You must get working getaddrinfo() function.'
19401 echo ' or you can specify "--disable-ipv6"'.
19402 exit 1
19403 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019404else
Martin v. Löwis11437992002-04-12 09:54:03 +000019405
19406cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019407#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019408_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019409
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019410fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019411
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019412for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019413do
Martin v. Löwis11437992002-04-12 09:54:03 +000019414as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000019415{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19416echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19417if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019419else
Martin v. Löwis11437992002-04-12 09:54:03 +000019420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019421/* confdefs.h. */
19422_ACEOF
19423cat confdefs.h >>conftest.$ac_ext
19424cat >>conftest.$ac_ext <<_ACEOF
19425/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019426/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19427 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19428#define $ac_func innocuous_$ac_func
19429
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019430/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019431 which can conflict with char $ac_func (); below.
19432 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019433 <limits.h> exists even on freestanding compilers. */
19434
19435#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019436# include <limits.h>
19437#else
19438# include <assert.h>
19439#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019440
19441#undef $ac_func
19442
Martin v. Löwiseba40652007-08-30 20:10:57 +000019443/* Override any GCC internal prototype to avoid an error.
19444 Use char because int might match the return type of a GCC
19445 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019446#ifdef __cplusplus
19447extern "C"
19448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019449char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019450/* The GNU C library defines this for functions which it implements
19451 to always fail with ENOSYS. Some functions are actually named
19452 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019453#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019454choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019455#endif
19456
Skip Montanaro6dead952003-09-25 14:50:04 +000019457int
19458main ()
19459{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019460return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019461 ;
19462 return 0;
19463}
19464_ACEOF
19465rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019466if { (ac_try="$ac_link"
19467case "(($ac_try" in
19468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19469 *) ac_try_echo=$ac_try;;
19470esac
19471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19472 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019474 grep -v '^ *+' conftest.er1 >conftest.err
19475 rm -f conftest.er1
19476 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019478 (exit $ac_status); } && {
19479 test -z "$ac_c_werror_flag" ||
19480 test ! -s conftest.err
19481 } && test -s conftest$ac_exeext &&
19482 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019483 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019484else
Martin v. Löwis11437992002-04-12 09:54:03 +000019485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019486sed 's/^/| /' conftest.$ac_ext >&5
19487
Martin v. Löwiseba40652007-08-30 20:10:57 +000019488 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019490
19491rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019492 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019494ac_res=`eval echo '${'$as_ac_var'}'`
19495 { echo "$as_me:$LINENO: result: $ac_res" >&5
19496echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019497if test `eval echo '${'$as_ac_var'}'` = yes; then
19498 cat >>confdefs.h <<_ACEOF
19499#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19500_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019501
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019502fi
19503done
19504
Michael W. Hudson54241132001-12-07 15:38:26 +000019505
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019506# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019507{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19508echo $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 +000019509if test "${ac_cv_header_time+set}" = set; then
19510 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019511else
Martin v. Löwis11437992002-04-12 09:54:03 +000019512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019513/* confdefs.h. */
19514_ACEOF
19515cat confdefs.h >>conftest.$ac_ext
19516cat >>conftest.$ac_ext <<_ACEOF
19517/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019518#include <sys/types.h>
19519#include <sys/time.h>
19520#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019521
Martin v. Löwis11437992002-04-12 09:54:03 +000019522int
19523main ()
19524{
19525if ((struct tm *) 0)
19526return 0;
19527 ;
19528 return 0;
19529}
19530_ACEOF
19531rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019532if { (ac_try="$ac_compile"
19533case "(($ac_try" in
19534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19535 *) ac_try_echo=$ac_try;;
19536esac
19537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019540 grep -v '^ *+' conftest.er1 >conftest.err
19541 rm -f conftest.er1
19542 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019544 (exit $ac_status); } && {
19545 test -z "$ac_c_werror_flag" ||
19546 test ! -s conftest.err
19547 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019548 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019549else
Martin v. Löwis11437992002-04-12 09:54:03 +000019550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019551sed 's/^/| /' conftest.$ac_ext >&5
19552
Martin v. Löwiseba40652007-08-30 20:10:57 +000019553 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019555
19556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019558{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19559echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019560if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019561
19562cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019563#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019564_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019565
19566fi
19567
Martin v. Löwiseba40652007-08-30 20:10:57 +000019568{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19569echo $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 +000019570if test "${ac_cv_struct_tm+set}" = set; then
19571 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019572else
Martin v. Löwis11437992002-04-12 09:54:03 +000019573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019574/* confdefs.h. */
19575_ACEOF
19576cat confdefs.h >>conftest.$ac_ext
19577cat >>conftest.$ac_ext <<_ACEOF
19578/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019579#include <sys/types.h>
19580#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019581
Martin v. Löwis11437992002-04-12 09:54:03 +000019582int
19583main ()
19584{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019585struct tm tm;
19586 int *p = &tm.tm_sec;
19587 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019588 ;
19589 return 0;
19590}
19591_ACEOF
19592rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019593if { (ac_try="$ac_compile"
19594case "(($ac_try" in
19595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19596 *) ac_try_echo=$ac_try;;
19597esac
19598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19599 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019601 grep -v '^ *+' conftest.er1 >conftest.err
19602 rm -f conftest.er1
19603 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019605 (exit $ac_status); } && {
19606 test -z "$ac_c_werror_flag" ||
19607 test ! -s conftest.err
19608 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019609 ac_cv_struct_tm=time.h
19610else
Martin v. Löwis11437992002-04-12 09:54:03 +000019611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019612sed 's/^/| /' conftest.$ac_ext >&5
19613
Martin v. Löwiseba40652007-08-30 20:10:57 +000019614 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019616
19617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019619{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19620echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019621if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019622
19623cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019624#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019625_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019626
19627fi
19628
Martin v. Löwiseba40652007-08-30 20:10:57 +000019629{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19630echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019631if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19632 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019633else
Martin v. Löwis11437992002-04-12 09:54:03 +000019634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019635/* confdefs.h. */
19636_ACEOF
19637cat confdefs.h >>conftest.$ac_ext
19638cat >>conftest.$ac_ext <<_ACEOF
19639/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019640#include <sys/types.h>
19641#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019642
19643
Martin v. Löwis11437992002-04-12 09:54:03 +000019644int
19645main ()
19646{
19647static struct tm ac_aggr;
19648if (ac_aggr.tm_zone)
19649return 0;
19650 ;
19651 return 0;
19652}
19653_ACEOF
19654rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019655if { (ac_try="$ac_compile"
19656case "(($ac_try" in
19657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19658 *) ac_try_echo=$ac_try;;
19659esac
19660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19661 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019663 grep -v '^ *+' conftest.er1 >conftest.err
19664 rm -f conftest.er1
19665 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019667 (exit $ac_status); } && {
19668 test -z "$ac_c_werror_flag" ||
19669 test ! -s conftest.err
19670 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019671 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019672else
Martin v. Löwis11437992002-04-12 09:54:03 +000019673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019674sed 's/^/| /' conftest.$ac_ext >&5
19675
Martin v. Löwiseba40652007-08-30 20:10:57 +000019676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019677/* confdefs.h. */
19678_ACEOF
19679cat confdefs.h >>conftest.$ac_ext
19680cat >>conftest.$ac_ext <<_ACEOF
19681/* end confdefs.h. */
19682#include <sys/types.h>
19683#include <$ac_cv_struct_tm>
19684
19685
19686int
19687main ()
19688{
19689static struct tm ac_aggr;
19690if (sizeof ac_aggr.tm_zone)
19691return 0;
19692 ;
19693 return 0;
19694}
19695_ACEOF
19696rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019697if { (ac_try="$ac_compile"
19698case "(($ac_try" in
19699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19700 *) ac_try_echo=$ac_try;;
19701esac
19702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19703 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019705 grep -v '^ *+' conftest.er1 >conftest.err
19706 rm -f conftest.er1
19707 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019709 (exit $ac_status); } && {
19710 test -z "$ac_c_werror_flag" ||
19711 test ! -s conftest.err
19712 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019713 ac_cv_member_struct_tm_tm_zone=yes
19714else
19715 echo "$as_me: failed program was:" >&5
19716sed 's/^/| /' conftest.$ac_ext >&5
19717
Martin v. Löwiseba40652007-08-30 20:10:57 +000019718 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019720
19721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019723
19724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019726{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19727echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019728if test $ac_cv_member_struct_tm_tm_zone = yes; then
19729
19730cat >>confdefs.h <<_ACEOF
19731#define HAVE_STRUCT_TM_TM_ZONE 1
19732_ACEOF
19733
19734
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019735fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019736
Martin v. Löwis11437992002-04-12 09:54:03 +000019737if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19738
19739cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019740#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019741_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019742
19743else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019744 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19745echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19746if test "${ac_cv_have_decl_tzname+set}" = set; then
19747 echo $ECHO_N "(cached) $ECHO_C" >&6
19748else
19749 cat >conftest.$ac_ext <<_ACEOF
19750/* confdefs.h. */
19751_ACEOF
19752cat confdefs.h >>conftest.$ac_ext
19753cat >>conftest.$ac_ext <<_ACEOF
19754/* end confdefs.h. */
19755#include <time.h>
19756
19757int
19758main ()
19759{
19760#ifndef tzname
19761 (void) tzname;
19762#endif
19763
19764 ;
19765 return 0;
19766}
19767_ACEOF
19768rm -f conftest.$ac_objext
19769if { (ac_try="$ac_compile"
19770case "(($ac_try" in
19771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19772 *) ac_try_echo=$ac_try;;
19773esac
19774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19775 (eval "$ac_compile") 2>conftest.er1
19776 ac_status=$?
19777 grep -v '^ *+' conftest.er1 >conftest.err
19778 rm -f conftest.er1
19779 cat conftest.err >&5
19780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19781 (exit $ac_status); } && {
19782 test -z "$ac_c_werror_flag" ||
19783 test ! -s conftest.err
19784 } && test -s conftest.$ac_objext; then
19785 ac_cv_have_decl_tzname=yes
19786else
19787 echo "$as_me: failed program was:" >&5
19788sed 's/^/| /' conftest.$ac_ext >&5
19789
19790 ac_cv_have_decl_tzname=no
19791fi
19792
19793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19794fi
19795{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19796echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19797if test $ac_cv_have_decl_tzname = yes; then
19798
19799cat >>confdefs.h <<_ACEOF
19800#define HAVE_DECL_TZNAME 1
19801_ACEOF
19802
19803
19804else
19805 cat >>confdefs.h <<_ACEOF
19806#define HAVE_DECL_TZNAME 0
19807_ACEOF
19808
19809
19810fi
19811
19812
19813 { echo "$as_me:$LINENO: checking for tzname" >&5
19814echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019815if test "${ac_cv_var_tzname+set}" = set; then
19816 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019817else
Martin v. Löwis11437992002-04-12 09:54:03 +000019818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019819/* confdefs.h. */
19820_ACEOF
19821cat confdefs.h >>conftest.$ac_ext
19822cat >>conftest.$ac_ext <<_ACEOF
19823/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019824#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019825#if !HAVE_DECL_TZNAME
19826extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019828
Martin v. Löwis11437992002-04-12 09:54:03 +000019829int
19830main ()
19831{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019832return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019833 ;
19834 return 0;
19835}
19836_ACEOF
19837rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019838if { (ac_try="$ac_link"
19839case "(($ac_try" in
19840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19841 *) ac_try_echo=$ac_try;;
19842esac
19843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19844 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019846 grep -v '^ *+' conftest.er1 >conftest.err
19847 rm -f conftest.er1
19848 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019850 (exit $ac_status); } && {
19851 test -z "$ac_c_werror_flag" ||
19852 test ! -s conftest.err
19853 } && test -s conftest$ac_exeext &&
19854 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019855 ac_cv_var_tzname=yes
19856else
Martin v. Löwis11437992002-04-12 09:54:03 +000019857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019858sed 's/^/| /' conftest.$ac_ext >&5
19859
Martin v. Löwiseba40652007-08-30 20:10:57 +000019860 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019862
19863rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019864 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019866{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19867echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019868 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019869
19870cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019871#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019872_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019873
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019874 fi
19875fi
19876
Martin v. Löwiseba40652007-08-30 20:10:57 +000019877{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19878echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019879if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19880 echo $ECHO_N "(cached) $ECHO_C" >&6
19881else
19882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019883/* confdefs.h. */
19884_ACEOF
19885cat confdefs.h >>conftest.$ac_ext
19886cat >>conftest.$ac_ext <<_ACEOF
19887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019888$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019889int
19890main ()
19891{
19892static struct stat ac_aggr;
19893if (ac_aggr.st_rdev)
19894return 0;
19895 ;
19896 return 0;
19897}
19898_ACEOF
19899rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019900if { (ac_try="$ac_compile"
19901case "(($ac_try" in
19902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19903 *) ac_try_echo=$ac_try;;
19904esac
19905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19906 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019908 grep -v '^ *+' conftest.er1 >conftest.err
19909 rm -f conftest.er1
19910 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019912 (exit $ac_status); } && {
19913 test -z "$ac_c_werror_flag" ||
19914 test ! -s conftest.err
19915 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019916 ac_cv_member_struct_stat_st_rdev=yes
19917else
19918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019919sed 's/^/| /' conftest.$ac_ext >&5
19920
Martin v. Löwiseba40652007-08-30 20:10:57 +000019921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019922/* confdefs.h. */
19923_ACEOF
19924cat confdefs.h >>conftest.$ac_ext
19925cat >>conftest.$ac_ext <<_ACEOF
19926/* end confdefs.h. */
19927$ac_includes_default
19928int
19929main ()
19930{
19931static struct stat ac_aggr;
19932if (sizeof ac_aggr.st_rdev)
19933return 0;
19934 ;
19935 return 0;
19936}
19937_ACEOF
19938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019939if { (ac_try="$ac_compile"
19940case "(($ac_try" in
19941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19942 *) ac_try_echo=$ac_try;;
19943esac
19944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19945 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019947 grep -v '^ *+' conftest.er1 >conftest.err
19948 rm -f conftest.er1
19949 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019951 (exit $ac_status); } && {
19952 test -z "$ac_c_werror_flag" ||
19953 test ! -s conftest.err
19954 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019955 ac_cv_member_struct_stat_st_rdev=yes
19956else
19957 echo "$as_me: failed program was:" >&5
19958sed 's/^/| /' conftest.$ac_ext >&5
19959
Martin v. Löwiseba40652007-08-30 20:10:57 +000019960 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019962
19963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019965
19966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019968{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19969echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019970if test $ac_cv_member_struct_stat_st_rdev = yes; then
19971
19972cat >>confdefs.h <<_ACEOF
19973#define HAVE_STRUCT_STAT_ST_RDEV 1
19974_ACEOF
19975
19976
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019977fi
19978
Martin v. Löwiseba40652007-08-30 20:10:57 +000019979{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19980echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019981if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19982 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019983else
Martin v. Löwis11437992002-04-12 09:54:03 +000019984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019985/* confdefs.h. */
19986_ACEOF
19987cat confdefs.h >>conftest.$ac_ext
19988cat >>conftest.$ac_ext <<_ACEOF
19989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019990$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019991int
19992main ()
19993{
19994static struct stat ac_aggr;
19995if (ac_aggr.st_blksize)
19996return 0;
19997 ;
19998 return 0;
19999}
20000_ACEOF
20001rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020002if { (ac_try="$ac_compile"
20003case "(($ac_try" in
20004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20005 *) ac_try_echo=$ac_try;;
20006esac
20007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020010 grep -v '^ *+' conftest.er1 >conftest.err
20011 rm -f conftest.er1
20012 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020014 (exit $ac_status); } && {
20015 test -z "$ac_c_werror_flag" ||
20016 test ! -s conftest.err
20017 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020018 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020019else
Martin v. Löwis11437992002-04-12 09:54:03 +000020020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020021sed 's/^/| /' conftest.$ac_ext >&5
20022
Martin v. Löwiseba40652007-08-30 20:10:57 +000020023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020024/* confdefs.h. */
20025_ACEOF
20026cat confdefs.h >>conftest.$ac_ext
20027cat >>conftest.$ac_ext <<_ACEOF
20028/* end confdefs.h. */
20029$ac_includes_default
20030int
20031main ()
20032{
20033static struct stat ac_aggr;
20034if (sizeof ac_aggr.st_blksize)
20035return 0;
20036 ;
20037 return 0;
20038}
20039_ACEOF
20040rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020041if { (ac_try="$ac_compile"
20042case "(($ac_try" in
20043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20044 *) ac_try_echo=$ac_try;;
20045esac
20046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20047 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020049 grep -v '^ *+' conftest.er1 >conftest.err
20050 rm -f conftest.er1
20051 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020053 (exit $ac_status); } && {
20054 test -z "$ac_c_werror_flag" ||
20055 test ! -s conftest.err
20056 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020057 ac_cv_member_struct_stat_st_blksize=yes
20058else
20059 echo "$as_me: failed program was:" >&5
20060sed 's/^/| /' conftest.$ac_ext >&5
20061
Martin v. Löwiseba40652007-08-30 20:10:57 +000020062 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020064
20065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020067
20068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020070{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20071echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020072if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020073
Martin v. Löwis11437992002-04-12 09:54:03 +000020074cat >>confdefs.h <<_ACEOF
20075#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20076_ACEOF
20077
20078
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020079fi
20080
Martin v. Löwiseba40652007-08-30 20:10:57 +000020081{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20082echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020083if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
20084 echo $ECHO_N "(cached) $ECHO_C" >&6
20085else
20086 cat >conftest.$ac_ext <<_ACEOF
20087/* confdefs.h. */
20088_ACEOF
20089cat confdefs.h >>conftest.$ac_ext
20090cat >>conftest.$ac_ext <<_ACEOF
20091/* end confdefs.h. */
20092$ac_includes_default
20093int
20094main ()
20095{
20096static struct stat ac_aggr;
20097if (ac_aggr.st_flags)
20098return 0;
20099 ;
20100 return 0;
20101}
20102_ACEOF
20103rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020104if { (ac_try="$ac_compile"
20105case "(($ac_try" in
20106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20107 *) ac_try_echo=$ac_try;;
20108esac
20109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20110 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020111 ac_status=$?
20112 grep -v '^ *+' conftest.er1 >conftest.err
20113 rm -f conftest.er1
20114 cat conftest.err >&5
20115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020116 (exit $ac_status); } && {
20117 test -z "$ac_c_werror_flag" ||
20118 test ! -s conftest.err
20119 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020120 ac_cv_member_struct_stat_st_flags=yes
20121else
20122 echo "$as_me: failed program was:" >&5
20123sed 's/^/| /' conftest.$ac_ext >&5
20124
Martin v. Löwiseba40652007-08-30 20:10:57 +000020125 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020126/* confdefs.h. */
20127_ACEOF
20128cat confdefs.h >>conftest.$ac_ext
20129cat >>conftest.$ac_ext <<_ACEOF
20130/* end confdefs.h. */
20131$ac_includes_default
20132int
20133main ()
20134{
20135static struct stat ac_aggr;
20136if (sizeof ac_aggr.st_flags)
20137return 0;
20138 ;
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
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020150 ac_status=$?
20151 grep -v '^ *+' conftest.er1 >conftest.err
20152 rm -f conftest.er1
20153 cat conftest.err >&5
20154 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
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020159 ac_cv_member_struct_stat_st_flags=yes
20160else
20161 echo "$as_me: failed program was:" >&5
20162sed 's/^/| /' conftest.$ac_ext >&5
20163
Martin v. Löwiseba40652007-08-30 20:10:57 +000020164 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020166
20167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020169
20170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020172{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20173echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020174if test $ac_cv_member_struct_stat_st_flags = yes; then
20175
20176cat >>confdefs.h <<_ACEOF
20177#define HAVE_STRUCT_STAT_ST_FLAGS 1
20178_ACEOF
20179
20180
20181fi
20182
Martin v. Löwiseba40652007-08-30 20:10:57 +000020183{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20184echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020185if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
20186 echo $ECHO_N "(cached) $ECHO_C" >&6
20187else
20188 cat >conftest.$ac_ext <<_ACEOF
20189/* confdefs.h. */
20190_ACEOF
20191cat confdefs.h >>conftest.$ac_ext
20192cat >>conftest.$ac_ext <<_ACEOF
20193/* end confdefs.h. */
20194$ac_includes_default
20195int
20196main ()
20197{
20198static struct stat ac_aggr;
20199if (ac_aggr.st_gen)
20200return 0;
20201 ;
20202 return 0;
20203}
20204_ACEOF
20205rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020206if { (ac_try="$ac_compile"
20207case "(($ac_try" in
20208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20209 *) ac_try_echo=$ac_try;;
20210esac
20211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20212 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020213 ac_status=$?
20214 grep -v '^ *+' conftest.er1 >conftest.err
20215 rm -f conftest.er1
20216 cat conftest.err >&5
20217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020218 (exit $ac_status); } && {
20219 test -z "$ac_c_werror_flag" ||
20220 test ! -s conftest.err
20221 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020222 ac_cv_member_struct_stat_st_gen=yes
20223else
20224 echo "$as_me: failed program was:" >&5
20225sed 's/^/| /' conftest.$ac_ext >&5
20226
Martin v. Löwiseba40652007-08-30 20:10:57 +000020227 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020228/* confdefs.h. */
20229_ACEOF
20230cat confdefs.h >>conftest.$ac_ext
20231cat >>conftest.$ac_ext <<_ACEOF
20232/* end confdefs.h. */
20233$ac_includes_default
20234int
20235main ()
20236{
20237static struct stat ac_aggr;
20238if (sizeof ac_aggr.st_gen)
20239return 0;
20240 ;
20241 return 0;
20242}
20243_ACEOF
20244rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020245if { (ac_try="$ac_compile"
20246case "(($ac_try" in
20247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20248 *) ac_try_echo=$ac_try;;
20249esac
20250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20251 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020252 ac_status=$?
20253 grep -v '^ *+' conftest.er1 >conftest.err
20254 rm -f conftest.er1
20255 cat conftest.err >&5
20256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020257 (exit $ac_status); } && {
20258 test -z "$ac_c_werror_flag" ||
20259 test ! -s conftest.err
20260 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020261 ac_cv_member_struct_stat_st_gen=yes
20262else
20263 echo "$as_me: failed program was:" >&5
20264sed 's/^/| /' conftest.$ac_ext >&5
20265
Martin v. Löwiseba40652007-08-30 20:10:57 +000020266 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020268
20269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020271
20272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020274{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20275echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020276if test $ac_cv_member_struct_stat_st_gen = yes; then
20277
20278cat >>confdefs.h <<_ACEOF
20279#define HAVE_STRUCT_STAT_ST_GEN 1
20280_ACEOF
20281
20282
20283fi
20284
Martin v. Löwiseba40652007-08-30 20:10:57 +000020285{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20286echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020287if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
20288 echo $ECHO_N "(cached) $ECHO_C" >&6
20289else
20290 cat >conftest.$ac_ext <<_ACEOF
20291/* confdefs.h. */
20292_ACEOF
20293cat confdefs.h >>conftest.$ac_ext
20294cat >>conftest.$ac_ext <<_ACEOF
20295/* end confdefs.h. */
20296$ac_includes_default
20297int
20298main ()
20299{
20300static struct stat ac_aggr;
20301if (ac_aggr.st_birthtime)
20302return 0;
20303 ;
20304 return 0;
20305}
20306_ACEOF
20307rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020308if { (ac_try="$ac_compile"
20309case "(($ac_try" in
20310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20311 *) ac_try_echo=$ac_try;;
20312esac
20313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20314 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020315 ac_status=$?
20316 grep -v '^ *+' conftest.er1 >conftest.err
20317 rm -f conftest.er1
20318 cat conftest.err >&5
20319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020320 (exit $ac_status); } && {
20321 test -z "$ac_c_werror_flag" ||
20322 test ! -s conftest.err
20323 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020324 ac_cv_member_struct_stat_st_birthtime=yes
20325else
20326 echo "$as_me: failed program was:" >&5
20327sed 's/^/| /' conftest.$ac_ext >&5
20328
Martin v. Löwiseba40652007-08-30 20:10:57 +000020329 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020330/* confdefs.h. */
20331_ACEOF
20332cat confdefs.h >>conftest.$ac_ext
20333cat >>conftest.$ac_ext <<_ACEOF
20334/* end confdefs.h. */
20335$ac_includes_default
20336int
20337main ()
20338{
20339static struct stat ac_aggr;
20340if (sizeof ac_aggr.st_birthtime)
20341return 0;
20342 ;
20343 return 0;
20344}
20345_ACEOF
20346rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020347if { (ac_try="$ac_compile"
20348case "(($ac_try" in
20349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20350 *) ac_try_echo=$ac_try;;
20351esac
20352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020354 ac_status=$?
20355 grep -v '^ *+' conftest.er1 >conftest.err
20356 rm -f conftest.er1
20357 cat conftest.err >&5
20358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020359 (exit $ac_status); } && {
20360 test -z "$ac_c_werror_flag" ||
20361 test ! -s conftest.err
20362 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020363 ac_cv_member_struct_stat_st_birthtime=yes
20364else
20365 echo "$as_me: failed program was:" >&5
20366sed 's/^/| /' conftest.$ac_ext >&5
20367
Martin v. Löwiseba40652007-08-30 20:10:57 +000020368 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020370
20371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020373
20374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020376{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20377echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020378if test $ac_cv_member_struct_stat_st_birthtime = yes; then
20379
20380cat >>confdefs.h <<_ACEOF
20381#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20382_ACEOF
20383
20384
20385fi
20386
Martin v. Löwiseba40652007-08-30 20:10:57 +000020387{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20388echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020389if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
20390 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020391else
Martin v. Löwis11437992002-04-12 09:54:03 +000020392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020393/* confdefs.h. */
20394_ACEOF
20395cat confdefs.h >>conftest.$ac_ext
20396cat >>conftest.$ac_ext <<_ACEOF
20397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020398$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020399int
20400main ()
20401{
20402static struct stat ac_aggr;
20403if (ac_aggr.st_blocks)
20404return 0;
20405 ;
20406 return 0;
20407}
20408_ACEOF
20409rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020410if { (ac_try="$ac_compile"
20411case "(($ac_try" in
20412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20413 *) ac_try_echo=$ac_try;;
20414esac
20415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20416 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020418 grep -v '^ *+' conftest.er1 >conftest.err
20419 rm -f conftest.er1
20420 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020422 (exit $ac_status); } && {
20423 test -z "$ac_c_werror_flag" ||
20424 test ! -s conftest.err
20425 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020426 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020427else
Martin v. Löwis11437992002-04-12 09:54:03 +000020428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020429sed 's/^/| /' conftest.$ac_ext >&5
20430
Martin v. Löwiseba40652007-08-30 20:10:57 +000020431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020432/* confdefs.h. */
20433_ACEOF
20434cat confdefs.h >>conftest.$ac_ext
20435cat >>conftest.$ac_ext <<_ACEOF
20436/* end confdefs.h. */
20437$ac_includes_default
20438int
20439main ()
20440{
20441static struct stat ac_aggr;
20442if (sizeof ac_aggr.st_blocks)
20443return 0;
20444 ;
20445 return 0;
20446}
20447_ACEOF
20448rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020449if { (ac_try="$ac_compile"
20450case "(($ac_try" in
20451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20452 *) ac_try_echo=$ac_try;;
20453esac
20454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20455 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020457 grep -v '^ *+' conftest.er1 >conftest.err
20458 rm -f conftest.er1
20459 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020461 (exit $ac_status); } && {
20462 test -z "$ac_c_werror_flag" ||
20463 test ! -s conftest.err
20464 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020465 ac_cv_member_struct_stat_st_blocks=yes
20466else
20467 echo "$as_me: failed program was:" >&5
20468sed 's/^/| /' conftest.$ac_ext >&5
20469
Martin v. Löwiseba40652007-08-30 20:10:57 +000020470 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020472
20473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020475
20476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020478{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20479echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020480if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020481
Martin v. Löwis11437992002-04-12 09:54:03 +000020482cat >>confdefs.h <<_ACEOF
20483#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20484_ACEOF
20485
20486
20487cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020488#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020489_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020490
20491else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020492 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020493 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020494 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20495 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020496esac
20497
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020498fi
20499
Michael W. Hudson54241132001-12-07 15:38:26 +000020500
Martin v. Löwis11437992002-04-12 09:54:03 +000020501
Martin v. Löwiseba40652007-08-30 20:10:57 +000020502{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20503echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020504if test "${ac_cv_header_time_altzone+set}" = set; then
20505 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020506else
Martin v. Löwis11437992002-04-12 09:54:03 +000020507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020508/* confdefs.h. */
20509_ACEOF
20510cat confdefs.h >>conftest.$ac_ext
20511cat >>conftest.$ac_ext <<_ACEOF
20512/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020513#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020514int
20515main ()
20516{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020517return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020518 ;
20519 return 0;
20520}
20521_ACEOF
20522rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020523if { (ac_try="$ac_compile"
20524case "(($ac_try" in
20525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20526 *) ac_try_echo=$ac_try;;
20527esac
20528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20529 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020531 grep -v '^ *+' conftest.er1 >conftest.err
20532 rm -f conftest.er1
20533 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535 (exit $ac_status); } && {
20536 test -z "$ac_c_werror_flag" ||
20537 test ! -s conftest.err
20538 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020539 ac_cv_header_time_altzone=yes
20540else
Martin v. Löwis11437992002-04-12 09:54:03 +000020541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020542sed 's/^/| /' conftest.$ac_ext >&5
20543
Martin v. Löwiseba40652007-08-30 20:10:57 +000020544 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020545fi
20546
Martin v. Löwiseba40652007-08-30 20:10:57 +000020547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20548fi
20549
20550{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20551echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020552if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020553
20554cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020555#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020556_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020557
20558fi
20559
Guido van Rossumda88dad1995-01-26 00:46:29 +000020560was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020561{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20562echo $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 +000020563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020564/* confdefs.h. */
20565_ACEOF
20566cat confdefs.h >>conftest.$ac_ext
20567cat >>conftest.$ac_ext <<_ACEOF
20568/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020569
20570#include <sys/types.h>
20571#include <sys/select.h>
20572#include <sys/time.h>
20573
Martin v. Löwis11437992002-04-12 09:54:03 +000020574int
20575main ()
20576{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020577;
Martin v. Löwis11437992002-04-12 09:54:03 +000020578 ;
20579 return 0;
20580}
20581_ACEOF
20582rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020583if { (ac_try="$ac_compile"
20584case "(($ac_try" in
20585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20586 *) ac_try_echo=$ac_try;;
20587esac
20588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020591 grep -v '^ *+' conftest.er1 >conftest.err
20592 rm -f conftest.er1
20593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020595 (exit $ac_status); } && {
20596 test -z "$ac_c_werror_flag" ||
20597 test ! -s conftest.err
20598 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020599
20600
20601cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020602#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020603_ACEOF
20604
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020605 was_it_defined=yes
20606
Guido van Rossumf78abae1997-01-21 22:02:36 +000020607else
Martin v. Löwis11437992002-04-12 09:54:03 +000020608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020609sed 's/^/| /' conftest.$ac_ext >&5
20610
Brett Cannon19fab762007-06-02 03:02:29 +000020611
Martin v. Löwiseba40652007-08-30 20:10:57 +000020612fi
20613
20614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20615{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20616echo "${ECHO_T}$was_it_defined" >&6; }
20617
20618{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20619echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020620if test "${ac_cv_struct_addrinfo+set}" = set; then
20621 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020622else
Martin v. Löwis11437992002-04-12 09:54:03 +000020623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020624/* confdefs.h. */
20625_ACEOF
20626cat confdefs.h >>conftest.$ac_ext
20627cat >>conftest.$ac_ext <<_ACEOF
20628/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020629
20630# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020631int
20632main ()
20633{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020634struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020635 ;
20636 return 0;
20637}
20638_ACEOF
20639rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020640if { (ac_try="$ac_compile"
20641case "(($ac_try" in
20642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20643 *) ac_try_echo=$ac_try;;
20644esac
20645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020648 grep -v '^ *+' conftest.er1 >conftest.err
20649 rm -f conftest.er1
20650 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020652 (exit $ac_status); } && {
20653 test -z "$ac_c_werror_flag" ||
20654 test ! -s conftest.err
20655 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020656 ac_cv_struct_addrinfo=yes
20657else
Martin v. Löwis11437992002-04-12 09:54:03 +000020658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020659sed 's/^/| /' conftest.$ac_ext >&5
20660
Martin v. Löwiseba40652007-08-30 20:10:57 +000020661 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020662fi
20663
Martin v. Löwiseba40652007-08-30 20:10:57 +000020664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20665fi
20666
20667{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20668echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020669if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020670
20671cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020672#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020673_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020674
20675fi
20676
Martin v. Löwiseba40652007-08-30 20:10:57 +000020677{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20678echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020679if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20680 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020681else
Martin v. Löwis11437992002-04-12 09:54:03 +000020682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020683/* confdefs.h. */
20684_ACEOF
20685cat confdefs.h >>conftest.$ac_ext
20686cat >>conftest.$ac_ext <<_ACEOF
20687/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020688
20689# include <sys/types.h>
20690# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020691int
20692main ()
20693{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020694struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020695 ;
20696 return 0;
20697}
20698_ACEOF
20699rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020700if { (ac_try="$ac_compile"
20701case "(($ac_try" in
20702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20703 *) ac_try_echo=$ac_try;;
20704esac
20705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20706 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020708 grep -v '^ *+' conftest.er1 >conftest.err
20709 rm -f conftest.er1
20710 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020712 (exit $ac_status); } && {
20713 test -z "$ac_c_werror_flag" ||
20714 test ! -s conftest.err
20715 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020716 ac_cv_struct_sockaddr_storage=yes
20717else
Martin v. Löwis11437992002-04-12 09:54:03 +000020718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020719sed 's/^/| /' conftest.$ac_ext >&5
20720
Martin v. Löwiseba40652007-08-30 20:10:57 +000020721 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020722fi
20723
Martin v. Löwiseba40652007-08-30 20:10:57 +000020724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20725fi
20726
20727{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20728echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020729if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020730
20731cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020732#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020733_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020734
20735fi
20736
Guido van Rossum627b2d71993-12-24 10:39:16 +000020737# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020738
Michael W. Hudson54241132001-12-07 15:38:26 +000020739
Martin v. Löwiseba40652007-08-30 20:10:57 +000020740{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20741echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020742if test "${ac_cv_c_char_unsigned+set}" = set; then
20743 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020744else
Martin v. Löwis11437992002-04-12 09:54:03 +000020745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020746/* confdefs.h. */
20747_ACEOF
20748cat confdefs.h >>conftest.$ac_ext
20749cat >>conftest.$ac_ext <<_ACEOF
20750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020751$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020752int
20753main ()
20754{
20755static int test_array [1 - 2 * !(((char) -1) < 0)];
20756test_array [0] = 0
20757
20758 ;
20759 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020760}
Martin v. Löwis11437992002-04-12 09:54:03 +000020761_ACEOF
20762rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020763if { (ac_try="$ac_compile"
20764case "(($ac_try" in
20765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20766 *) ac_try_echo=$ac_try;;
20767esac
20768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020771 grep -v '^ *+' conftest.er1 >conftest.err
20772 rm -f conftest.er1
20773 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020775 (exit $ac_status); } && {
20776 test -z "$ac_c_werror_flag" ||
20777 test ! -s conftest.err
20778 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020779 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020780else
20781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020782sed 's/^/| /' conftest.$ac_ext >&5
20783
Martin v. Löwiseba40652007-08-30 20:10:57 +000020784 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020786
20787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020789{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20790echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020791if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020792 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020793#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020794_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020795
20796fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020797
Martin v. Löwiseba40652007-08-30 20:10:57 +000020798{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20799echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020800if test "${ac_cv_c_const+set}" = set; then
20801 echo $ECHO_N "(cached) $ECHO_C" >&6
20802else
20803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020804/* confdefs.h. */
20805_ACEOF
20806cat confdefs.h >>conftest.$ac_ext
20807cat >>conftest.$ac_ext <<_ACEOF
20808/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020809
Martin v. Löwis11437992002-04-12 09:54:03 +000020810int
20811main ()
20812{
20813/* FIXME: Include the comments suggested by Paul. */
20814#ifndef __cplusplus
20815 /* Ultrix mips cc rejects this. */
20816 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020817 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020818 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020819 char const *const *pcpcc;
20820 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020821 /* NEC SVR4.0.2 mips cc rejects this. */
20822 struct point {int x, y;};
20823 static struct point const zero = {0,0};
20824 /* AIX XL C 1.02.0.0 rejects this.
20825 It does not let you subtract one const X* pointer from another in
20826 an arm of an if-expression whose if-part is not a constant
20827 expression */
20828 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020829 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020830 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020831 ++pcpcc;
20832 ppc = (char**) pcpcc;
20833 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020834 { /* SCO 3.2v4 cc rejects this. */
20835 char *t;
20836 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020837
Martin v. Löwis11437992002-04-12 09:54:03 +000020838 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020839 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020840 }
20841 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20842 int x[] = {25, 17};
20843 const int *foo = &x[0];
20844 ++foo;
20845 }
20846 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20847 typedef const int *iptr;
20848 iptr p = 0;
20849 ++p;
20850 }
20851 { /* AIX XL C 1.02.0.0 rejects this saying
20852 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20853 struct s { int j; const int *ap[3]; };
20854 struct s *b; b->j = 5;
20855 }
20856 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20857 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020858 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020859 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020860 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020861#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020862
Martin v. Löwis11437992002-04-12 09:54:03 +000020863 ;
20864 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020865}
Martin v. Löwis11437992002-04-12 09:54:03 +000020866_ACEOF
20867rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020868if { (ac_try="$ac_compile"
20869case "(($ac_try" in
20870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20871 *) ac_try_echo=$ac_try;;
20872esac
20873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020876 grep -v '^ *+' conftest.er1 >conftest.err
20877 rm -f conftest.er1
20878 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020880 (exit $ac_status); } && {
20881 test -z "$ac_c_werror_flag" ||
20882 test ! -s conftest.err
20883 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020884 ac_cv_c_const=yes
20885else
Martin v. Löwis11437992002-04-12 09:54:03 +000020886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020887sed 's/^/| /' conftest.$ac_ext >&5
20888
Martin v. Löwiseba40652007-08-30 20:10:57 +000020889 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020891
20892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020894{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20895echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020896if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020897
20898cat >>confdefs.h <<\_ACEOF
20899#define const
20900_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020901
20902fi
20903
Michael W. Hudson54241132001-12-07 15:38:26 +000020904
Guido van Rossumda88dad1995-01-26 00:46:29 +000020905works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020906{ echo "$as_me:$LINENO: checking for working volatile" >&5
20907echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020908cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020909/* confdefs.h. */
20910_ACEOF
20911cat confdefs.h >>conftest.$ac_ext
20912cat >>conftest.$ac_ext <<_ACEOF
20913/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020914
Martin v. Löwis11437992002-04-12 09:54:03 +000020915int
20916main ()
20917{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020918volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020919 ;
20920 return 0;
20921}
20922_ACEOF
20923rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020924if { (ac_try="$ac_compile"
20925case "(($ac_try" in
20926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20927 *) ac_try_echo=$ac_try;;
20928esac
20929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020932 grep -v '^ *+' conftest.er1 >conftest.err
20933 rm -f conftest.er1
20934 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020936 (exit $ac_status); } && {
20937 test -z "$ac_c_werror_flag" ||
20938 test ! -s conftest.err
20939 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020940 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020941else
Martin v. Löwis11437992002-04-12 09:54:03 +000020942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020943sed 's/^/| /' conftest.$ac_ext >&5
20944
Martin v. Löwis11437992002-04-12 09:54:03 +000020945
20946cat >>confdefs.h <<\_ACEOF
20947#define volatile
20948_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020949
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020950
Guido van Rossum627b2d71993-12-24 10:39:16 +000020951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020952
20953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20954{ echo "$as_me:$LINENO: result: $works" >&5
20955echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020956
Guido van Rossumda88dad1995-01-26 00:46:29 +000020957works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020958{ echo "$as_me:$LINENO: checking for working signed char" >&5
20959echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020960cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020961/* confdefs.h. */
20962_ACEOF
20963cat confdefs.h >>conftest.$ac_ext
20964cat >>conftest.$ac_ext <<_ACEOF
20965/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020966
Martin v. Löwis11437992002-04-12 09:54:03 +000020967int
20968main ()
20969{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020970signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020971 ;
20972 return 0;
20973}
20974_ACEOF
20975rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020976if { (ac_try="$ac_compile"
20977case "(($ac_try" in
20978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20979 *) ac_try_echo=$ac_try;;
20980esac
20981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020984 grep -v '^ *+' conftest.er1 >conftest.err
20985 rm -f conftest.er1
20986 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020988 (exit $ac_status); } && {
20989 test -z "$ac_c_werror_flag" ||
20990 test ! -s conftest.err
20991 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020992 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020993else
Martin v. Löwis11437992002-04-12 09:54:03 +000020994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020995sed 's/^/| /' conftest.$ac_ext >&5
20996
Martin v. Löwis11437992002-04-12 09:54:03 +000020997
20998cat >>confdefs.h <<\_ACEOF
20999#define signed
21000_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021001
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021002
Guido van Rossum7f43da71994-08-01 12:15:30 +000021003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021004
21005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21006{ echo "$as_me:$LINENO: result: $works" >&5
21007echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021008
Guido van Rossumda88dad1995-01-26 00:46:29 +000021009have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021010{ echo "$as_me:$LINENO: checking for prototypes" >&5
21011echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021012cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021013/* confdefs.h. */
21014_ACEOF
21015cat confdefs.h >>conftest.$ac_ext
21016cat >>conftest.$ac_ext <<_ACEOF
21017/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021018int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021019int
21020main ()
21021{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021022return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021023 ;
21024 return 0;
21025}
21026_ACEOF
21027rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021028if { (ac_try="$ac_compile"
21029case "(($ac_try" in
21030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21031 *) ac_try_echo=$ac_try;;
21032esac
21033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021036 grep -v '^ *+' conftest.er1 >conftest.err
21037 rm -f conftest.er1
21038 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021040 (exit $ac_status); } && {
21041 test -z "$ac_c_werror_flag" ||
21042 test ! -s conftest.err
21043 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021044
21045
21046cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021047#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021048_ACEOF
21049
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021050 have_prototypes=yes
21051
Guido van Rossumf78abae1997-01-21 22:02:36 +000021052else
Martin v. Löwis11437992002-04-12 09:54:03 +000021053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021054sed 's/^/| /' conftest.$ac_ext >&5
21055
Martin v. Löwiseba40652007-08-30 20:10:57 +000021056
Guido van Rossum7f43da71994-08-01 12:15:30 +000021057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021058
21059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21060{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21061echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021062
Guido van Rossumda88dad1995-01-26 00:46:29 +000021063works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021064{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21065echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021066cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021067/* confdefs.h. */
21068_ACEOF
21069cat confdefs.h >>conftest.$ac_ext
21070cat >>conftest.$ac_ext <<_ACEOF
21071/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021072
21073#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021074int foo(int x, ...) {
21075 va_list va;
21076 va_start(va, x);
21077 va_arg(va, int);
21078 va_arg(va, char *);
21079 va_arg(va, double);
21080 return 0;
21081}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021082
Martin v. Löwis11437992002-04-12 09:54:03 +000021083int
21084main ()
21085{
Guido van Rossum90eea071996-08-30 20:58:57 +000021086return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021087 ;
21088 return 0;
21089}
21090_ACEOF
21091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021092if { (ac_try="$ac_compile"
21093case "(($ac_try" in
21094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21095 *) ac_try_echo=$ac_try;;
21096esac
21097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021099 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021100 grep -v '^ *+' conftest.er1 >conftest.err
21101 rm -f conftest.er1
21102 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021104 (exit $ac_status); } && {
21105 test -z "$ac_c_werror_flag" ||
21106 test ! -s conftest.err
21107 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021108
21109
21110cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021111#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021112_ACEOF
21113
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021114 works=yes
21115
Guido van Rossumf78abae1997-01-21 22:02:36 +000021116else
Martin v. Löwis11437992002-04-12 09:54:03 +000021117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021118sed 's/^/| /' conftest.$ac_ext >&5
21119
Martin v. Löwiseba40652007-08-30 20:10:57 +000021120
Guido van Rossum627b2d71993-12-24 10:39:16 +000021121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021122
21123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21124{ echo "$as_me:$LINENO: result: $works" >&5
21125echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021126
Martin v. Löwisd6320502004-08-12 13:45:08 +000021127# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000021128{ echo "$as_me:$LINENO: checking for socketpair" >&5
21129echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021130cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021131/* confdefs.h. */
21132_ACEOF
21133cat confdefs.h >>conftest.$ac_ext
21134cat >>conftest.$ac_ext <<_ACEOF
21135/* end confdefs.h. */
21136
21137#include <sys/types.h>
21138#include <sys/socket.h>
21139
21140int
21141main ()
21142{
21143void *x=socketpair
21144 ;
21145 return 0;
21146}
21147_ACEOF
21148rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021149if { (ac_try="$ac_compile"
21150case "(($ac_try" in
21151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21152 *) ac_try_echo=$ac_try;;
21153esac
21154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21155 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021157 grep -v '^ *+' conftest.er1 >conftest.err
21158 rm -f conftest.er1
21159 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021161 (exit $ac_status); } && {
21162 test -z "$ac_c_werror_flag" ||
21163 test ! -s conftest.err
21164 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021165
21166cat >>confdefs.h <<\_ACEOF
21167#define HAVE_SOCKETPAIR 1
21168_ACEOF
21169
Martin v. Löwiseba40652007-08-30 20:10:57 +000021170 { echo "$as_me:$LINENO: result: yes" >&5
21171echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021172else
21173 echo "$as_me: failed program was:" >&5
21174sed 's/^/| /' conftest.$ac_ext >&5
21175
Martin v. Löwiseba40652007-08-30 20:10:57 +000021176 { echo "$as_me:$LINENO: result: no" >&5
21177echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021178
21179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021180
21181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021182
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021183# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000021184{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21185echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021186cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021187/* confdefs.h. */
21188_ACEOF
21189cat confdefs.h >>conftest.$ac_ext
21190cat >>conftest.$ac_ext <<_ACEOF
21191/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021192#include <sys/types.h>
21193#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021194int
21195main ()
21196{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021197struct sockaddr x;
21198x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021199 ;
21200 return 0;
21201}
21202_ACEOF
21203rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021204if { (ac_try="$ac_compile"
21205case "(($ac_try" in
21206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21207 *) ac_try_echo=$ac_try;;
21208esac
21209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021212 grep -v '^ *+' conftest.er1 >conftest.err
21213 rm -f conftest.er1
21214 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021216 (exit $ac_status); } && {
21217 test -z "$ac_c_werror_flag" ||
21218 test ! -s conftest.err
21219 } && test -s conftest.$ac_objext; then
21220 { echo "$as_me:$LINENO: result: yes" >&5
21221echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021222
21223cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021224#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021225_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021226
21227else
Martin v. Löwis11437992002-04-12 09:54:03 +000021228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021229sed 's/^/| /' conftest.$ac_ext >&5
21230
Martin v. Löwiseba40652007-08-30 20:10:57 +000021231 { echo "$as_me:$LINENO: result: no" >&5
21232echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021234
21235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021236
Guido van Rossumda88dad1995-01-26 00:46:29 +000021237va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000021238{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21239echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021240cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021241/* confdefs.h. */
21242_ACEOF
21243cat confdefs.h >>conftest.$ac_ext
21244cat >>conftest.$ac_ext <<_ACEOF
21245/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021246
21247#ifdef HAVE_STDARG_PROTOTYPES
21248#include <stdarg.h>
21249#else
21250#include <varargs.h>
21251#endif
21252
Martin v. Löwis11437992002-04-12 09:54:03 +000021253int
21254main ()
21255{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021256va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021257 ;
21258 return 0;
21259}
21260_ACEOF
21261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021262if { (ac_try="$ac_compile"
21263case "(($ac_try" in
21264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21265 *) ac_try_echo=$ac_try;;
21266esac
21267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021270 grep -v '^ *+' conftest.er1 >conftest.err
21271 rm -f conftest.er1
21272 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021274 (exit $ac_status); } && {
21275 test -z "$ac_c_werror_flag" ||
21276 test ! -s conftest.err
21277 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021278 :
21279else
Martin v. Löwis11437992002-04-12 09:54:03 +000021280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021281sed 's/^/| /' conftest.$ac_ext >&5
21282
Martin v. Löwis11437992002-04-12 09:54:03 +000021283
21284
21285cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021286#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021287_ACEOF
21288
Guido van Rossumda88dad1995-01-26 00:46:29 +000021289 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021290
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021292
21293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21294{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21295echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021296
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021297# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021298
21299
21300
Martin v. Löwiseba40652007-08-30 20:10:57 +000021301{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21302echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021303if test "${ac_cv_func_gethostbyname_r+set}" = set; then
21304 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021305else
Martin v. Löwis11437992002-04-12 09:54:03 +000021306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021307/* confdefs.h. */
21308_ACEOF
21309cat confdefs.h >>conftest.$ac_ext
21310cat >>conftest.$ac_ext <<_ACEOF
21311/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021312/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21313 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21314#define gethostbyname_r innocuous_gethostbyname_r
21315
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021316/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021317 which can conflict with char gethostbyname_r (); below.
21318 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021319 <limits.h> exists even on freestanding compilers. */
21320
21321#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021322# include <limits.h>
21323#else
21324# include <assert.h>
21325#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021326
21327#undef gethostbyname_r
21328
Martin v. Löwiseba40652007-08-30 20:10:57 +000021329/* Override any GCC internal prototype to avoid an error.
21330 Use char because int might match the return type of a GCC
21331 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021332#ifdef __cplusplus
21333extern "C"
21334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021335char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021336/* The GNU C library defines this for functions which it implements
21337 to always fail with ENOSYS. Some functions are actually named
21338 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021339#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021340choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021341#endif
21342
Skip Montanaro6dead952003-09-25 14:50:04 +000021343int
21344main ()
21345{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021346return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021347 ;
21348 return 0;
21349}
21350_ACEOF
21351rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021352if { (ac_try="$ac_link"
21353case "(($ac_try" in
21354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21355 *) ac_try_echo=$ac_try;;
21356esac
21357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21358 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021360 grep -v '^ *+' conftest.er1 >conftest.err
21361 rm -f conftest.er1
21362 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021364 (exit $ac_status); } && {
21365 test -z "$ac_c_werror_flag" ||
21366 test ! -s conftest.err
21367 } && test -s conftest$ac_exeext &&
21368 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021369 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021370else
Martin v. Löwis11437992002-04-12 09:54:03 +000021371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021372sed 's/^/| /' conftest.$ac_ext >&5
21373
Martin v. Löwiseba40652007-08-30 20:10:57 +000021374 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021376
21377rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021378 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021380{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21381echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021382if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021383
Martin v. Löwis11437992002-04-12 09:54:03 +000021384 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021385#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021386_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021387
Martin v. Löwiseba40652007-08-30 20:10:57 +000021388 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21389echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021390 OLD_CFLAGS=$CFLAGS
21391 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021393/* confdefs.h. */
21394_ACEOF
21395cat confdefs.h >>conftest.$ac_ext
21396cat >>conftest.$ac_ext <<_ACEOF
21397/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021398
21399# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021400
Martin v. Löwis11437992002-04-12 09:54:03 +000021401int
21402main ()
21403{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021404
21405 char *name;
21406 struct hostent *he, *res;
21407 char buffer[2048];
21408 int buflen = 2048;
21409 int h_errnop;
21410
21411 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021412
21413 ;
21414 return 0;
21415}
21416_ACEOF
21417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021418if { (ac_try="$ac_compile"
21419case "(($ac_try" in
21420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21421 *) ac_try_echo=$ac_try;;
21422esac
21423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021426 grep -v '^ *+' conftest.er1 >conftest.err
21427 rm -f conftest.er1
21428 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021430 (exit $ac_status); } && {
21431 test -z "$ac_c_werror_flag" ||
21432 test ! -s conftest.err
21433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021434
21435 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021436#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021437_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021438
Martin v. Löwis11437992002-04-12 09:54:03 +000021439
21440cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021441#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021442_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021443
Martin v. Löwiseba40652007-08-30 20:10:57 +000021444 { echo "$as_me:$LINENO: result: yes" >&5
21445echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021446
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021447else
Martin v. Löwis11437992002-04-12 09:54:03 +000021448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021449sed 's/^/| /' conftest.$ac_ext >&5
21450
Martin v. Löwis11437992002-04-12 09:54:03 +000021451
Martin v. Löwiseba40652007-08-30 20:10:57 +000021452 { echo "$as_me:$LINENO: result: no" >&5
21453echo "${ECHO_T}no" >&6; }
21454 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21455echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021457/* confdefs.h. */
21458_ACEOF
21459cat confdefs.h >>conftest.$ac_ext
21460cat >>conftest.$ac_ext <<_ACEOF
21461/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021462
21463# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021464
Martin v. Löwis11437992002-04-12 09:54:03 +000021465int
21466main ()
21467{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021468
21469 char *name;
21470 struct hostent *he;
21471 char buffer[2048];
21472 int buflen = 2048;
21473 int h_errnop;
21474
21475 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021476
21477 ;
21478 return 0;
21479}
21480_ACEOF
21481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021482if { (ac_try="$ac_compile"
21483case "(($ac_try" in
21484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21485 *) ac_try_echo=$ac_try;;
21486esac
21487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021490 grep -v '^ *+' conftest.er1 >conftest.err
21491 rm -f conftest.er1
21492 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021494 (exit $ac_status); } && {
21495 test -z "$ac_c_werror_flag" ||
21496 test ! -s conftest.err
21497 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021498
21499 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021500#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021501_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021502
Martin v. Löwis11437992002-04-12 09:54:03 +000021503
21504cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021505#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021506_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021507
Martin v. Löwiseba40652007-08-30 20:10:57 +000021508 { echo "$as_me:$LINENO: result: yes" >&5
21509echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021510
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021511else
Martin v. Löwis11437992002-04-12 09:54:03 +000021512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021513sed 's/^/| /' conftest.$ac_ext >&5
21514
Martin v. Löwis11437992002-04-12 09:54:03 +000021515
Martin v. Löwiseba40652007-08-30 20:10:57 +000021516 { echo "$as_me:$LINENO: result: no" >&5
21517echo "${ECHO_T}no" >&6; }
21518 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21519echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021521/* confdefs.h. */
21522_ACEOF
21523cat confdefs.h >>conftest.$ac_ext
21524cat >>conftest.$ac_ext <<_ACEOF
21525/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021526
21527# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021528
Martin v. Löwis11437992002-04-12 09:54:03 +000021529int
21530main ()
21531{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021532
21533 char *name;
21534 struct hostent *he;
21535 struct hostent_data data;
21536
21537 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021538
21539 ;
21540 return 0;
21541}
21542_ACEOF
21543rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021544if { (ac_try="$ac_compile"
21545case "(($ac_try" in
21546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21547 *) ac_try_echo=$ac_try;;
21548esac
21549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021552 grep -v '^ *+' conftest.er1 >conftest.err
21553 rm -f conftest.er1
21554 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021556 (exit $ac_status); } && {
21557 test -z "$ac_c_werror_flag" ||
21558 test ! -s conftest.err
21559 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021560
21561 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021562#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021563_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021564
Martin v. Löwis11437992002-04-12 09:54:03 +000021565
21566cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021567#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021568_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021569
Martin v. Löwiseba40652007-08-30 20:10:57 +000021570 { echo "$as_me:$LINENO: result: yes" >&5
21571echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021572
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021573else
Martin v. Löwis11437992002-04-12 09:54:03 +000021574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021575sed 's/^/| /' conftest.$ac_ext >&5
21576
Martin v. Löwis11437992002-04-12 09:54:03 +000021577
Martin v. Löwiseba40652007-08-30 20:10:57 +000021578 { echo "$as_me:$LINENO: result: no" >&5
21579echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021580
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021582
21583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021584
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021586
21587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021588
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021590
21591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021592 CFLAGS=$OLD_CFLAGS
21593
21594else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021595
Martin v. Löwis11437992002-04-12 09:54:03 +000021596
21597for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021598do
Martin v. Löwis11437992002-04-12 09:54:03 +000021599as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021600{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21601echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21602if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021603 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021604else
Martin v. Löwis11437992002-04-12 09:54:03 +000021605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021606/* confdefs.h. */
21607_ACEOF
21608cat confdefs.h >>conftest.$ac_ext
21609cat >>conftest.$ac_ext <<_ACEOF
21610/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021611/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21612 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21613#define $ac_func innocuous_$ac_func
21614
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021615/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021616 which can conflict with char $ac_func (); below.
21617 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021618 <limits.h> exists even on freestanding compilers. */
21619
21620#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021621# include <limits.h>
21622#else
21623# include <assert.h>
21624#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021625
21626#undef $ac_func
21627
Martin v. Löwiseba40652007-08-30 20:10:57 +000021628/* Override any GCC internal prototype to avoid an error.
21629 Use char because int might match the return type of a GCC
21630 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021631#ifdef __cplusplus
21632extern "C"
21633#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021634char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021635/* The GNU C library defines this for functions which it implements
21636 to always fail with ENOSYS. Some functions are actually named
21637 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021638#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021639choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021640#endif
21641
Skip Montanaro6dead952003-09-25 14:50:04 +000021642int
21643main ()
21644{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021645return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021646 ;
21647 return 0;
21648}
21649_ACEOF
21650rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021651if { (ac_try="$ac_link"
21652case "(($ac_try" in
21653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21654 *) ac_try_echo=$ac_try;;
21655esac
21656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21657 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021659 grep -v '^ *+' conftest.er1 >conftest.err
21660 rm -f conftest.er1
21661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021663 (exit $ac_status); } && {
21664 test -z "$ac_c_werror_flag" ||
21665 test ! -s conftest.err
21666 } && test -s conftest$ac_exeext &&
21667 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021668 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021669else
Martin v. Löwis11437992002-04-12 09:54:03 +000021670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021671sed 's/^/| /' conftest.$ac_ext >&5
21672
Martin v. Löwiseba40652007-08-30 20:10:57 +000021673 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021675
21676rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021677 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021679ac_res=`eval echo '${'$as_ac_var'}'`
21680 { echo "$as_me:$LINENO: result: $ac_res" >&5
21681echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021682if test `eval echo '${'$as_ac_var'}'` = yes; then
21683 cat >>confdefs.h <<_ACEOF
21684#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21685_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021686
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021687fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021688done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021689
Michael W. Hudson54241132001-12-07 15:38:26 +000021690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021691fi
21692
Michael W. Hudson54241132001-12-07 15:38:26 +000021693
21694
21695
21696
21697
21698
Guido van Rossum627b2d71993-12-24 10:39:16 +000021699# checks for system services
21700# (none yet)
21701
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021702# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021703{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21704echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021705if test "${ac_cv_func___fpu_control+set}" = set; then
21706 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021707else
Martin v. Löwis11437992002-04-12 09:54:03 +000021708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021709/* confdefs.h. */
21710_ACEOF
21711cat confdefs.h >>conftest.$ac_ext
21712cat >>conftest.$ac_ext <<_ACEOF
21713/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021714/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21715 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21716#define __fpu_control innocuous___fpu_control
21717
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021718/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021719 which can conflict with char __fpu_control (); below.
21720 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021721 <limits.h> exists even on freestanding compilers. */
21722
21723#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021724# include <limits.h>
21725#else
21726# include <assert.h>
21727#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021728
21729#undef __fpu_control
21730
Martin v. Löwiseba40652007-08-30 20:10:57 +000021731/* Override any GCC internal prototype to avoid an error.
21732 Use char because int might match the return type of a GCC
21733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021734#ifdef __cplusplus
21735extern "C"
21736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021737char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021738/* The GNU C library defines this for functions which it implements
21739 to always fail with ENOSYS. Some functions are actually named
21740 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021741#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021742choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021743#endif
21744
Skip Montanaro6dead952003-09-25 14:50:04 +000021745int
21746main ()
21747{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021748return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021749 ;
21750 return 0;
21751}
21752_ACEOF
21753rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021754if { (ac_try="$ac_link"
21755case "(($ac_try" in
21756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21757 *) ac_try_echo=$ac_try;;
21758esac
21759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21760 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021762 grep -v '^ *+' conftest.er1 >conftest.err
21763 rm -f conftest.er1
21764 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021766 (exit $ac_status); } && {
21767 test -z "$ac_c_werror_flag" ||
21768 test ! -s conftest.err
21769 } && test -s conftest$ac_exeext &&
21770 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021771 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021772else
Martin v. Löwis11437992002-04-12 09:54:03 +000021773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021774sed 's/^/| /' conftest.$ac_ext >&5
21775
Martin v. Löwiseba40652007-08-30 20:10:57 +000021776 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021778
21779rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021780 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021782{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21783echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021784if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021785 :
21786else
Martin v. Löwis11437992002-04-12 09:54:03 +000021787
Martin v. Löwiseba40652007-08-30 20:10:57 +000021788{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21789echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021790if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21791 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021792else
Martin v. Löwis11437992002-04-12 09:54:03 +000021793 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021794LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021795cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021796/* confdefs.h. */
21797_ACEOF
21798cat confdefs.h >>conftest.$ac_ext
21799cat >>conftest.$ac_ext <<_ACEOF
21800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021801
Martin v. Löwiseba40652007-08-30 20:10:57 +000021802/* Override any GCC internal prototype to avoid an error.
21803 Use char because int might match the return type of a GCC
21804 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021805#ifdef __cplusplus
21806extern "C"
21807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021808char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021809int
21810main ()
21811{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021812return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021813 ;
21814 return 0;
21815}
21816_ACEOF
21817rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021818if { (ac_try="$ac_link"
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_link") 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_exeext &&
21834 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021835 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021836else
Martin v. Löwis11437992002-04-12 09:54:03 +000021837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021838sed 's/^/| /' conftest.$ac_ext >&5
21839
Martin v. Löwiseba40652007-08-30 20:10:57 +000021840 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021842
21843rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021845LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021847{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21848echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021849if test $ac_cv_lib_ieee___fpu_control = yes; then
21850 cat >>confdefs.h <<_ACEOF
21851#define HAVE_LIBIEEE 1
21852_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021853
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021854 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021855
Guido van Rossum627b2d71993-12-24 10:39:16 +000021856fi
21857
Michael W. Hudson54241132001-12-07 15:38:26 +000021858
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021859fi
21860
Michael W. Hudson54241132001-12-07 15:38:26 +000021861
Guido van Rossum7f253911997-05-09 02:42:48 +000021862# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021863{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21864echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021865
Martin v. Löwiseba40652007-08-30 20:10:57 +000021866# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021867if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021868 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021869if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021870then
21871
21872cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021873#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021874_ACEOF
21875
Martin v. Löwiseba40652007-08-30 20:10:57 +000021876 { echo "$as_me:$LINENO: result: yes" >&5
21877echo "${ECHO_T}yes" >&6; }
21878else { echo "$as_me:$LINENO: result: no" >&5
21879echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021880fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021881else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021882 { echo "$as_me:$LINENO: result: no" >&5
21883echo "${ECHO_T}no" >&6; }
21884fi
21885
Guido van Rossum7f253911997-05-09 02:42:48 +000021886
Guido van Rossum7f43da71994-08-01 12:15:30 +000021887# check for --with-libm=...
21888
Guido van Rossum563e7081996-09-10 18:20:48 +000021889case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021890Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021891BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021892*) LIBM=-lm
21893esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021894{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21895echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021896
Martin v. Löwiseba40652007-08-30 20:10:57 +000021897# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021898if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021899 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021900if test "$withval" = no
21901then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021902 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21903echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021904elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021905then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021906 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21907echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021908else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21909echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21910 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021911fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021912else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021913 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21914echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21915fi
21916
Guido van Rossum7f43da71994-08-01 12:15:30 +000021917
21918# check for --with-libc=...
21919
Martin v. Löwiseba40652007-08-30 20:10:57 +000021920{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21921echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021922
Martin v. Löwiseba40652007-08-30 20:10:57 +000021923# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021924if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021925 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021926if test "$withval" = no
21927then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021928 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21929echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021930elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021931then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021932 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21933echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021934else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21935echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21936 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021937fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021938else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021939 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21940echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21941fi
21942
Guido van Rossum7f43da71994-08-01 12:15:30 +000021943
Christian Heimes0a8143f2007-12-18 23:22:54 +000021944# ************************************
21945# * Check for mathematical functions *
21946# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021947
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021948LIBS_SAVE=$LIBS
21949LIBS="$LIBS $LIBM"
21950
Mark Dickinson04b27232009-01-04 12:29:36 +000021951# Detect whether system arithmetic is subject to x87-style double
21952# rounding issues. The result of this test has little meaning on non
21953# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21954# mode is round-to-nearest and double rounding issues are present, and
21955# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
21956{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21957echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
21958if test "${ac_cv_x87_double_rounding+set}" = set; then
21959 echo $ECHO_N "(cached) $ECHO_C" >&6
21960else
21961
21962if test "$cross_compiling" = yes; then
21963 ac_cv_x87_double_rounding=no
21964else
21965 cat >conftest.$ac_ext <<_ACEOF
21966/* confdefs.h. */
21967_ACEOF
21968cat confdefs.h >>conftest.$ac_ext
21969cat >>conftest.$ac_ext <<_ACEOF
21970/* end confdefs.h. */
21971
21972#include <stdlib.h>
21973#include <math.h>
21974int main() {
21975 volatile double x, y, z;
21976 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21977 x = 0.99999999999999989; /* 1-2**-53 */
21978 y = 1./x;
21979 if (y != 1.)
21980 exit(0);
21981 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21982 x = 1e16;
21983 y = 2.99999;
21984 z = x + y;
21985 if (z != 1e16+4.)
21986 exit(0);
21987 /* both tests show evidence of double rounding */
21988 exit(1);
21989}
21990
21991_ACEOF
21992rm -f conftest$ac_exeext
21993if { (ac_try="$ac_link"
21994case "(($ac_try" in
21995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21996 *) ac_try_echo=$ac_try;;
21997esac
21998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21999 (eval "$ac_link") 2>&5
22000 ac_status=$?
22001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22002 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22003 { (case "(($ac_try" in
22004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22005 *) ac_try_echo=$ac_try;;
22006esac
22007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22008 (eval "$ac_try") 2>&5
22009 ac_status=$?
22010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22011 (exit $ac_status); }; }; then
22012 ac_cv_x87_double_rounding=no
22013else
22014 echo "$as_me: program exited with status $ac_status" >&5
22015echo "$as_me: failed program was:" >&5
22016sed 's/^/| /' conftest.$ac_ext >&5
22017
22018( exit $ac_status )
22019ac_cv_x87_double_rounding=yes
22020fi
22021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22022fi
22023
22024
22025fi
22026
22027{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22028echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
22029if test "$ac_cv_x87_double_rounding" = yes
22030then
22031
22032cat >>confdefs.h <<\_ACEOF
22033#define X87_DOUBLE_ROUNDING 1
22034_ACEOF
22035
22036fi
22037
Jesse Noller355b1262009-04-02 00:03:28 +000022038# Multiprocessing check for broken sem_getvalue
22039{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22040echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
22041if test "$cross_compiling" = yes; then
22042 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
22043See \`config.log' for more details." >&5
22044echo "$as_me: error: cannot run test program while cross compiling
22045See \`config.log' for more details." >&2;}
22046 { (exit 1); exit 1; }; }
22047else
22048 cat >conftest.$ac_ext <<_ACEOF
22049/* confdefs.h. */
22050_ACEOF
22051cat confdefs.h >>conftest.$ac_ext
22052cat >>conftest.$ac_ext <<_ACEOF
22053/* end confdefs.h. */
22054
22055#include <unistd.h>
22056#include <fcntl.h>
22057#include <stdio.h>
22058#include <semaphore.h>
22059#include <sys/stat.h>
22060
22061int main(void){
22062 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22063 int count;
22064 int res;
22065 if(a==SEM_FAILED){
22066 perror("sem_open");
22067 return 1;
22068
22069 }
22070 res = sem_getvalue(a, &count);
22071 sem_close(a);
22072 return res==-1 ? 1 : 0;
22073}
22074
22075
22076_ACEOF
22077rm -f conftest$ac_exeext
22078if { (ac_try="$ac_link"
22079case "(($ac_try" in
22080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22081 *) ac_try_echo=$ac_try;;
22082esac
22083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22084 (eval "$ac_link") 2>&5
22085 ac_status=$?
22086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22087 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22088 { (case "(($ac_try" in
22089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22090 *) ac_try_echo=$ac_try;;
22091esac
22092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22093 (eval "$ac_try") 2>&5
22094 ac_status=$?
22095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22096 (exit $ac_status); }; }; then
22097 { echo "$as_me:$LINENO: result: no" >&5
22098echo "${ECHO_T}no" >&6; }
22099else
22100 echo "$as_me: program exited with status $ac_status" >&5
22101echo "$as_me: failed program was:" >&5
22102sed 's/^/| /' conftest.$ac_ext >&5
22103
22104( exit $ac_status )
22105{ echo "$as_me:$LINENO: result: yes" >&5
22106echo "${ECHO_T}yes" >&6; }
22107
22108cat >>confdefs.h <<\_ACEOF
22109#define HAVE_BROKEN_SEM_GETVALUE 1
22110_ACEOF
22111
22112
22113fi
22114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22115fi
22116
22117
Mark Dickinson04b27232009-01-04 12:29:36 +000022118
Mark Dickinson265d7382008-04-21 22:32:24 +000022119# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22120# -0. on some architectures.
22121{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22122echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
22123if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
22124 echo $ECHO_N "(cached) $ECHO_C" >&6
22125else
22126
22127if test "$cross_compiling" = yes; then
22128 ac_cv_tanh_preserves_zero_sign=no
22129else
22130 cat >conftest.$ac_ext <<_ACEOF
22131/* confdefs.h. */
22132_ACEOF
22133cat confdefs.h >>conftest.$ac_ext
22134cat >>conftest.$ac_ext <<_ACEOF
22135/* end confdefs.h. */
22136
22137#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000022138#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000022139int main() {
22140 /* return 0 if either negative zeros don't exist
22141 on this platform or if negative zeros exist
22142 and tanh(-0.) == -0. */
22143 if (atan2(0., -1.) == atan2(-0., -1.) ||
22144 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22145 else exit(1);
22146}
22147
22148_ACEOF
22149rm -f conftest$ac_exeext
22150if { (ac_try="$ac_link"
22151case "(($ac_try" in
22152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22153 *) ac_try_echo=$ac_try;;
22154esac
22155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22156 (eval "$ac_link") 2>&5
22157 ac_status=$?
22158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22159 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22160 { (case "(($ac_try" in
22161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22162 *) ac_try_echo=$ac_try;;
22163esac
22164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22165 (eval "$ac_try") 2>&5
22166 ac_status=$?
22167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22168 (exit $ac_status); }; }; then
22169 ac_cv_tanh_preserves_zero_sign=yes
22170else
22171 echo "$as_me: program exited with status $ac_status" >&5
22172echo "$as_me: failed program was:" >&5
22173sed 's/^/| /' conftest.$ac_ext >&5
22174
22175( exit $ac_status )
22176ac_cv_tanh_preserves_zero_sign=no
22177fi
22178rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22179fi
22180
22181
22182fi
22183
22184{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22185echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
22186if test "$ac_cv_tanh_preserves_zero_sign" = yes
22187then
22188
22189cat >>confdefs.h <<\_ACEOF
22190#define TANH_PRESERVES_ZERO_SIGN 1
22191_ACEOF
22192
22193fi
22194
Martin v. Löwis11437992002-04-12 09:54:03 +000022195
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022196
Michael W. Hudson54241132001-12-07 15:38:26 +000022197
Christian Heimes0a8143f2007-12-18 23:22:54 +000022198
22199
22200
22201
22202
Mark Dickinson8e5446f2009-04-18 14:41:37 +000022203
22204for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes0a8143f2007-12-18 23:22:54 +000022205do
22206as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22207{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22208echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22209if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22210 echo $ECHO_N "(cached) $ECHO_C" >&6
22211else
22212 cat >conftest.$ac_ext <<_ACEOF
22213/* confdefs.h. */
22214_ACEOF
22215cat confdefs.h >>conftest.$ac_ext
22216cat >>conftest.$ac_ext <<_ACEOF
22217/* end confdefs.h. */
22218/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22219 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22220#define $ac_func innocuous_$ac_func
22221
22222/* System header to define __stub macros and hopefully few prototypes,
22223 which can conflict with char $ac_func (); below.
22224 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22225 <limits.h> exists even on freestanding compilers. */
22226
22227#ifdef __STDC__
22228# include <limits.h>
22229#else
22230# include <assert.h>
22231#endif
22232
22233#undef $ac_func
22234
22235/* Override any GCC internal prototype to avoid an error.
22236 Use char because int might match the return type of a GCC
22237 builtin and then its argument prototype would still apply. */
22238#ifdef __cplusplus
22239extern "C"
22240#endif
22241char $ac_func ();
22242/* The GNU C library defines this for functions which it implements
22243 to always fail with ENOSYS. Some functions are actually named
22244 something starting with __ and the normal name is an alias. */
22245#if defined __stub_$ac_func || defined __stub___$ac_func
22246choke me
22247#endif
22248
22249int
22250main ()
22251{
22252return $ac_func ();
22253 ;
22254 return 0;
22255}
22256_ACEOF
22257rm -f conftest.$ac_objext conftest$ac_exeext
22258if { (ac_try="$ac_link"
22259case "(($ac_try" in
22260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22261 *) ac_try_echo=$ac_try;;
22262esac
22263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22264 (eval "$ac_link") 2>conftest.er1
22265 ac_status=$?
22266 grep -v '^ *+' conftest.er1 >conftest.err
22267 rm -f conftest.er1
22268 cat conftest.err >&5
22269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22270 (exit $ac_status); } && {
22271 test -z "$ac_c_werror_flag" ||
22272 test ! -s conftest.err
22273 } && test -s conftest$ac_exeext &&
22274 $as_test_x conftest$ac_exeext; then
22275 eval "$as_ac_var=yes"
22276else
22277 echo "$as_me: failed program was:" >&5
22278sed 's/^/| /' conftest.$ac_ext >&5
22279
22280 eval "$as_ac_var=no"
22281fi
22282
22283rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22284 conftest$ac_exeext conftest.$ac_ext
22285fi
22286ac_res=`eval echo '${'$as_ac_var'}'`
22287 { echo "$as_me:$LINENO: result: $ac_res" >&5
22288echo "${ECHO_T}$ac_res" >&6; }
22289if test `eval echo '${'$as_ac_var'}'` = yes; then
22290 cat >>confdefs.h <<_ACEOF
22291#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22292_ACEOF
22293
22294fi
22295done
22296
Mark Dickinsond181e3a2009-01-04 13:57:26 +000022297{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22298echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
22299if test "${ac_cv_have_decl_isinf+set}" = set; then
22300 echo $ECHO_N "(cached) $ECHO_C" >&6
22301else
22302 cat >conftest.$ac_ext <<_ACEOF
22303/* confdefs.h. */
22304_ACEOF
22305cat confdefs.h >>conftest.$ac_ext
22306cat >>conftest.$ac_ext <<_ACEOF
22307/* end confdefs.h. */
22308#include <math.h>
22309
22310int
22311main ()
22312{
22313#ifndef isinf
22314 (void) isinf;
22315#endif
22316
22317 ;
22318 return 0;
22319}
22320_ACEOF
22321rm -f conftest.$ac_objext
22322if { (ac_try="$ac_compile"
22323case "(($ac_try" in
22324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22325 *) ac_try_echo=$ac_try;;
22326esac
22327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22328 (eval "$ac_compile") 2>conftest.er1
22329 ac_status=$?
22330 grep -v '^ *+' conftest.er1 >conftest.err
22331 rm -f conftest.er1
22332 cat conftest.err >&5
22333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22334 (exit $ac_status); } && {
22335 test -z "$ac_c_werror_flag" ||
22336 test ! -s conftest.err
22337 } && test -s conftest.$ac_objext; then
22338 ac_cv_have_decl_isinf=yes
22339else
22340 echo "$as_me: failed program was:" >&5
22341sed 's/^/| /' conftest.$ac_ext >&5
22342
22343 ac_cv_have_decl_isinf=no
22344fi
22345
22346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22347fi
22348{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22349echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22350if test $ac_cv_have_decl_isinf = yes; then
22351
22352cat >>confdefs.h <<_ACEOF
22353#define HAVE_DECL_ISINF 1
22354_ACEOF
22355
22356
22357else
22358 cat >>confdefs.h <<_ACEOF
22359#define HAVE_DECL_ISINF 0
22360_ACEOF
22361
22362
22363fi
22364{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22365echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
22366if test "${ac_cv_have_decl_isnan+set}" = set; then
22367 echo $ECHO_N "(cached) $ECHO_C" >&6
22368else
22369 cat >conftest.$ac_ext <<_ACEOF
22370/* confdefs.h. */
22371_ACEOF
22372cat confdefs.h >>conftest.$ac_ext
22373cat >>conftest.$ac_ext <<_ACEOF
22374/* end confdefs.h. */
22375#include <math.h>
22376
22377int
22378main ()
22379{
22380#ifndef isnan
22381 (void) isnan;
22382#endif
22383
22384 ;
22385 return 0;
22386}
22387_ACEOF
22388rm -f conftest.$ac_objext
22389if { (ac_try="$ac_compile"
22390case "(($ac_try" in
22391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22392 *) ac_try_echo=$ac_try;;
22393esac
22394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22395 (eval "$ac_compile") 2>conftest.er1
22396 ac_status=$?
22397 grep -v '^ *+' conftest.er1 >conftest.err
22398 rm -f conftest.er1
22399 cat conftest.err >&5
22400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22401 (exit $ac_status); } && {
22402 test -z "$ac_c_werror_flag" ||
22403 test ! -s conftest.err
22404 } && test -s conftest.$ac_objext; then
22405 ac_cv_have_decl_isnan=yes
22406else
22407 echo "$as_me: failed program was:" >&5
22408sed 's/^/| /' conftest.$ac_ext >&5
22409
22410 ac_cv_have_decl_isnan=no
22411fi
22412
22413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22414fi
22415{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22416echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22417if test $ac_cv_have_decl_isnan = yes; then
22418
22419cat >>confdefs.h <<_ACEOF
22420#define HAVE_DECL_ISNAN 1
22421_ACEOF
22422
22423
22424else
22425 cat >>confdefs.h <<_ACEOF
22426#define HAVE_DECL_ISNAN 0
22427_ACEOF
22428
22429
22430fi
22431{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22432echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
22433if test "${ac_cv_have_decl_isfinite+set}" = set; then
22434 echo $ECHO_N "(cached) $ECHO_C" >&6
22435else
22436 cat >conftest.$ac_ext <<_ACEOF
22437/* confdefs.h. */
22438_ACEOF
22439cat confdefs.h >>conftest.$ac_ext
22440cat >>conftest.$ac_ext <<_ACEOF
22441/* end confdefs.h. */
22442#include <math.h>
22443
22444int
22445main ()
22446{
22447#ifndef isfinite
22448 (void) isfinite;
22449#endif
22450
22451 ;
22452 return 0;
22453}
22454_ACEOF
22455rm -f conftest.$ac_objext
22456if { (ac_try="$ac_compile"
22457case "(($ac_try" in
22458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22459 *) ac_try_echo=$ac_try;;
22460esac
22461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22462 (eval "$ac_compile") 2>conftest.er1
22463 ac_status=$?
22464 grep -v '^ *+' conftest.er1 >conftest.err
22465 rm -f conftest.er1
22466 cat conftest.err >&5
22467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22468 (exit $ac_status); } && {
22469 test -z "$ac_c_werror_flag" ||
22470 test ! -s conftest.err
22471 } && test -s conftest.$ac_objext; then
22472 ac_cv_have_decl_isfinite=yes
22473else
22474 echo "$as_me: failed program was:" >&5
22475sed 's/^/| /' conftest.$ac_ext >&5
22476
22477 ac_cv_have_decl_isfinite=no
22478fi
22479
22480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22481fi
22482{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22483echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22484if test $ac_cv_have_decl_isfinite = yes; then
22485
22486cat >>confdefs.h <<_ACEOF
22487#define HAVE_DECL_ISFINITE 1
22488_ACEOF
22489
22490
22491else
22492 cat >>confdefs.h <<_ACEOF
22493#define HAVE_DECL_ISFINITE 0
22494_ACEOF
22495
22496
22497fi
22498
22499
Christian Heimes0a8143f2007-12-18 23:22:54 +000022500
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022501LIBS=$LIBS_SAVE
22502
Mark Dickinsonefc82f72009-03-20 15:51:55 +000022503# determine what size digit to use for Python's longs
22504{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22505echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
22506# Check whether --enable-big-digits was given.
22507if test "${enable_big_digits+set}" = set; then
22508 enableval=$enable_big_digits; case $enable_big_digits in
22509yes)
22510 enable_big_digits=30 ;;
22511no)
22512 enable_big_digits=15 ;;
2251315|30)
22514 ;;
22515*)
22516 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22517echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
22518 { (exit 1); exit 1; }; } ;;
22519esac
22520{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22521echo "${ECHO_T}$enable_big_digits" >&6; }
22522
22523cat >>confdefs.h <<_ACEOF
22524#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22525_ACEOF
22526
22527
22528else
22529 { echo "$as_me:$LINENO: result: no value specified" >&5
22530echo "${ECHO_T}no value specified" >&6; }
22531fi
22532
22533
Guido van Rossumef2255b2000-03-10 22:30:29 +000022534# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022535if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022536 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22537echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022538if test "${ac_cv_header_wchar_h+set}" = set; then
22539 echo $ECHO_N "(cached) $ECHO_C" >&6
22540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022541{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22542echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022543else
Martin v. Löwis11437992002-04-12 09:54:03 +000022544 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022545{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22546echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022547cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022548/* confdefs.h. */
22549_ACEOF
22550cat confdefs.h >>conftest.$ac_ext
22551cat >>conftest.$ac_ext <<_ACEOF
22552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022553$ac_includes_default
22554#include <wchar.h>
22555_ACEOF
22556rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022557if { (ac_try="$ac_compile"
22558case "(($ac_try" in
22559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22560 *) ac_try_echo=$ac_try;;
22561esac
22562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022565 grep -v '^ *+' conftest.er1 >conftest.err
22566 rm -f conftest.er1
22567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022569 (exit $ac_status); } && {
22570 test -z "$ac_c_werror_flag" ||
22571 test ! -s conftest.err
22572 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022573 ac_header_compiler=yes
22574else
22575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022576sed 's/^/| /' conftest.$ac_ext >&5
22577
Martin v. Löwiseba40652007-08-30 20:10:57 +000022578 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022580
22581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22582{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22583echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022584
22585# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022586{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22587echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022588cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022589/* confdefs.h. */
22590_ACEOF
22591cat confdefs.h >>conftest.$ac_ext
22592cat >>conftest.$ac_ext <<_ACEOF
22593/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022594#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022595_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022596if { (ac_try="$ac_cpp conftest.$ac_ext"
22597case "(($ac_try" in
22598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22599 *) ac_try_echo=$ac_try;;
22600esac
22601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22602 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022603 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022604 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022605 rm -f conftest.er1
22606 cat conftest.err >&5
22607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022608 (exit $ac_status); } >/dev/null && {
22609 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22610 test ! -s conftest.err
22611 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022612 ac_header_preproc=yes
22613else
22614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022615sed 's/^/| /' conftest.$ac_ext >&5
22616
Martin v. Löwis11437992002-04-12 09:54:03 +000022617 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022619
Martin v. Löwis11437992002-04-12 09:54:03 +000022620rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022621{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22622echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022623
22624# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022625case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22626 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022627 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22628echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022629 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22630echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22631 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022632 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022633 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022634 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22635echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022636 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22637echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22638 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22639echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22640 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22641echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022642 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22643echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022644 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22645echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022646 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022647## ------------------------------------------------ ##
22648## Report this to http://www.python.org/python-bugs ##
22649## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022650_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000022651 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022652 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022653esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000022654{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22655echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022656if test "${ac_cv_header_wchar_h+set}" = set; then
22657 echo $ECHO_N "(cached) $ECHO_C" >&6
22658else
22659 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022661{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22662echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022663
22664fi
22665if test $ac_cv_header_wchar_h = yes; then
22666
22667
22668cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022669#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022670_ACEOF
22671
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022672 wchar_h="yes"
22673
Guido van Rossumef2255b2000-03-10 22:30:29 +000022674else
Martin v. Löwis11437992002-04-12 09:54:03 +000022675 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022676
22677fi
22678
Michael W. Hudson54241132001-12-07 15:38:26 +000022679
Martin v. Löwis11437992002-04-12 09:54:03 +000022680
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022681# determine wchar_t size
22682if test "$wchar_h" = yes
22683then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022684 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22685echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022686if test "${ac_cv_type_wchar_t+set}" = set; then
22687 echo $ECHO_N "(cached) $ECHO_C" >&6
22688else
22689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022690/* confdefs.h. */
22691_ACEOF
22692cat confdefs.h >>conftest.$ac_ext
22693cat >>conftest.$ac_ext <<_ACEOF
22694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022695#include <wchar.h>
22696
Martin v. Löwiseba40652007-08-30 20:10:57 +000022697typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022698int
22699main ()
22700{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022701if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022702 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022703if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022704 return 0;
22705 ;
22706 return 0;
22707}
22708_ACEOF
22709rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022710if { (ac_try="$ac_compile"
22711case "(($ac_try" in
22712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22713 *) ac_try_echo=$ac_try;;
22714esac
22715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022718 grep -v '^ *+' conftest.er1 >conftest.err
22719 rm -f conftest.er1
22720 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022722 (exit $ac_status); } && {
22723 test -z "$ac_c_werror_flag" ||
22724 test ! -s conftest.err
22725 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022726 ac_cv_type_wchar_t=yes
22727else
22728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022729sed 's/^/| /' conftest.$ac_ext >&5
22730
Martin v. Löwiseba40652007-08-30 20:10:57 +000022731 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022732fi
Brett Cannon19fab762007-06-02 03:02:29 +000022733
Martin v. Löwiseba40652007-08-30 20:10:57 +000022734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22735fi
22736{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22737echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22738
22739# The cast to long int works around a bug in the HP C Compiler
22740# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22741# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22742# This bug is HP SR number 8606223364.
22743{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22744echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022745if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22746 echo $ECHO_N "(cached) $ECHO_C" >&6
22747else
Martin v. Löwis11437992002-04-12 09:54:03 +000022748 if test "$cross_compiling" = yes; then
22749 # Depending upon the size, compute the lo and hi bounds.
22750cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022751/* confdefs.h. */
22752_ACEOF
22753cat confdefs.h >>conftest.$ac_ext
22754cat >>conftest.$ac_ext <<_ACEOF
22755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022756#include <wchar.h>
22757
Martin v. Löwiseba40652007-08-30 20:10:57 +000022758 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022759int
22760main ()
22761{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022762static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022763test_array [0] = 0
22764
22765 ;
22766 return 0;
22767}
22768_ACEOF
22769rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022770if { (ac_try="$ac_compile"
22771case "(($ac_try" in
22772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22773 *) ac_try_echo=$ac_try;;
22774esac
22775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22776 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022778 grep -v '^ *+' conftest.er1 >conftest.err
22779 rm -f conftest.er1
22780 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022782 (exit $ac_status); } && {
22783 test -z "$ac_c_werror_flag" ||
22784 test ! -s conftest.err
22785 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022786 ac_lo=0 ac_mid=0
22787 while :; do
22788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022789/* confdefs.h. */
22790_ACEOF
22791cat confdefs.h >>conftest.$ac_ext
22792cat >>conftest.$ac_ext <<_ACEOF
22793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022794#include <wchar.h>
22795
Martin v. Löwiseba40652007-08-30 20:10:57 +000022796 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022797int
22798main ()
22799{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022800static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022801test_array [0] = 0
22802
22803 ;
22804 return 0;
22805}
22806_ACEOF
22807rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022808if { (ac_try="$ac_compile"
22809case "(($ac_try" in
22810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22811 *) ac_try_echo=$ac_try;;
22812esac
22813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22814 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022816 grep -v '^ *+' conftest.er1 >conftest.err
22817 rm -f conftest.er1
22818 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022820 (exit $ac_status); } && {
22821 test -z "$ac_c_werror_flag" ||
22822 test ! -s conftest.err
22823 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022824 ac_hi=$ac_mid; break
22825else
22826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022827sed 's/^/| /' conftest.$ac_ext >&5
22828
Martin v. Löwiseba40652007-08-30 20:10:57 +000022829 ac_lo=`expr $ac_mid + 1`
22830 if test $ac_lo -le $ac_mid; then
22831 ac_lo= ac_hi=
22832 break
22833 fi
22834 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022836
22837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022838 done
22839else
22840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022841sed 's/^/| /' conftest.$ac_ext >&5
22842
Martin v. Löwiseba40652007-08-30 20:10:57 +000022843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022844/* confdefs.h. */
22845_ACEOF
22846cat confdefs.h >>conftest.$ac_ext
22847cat >>conftest.$ac_ext <<_ACEOF
22848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022849#include <wchar.h>
22850
Martin v. Löwiseba40652007-08-30 20:10:57 +000022851 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022852int
22853main ()
22854{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022855static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022856test_array [0] = 0
22857
22858 ;
22859 return 0;
22860}
22861_ACEOF
22862rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022863if { (ac_try="$ac_compile"
22864case "(($ac_try" in
22865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22866 *) ac_try_echo=$ac_try;;
22867esac
22868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22869 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022871 grep -v '^ *+' conftest.er1 >conftest.err
22872 rm -f conftest.er1
22873 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022875 (exit $ac_status); } && {
22876 test -z "$ac_c_werror_flag" ||
22877 test ! -s conftest.err
22878 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022879 ac_hi=-1 ac_mid=-1
22880 while :; do
22881 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022882/* confdefs.h. */
22883_ACEOF
22884cat confdefs.h >>conftest.$ac_ext
22885cat >>conftest.$ac_ext <<_ACEOF
22886/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022887#include <wchar.h>
22888
Martin v. Löwiseba40652007-08-30 20:10:57 +000022889 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022890int
22891main ()
22892{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022893static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022894test_array [0] = 0
22895
22896 ;
22897 return 0;
22898}
22899_ACEOF
22900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022901if { (ac_try="$ac_compile"
22902case "(($ac_try" in
22903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22904 *) ac_try_echo=$ac_try;;
22905esac
22906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022909 grep -v '^ *+' conftest.er1 >conftest.err
22910 rm -f conftest.er1
22911 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022913 (exit $ac_status); } && {
22914 test -z "$ac_c_werror_flag" ||
22915 test ! -s conftest.err
22916 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022917 ac_lo=$ac_mid; break
22918else
22919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022920sed 's/^/| /' conftest.$ac_ext >&5
22921
Martin v. Löwiseba40652007-08-30 20:10:57 +000022922 ac_hi=`expr '(' $ac_mid ')' - 1`
22923 if test $ac_mid -le $ac_hi; then
22924 ac_lo= ac_hi=
22925 break
22926 fi
22927 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022929
22930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022931 done
22932else
22933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022934sed 's/^/| /' conftest.$ac_ext >&5
22935
Martin v. Löwiseba40652007-08-30 20:10:57 +000022936 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022938
22939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022941
22942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022943# Binary search between lo and hi bounds.
22944while test "x$ac_lo" != "x$ac_hi"; do
22945 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022947/* confdefs.h. */
22948_ACEOF
22949cat confdefs.h >>conftest.$ac_ext
22950cat >>conftest.$ac_ext <<_ACEOF
22951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022952#include <wchar.h>
22953
Martin v. Löwiseba40652007-08-30 20:10:57 +000022954 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022955int
22956main ()
22957{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022958static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022959test_array [0] = 0
22960
22961 ;
22962 return 0;
22963}
22964_ACEOF
22965rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022966if { (ac_try="$ac_compile"
22967case "(($ac_try" in
22968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22969 *) ac_try_echo=$ac_try;;
22970esac
22971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22972 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022974 grep -v '^ *+' conftest.er1 >conftest.err
22975 rm -f conftest.er1
22976 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022978 (exit $ac_status); } && {
22979 test -z "$ac_c_werror_flag" ||
22980 test ! -s conftest.err
22981 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022982 ac_hi=$ac_mid
22983else
22984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022985sed 's/^/| /' conftest.$ac_ext >&5
22986
Martin v. Löwiseba40652007-08-30 20:10:57 +000022987 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022989
22990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022991done
22992case $ac_lo in
22993?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022994'') if test "$ac_cv_type_wchar_t" = yes; then
22995 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022996See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022997echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022998See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022999 { (exit 77); exit 77; }; }
23000 else
23001 ac_cv_sizeof_wchar_t=0
23002 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023003esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023004else
Martin v. Löwis11437992002-04-12 09:54:03 +000023005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023006/* confdefs.h. */
23007_ACEOF
23008cat confdefs.h >>conftest.$ac_ext
23009cat >>conftest.$ac_ext <<_ACEOF
23010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023011#include <wchar.h>
23012
Martin v. Löwiseba40652007-08-30 20:10:57 +000023013 typedef wchar_t ac__type_sizeof_;
23014static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23015static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023016#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023017#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023018int
23019main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023020{
Martin v. Löwis11437992002-04-12 09:54:03 +000023021
23022 FILE *f = fopen ("conftest.val", "w");
23023 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000023024 return 1;
23025 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023026 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023027 long int i = longval ();
23028 if (i != ((long int) (sizeof (ac__type_sizeof_))))
23029 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000023030 fprintf (f, "%ld\n", i);
23031 }
23032 else
23033 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023034 unsigned long int i = ulongval ();
23035 if (i != ((long int) (sizeof (ac__type_sizeof_))))
23036 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000023037 fprintf (f, "%lu\n", i);
23038 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023039 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023040
23041 ;
23042 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023043}
Martin v. Löwis11437992002-04-12 09:54:03 +000023044_ACEOF
23045rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023046if { (ac_try="$ac_link"
23047case "(($ac_try" in
23048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23049 *) ac_try_echo=$ac_try;;
23050esac
23051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23052 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023053 ac_status=$?
23054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023056 { (case "(($ac_try" in
23057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23058 *) ac_try_echo=$ac_try;;
23059esac
23060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23061 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023062 ac_status=$?
23063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23064 (exit $ac_status); }; }; then
23065 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023066else
Martin v. Löwis11437992002-04-12 09:54:03 +000023067 echo "$as_me: program exited with status $ac_status" >&5
23068echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023069sed 's/^/| /' conftest.$ac_ext >&5
23070
Martin v. Löwis11437992002-04-12 09:54:03 +000023071( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023072if test "$ac_cv_type_wchar_t" = yes; then
23073 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023074See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023075echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023076See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000023077 { (exit 77); exit 77; }; }
23078 else
23079 ac_cv_sizeof_wchar_t=0
23080 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023082rm -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 +000023083fi
23084rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023086{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23087echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
23088
23089
23090
Martin v. Löwis11437992002-04-12 09:54:03 +000023091cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023092#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023093_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023094
Michael W. Hudson54241132001-12-07 15:38:26 +000023095
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023096fi
23097
Martin v. Löwiseba40652007-08-30 20:10:57 +000023098{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23099echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023100have_ucs4_tcl=no
23101cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023102/* confdefs.h. */
23103_ACEOF
23104cat confdefs.h >>conftest.$ac_ext
23105cat >>conftest.$ac_ext <<_ACEOF
23106/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023107
23108#include <tcl.h>
23109#if TCL_UTF_MAX != 6
23110# error "NOT UCS4_TCL"
23111#endif
23112int
23113main ()
23114{
23115
23116 ;
23117 return 0;
23118}
23119_ACEOF
23120rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023121if { (ac_try="$ac_compile"
23122case "(($ac_try" in
23123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23124 *) ac_try_echo=$ac_try;;
23125esac
23126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23127 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023129 grep -v '^ *+' conftest.er1 >conftest.err
23130 rm -f conftest.er1
23131 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023133 (exit $ac_status); } && {
23134 test -z "$ac_c_werror_flag" ||
23135 test ! -s conftest.err
23136 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023137
23138
23139cat >>confdefs.h <<\_ACEOF
23140#define HAVE_UCS4_TCL 1
23141_ACEOF
23142
23143 have_ucs4_tcl=yes
23144
23145else
23146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023147sed 's/^/| /' conftest.$ac_ext >&5
23148
Martin v. Löwiseba40652007-08-30 20:10:57 +000023149
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023151
23152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23153{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23154echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023155
Skip Montanaro6dead952003-09-25 14:50:04 +000023156# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023157if test "$wchar_h" = yes
23158then
23159 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000023160 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23161echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023162 if test "${ac_cv_wchar_t_signed+set}" = set; then
23163 echo $ECHO_N "(cached) $ECHO_C" >&6
23164else
23165
23166 if test "$cross_compiling" = yes; then
23167 ac_cv_wchar_t_signed=yes
23168else
23169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023170/* confdefs.h. */
23171_ACEOF
23172cat confdefs.h >>conftest.$ac_ext
23173cat >>conftest.$ac_ext <<_ACEOF
23174/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023175
23176 #include <wchar.h>
23177 int main()
23178 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000023179 /* Success: exit code 0 */
23180 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023181 }
23182
23183_ACEOF
23184rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023185if { (ac_try="$ac_link"
23186case "(($ac_try" in
23187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23188 *) ac_try_echo=$ac_try;;
23189esac
23190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23191 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023192 ac_status=$?
23193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23194 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023195 { (case "(($ac_try" in
23196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23197 *) ac_try_echo=$ac_try;;
23198esac
23199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23200 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023201 ac_status=$?
23202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23203 (exit $ac_status); }; }; then
23204 ac_cv_wchar_t_signed=yes
23205else
23206 echo "$as_me: program exited with status $ac_status" >&5
23207echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023208sed 's/^/| /' conftest.$ac_ext >&5
23209
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023210( exit $ac_status )
23211ac_cv_wchar_t_signed=no
23212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023213rm -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 +000023214fi
23215
Martin v. Löwiseba40652007-08-30 20:10:57 +000023216
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023217fi
23218
Martin v. Löwiseba40652007-08-30 20:10:57 +000023219 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23220echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
23221fi
23222
23223{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
23224echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
23225# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023226if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023227 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023228else
23229 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000023230fi
23231
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023232
23233if test $enable_unicode = yes
23234then
Martin v. Löwisfd917792001-06-27 20:22:04 +000023235 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023236 case "$have_ucs4_tcl" in
23237 yes) enable_unicode="ucs4"
23238 ;;
23239 *) enable_unicode="ucs2"
23240 ;;
23241 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023242fi
23243
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023244
23245
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023246case "$enable_unicode" in
23247ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000023248 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023249#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000023250_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023251
23252 ;;
23253ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000023254 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023255#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023256_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023257
23258 ;;
23259esac
23260
Michael W. Hudson54241132001-12-07 15:38:26 +000023261
Martin v. Löwis11437992002-04-12 09:54:03 +000023262
23263
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023264
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023265if test "$enable_unicode" = "no"
23266then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023267 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000023268 { echo "$as_me:$LINENO: result: not used" >&5
23269echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023270else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023271 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000023272
23273cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023274#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023275_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023276
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023277
23278 # wchar_t is only usable if it maps to an unsigned type
23279 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023280 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023281 then
23282 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023283
Martin v. Löwis11437992002-04-12 09:54:03 +000023284cat >>confdefs.h <<\_ACEOF
23285#define HAVE_USABLE_WCHAR_T 1
23286_ACEOF
23287
23288 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023289#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023290_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023291
23292 elif test "$ac_cv_sizeof_short" = "$unicode_size"
23293 then
23294 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000023295 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023296#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023297_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023298
23299 elif test "$ac_cv_sizeof_long" = "$unicode_size"
23300 then
23301 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000023302 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023303#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023304_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023305
23306 else
23307 PY_UNICODE_TYPE="no type found"
23308 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023309 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23310echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023311fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023312
23313# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000023314{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23315echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023316if test "${ac_cv_c_bigendian+set}" = set; then
23317 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023318else
Martin v. Löwis11437992002-04-12 09:54:03 +000023319 # See if sys/param.h defines the BYTE_ORDER macro.
23320cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023321/* confdefs.h. */
23322_ACEOF
23323cat confdefs.h >>conftest.$ac_ext
23324cat >>conftest.$ac_ext <<_ACEOF
23325/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023326#include <sys/types.h>
23327#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023328
Martin v. Löwis11437992002-04-12 09:54:03 +000023329int
23330main ()
23331{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023332#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23333 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000023334 bogus endian macros
23335#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023336
23337 ;
23338 return 0;
23339}
23340_ACEOF
23341rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023342if { (ac_try="$ac_compile"
23343case "(($ac_try" in
23344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23345 *) ac_try_echo=$ac_try;;
23346esac
23347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23348 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023350 grep -v '^ *+' conftest.er1 >conftest.err
23351 rm -f conftest.er1
23352 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023354 (exit $ac_status); } && {
23355 test -z "$ac_c_werror_flag" ||
23356 test ! -s conftest.err
23357 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023358 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000023359cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023360/* confdefs.h. */
23361_ACEOF
23362cat confdefs.h >>conftest.$ac_ext
23363cat >>conftest.$ac_ext <<_ACEOF
23364/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023365#include <sys/types.h>
23366#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023367
Martin v. Löwis11437992002-04-12 09:54:03 +000023368int
23369main ()
23370{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023371#if BYTE_ORDER != BIG_ENDIAN
23372 not big endian
23373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023374
23375 ;
23376 return 0;
23377}
23378_ACEOF
23379rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023380if { (ac_try="$ac_compile"
23381case "(($ac_try" in
23382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23383 *) ac_try_echo=$ac_try;;
23384esac
23385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23386 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023388 grep -v '^ *+' conftest.er1 >conftest.err
23389 rm -f conftest.er1
23390 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023392 (exit $ac_status); } && {
23393 test -z "$ac_c_werror_flag" ||
23394 test ! -s conftest.err
23395 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023396 ac_cv_c_bigendian=yes
23397else
Martin v. Löwis11437992002-04-12 09:54:03 +000023398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023399sed 's/^/| /' conftest.$ac_ext >&5
23400
Martin v. Löwiseba40652007-08-30 20:10:57 +000023401 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023403
23404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023405else
Martin v. Löwis11437992002-04-12 09:54:03 +000023406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023407sed 's/^/| /' conftest.$ac_ext >&5
23408
Martin v. Löwiseba40652007-08-30 20:10:57 +000023409 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000023410if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023411 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000023412 ac_cv_c_bigendian=unknown
23413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023414/* confdefs.h. */
23415_ACEOF
23416cat confdefs.h >>conftest.$ac_ext
23417cat >>conftest.$ac_ext <<_ACEOF
23418/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023419short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23420short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023421void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023422short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23423short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023424void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023425int
23426main ()
23427{
23428 _ascii (); _ebcdic ();
23429 ;
23430 return 0;
23431}
23432_ACEOF
23433rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023434if { (ac_try="$ac_compile"
23435case "(($ac_try" in
23436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23437 *) ac_try_echo=$ac_try;;
23438esac
23439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023442 grep -v '^ *+' conftest.er1 >conftest.err
23443 rm -f conftest.er1
23444 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023446 (exit $ac_status); } && {
23447 test -z "$ac_c_werror_flag" ||
23448 test ! -s conftest.err
23449 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023450 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023451 ac_cv_c_bigendian=yes
23452fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023453if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023454 if test "$ac_cv_c_bigendian" = unknown; then
23455 ac_cv_c_bigendian=no
23456 else
23457 # finding both strings is unlikely to happen, but who knows?
23458 ac_cv_c_bigendian=unknown
23459 fi
23460fi
23461else
23462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023463sed 's/^/| /' conftest.$ac_ext >&5
23464
Martin v. Löwiseba40652007-08-30 20:10:57 +000023465
Martin v. Löwis11437992002-04-12 09:54:03 +000023466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023467
23468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023469else
23470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023471/* confdefs.h. */
23472_ACEOF
23473cat confdefs.h >>conftest.$ac_ext
23474cat >>conftest.$ac_ext <<_ACEOF
23475/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023476$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023477int
23478main ()
23479{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023480
Guido van Rossumef2255b2000-03-10 22:30:29 +000023481 /* Are we little or big endian? From Harbison&Steele. */
23482 union
23483 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023484 long int l;
23485 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000023486 } u;
23487 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023488 return u.c[sizeof (long int) - 1] == 1;
23489
23490 ;
23491 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023492}
Martin v. Löwis11437992002-04-12 09:54:03 +000023493_ACEOF
23494rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023495if { (ac_try="$ac_link"
23496case "(($ac_try" in
23497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23498 *) ac_try_echo=$ac_try;;
23499esac
23500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23501 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023502 ac_status=$?
23503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23504 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023505 { (case "(($ac_try" in
23506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23507 *) ac_try_echo=$ac_try;;
23508esac
23509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23510 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023511 ac_status=$?
23512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23513 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023514 ac_cv_c_bigendian=no
23515else
Martin v. Löwis11437992002-04-12 09:54:03 +000023516 echo "$as_me: program exited with status $ac_status" >&5
23517echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023518sed 's/^/| /' conftest.$ac_ext >&5
23519
Martin v. Löwis11437992002-04-12 09:54:03 +000023520( exit $ac_status )
23521ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023523rm -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 +000023524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023525
23526
Martin v. Löwis11437992002-04-12 09:54:03 +000023527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023528
23529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023531{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23532echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023533case $ac_cv_c_bigendian in
23534 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023535
Martin v. Löwis11437992002-04-12 09:54:03 +000023536cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023537#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023538_ACEOF
23539 ;;
23540 no)
23541 ;;
23542 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023543 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023544presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023545echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023546presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23547 { (exit 1); exit 1; }; } ;;
23548esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023549
Michael W. Hudson54241132001-12-07 15:38:26 +000023550
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023551# Check whether right shifting a negative integer extends the sign bit
23552# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000023553{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23554echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023555if test "${ac_cv_rshift_extends_sign+set}" = set; then
23556 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023557else
Martin v. Löwis11437992002-04-12 09:54:03 +000023558
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023559if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023560 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023561else
Martin v. Löwis11437992002-04-12 09:54:03 +000023562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023563/* confdefs.h. */
23564_ACEOF
23565cat confdefs.h >>conftest.$ac_ext
23566cat >>conftest.$ac_ext <<_ACEOF
23567/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023568
23569int main()
23570{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023571 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023572}
23573
Martin v. Löwis11437992002-04-12 09:54:03 +000023574_ACEOF
23575rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023576if { (ac_try="$ac_link"
23577case "(($ac_try" in
23578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23579 *) ac_try_echo=$ac_try;;
23580esac
23581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23582 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023583 ac_status=$?
23584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23585 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023586 { (case "(($ac_try" in
23587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23588 *) ac_try_echo=$ac_try;;
23589esac
23590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23591 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023592 ac_status=$?
23593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23594 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023595 ac_cv_rshift_extends_sign=yes
23596else
Martin v. Löwis11437992002-04-12 09:54:03 +000023597 echo "$as_me: program exited with status $ac_status" >&5
23598echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023599sed 's/^/| /' conftest.$ac_ext >&5
23600
Martin v. Löwis11437992002-04-12 09:54:03 +000023601( exit $ac_status )
23602ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023604rm -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 +000023605fi
23606
Martin v. Löwiseba40652007-08-30 20:10:57 +000023607
23608fi
23609
23610{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23611echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023612if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023613then
Martin v. Löwis11437992002-04-12 09:54:03 +000023614
23615cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023616#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023617_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023618
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023619fi
23620
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023621# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000023622{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23623echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023624if test "${ac_cv_have_getc_unlocked+set}" = set; then
23625 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023626else
Martin v. Löwis11437992002-04-12 09:54:03 +000023627
23628cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023629/* confdefs.h. */
23630_ACEOF
23631cat confdefs.h >>conftest.$ac_ext
23632cat >>conftest.$ac_ext <<_ACEOF
23633/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023634#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023635int
23636main ()
23637{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023638
23639 FILE *f = fopen("/dev/null", "r");
23640 flockfile(f);
23641 getc_unlocked(f);
23642 funlockfile(f);
23643
Martin v. Löwis11437992002-04-12 09:54:03 +000023644 ;
23645 return 0;
23646}
23647_ACEOF
23648rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023649if { (ac_try="$ac_link"
23650case "(($ac_try" in
23651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23652 *) ac_try_echo=$ac_try;;
23653esac
23654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23655 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023657 grep -v '^ *+' conftest.er1 >conftest.err
23658 rm -f conftest.er1
23659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023661 (exit $ac_status); } && {
23662 test -z "$ac_c_werror_flag" ||
23663 test ! -s conftest.err
23664 } && test -s conftest$ac_exeext &&
23665 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023666 ac_cv_have_getc_unlocked=yes
23667else
Martin v. Löwis11437992002-04-12 09:54:03 +000023668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023669sed 's/^/| /' conftest.$ac_ext >&5
23670
Martin v. Löwiseba40652007-08-30 20:10:57 +000023671 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023673
23674rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023675 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023676fi
23677
Martin v. Löwiseba40652007-08-30 20:10:57 +000023678{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23679echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023680if test "$ac_cv_have_getc_unlocked" = yes
23681then
Martin v. Löwis11437992002-04-12 09:54:03 +000023682
23683cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023684#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023685_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023686
23687fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023688
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023689# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023690# save the value of LIBS so we don't actually link Python with readline
23691LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023692
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023693# On some systems we need to link readline to a termcap compatible
23694# library. NOTE: Keep the precedence of listed libraries synchronised
23695# with setup.py.
23696py_cv_lib_readline=no
23697{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23698echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
23699for py_libtermcap in "" ncursesw ncurses curses termcap; do
23700 if test -z "$py_libtermcap"; then
23701 READLINE_LIBS="-lreadline"
23702 else
23703 READLINE_LIBS="-lreadline -l$py_libtermcap"
23704 fi
23705 LIBS="$READLINE_LIBS $LIBS_no_readline"
23706 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023707/* confdefs.h. */
23708_ACEOF
23709cat confdefs.h >>conftest.$ac_ext
23710cat >>conftest.$ac_ext <<_ACEOF
23711/* end confdefs.h. */
23712
Martin v. Löwiseba40652007-08-30 20:10:57 +000023713/* Override any GCC internal prototype to avoid an error.
23714 Use char because int might match the return type of a GCC
23715 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023716#ifdef __cplusplus
23717extern "C"
23718#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023719char readline ();
23720int
23721main ()
23722{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023723return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023724 ;
23725 return 0;
23726}
23727_ACEOF
23728rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023729if { (ac_try="$ac_link"
23730case "(($ac_try" in
23731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23732 *) ac_try_echo=$ac_try;;
23733esac
23734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23735 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023736 ac_status=$?
23737 grep -v '^ *+' conftest.er1 >conftest.err
23738 rm -f conftest.er1
23739 cat conftest.err >&5
23740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023741 (exit $ac_status); } && {
23742 test -z "$ac_c_werror_flag" ||
23743 test ! -s conftest.err
23744 } && test -s conftest$ac_exeext &&
23745 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023746 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023747else
23748 echo "$as_me: failed program was:" >&5
23749sed 's/^/| /' conftest.$ac_ext >&5
23750
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023751
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023753
23754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023755 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023756 if test $py_cv_lib_readline = yes; then
23757 break
23758 fi
23759done
23760# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23761#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000023762if test $py_cv_lib_readline = no; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023763 { echo "$as_me:$LINENO: result: none" >&5
23764echo "${ECHO_T}none" >&6; }
23765else
23766 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23767echo "${ECHO_T}$READLINE_LIBS" >&6; }
23768
23769cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023770#define HAVE_LIBREADLINE 1
23771_ACEOF
23772
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023773fi
23774
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023775# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023776{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23777echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023778if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23779 echo $ECHO_N "(cached) $ECHO_C" >&6
23780else
23781 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023782LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023783cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023784/* confdefs.h. */
23785_ACEOF
23786cat confdefs.h >>conftest.$ac_ext
23787cat >>conftest.$ac_ext <<_ACEOF
23788/* end confdefs.h. */
23789
Martin v. Löwiseba40652007-08-30 20:10:57 +000023790/* Override any GCC internal prototype to avoid an error.
23791 Use char because int might match the return type of a GCC
23792 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023793#ifdef __cplusplus
23794extern "C"
23795#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023796char rl_callback_handler_install ();
23797int
23798main ()
23799{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023800return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023801 ;
23802 return 0;
23803}
23804_ACEOF
23805rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023806if { (ac_try="$ac_link"
23807case "(($ac_try" in
23808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23809 *) ac_try_echo=$ac_try;;
23810esac
23811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23812 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023814 grep -v '^ *+' conftest.er1 >conftest.err
23815 rm -f conftest.er1
23816 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023818 (exit $ac_status); } && {
23819 test -z "$ac_c_werror_flag" ||
23820 test ! -s conftest.err
23821 } && test -s conftest$ac_exeext &&
23822 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023823 ac_cv_lib_readline_rl_callback_handler_install=yes
23824else
23825 echo "$as_me: failed program was:" >&5
23826sed 's/^/| /' conftest.$ac_ext >&5
23827
Martin v. Löwiseba40652007-08-30 20:10:57 +000023828 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023830
23831rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023832 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023833LIBS=$ac_check_lib_save_LIBS
23834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023835{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23836echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023837if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23838
23839cat >>confdefs.h <<\_ACEOF
23840#define HAVE_RL_CALLBACK 1
23841_ACEOF
23842
23843fi
23844
23845
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023846# check for readline 2.2
23847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023848/* confdefs.h. */
23849_ACEOF
23850cat confdefs.h >>conftest.$ac_ext
23851cat >>conftest.$ac_ext <<_ACEOF
23852/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023853#include <readline/readline.h>
23854_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023855if { (ac_try="$ac_cpp conftest.$ac_ext"
23856case "(($ac_try" in
23857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23858 *) ac_try_echo=$ac_try;;
23859esac
23860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23861 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023862 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023863 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023864 rm -f conftest.er1
23865 cat conftest.err >&5
23866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023867 (exit $ac_status); } >/dev/null && {
23868 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23869 test ! -s conftest.err
23870 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023871 have_readline=yes
23872else
23873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023874sed 's/^/| /' conftest.$ac_ext >&5
23875
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023876 have_readline=no
23877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023878
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023879rm -f conftest.err conftest.$ac_ext
23880if test $have_readline = yes
23881then
23882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023883/* confdefs.h. */
23884_ACEOF
23885cat confdefs.h >>conftest.$ac_ext
23886cat >>conftest.$ac_ext <<_ACEOF
23887/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023888#include <readline/readline.h>
23889
23890_ACEOF
23891if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023892 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023893
23894cat >>confdefs.h <<\_ACEOF
23895#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23896_ACEOF
23897
23898fi
23899rm -f conftest*
23900
23901fi
23902
Martin v. Löwis0daad592001-09-30 21:09:59 +000023903# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023904{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23905echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023906if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23907 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023908else
Martin v. Löwis11437992002-04-12 09:54:03 +000023909 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023910LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023911cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023912/* confdefs.h. */
23913_ACEOF
23914cat confdefs.h >>conftest.$ac_ext
23915cat >>conftest.$ac_ext <<_ACEOF
23916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023917
Martin v. Löwiseba40652007-08-30 20:10:57 +000023918/* Override any GCC internal prototype to avoid an error.
23919 Use char because int might match the return type of a GCC
23920 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023921#ifdef __cplusplus
23922extern "C"
23923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023924char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023925int
23926main ()
23927{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023928return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023929 ;
23930 return 0;
23931}
23932_ACEOF
23933rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023934if { (ac_try="$ac_link"
23935case "(($ac_try" in
23936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23937 *) ac_try_echo=$ac_try;;
23938esac
23939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23940 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023942 grep -v '^ *+' conftest.er1 >conftest.err
23943 rm -f conftest.er1
23944 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023946 (exit $ac_status); } && {
23947 test -z "$ac_c_werror_flag" ||
23948 test ! -s conftest.err
23949 } && test -s conftest$ac_exeext &&
23950 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023951 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023952else
Martin v. Löwis11437992002-04-12 09:54:03 +000023953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023954sed 's/^/| /' conftest.$ac_ext >&5
23955
Martin v. Löwiseba40652007-08-30 20:10:57 +000023956 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023958
23959rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023961LIBS=$ac_check_lib_save_LIBS
23962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023963{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23964echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023965if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023966
Martin v. Löwis11437992002-04-12 09:54:03 +000023967cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023968#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023969_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023970
Martin v. Löwis0daad592001-09-30 21:09:59 +000023971fi
23972
Michael W. Hudson54241132001-12-07 15:38:26 +000023973
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023974# also in 4.0
23975{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23976echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23977if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23978 echo $ECHO_N "(cached) $ECHO_C" >&6
23979else
23980 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023981LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023982cat >conftest.$ac_ext <<_ACEOF
23983/* confdefs.h. */
23984_ACEOF
23985cat confdefs.h >>conftest.$ac_ext
23986cat >>conftest.$ac_ext <<_ACEOF
23987/* end confdefs.h. */
23988
23989/* Override any GCC internal prototype to avoid an error.
23990 Use char because int might match the return type of a GCC
23991 builtin and then its argument prototype would still apply. */
23992#ifdef __cplusplus
23993extern "C"
23994#endif
23995char rl_completion_display_matches_hook ();
23996int
23997main ()
23998{
23999return rl_completion_display_matches_hook ();
24000 ;
24001 return 0;
24002}
24003_ACEOF
24004rm -f conftest.$ac_objext conftest$ac_exeext
24005if { (ac_try="$ac_link"
24006case "(($ac_try" in
24007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24008 *) ac_try_echo=$ac_try;;
24009esac
24010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24011 (eval "$ac_link") 2>conftest.er1
24012 ac_status=$?
24013 grep -v '^ *+' conftest.er1 >conftest.err
24014 rm -f conftest.er1
24015 cat conftest.err >&5
24016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24017 (exit $ac_status); } && {
24018 test -z "$ac_c_werror_flag" ||
24019 test ! -s conftest.err
24020 } && test -s conftest$ac_exeext &&
24021 $as_test_x conftest$ac_exeext; then
24022 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24023else
24024 echo "$as_me: failed program was:" >&5
24025sed 's/^/| /' conftest.$ac_ext >&5
24026
24027 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24028fi
24029
24030rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24031 conftest$ac_exeext conftest.$ac_ext
24032LIBS=$ac_check_lib_save_LIBS
24033fi
24034{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24035echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24036if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
24037
24038cat >>confdefs.h <<\_ACEOF
24039#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24040_ACEOF
24041
24042fi
24043
24044
Martin v. Löwis0daad592001-09-30 21:09:59 +000024045# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000024046{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24047echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024048if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
24049 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024050else
Martin v. Löwis11437992002-04-12 09:54:03 +000024051 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000024052LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024054/* confdefs.h. */
24055_ACEOF
24056cat confdefs.h >>conftest.$ac_ext
24057cat >>conftest.$ac_ext <<_ACEOF
24058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024059
Martin v. Löwiseba40652007-08-30 20:10:57 +000024060/* Override any GCC internal prototype to avoid an error.
24061 Use char because int might match the return type of a GCC
24062 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024063#ifdef __cplusplus
24064extern "C"
24065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024066char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024067int
24068main ()
24069{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024070return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024071 ;
24072 return 0;
24073}
24074_ACEOF
24075rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024076if { (ac_try="$ac_link"
24077case "(($ac_try" in
24078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24079 *) ac_try_echo=$ac_try;;
24080esac
24081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24082 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024084 grep -v '^ *+' conftest.er1 >conftest.err
24085 rm -f conftest.er1
24086 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024088 (exit $ac_status); } && {
24089 test -z "$ac_c_werror_flag" ||
24090 test ! -s conftest.err
24091 } && test -s conftest$ac_exeext &&
24092 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024093 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024094else
Martin v. Löwis11437992002-04-12 09:54:03 +000024095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024096sed 's/^/| /' conftest.$ac_ext >&5
24097
Martin v. Löwiseba40652007-08-30 20:10:57 +000024098 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024100
24101rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024103LIBS=$ac_check_lib_save_LIBS
24104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024105{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24106echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024107if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024108
Martin v. Löwis11437992002-04-12 09:54:03 +000024109cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024110#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024111_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024112
Guido van Rossum353ae582001-07-10 16:45:32 +000024113fi
24114
Jack Jansendd19cf82001-12-06 22:36:17 +000024115
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024116# also in readline 4.2
24117cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024118/* confdefs.h. */
24119_ACEOF
24120cat confdefs.h >>conftest.$ac_ext
24121cat >>conftest.$ac_ext <<_ACEOF
24122/* end confdefs.h. */
24123#include <readline/readline.h>
24124_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024125if { (ac_try="$ac_cpp conftest.$ac_ext"
24126case "(($ac_try" in
24127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24128 *) ac_try_echo=$ac_try;;
24129esac
24130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24131 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024132 ac_status=$?
24133 grep -v '^ *+' conftest.er1 >conftest.err
24134 rm -f conftest.er1
24135 cat conftest.err >&5
24136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024137 (exit $ac_status); } >/dev/null && {
24138 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24139 test ! -s conftest.err
24140 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024141 have_readline=yes
24142else
24143 echo "$as_me: failed program was:" >&5
24144sed 's/^/| /' conftest.$ac_ext >&5
24145
24146 have_readline=no
24147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024148
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024149rm -f conftest.err conftest.$ac_ext
24150if test $have_readline = yes
24151then
24152 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024153/* confdefs.h. */
24154_ACEOF
24155cat confdefs.h >>conftest.$ac_ext
24156cat >>conftest.$ac_ext <<_ACEOF
24157/* end confdefs.h. */
24158#include <readline/readline.h>
24159
24160_ACEOF
24161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24162 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24163
24164cat >>confdefs.h <<\_ACEOF
24165#define HAVE_RL_CATCH_SIGNAL 1
24166_ACEOF
24167
24168fi
24169rm -f conftest*
24170
24171fi
24172
Martin v. Löwis82bca632006-02-10 20:49:30 +000024173# End of readline checks: restore LIBS
24174LIBS=$LIBS_no_readline
24175
Martin v. Löwiseba40652007-08-30 20:10:57 +000024176{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24177echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024178if test "${ac_cv_broken_nice+set}" = set; then
24179 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024180else
Martin v. Löwis11437992002-04-12 09:54:03 +000024181
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024182if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024183 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024184else
Martin v. Löwis11437992002-04-12 09:54:03 +000024185 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024186/* confdefs.h. */
24187_ACEOF
24188cat confdefs.h >>conftest.$ac_ext
24189cat >>conftest.$ac_ext <<_ACEOF
24190/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024191
24192int main()
24193{
24194 int val1 = nice(1);
24195 if (val1 != -1 && val1 == nice(2))
24196 exit(0);
24197 exit(1);
24198}
24199
Martin v. Löwis11437992002-04-12 09:54:03 +000024200_ACEOF
24201rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024202if { (ac_try="$ac_link"
24203case "(($ac_try" in
24204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24205 *) ac_try_echo=$ac_try;;
24206esac
24207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24208 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024209 ac_status=$?
24210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24211 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024212 { (case "(($ac_try" in
24213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24214 *) ac_try_echo=$ac_try;;
24215esac
24216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24217 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024218 ac_status=$?
24219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24220 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024221 ac_cv_broken_nice=yes
24222else
Martin v. Löwis11437992002-04-12 09:54:03 +000024223 echo "$as_me: program exited with status $ac_status" >&5
24224echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024225sed 's/^/| /' conftest.$ac_ext >&5
24226
Martin v. Löwis11437992002-04-12 09:54:03 +000024227( exit $ac_status )
24228ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024230rm -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 +000024231fi
24232
Martin v. Löwiseba40652007-08-30 20:10:57 +000024233
24234fi
24235
24236{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24237echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024238if test "$ac_cv_broken_nice" = yes
24239then
Martin v. Löwis11437992002-04-12 09:54:03 +000024240
24241cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024242#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024243_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024244
24245fi
24246
Martin v. Löwiseba40652007-08-30 20:10:57 +000024247{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24248echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024249if test "$cross_compiling" = yes; then
24250 ac_cv_broken_poll=no
24251else
24252 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024253/* confdefs.h. */
24254_ACEOF
24255cat confdefs.h >>conftest.$ac_ext
24256cat >>conftest.$ac_ext <<_ACEOF
24257/* end confdefs.h. */
24258
24259#include <poll.h>
24260
24261int main (void)
24262 {
24263 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24264
24265 close (42);
24266
24267 int poll_test = poll (&poll_struct, 1, 0);
24268
24269 if (poll_test < 0)
24270 {
24271 exit(0);
24272 }
24273 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24274 {
24275 exit(0);
24276 }
24277 else
24278 {
24279 exit(1);
24280 }
24281 }
24282
24283_ACEOF
24284rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024285if { (ac_try="$ac_link"
24286case "(($ac_try" in
24287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24288 *) ac_try_echo=$ac_try;;
24289esac
24290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24291 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024292 ac_status=$?
24293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24294 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024295 { (case "(($ac_try" in
24296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24297 *) ac_try_echo=$ac_try;;
24298esac
24299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24300 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024301 ac_status=$?
24302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24303 (exit $ac_status); }; }; then
24304 ac_cv_broken_poll=yes
24305else
24306 echo "$as_me: program exited with status $ac_status" >&5
24307echo "$as_me: failed program was:" >&5
24308sed 's/^/| /' conftest.$ac_ext >&5
24309
24310( exit $ac_status )
24311ac_cv_broken_poll=no
24312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024313rm -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 +000024314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024315
24316
24317{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24318echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024319if test "$ac_cv_broken_poll" = yes
24320then
24321
24322cat >>confdefs.h <<\_ACEOF
24323#define HAVE_BROKEN_POLL 1
24324_ACEOF
24325
24326fi
24327
Brett Cannon43802422005-02-10 20:48:03 +000024328# 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 +000024329# (which is not required by ISO C or UNIX spec) and/or if we support
24330# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000024331{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24332echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024333if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
24334 echo $ECHO_N "(cached) $ECHO_C" >&6
24335else
24336 cat >conftest.$ac_ext <<_ACEOF
24337/* confdefs.h. */
24338_ACEOF
24339cat confdefs.h >>conftest.$ac_ext
24340cat >>conftest.$ac_ext <<_ACEOF
24341/* end confdefs.h. */
24342#include <sys/types.h>
24343#include <$ac_cv_struct_tm>
24344
24345
24346int
24347main ()
24348{
24349static struct tm ac_aggr;
24350if (ac_aggr.tm_zone)
24351return 0;
24352 ;
24353 return 0;
24354}
24355_ACEOF
24356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024357if { (ac_try="$ac_compile"
24358case "(($ac_try" in
24359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24360 *) ac_try_echo=$ac_try;;
24361esac
24362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24363 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024364 ac_status=$?
24365 grep -v '^ *+' conftest.er1 >conftest.err
24366 rm -f conftest.er1
24367 cat conftest.err >&5
24368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024369 (exit $ac_status); } && {
24370 test -z "$ac_c_werror_flag" ||
24371 test ! -s conftest.err
24372 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024373 ac_cv_member_struct_tm_tm_zone=yes
24374else
24375 echo "$as_me: failed program was:" >&5
24376sed 's/^/| /' conftest.$ac_ext >&5
24377
Martin v. Löwiseba40652007-08-30 20:10:57 +000024378 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024379/* confdefs.h. */
24380_ACEOF
24381cat confdefs.h >>conftest.$ac_ext
24382cat >>conftest.$ac_ext <<_ACEOF
24383/* end confdefs.h. */
24384#include <sys/types.h>
24385#include <$ac_cv_struct_tm>
24386
24387
24388int
24389main ()
24390{
24391static struct tm ac_aggr;
24392if (sizeof ac_aggr.tm_zone)
24393return 0;
24394 ;
24395 return 0;
24396}
24397_ACEOF
24398rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024399if { (ac_try="$ac_compile"
24400case "(($ac_try" in
24401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24402 *) ac_try_echo=$ac_try;;
24403esac
24404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24405 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024406 ac_status=$?
24407 grep -v '^ *+' conftest.er1 >conftest.err
24408 rm -f conftest.er1
24409 cat conftest.err >&5
24410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024411 (exit $ac_status); } && {
24412 test -z "$ac_c_werror_flag" ||
24413 test ! -s conftest.err
24414 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024415 ac_cv_member_struct_tm_tm_zone=yes
24416else
24417 echo "$as_me: failed program was:" >&5
24418sed 's/^/| /' conftest.$ac_ext >&5
24419
Martin v. Löwiseba40652007-08-30 20:10:57 +000024420 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024422
24423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024425
24426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024428{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24429echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024430if test $ac_cv_member_struct_tm_tm_zone = yes; then
24431
24432cat >>confdefs.h <<_ACEOF
24433#define HAVE_STRUCT_TM_TM_ZONE 1
24434_ACEOF
24435
24436
24437fi
24438
24439if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24440
24441cat >>confdefs.h <<\_ACEOF
24442#define HAVE_TM_ZONE 1
24443_ACEOF
24444
24445else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024446 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24447echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
24448if test "${ac_cv_have_decl_tzname+set}" = set; then
24449 echo $ECHO_N "(cached) $ECHO_C" >&6
24450else
24451 cat >conftest.$ac_ext <<_ACEOF
24452/* confdefs.h. */
24453_ACEOF
24454cat confdefs.h >>conftest.$ac_ext
24455cat >>conftest.$ac_ext <<_ACEOF
24456/* end confdefs.h. */
24457#include <time.h>
24458
24459int
24460main ()
24461{
24462#ifndef tzname
24463 (void) tzname;
24464#endif
24465
24466 ;
24467 return 0;
24468}
24469_ACEOF
24470rm -f conftest.$ac_objext
24471if { (ac_try="$ac_compile"
24472case "(($ac_try" in
24473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24474 *) ac_try_echo=$ac_try;;
24475esac
24476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24477 (eval "$ac_compile") 2>conftest.er1
24478 ac_status=$?
24479 grep -v '^ *+' conftest.er1 >conftest.err
24480 rm -f conftest.er1
24481 cat conftest.err >&5
24482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24483 (exit $ac_status); } && {
24484 test -z "$ac_c_werror_flag" ||
24485 test ! -s conftest.err
24486 } && test -s conftest.$ac_objext; then
24487 ac_cv_have_decl_tzname=yes
24488else
24489 echo "$as_me: failed program was:" >&5
24490sed 's/^/| /' conftest.$ac_ext >&5
24491
24492 ac_cv_have_decl_tzname=no
24493fi
24494
24495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24496fi
24497{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24498echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24499if test $ac_cv_have_decl_tzname = yes; then
24500
24501cat >>confdefs.h <<_ACEOF
24502#define HAVE_DECL_TZNAME 1
24503_ACEOF
24504
24505
24506else
24507 cat >>confdefs.h <<_ACEOF
24508#define HAVE_DECL_TZNAME 0
24509_ACEOF
24510
24511
24512fi
24513
24514
24515 { echo "$as_me:$LINENO: checking for tzname" >&5
24516echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024517if test "${ac_cv_var_tzname+set}" = set; then
24518 echo $ECHO_N "(cached) $ECHO_C" >&6
24519else
24520 cat >conftest.$ac_ext <<_ACEOF
24521/* confdefs.h. */
24522_ACEOF
24523cat confdefs.h >>conftest.$ac_ext
24524cat >>conftest.$ac_ext <<_ACEOF
24525/* end confdefs.h. */
24526#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000024527#if !HAVE_DECL_TZNAME
24528extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024529#endif
24530
24531int
24532main ()
24533{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024534return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024535 ;
24536 return 0;
24537}
24538_ACEOF
24539rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024540if { (ac_try="$ac_link"
24541case "(($ac_try" in
24542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24543 *) ac_try_echo=$ac_try;;
24544esac
24545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24546 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024547 ac_status=$?
24548 grep -v '^ *+' conftest.er1 >conftest.err
24549 rm -f conftest.er1
24550 cat conftest.err >&5
24551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024552 (exit $ac_status); } && {
24553 test -z "$ac_c_werror_flag" ||
24554 test ! -s conftest.err
24555 } && test -s conftest$ac_exeext &&
24556 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024557 ac_cv_var_tzname=yes
24558else
24559 echo "$as_me: failed program was:" >&5
24560sed 's/^/| /' conftest.$ac_ext >&5
24561
Martin v. Löwiseba40652007-08-30 20:10:57 +000024562 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024564
24565rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024566 conftest$ac_exeext conftest.$ac_ext
24567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024568{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24569echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024570 if test $ac_cv_var_tzname = yes; then
24571
24572cat >>confdefs.h <<\_ACEOF
24573#define HAVE_TZNAME 1
24574_ACEOF
24575
24576 fi
24577fi
24578
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024579
Martin v. Löwis1d459062005-03-14 21:23:33 +000024580# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000024581{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24582echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024583if test "${ac_cv_working_tzset+set}" = set; then
24584 echo $ECHO_N "(cached) $ECHO_C" >&6
24585else
24586
24587if test "$cross_compiling" = yes; then
24588 ac_cv_working_tzset=no
24589else
24590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024591/* confdefs.h. */
24592_ACEOF
24593cat confdefs.h >>conftest.$ac_ext
24594cat >>conftest.$ac_ext <<_ACEOF
24595/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024596
24597#include <stdlib.h>
24598#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024599#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024600
24601#if HAVE_TZNAME
24602extern char *tzname[];
24603#endif
24604
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024605int main()
24606{
Brett Cannon18367812003-09-19 00:59:16 +000024607 /* Note that we need to ensure that not only does tzset(3)
24608 do 'something' with localtime, but it works as documented
24609 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024610 This includes making sure that tzname is set properly if
24611 tm->tm_zone does not exist since it is the alternative way
24612 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024613
24614 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024615 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024616 */
24617
Martin v. Löwis1d459062005-03-14 21:23:33 +000024618 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024619 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24620
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024621 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024622 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024623 if (localtime(&groundhogday)->tm_hour != 0)
24624 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024625#if HAVE_TZNAME
24626 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24627 if (strcmp(tzname[0], "UTC") ||
24628 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24629 exit(1);
24630#endif
Brett Cannon18367812003-09-19 00:59:16 +000024631
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024632 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024633 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024634 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024635 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024636#if HAVE_TZNAME
24637 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24638 exit(1);
24639#endif
Brett Cannon18367812003-09-19 00:59:16 +000024640
24641 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24642 tzset();
24643 if (localtime(&groundhogday)->tm_hour != 11)
24644 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024645#if HAVE_TZNAME
24646 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24647 exit(1);
24648#endif
24649
24650#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024651 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24652 exit(1);
24653 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24654 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024655#endif
Brett Cannon18367812003-09-19 00:59:16 +000024656
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024657 exit(0);
24658}
24659
24660_ACEOF
24661rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024662if { (ac_try="$ac_link"
24663case "(($ac_try" in
24664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24665 *) ac_try_echo=$ac_try;;
24666esac
24667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24668 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024669 ac_status=$?
24670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24671 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024672 { (case "(($ac_try" in
24673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24674 *) ac_try_echo=$ac_try;;
24675esac
24676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24677 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024678 ac_status=$?
24679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24680 (exit $ac_status); }; }; then
24681 ac_cv_working_tzset=yes
24682else
24683 echo "$as_me: program exited with status $ac_status" >&5
24684echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024685sed 's/^/| /' conftest.$ac_ext >&5
24686
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024687( exit $ac_status )
24688ac_cv_working_tzset=no
24689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024690rm -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 +000024691fi
24692
Martin v. Löwiseba40652007-08-30 20:10:57 +000024693
24694fi
24695
24696{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24697echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024698if test "$ac_cv_working_tzset" = yes
24699then
24700
24701cat >>confdefs.h <<\_ACEOF
24702#define HAVE_WORKING_TZSET 1
24703_ACEOF
24704
24705fi
24706
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024707# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024708{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24709echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024710if test "${ac_cv_stat_tv_nsec+set}" = set; then
24711 echo $ECHO_N "(cached) $ECHO_C" >&6
24712else
24713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024714/* confdefs.h. */
24715_ACEOF
24716cat confdefs.h >>conftest.$ac_ext
24717cat >>conftest.$ac_ext <<_ACEOF
24718/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024719#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024720int
24721main ()
24722{
24723
24724struct stat st;
24725st.st_mtim.tv_nsec = 1;
24726
24727 ;
24728 return 0;
24729}
24730_ACEOF
24731rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024732if { (ac_try="$ac_compile"
24733case "(($ac_try" in
24734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24735 *) ac_try_echo=$ac_try;;
24736esac
24737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024740 grep -v '^ *+' conftest.er1 >conftest.err
24741 rm -f conftest.er1
24742 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024744 (exit $ac_status); } && {
24745 test -z "$ac_c_werror_flag" ||
24746 test ! -s conftest.err
24747 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024748 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024749else
24750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024751sed 's/^/| /' conftest.$ac_ext >&5
24752
Martin v. Löwiseba40652007-08-30 20:10:57 +000024753 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024754fi
24755
Martin v. Löwiseba40652007-08-30 20:10:57 +000024756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24757fi
24758
24759{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24760echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024761if test "$ac_cv_stat_tv_nsec" = yes
24762then
24763
24764cat >>confdefs.h <<\_ACEOF
24765#define HAVE_STAT_TV_NSEC 1
24766_ACEOF
24767
24768fi
24769
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024770# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024771{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24772echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024773if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24774 echo $ECHO_N "(cached) $ECHO_C" >&6
24775else
24776 cat >conftest.$ac_ext <<_ACEOF
24777/* confdefs.h. */
24778_ACEOF
24779cat confdefs.h >>conftest.$ac_ext
24780cat >>conftest.$ac_ext <<_ACEOF
24781/* end confdefs.h. */
24782#include <sys/stat.h>
24783int
24784main ()
24785{
24786
24787struct stat st;
24788st.st_mtimespec.tv_nsec = 1;
24789
24790 ;
24791 return 0;
24792}
24793_ACEOF
24794rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024795if { (ac_try="$ac_compile"
24796case "(($ac_try" in
24797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24798 *) ac_try_echo=$ac_try;;
24799esac
24800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24801 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024802 ac_status=$?
24803 grep -v '^ *+' conftest.er1 >conftest.err
24804 rm -f conftest.er1
24805 cat conftest.err >&5
24806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024807 (exit $ac_status); } && {
24808 test -z "$ac_c_werror_flag" ||
24809 test ! -s conftest.err
24810 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024811 ac_cv_stat_tv_nsec2=yes
24812else
24813 echo "$as_me: failed program was:" >&5
24814sed 's/^/| /' conftest.$ac_ext >&5
24815
Martin v. Löwiseba40652007-08-30 20:10:57 +000024816 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024817fi
24818
Martin v. Löwiseba40652007-08-30 20:10:57 +000024819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24820fi
24821
24822{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24823echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024824if test "$ac_cv_stat_tv_nsec2" = yes
24825then
24826
24827cat >>confdefs.h <<\_ACEOF
24828#define HAVE_STAT_TV_NSEC2 1
24829_ACEOF
24830
24831fi
24832
Jack Jansen666b1e72001-10-31 12:11:48 +000024833# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024834{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24835echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024836if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24837 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024838else
Martin v. Löwis11437992002-04-12 09:54:03 +000024839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024840/* confdefs.h. */
24841_ACEOF
24842cat confdefs.h >>conftest.$ac_ext
24843cat >>conftest.$ac_ext <<_ACEOF
24844/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024845#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024846int
24847main ()
24848{
Jack Jansen666b1e72001-10-31 12:11:48 +000024849
24850 int rtn;
24851 rtn = mvwdelch(0,0,0);
24852
Martin v. Löwis11437992002-04-12 09:54:03 +000024853 ;
24854 return 0;
24855}
24856_ACEOF
24857rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024858if { (ac_try="$ac_compile"
24859case "(($ac_try" in
24860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24861 *) ac_try_echo=$ac_try;;
24862esac
24863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24864 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024866 grep -v '^ *+' conftest.er1 >conftest.err
24867 rm -f conftest.er1
24868 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024870 (exit $ac_status); } && {
24871 test -z "$ac_c_werror_flag" ||
24872 test ! -s conftest.err
24873 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024874 ac_cv_mvwdelch_is_expression=yes
24875else
Martin v. Löwis11437992002-04-12 09:54:03 +000024876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024877sed 's/^/| /' conftest.$ac_ext >&5
24878
Martin v. Löwiseba40652007-08-30 20:10:57 +000024879 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024880fi
24881
Martin v. Löwiseba40652007-08-30 20:10:57 +000024882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24883fi
24884
24885{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24886echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024887
24888if test "$ac_cv_mvwdelch_is_expression" = yes
24889then
Martin v. Löwis11437992002-04-12 09:54:03 +000024890
24891cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024892#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024893_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024894
24895fi
24896
Martin v. Löwiseba40652007-08-30 20:10:57 +000024897{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24898echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024899if test "${ac_cv_window_has_flags+set}" = set; then
24900 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024901else
Martin v. Löwis11437992002-04-12 09:54:03 +000024902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024903/* confdefs.h. */
24904_ACEOF
24905cat confdefs.h >>conftest.$ac_ext
24906cat >>conftest.$ac_ext <<_ACEOF
24907/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024908#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024909int
24910main ()
24911{
Jack Jansen666b1e72001-10-31 12:11:48 +000024912
24913 WINDOW *w;
24914 w->_flags = 0;
24915
Martin v. Löwis11437992002-04-12 09:54:03 +000024916 ;
24917 return 0;
24918}
24919_ACEOF
24920rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024921if { (ac_try="$ac_compile"
24922case "(($ac_try" in
24923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24924 *) ac_try_echo=$ac_try;;
24925esac
24926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24927 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024929 grep -v '^ *+' conftest.er1 >conftest.err
24930 rm -f conftest.er1
24931 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024933 (exit $ac_status); } && {
24934 test -z "$ac_c_werror_flag" ||
24935 test ! -s conftest.err
24936 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024937 ac_cv_window_has_flags=yes
24938else
Martin v. Löwis11437992002-04-12 09:54:03 +000024939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024940sed 's/^/| /' conftest.$ac_ext >&5
24941
Martin v. Löwiseba40652007-08-30 20:10:57 +000024942 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024943fi
24944
Martin v. Löwiseba40652007-08-30 20:10:57 +000024945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24946fi
24947
24948{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24949echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024950
Jack Jansen666b1e72001-10-31 12:11:48 +000024951
24952if test "$ac_cv_window_has_flags" = yes
24953then
Martin v. Löwis11437992002-04-12 09:54:03 +000024954
24955cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024956#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024957_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024958
24959fi
24960
Martin v. Löwiseba40652007-08-30 20:10:57 +000024961{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24962echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024963cat >conftest.$ac_ext <<_ACEOF
24964/* confdefs.h. */
24965_ACEOF
24966cat confdefs.h >>conftest.$ac_ext
24967cat >>conftest.$ac_ext <<_ACEOF
24968/* end confdefs.h. */
24969#include <curses.h>
24970int
24971main ()
24972{
24973void *x=is_term_resized
24974 ;
24975 return 0;
24976}
24977_ACEOF
24978rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024979if { (ac_try="$ac_compile"
24980case "(($ac_try" in
24981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24982 *) ac_try_echo=$ac_try;;
24983esac
24984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24985 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024986 ac_status=$?
24987 grep -v '^ *+' conftest.er1 >conftest.err
24988 rm -f conftest.er1
24989 cat conftest.err >&5
24990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024991 (exit $ac_status); } && {
24992 test -z "$ac_c_werror_flag" ||
24993 test ! -s conftest.err
24994 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024995
24996cat >>confdefs.h <<\_ACEOF
24997#define HAVE_CURSES_IS_TERM_RESIZED 1
24998_ACEOF
24999
Martin v. Löwiseba40652007-08-30 20:10:57 +000025000 { echo "$as_me:$LINENO: result: yes" >&5
25001echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025002else
25003 echo "$as_me: failed program was:" >&5
25004sed 's/^/| /' conftest.$ac_ext >&5
25005
Martin v. Löwiseba40652007-08-30 20:10:57 +000025006 { echo "$as_me:$LINENO: result: no" >&5
25007echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025008
25009fi
Walter Dörwald4994d952006-06-19 08:07:50 +000025010
Martin v. Löwiseba40652007-08-30 20:10:57 +000025011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25012
25013{ echo "$as_me:$LINENO: checking for resize_term" >&5
25014echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025015cat >conftest.$ac_ext <<_ACEOF
25016/* confdefs.h. */
25017_ACEOF
25018cat confdefs.h >>conftest.$ac_ext
25019cat >>conftest.$ac_ext <<_ACEOF
25020/* end confdefs.h. */
25021#include <curses.h>
25022int
25023main ()
25024{
25025void *x=resize_term
25026 ;
25027 return 0;
25028}
25029_ACEOF
25030rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025031if { (ac_try="$ac_compile"
25032case "(($ac_try" in
25033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25034 *) ac_try_echo=$ac_try;;
25035esac
25036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25037 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000025038 ac_status=$?
25039 grep -v '^ *+' conftest.er1 >conftest.err
25040 rm -f conftest.er1
25041 cat conftest.err >&5
25042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025043 (exit $ac_status); } && {
25044 test -z "$ac_c_werror_flag" ||
25045 test ! -s conftest.err
25046 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000025047
25048cat >>confdefs.h <<\_ACEOF
25049#define HAVE_CURSES_RESIZE_TERM 1
25050_ACEOF
25051
Martin v. Löwiseba40652007-08-30 20:10:57 +000025052 { echo "$as_me:$LINENO: result: yes" >&5
25053echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025054else
25055 echo "$as_me: failed program was:" >&5
25056sed 's/^/| /' conftest.$ac_ext >&5
25057
Martin v. Löwiseba40652007-08-30 20:10:57 +000025058 { echo "$as_me:$LINENO: result: no" >&5
25059echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025060
25061fi
Walter Dörwald4994d952006-06-19 08:07:50 +000025062
Martin v. Löwiseba40652007-08-30 20:10:57 +000025063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25064
25065{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25066echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025067cat >conftest.$ac_ext <<_ACEOF
25068/* confdefs.h. */
25069_ACEOF
25070cat confdefs.h >>conftest.$ac_ext
25071cat >>conftest.$ac_ext <<_ACEOF
25072/* end confdefs.h. */
25073#include <curses.h>
25074int
25075main ()
25076{
25077void *x=resizeterm
25078 ;
25079 return 0;
25080}
25081_ACEOF
25082rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025083if { (ac_try="$ac_compile"
25084case "(($ac_try" in
25085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25086 *) ac_try_echo=$ac_try;;
25087esac
25088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25089 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000025090 ac_status=$?
25091 grep -v '^ *+' conftest.er1 >conftest.err
25092 rm -f conftest.er1
25093 cat conftest.err >&5
25094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025095 (exit $ac_status); } && {
25096 test -z "$ac_c_werror_flag" ||
25097 test ! -s conftest.err
25098 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000025099
25100cat >>confdefs.h <<\_ACEOF
25101#define HAVE_CURSES_RESIZETERM 1
25102_ACEOF
25103
Martin v. Löwiseba40652007-08-30 20:10:57 +000025104 { echo "$as_me:$LINENO: result: yes" >&5
25105echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025106else
25107 echo "$as_me: failed program was:" >&5
25108sed 's/^/| /' conftest.$ac_ext >&5
25109
Martin v. Löwiseba40652007-08-30 20:10:57 +000025110 { echo "$as_me:$LINENO: result: no" >&5
25111echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025112
25113fi
Walter Dörwald4994d952006-06-19 08:07:50 +000025114
Martin v. Löwiseba40652007-08-30 20:10:57 +000025115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25116
25117{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25118echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025119
25120if test -r /dev/ptmx
25121then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025122 { echo "$as_me:$LINENO: result: yes" >&5
25123echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025124
25125cat >>confdefs.h <<\_ACEOF
25126#define HAVE_DEV_PTMX 1
25127_ACEOF
25128
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025129else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025130 { echo "$as_me:$LINENO: result: no" >&5
25131echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025132fi
25133
Martin v. Löwiseba40652007-08-30 20:10:57 +000025134{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25135echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025136
25137if test -r /dev/ptc
25138then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025139 { echo "$as_me:$LINENO: result: yes" >&5
25140echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025141
25142cat >>confdefs.h <<\_ACEOF
25143#define HAVE_DEV_PTC 1
25144_ACEOF
25145
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025146else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025147 { echo "$as_me:$LINENO: result: no" >&5
25148echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025149fi
25150
Martin v. Löwiseba40652007-08-30 20:10:57 +000025151{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25152echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025153if test "$cross_compiling" = yes; then
25154 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
25155See \`config.log' for more details." >&5
25156echo "$as_me: error: cannot run test program while cross compiling
25157See \`config.log' for more details." >&2;}
25158 { (exit 1); exit 1; }; }
25159else
25160 cat >conftest.$ac_ext <<_ACEOF
25161/* confdefs.h. */
25162_ACEOF
25163cat confdefs.h >>conftest.$ac_ext
25164cat >>conftest.$ac_ext <<_ACEOF
25165/* end confdefs.h. */
25166#include <stdio.h>
25167#include <stddef.h>
25168#include <string.h>
25169
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025170#ifdef HAVE_SYS_TYPES_H
25171#include <sys/types.h>
25172#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025173
25174#ifdef HAVE_SSIZE_T
25175typedef ssize_t Py_ssize_t;
25176#elif SIZEOF_VOID_P == SIZEOF_LONG
25177typedef long Py_ssize_t;
25178#else
25179typedef int Py_ssize_t;
25180#endif
Brett Cannon09d12362006-05-11 05:11:33 +000025181
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025182int main()
25183{
25184 char buffer[256];
25185
Brett Cannon09d12362006-05-11 05:11:33 +000025186 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25187 return 1;
25188
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025189 if (strcmp(buffer, "123"))
25190 return 1;
25191
25192 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25193 return 1;
25194
25195 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000025196 return 1;
25197
25198 return 0;
25199}
25200_ACEOF
25201rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025202if { (ac_try="$ac_link"
25203case "(($ac_try" in
25204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25205 *) ac_try_echo=$ac_try;;
25206esac
25207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25208 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025209 ac_status=$?
25210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25211 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025212 { (case "(($ac_try" in
25213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25214 *) ac_try_echo=$ac_try;;
25215esac
25216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25217 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025218 ac_status=$?
25219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25220 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025221 { echo "$as_me:$LINENO: result: yes" >&5
25222echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025223
25224cat >>confdefs.h <<\_ACEOF
25225#define PY_FORMAT_SIZE_T "z"
25226_ACEOF
25227
25228else
25229 echo "$as_me: program exited with status $ac_status" >&5
25230echo "$as_me: failed program was:" >&5
25231sed 's/^/| /' conftest.$ac_ext >&5
25232
25233( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025234{ echo "$as_me:$LINENO: result: no" >&5
25235echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025237rm -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 +000025238fi
25239
Martin v. Löwiseba40652007-08-30 20:10:57 +000025240
25241
25242{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25243echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025244if test "${ac_cv_type_socklen_t+set}" = set; then
25245 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025246else
Martin v. Löwis11437992002-04-12 09:54:03 +000025247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025248/* confdefs.h. */
25249_ACEOF
25250cat confdefs.h >>conftest.$ac_ext
25251cat >>conftest.$ac_ext <<_ACEOF
25252/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025253
25254#ifdef HAVE_SYS_TYPES_H
25255#include <sys/types.h>
25256#endif
25257#ifdef HAVE_SYS_SOCKET_H
25258#include <sys/socket.h>
25259#endif
25260
25261
Martin v. Löwiseba40652007-08-30 20:10:57 +000025262typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025263int
25264main ()
25265{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025266if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025267 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025268if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000025269 return 0;
25270 ;
25271 return 0;
25272}
25273_ACEOF
25274rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025275if { (ac_try="$ac_compile"
25276case "(($ac_try" in
25277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25278 *) ac_try_echo=$ac_try;;
25279esac
25280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025283 grep -v '^ *+' conftest.er1 >conftest.err
25284 rm -f conftest.er1
25285 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025287 (exit $ac_status); } && {
25288 test -z "$ac_c_werror_flag" ||
25289 test ! -s conftest.err
25290 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000025291 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025292else
Martin v. Löwis11437992002-04-12 09:54:03 +000025293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025294sed 's/^/| /' conftest.$ac_ext >&5
25295
Martin v. Löwiseba40652007-08-30 20:10:57 +000025296 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025298
25299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025301{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25302echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025303if test $ac_cv_type_socklen_t = yes; then
25304 :
25305else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025306
Martin v. Löwis01c04012002-11-11 14:58:44 +000025307cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025308#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025309_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025310
25311fi
25312
Michael W. Hudson54241132001-12-07 15:38:26 +000025313
Michael W. Hudson54241132001-12-07 15:38:26 +000025314
25315
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025316for h in `(cd $srcdir;echo Python/thread_*.h)`
25317do
25318 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25319done
25320
Michael W. Hudson54241132001-12-07 15:38:26 +000025321
Neal Norwitzd24499d2005-12-18 21:36:39 +000025322SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025323{ echo "$as_me:$LINENO: checking for build directories" >&5
25324echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025325for dir in $SRCDIRS; do
25326 if test ! -d $dir; then
25327 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025328 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025329done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025330{ echo "$as_me:$LINENO: result: done" >&5
25331echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025332
Guido van Rossum627b2d71993-12-24 10:39:16 +000025333# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000025334ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025335
Martin v. Löwis11437992002-04-12 09:54:03 +000025336cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025337# This file is a shell script that caches the results of configure
25338# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025339# scripts and configure runs, see configure's option --config-cache.
25340# It is not useful on other systems. If it contains results you don't
25341# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025342#
Martin v. Löwis11437992002-04-12 09:54:03 +000025343# config.status only pays attention to the cache file if you give it
25344# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025345#
Skip Montanaro6dead952003-09-25 14:50:04 +000025346# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025347# loading this file, other *unset* `ac_cv_foo' will be assigned the
25348# following values.
25349
25350_ACEOF
25351
Guido van Rossumf78abae1997-01-21 22:02:36 +000025352# The following way of writing the cache mishandles newlines in values,
25353# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025354# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025355# Ultrix sh set writes to stderr and can't be redirected directly,
25356# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025357(
25358 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25359 eval ac_val=\$$ac_var
25360 case $ac_val in #(
25361 *${as_nl}*)
25362 case $ac_var in #(
25363 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25364echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
25365 esac
25366 case $ac_var in #(
25367 _ | IFS | as_nl) ;; #(
25368 *) $as_unset $ac_var ;;
25369 esac ;;
25370 esac
25371 done
25372
Martin v. Löwis11437992002-04-12 09:54:03 +000025373 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025374 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25375 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025376 # `set' does not quote correctly, so add quotes (double-quote
25377 # substitution turns \\\\ into \\, and sed turns \\ into \).
25378 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025379 "s/'/'\\\\''/g;
25380 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025381 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025382 *)
25383 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025384 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025385 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025386 esac |
25387 sort
25388) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025389 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025390 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025391 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000025392 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025393 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25394 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000025395 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25396 :end' >>confcache
25397if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25398 if test -w "$cache_file"; then
25399 test "x$cache_file" != "x/dev/null" &&
25400 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25401echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025402 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025403 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025404 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25405echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025406 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025407fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025408rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025409
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025410test "x$prefix" = xNONE && prefix=$ac_default_prefix
25411# Let make expand exec_prefix.
25412test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025413
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025414DEFS=-DHAVE_CONFIG_H
25415
Skip Montanaro6dead952003-09-25 14:50:04 +000025416ac_libobjs=
25417ac_ltlibobjs=
25418for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25419 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025420 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25421 ac_i=`echo "$ac_i" | sed "$ac_script"`
25422 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25423 # will be set to the directory where LIBOBJS objects are built.
25424 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25425 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025426done
25427LIBOBJS=$ac_libobjs
25428
25429LTLIBOBJS=$ac_ltlibobjs
25430
25431
Martin v. Löwis11437992002-04-12 09:54:03 +000025432
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025433: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025434ac_clean_files_save=$ac_clean_files
25435ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25436{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25437echo "$as_me: creating $CONFIG_STATUS" >&6;}
25438cat >$CONFIG_STATUS <<_ACEOF
25439#! $SHELL
25440# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025441# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025442# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025443# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025444
Martin v. Löwis11437992002-04-12 09:54:03 +000025445debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025446ac_cs_recheck=false
25447ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025448SHELL=\${CONFIG_SHELL-$SHELL}
25449_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025450
Martin v. Löwis11437992002-04-12 09:54:03 +000025451cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025452## --------------------- ##
25453## M4sh Initialization. ##
25454## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025455
Martin v. Löwiseba40652007-08-30 20:10:57 +000025456# Be more Bourne compatible
25457DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025458if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25459 emulate sh
25460 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025461 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25462 # is contrary to our usage. Disable this feature.
25463 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025464 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025465else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025466 case `(set -o) 2>/dev/null` in
25467 *posix*) set -o posix ;;
25468esac
25469
Martin v. Löwis11437992002-04-12 09:54:03 +000025470fi
Michael W. Hudson54241132001-12-07 15:38:26 +000025471
Skip Montanaro6dead952003-09-25 14:50:04 +000025472
Martin v. Löwis11437992002-04-12 09:54:03 +000025473
25474
Martin v. Löwiseba40652007-08-30 20:10:57 +000025475# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025476# Avoid depending upon Character Ranges.
25477as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25478as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25479as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25480as_cr_digits='0123456789'
25481as_cr_alnum=$as_cr_Letters$as_cr_digits
25482
25483# The user is always right.
25484if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000025485 echo "#! /bin/sh" >conf$$.sh
25486 echo "exit 0" >>conf$$.sh
25487 chmod +x conf$$.sh
25488 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025489 PATH_SEPARATOR=';'
25490 else
25491 PATH_SEPARATOR=:
25492 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000025493 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025494fi
25495
Martin v. Löwiseba40652007-08-30 20:10:57 +000025496# Support unset when possible.
25497if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25498 as_unset=unset
25499else
25500 as_unset=false
25501fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025502
Martin v. Löwiseba40652007-08-30 20:10:57 +000025503
25504# IFS
25505# We need space, tab and new line, in precisely that order. Quoting is
25506# there to prevent editors from complaining about space-tab.
25507# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25508# splitting by setting IFS to empty value.)
25509as_nl='
25510'
25511IFS=" "" $as_nl"
25512
25513# Find who we are. Look in the path if we contain no directory separator.
25514case $0 in
25515 *[\\/]* ) as_myself=$0 ;;
25516 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025517for as_dir in $PATH
25518do
25519 IFS=$as_save_IFS
25520 test -z "$as_dir" && as_dir=.
25521 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25522done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025523IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025524
Martin v. Löwiseba40652007-08-30 20:10:57 +000025525 ;;
25526esac
25527# We did not find ourselves, most probably we were run as `sh COMMAND'
25528# in which case we are not to be found in the path.
25529if test "x$as_myself" = x; then
25530 as_myself=$0
25531fi
25532if test ! -f "$as_myself"; then
25533 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25534 { (exit 1); exit 1; }
25535fi
25536
25537# Work around bugs in pre-3.0 UWIN ksh.
25538for as_var in ENV MAIL MAILPATH
25539do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25540done
25541PS1='$ '
25542PS2='> '
25543PS4='+ '
25544
25545# NLS nuisances.
25546for as_var in \
25547 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25548 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25549 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000025550do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025551 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25552 eval $as_var=C; export $as_var
25553 else
25554 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25555 fi
25556done
25557
25558# Required to use basename.
25559if expr a : '\(a\)' >/dev/null 2>&1 &&
25560 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25561 as_expr=expr
25562else
25563 as_expr=false
25564fi
25565
25566if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25567 as_basename=basename
25568else
25569 as_basename=false
25570fi
25571
25572
25573# Name of the executable.
25574as_me=`$as_basename -- "$0" ||
25575$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25576 X"$0" : 'X\(//\)$' \| \
25577 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25578echo X/"$0" |
25579 sed '/^.*\/\([^/][^/]*\)\/*$/{
25580 s//\1/
25581 q
25582 }
25583 /^X\/\(\/\/\)$/{
25584 s//\1/
25585 q
25586 }
25587 /^X\/\(\/\).*/{
25588 s//\1/
25589 q
25590 }
25591 s/.*/./; q'`
25592
25593# CDPATH.
25594$as_unset CDPATH
25595
25596
25597
Martin v. Löwis11437992002-04-12 09:54:03 +000025598 as_lineno_1=$LINENO
25599 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025600 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025601 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025602
Martin v. Löwis11437992002-04-12 09:54:03 +000025603 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25604 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000025605 # line-number line after each line using $LINENO; the second 'sed'
25606 # does the real work. The second script uses 'N' to pair each
25607 # line-number line with the line containing $LINENO, and appends
25608 # trailing '-' during substitution so that $LINENO is not a special
25609 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025610 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025611 # scripts with optimization help from Paolo Bonzini. Blame Lee
25612 # E. McMahon (1931-1989) for sed's syntax. :-)
25613 sed -n '
25614 p
25615 /[$]LINENO/=
25616 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025617 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025618 s/[$]LINENO.*/&-/
25619 t lineno
25620 b
25621 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025622 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000025623 :loop
25624 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025625 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000025626 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025627 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025628 chmod +x "$as_me.lineno" ||
25629 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025630 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025631
Martin v. Löwis11437992002-04-12 09:54:03 +000025632 # Don't try to exec as it changes $[0], causing all sort of problems
25633 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025634 # original and so on. Autoconf is especially sensitive to this).
25635 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025636 # Exit status is that of the last command.
25637 exit
25638}
25639
25640
Martin v. Löwiseba40652007-08-30 20:10:57 +000025641if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25642 as_dirname=dirname
25643else
25644 as_dirname=false
25645fi
25646
25647ECHO_C= ECHO_N= ECHO_T=
25648case `echo -n x` in
25649-n*)
25650 case `echo 'x\c'` in
25651 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25652 *) ECHO_C='\c';;
25653 esac;;
25654*)
25655 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025656esac
25657
Martin v. Löwiseba40652007-08-30 20:10:57 +000025658if expr a : '\(a\)' >/dev/null 2>&1 &&
25659 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025660 as_expr=expr
25661else
25662 as_expr=false
25663fi
25664
25665rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025666if test -d conf$$.dir; then
25667 rm -f conf$$.dir/conf$$.file
25668else
25669 rm -f conf$$.dir
25670 mkdir conf$$.dir
25671fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025672echo >conf$$.file
25673if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025674 as_ln_s='ln -s'
25675 # ... but there are two gotchas:
25676 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25677 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25678 # In both cases, we have to default to `cp -p'.
25679 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025680 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025681elif ln conf$$.file conf$$ 2>/dev/null; then
25682 as_ln_s=ln
25683else
25684 as_ln_s='cp -p'
25685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025686rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25687rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025688
Skip Montanaro6dead952003-09-25 14:50:04 +000025689if mkdir -p . 2>/dev/null; then
25690 as_mkdir_p=:
25691else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025692 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025693 as_mkdir_p=false
25694fi
25695
Martin v. Löwiseba40652007-08-30 20:10:57 +000025696if test -x / >/dev/null 2>&1; then
25697 as_test_x='test -x'
25698else
25699 if ls -dL / >/dev/null 2>&1; then
25700 as_ls_L_option=L
25701 else
25702 as_ls_L_option=
25703 fi
25704 as_test_x='
25705 eval sh -c '\''
25706 if test -d "$1"; then
25707 test -d "$1/.";
25708 else
25709 case $1 in
25710 -*)set "./$1";;
25711 esac;
25712 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25713 ???[sx]*):;;*)false;;esac;fi
25714 '\'' sh
25715 '
25716fi
25717as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025718
25719# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025720as_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 +000025721
25722# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025723as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025724
25725
Martin v. Löwis11437992002-04-12 09:54:03 +000025726exec 6>&1
25727
Martin v. Löwiseba40652007-08-30 20:10:57 +000025728# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025729# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025730# values after options handling.
25731ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000025732This file was extended by python $as_me 2.7, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025733generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025734
25735 CONFIG_FILES = $CONFIG_FILES
25736 CONFIG_HEADERS = $CONFIG_HEADERS
25737 CONFIG_LINKS = $CONFIG_LINKS
25738 CONFIG_COMMANDS = $CONFIG_COMMANDS
25739 $ $0 $@
25740
Martin v. Löwiseba40652007-08-30 20:10:57 +000025741on `(hostname || uname -n) 2>/dev/null | sed 1q`
25742"
25743
Martin v. Löwis11437992002-04-12 09:54:03 +000025744_ACEOF
25745
Martin v. Löwiseba40652007-08-30 20:10:57 +000025746cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025747# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025748config_files="$ac_config_files"
25749config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025750
Martin v. Löwiseba40652007-08-30 20:10:57 +000025751_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025752
25753cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025754ac_cs_usage="\
25755\`$as_me' instantiates files from templates according to the
25756current configuration.
25757
25758Usage: $0 [OPTIONS] [FILE]...
25759
25760 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025761 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025762 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025763 -d, --debug don't remove temporary files
25764 --recheck update $as_me by reconfiguring in the same conditions
25765 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025766 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025767 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025768 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025769
25770Configuration files:
25771$config_files
25772
25773Configuration headers:
25774$config_headers
25775
25776Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025777
Martin v. Löwiseba40652007-08-30 20:10:57 +000025778_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025779cat >>$CONFIG_STATUS <<_ACEOF
25780ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000025781python config.status 2.7
Martin v. Löwiseba40652007-08-30 20:10:57 +000025782configured by $0, generated by GNU Autoconf 2.61,
25783 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025784
Martin v. Löwiseba40652007-08-30 20:10:57 +000025785Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025786This config.status script is free software; the Free Software Foundation
25787gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025788
25789ac_pwd='$ac_pwd'
25790srcdir='$srcdir'
25791INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025792_ACEOF
25793
25794cat >>$CONFIG_STATUS <<\_ACEOF
25795# If no file are specified by the user, then we need to provide default
25796# value. By we need to know if files were specified by the user.
25797ac_need_defaults=:
25798while test $# != 0
25799do
25800 case $1 in
25801 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025802 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25803 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025804 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025805 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025806 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025807 ac_option=$1
25808 ac_optarg=$2
25809 ac_shift=shift
25810 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025811 esac
25812
Skip Montanaro6dead952003-09-25 14:50:04 +000025813 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025814 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025815 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25816 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025817 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25818 echo "$ac_cs_version"; exit ;;
25819 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025820 debug=: ;;
25821 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025822 $ac_shift
25823 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025824 ac_need_defaults=false;;
25825 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025826 $ac_shift
25827 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025828 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025829 --he | --h)
25830 # Conflict between --help and --header
25831 { echo "$as_me: error: ambiguous option: $1
25832Try \`$0 --help' for more information." >&2
25833 { (exit 1); exit 1; }; };;
25834 --help | --hel | -h )
25835 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025836 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25837 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25838 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025839
25840 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025841 -*) { echo "$as_me: error: unrecognized option: $1
25842Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025843 { (exit 1); exit 1; }; } ;;
25844
Martin v. Löwiseba40652007-08-30 20:10:57 +000025845 *) ac_config_targets="$ac_config_targets $1"
25846 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025847
25848 esac
25849 shift
25850done
25851
Skip Montanaro6dead952003-09-25 14:50:04 +000025852ac_configure_extra_args=
25853
25854if $ac_cs_silent; then
25855 exec 6>/dev/null
25856 ac_configure_extra_args="$ac_configure_extra_args --silent"
25857fi
25858
25859_ACEOF
25860cat >>$CONFIG_STATUS <<_ACEOF
25861if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025862 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25863 CONFIG_SHELL=$SHELL
25864 export CONFIG_SHELL
25865 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025866fi
25867
Martin v. Löwis11437992002-04-12 09:54:03 +000025868_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025869cat >>$CONFIG_STATUS <<\_ACEOF
25870exec 5>>config.log
25871{
25872 echo
25873 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25874## Running $as_me. ##
25875_ASBOX
25876 echo "$ac_log"
25877} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025878
Martin v. Löwiseba40652007-08-30 20:10:57 +000025879_ACEOF
25880cat >>$CONFIG_STATUS <<_ACEOF
25881_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025882
25883cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025884
25885# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025886for ac_config_target in $ac_config_targets
25887do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025888 case $ac_config_target in
25889 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25890 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25891 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25892 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025893 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25894 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025895 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25896 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25897
Martin v. Löwis11437992002-04-12 09:54:03 +000025898 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25899echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25900 { (exit 1); exit 1; }; };;
25901 esac
25902done
25903
Martin v. Löwiseba40652007-08-30 20:10:57 +000025904
Martin v. Löwis11437992002-04-12 09:54:03 +000025905# If the user did not use the arguments to specify the items to instantiate,
25906# then the envvar interface is used. Set only those that are not.
25907# We use the long form for the default assignment because of an extremely
25908# bizarre bug on SunOS 4.1.3.
25909if $ac_need_defaults; then
25910 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25911 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25912fi
25913
Skip Montanaro6dead952003-09-25 14:50:04 +000025914# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025915# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025916# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025917# Hook for its removal unless debugging.
25918# Note that there is a small window in which the directory will not be cleaned:
25919# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025920$debug ||
25921{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025922 tmp=
25923 trap 'exit_status=$?
25924 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25925' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025926 trap '{ (exit 1); exit 1; }' 1 2 13 15
25927}
Martin v. Löwis11437992002-04-12 09:54:03 +000025928# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025929
Martin v. Löwis11437992002-04-12 09:54:03 +000025930{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025931 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025932 test -n "$tmp" && test -d "$tmp"
25933} ||
25934{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025935 tmp=./conf$$-$RANDOM
25936 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025937} ||
25938{
Skip Montanaro6dead952003-09-25 14:50:04 +000025939 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025940 { (exit 1); exit 1; }
25941}
25942
Martin v. Löwis11437992002-04-12 09:54:03 +000025943#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025944# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025945#
25946
25947# No need to generate the scripts if there are no CONFIG_FILES.
25948# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025949if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025950
25951_ACEOF
25952
Martin v. Löwiseba40652007-08-30 20:10:57 +000025953
25954
25955ac_delim='%!_!# '
25956for ac_last_try in false false false false false :; do
25957 cat >conf$$subs.sed <<_ACEOF
25958SHELL!$SHELL$ac_delim
25959PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25960PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25961PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25962PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25963PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25964PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25965exec_prefix!$exec_prefix$ac_delim
25966prefix!$prefix$ac_delim
25967program_transform_name!$program_transform_name$ac_delim
25968bindir!$bindir$ac_delim
25969sbindir!$sbindir$ac_delim
25970libexecdir!$libexecdir$ac_delim
25971datarootdir!$datarootdir$ac_delim
25972datadir!$datadir$ac_delim
25973sysconfdir!$sysconfdir$ac_delim
25974sharedstatedir!$sharedstatedir$ac_delim
25975localstatedir!$localstatedir$ac_delim
25976includedir!$includedir$ac_delim
25977oldincludedir!$oldincludedir$ac_delim
25978docdir!$docdir$ac_delim
25979infodir!$infodir$ac_delim
25980htmldir!$htmldir$ac_delim
25981dvidir!$dvidir$ac_delim
25982pdfdir!$pdfdir$ac_delim
25983psdir!$psdir$ac_delim
25984libdir!$libdir$ac_delim
25985localedir!$localedir$ac_delim
25986mandir!$mandir$ac_delim
25987DEFS!$DEFS$ac_delim
25988ECHO_C!$ECHO_C$ac_delim
25989ECHO_N!$ECHO_N$ac_delim
25990ECHO_T!$ECHO_T$ac_delim
25991LIBS!$LIBS$ac_delim
25992build_alias!$build_alias$ac_delim
25993host_alias!$host_alias$ac_delim
25994target_alias!$target_alias$ac_delim
25995VERSION!$VERSION$ac_delim
25996SOVERSION!$SOVERSION$ac_delim
25997CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25998UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025999ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026000PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000026001PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026002PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26003PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26004PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26005FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26006FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26007FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26008FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26009FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26010MACHDEP!$MACHDEP$ac_delim
26011SGI_ABI!$SGI_ABI$ac_delim
26012EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
26013EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
26014CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26015EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26016CC!$CC$ac_delim
26017CFLAGS!$CFLAGS$ac_delim
26018LDFLAGS!$LDFLAGS$ac_delim
26019CPPFLAGS!$CPPFLAGS$ac_delim
26020ac_ct_CC!$ac_ct_CC$ac_delim
26021EXEEXT!$EXEEXT$ac_delim
26022OBJEXT!$OBJEXT$ac_delim
26023CXX!$CXX$ac_delim
26024MAINCC!$MAINCC$ac_delim
26025CPP!$CPP$ac_delim
26026GREP!$GREP$ac_delim
26027EGREP!$EGREP$ac_delim
26028BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26029LIBRARY!$LIBRARY$ac_delim
26030LDLIBRARY!$LDLIBRARY$ac_delim
26031DLLLIBRARY!$DLLLIBRARY$ac_delim
26032BLDLIBRARY!$BLDLIBRARY$ac_delim
26033LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26034INSTSONAME!$INSTSONAME$ac_delim
26035RUNSHARED!$RUNSHARED$ac_delim
26036LINKCC!$LINKCC$ac_delim
26037RANLIB!$RANLIB$ac_delim
26038AR!$AR$ac_delim
26039SVNVERSION!$SVNVERSION$ac_delim
26040INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26041INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26042INSTALL_DATA!$INSTALL_DATA$ac_delim
26043LN!$LN$ac_delim
26044OPT!$OPT$ac_delim
26045BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000026046UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026047OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26048LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26049SO!$SO$ac_delim
26050LDSHARED!$LDSHARED$ac_delim
26051BLDSHARED!$BLDSHARED$ac_delim
26052CCSHARED!$CCSHARED$ac_delim
26053LINKFORSHARED!$LINKFORSHARED$ac_delim
26054CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026055_ACEOF
26056
26057 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
26058 break
26059 elif $ac_last_try; then
26060 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26061echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26062 { (exit 1); exit 1; }; }
26063 else
26064 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026065 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026066done
26067
26068ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26069if test -n "$ac_eof"; then
26070 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26071 ac_eof=`expr $ac_eof + 1`
26072fi
26073
26074cat >>$CONFIG_STATUS <<_ACEOF
26075cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26076/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26077_ACEOF
26078sed '
26079s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26080s/^/s,@/; s/!/@,|#_!!_#|/
26081:n
26082t n
26083s/'"$ac_delim"'$/,g/; t
26084s/$/\\/; p
26085N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26086' >>$CONFIG_STATUS <conf$$subs.sed
26087rm -f conf$$subs.sed
26088cat >>$CONFIG_STATUS <<_ACEOF
26089CEOF$ac_eof
26090_ACEOF
26091
26092
26093ac_delim='%!_!# '
26094for ac_last_try in false false false false false :; do
26095 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000026096SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000026097USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000026098SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000026099USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26100LDLAST!$LDLAST$ac_delim
26101THREADOBJ!$THREADOBJ$ac_delim
26102DLINCLDIR!$DLINCLDIR$ac_delim
26103DYNLOADFILE!$DYNLOADFILE$ac_delim
26104MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26105TRUE!$TRUE$ac_delim
26106LIBOBJS!$LIBOBJS$ac_delim
26107HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26108HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26109HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26110HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26111HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26112LIBM!$LIBM$ac_delim
26113LIBC!$LIBC$ac_delim
26114UNICODE_OBJS!$UNICODE_OBJS$ac_delim
26115THREADHEADERS!$THREADHEADERS$ac_delim
26116SRCDIRS!$SRCDIRS$ac_delim
26117LTLIBOBJS!$LTLIBOBJS$ac_delim
26118_ACEOF
26119
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000026120 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 +000026121 break
26122 elif $ac_last_try; then
26123 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26124echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26125 { (exit 1); exit 1; }; }
26126 else
26127 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26128 fi
26129done
26130
26131ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26132if test -n "$ac_eof"; then
26133 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26134 ac_eof=`expr $ac_eof + 1`
26135fi
26136
26137cat >>$CONFIG_STATUS <<_ACEOF
26138cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26139/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
26140_ACEOF
26141sed '
26142s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26143s/^/s,@/; s/!/@,|#_!!_#|/
26144:n
26145t n
26146s/'"$ac_delim"'$/,g/; t
26147s/$/\\/; p
26148N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26149' >>$CONFIG_STATUS <conf$$subs.sed
26150rm -f conf$$subs.sed
26151cat >>$CONFIG_STATUS <<_ACEOF
26152:end
26153s/|#_!!_#|//g
26154CEOF$ac_eof
26155_ACEOF
26156
26157
26158# VPATH may cause trouble with some makes, so we remove $(srcdir),
26159# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26160# trailing colons and then remove the whole line if VPATH becomes empty
26161# (actually we leave an empty line to preserve line numbers).
26162if test "x$srcdir" = x.; then
26163 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26164s/:*\$(srcdir):*/:/
26165s/:*\${srcdir}:*/:/
26166s/:*@srcdir@:*/:/
26167s/^\([^=]*=[ ]*\):*/\1/
26168s/:*$//
26169s/^[^=]*=[ ]*$//
26170}'
26171fi
26172
26173cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026174fi # test -n "$CONFIG_FILES"
26175
Martin v. Löwiseba40652007-08-30 20:10:57 +000026176
26177for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
26178do
26179 case $ac_tag in
26180 :[FHLC]) ac_mode=$ac_tag; continue;;
26181 esac
26182 case $ac_mode$ac_tag in
26183 :[FHL]*:*);;
26184 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26185echo "$as_me: error: Invalid tag $ac_tag." >&2;}
26186 { (exit 1); exit 1; }; };;
26187 :[FH]-) ac_tag=-:-;;
26188 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26189 esac
26190 ac_save_IFS=$IFS
26191 IFS=:
26192 set x $ac_tag
26193 IFS=$ac_save_IFS
26194 shift
26195 ac_file=$1
26196 shift
26197
26198 case $ac_mode in
26199 :L) ac_source=$1;;
26200 :[FH])
26201 ac_file_inputs=
26202 for ac_f
26203 do
26204 case $ac_f in
26205 -) ac_f="$tmp/stdin";;
26206 *) # Look for the file first in the build tree, then in the source tree
26207 # (if the path is not absolute). The absolute path cannot be DOS-style,
26208 # because $ac_f cannot contain `:'.
26209 test -f "$ac_f" ||
26210 case $ac_f in
26211 [\\/$]*) false;;
26212 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26213 esac ||
26214 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26215echo "$as_me: error: cannot find input file: $ac_f" >&2;}
26216 { (exit 1); exit 1; }; };;
26217 esac
26218 ac_file_inputs="$ac_file_inputs $ac_f"
26219 done
26220
26221 # Let's still pretend it is `configure' which instantiates (i.e., don't
26222 # use $as_me), people would be surprised to read:
26223 # /* config.h. Generated by config.status. */
26224 configure_input="Generated from "`IFS=:
26225 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
26226 if test x"$ac_file" != x-; then
26227 configure_input="$ac_file. $configure_input"
26228 { echo "$as_me:$LINENO: creating $ac_file" >&5
26229echo "$as_me: creating $ac_file" >&6;}
26230 fi
26231
26232 case $ac_tag in
26233 *:-:* | *:-) cat >"$tmp/stdin";;
26234 esac
26235 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026236 esac
26237
Martin v. Löwiseba40652007-08-30 20:10:57 +000026238 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026239$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026240 X"$ac_file" : 'X\(//\)[^/]' \| \
26241 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000026242 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026243echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026244 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26245 s//\1/
26246 q
26247 }
26248 /^X\(\/\/\)[^/].*/{
26249 s//\1/
26250 q
26251 }
26252 /^X\(\/\/\)$/{
26253 s//\1/
26254 q
26255 }
26256 /^X\(\/\).*/{
26257 s//\1/
26258 q
26259 }
26260 s/.*/./; q'`
26261 { as_dir="$ac_dir"
26262 case $as_dir in #(
26263 -*) as_dir=./$as_dir;;
26264 esac
26265 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026266 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000026267 while :; do
26268 case $as_dir in #(
26269 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
26270 *) as_qdir=$as_dir;;
26271 esac
26272 as_dirs="'$as_qdir' $as_dirs"
26273 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026274$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026275 X"$as_dir" : 'X\(//\)[^/]' \| \
26276 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000026277 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026278echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026279 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26280 s//\1/
26281 q
26282 }
26283 /^X\(\/\/\)[^/].*/{
26284 s//\1/
26285 q
26286 }
26287 /^X\(\/\/\)$/{
26288 s//\1/
26289 q
26290 }
26291 /^X\(\/\).*/{
26292 s//\1/
26293 q
26294 }
26295 s/.*/./; q'`
26296 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026297 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026298 test -z "$as_dirs" || eval "mkdir $as_dirs"
26299 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26300echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026301 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026302 ac_builddir=.
26303
Martin v. Löwiseba40652007-08-30 20:10:57 +000026304case "$ac_dir" in
26305.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26306*)
Martin v. Löwis11437992002-04-12 09:54:03 +000026307 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026308 # A ".." for each directory in $ac_dir_suffix.
26309 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
26310 case $ac_top_builddir_sub in
26311 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26312 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26313 esac ;;
26314esac
26315ac_abs_top_builddir=$ac_pwd
26316ac_abs_builddir=$ac_pwd$ac_dir_suffix
26317# for backward compatibility:
26318ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026319
26320case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026321 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026322 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026323 ac_top_srcdir=$ac_top_builddir_sub
26324 ac_abs_top_srcdir=$ac_pwd ;;
26325 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026326 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026327 ac_top_srcdir=$srcdir
26328 ac_abs_top_srcdir=$srcdir ;;
26329 *) # Relative name.
26330 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26331 ac_top_srcdir=$ac_top_build_prefix$srcdir
26332 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026333esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026334ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026335
Martin v. Löwis11437992002-04-12 09:54:03 +000026336
Martin v. Löwiseba40652007-08-30 20:10:57 +000026337 case $ac_mode in
26338 :F)
26339 #
26340 # CONFIG_FILE
26341 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026342
26343 case $INSTALL in
26344 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026345 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026346 esac
Brett Cannon19fab762007-06-02 03:02:29 +000026347_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026348
26349cat >>$CONFIG_STATUS <<\_ACEOF
26350# If the template does not know about datarootdir, expand it.
26351# FIXME: This hack should be removed a few years after 2.60.
26352ac_datarootdir_hack=; ac_datarootdir_seen=
26353
26354case `sed -n '/datarootdir/ {
26355 p
26356 q
26357}
26358/@datadir@/p
26359/@docdir@/p
26360/@infodir@/p
26361/@localedir@/p
26362/@mandir@/p
26363' $ac_file_inputs` in
26364*datarootdir*) ac_datarootdir_seen=yes;;
26365*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26366 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26367echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26368_ACEOF
26369cat >>$CONFIG_STATUS <<_ACEOF
26370 ac_datarootdir_hack='
26371 s&@datadir@&$datadir&g
26372 s&@docdir@&$docdir&g
26373 s&@infodir@&$infodir&g
26374 s&@localedir@&$localedir&g
26375 s&@mandir@&$mandir&g
26376 s&\\\${datarootdir}&$datarootdir&g' ;;
26377esac
26378_ACEOF
26379
26380# Neutralize VPATH when `$srcdir' = `.'.
26381# Shell code in configure.ac might set extrasub.
26382# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000026383cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026384 sed "$ac_vpsub
26385$extrasub
26386_ACEOF
26387cat >>$CONFIG_STATUS <<\_ACEOF
26388:t
26389/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000026390s&@configure_input@&$configure_input&;t t
26391s&@top_builddir@&$ac_top_builddir_sub&;t t
26392s&@srcdir@&$ac_srcdir&;t t
26393s&@abs_srcdir@&$ac_abs_srcdir&;t t
26394s&@top_srcdir@&$ac_top_srcdir&;t t
26395s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26396s&@builddir@&$ac_builddir&;t t
26397s&@abs_builddir@&$ac_abs_builddir&;t t
26398s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26399s&@INSTALL@&$ac_INSTALL&;t t
26400$ac_datarootdir_hack
26401" $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 +000026402
Martin v. Löwiseba40652007-08-30 20:10:57 +000026403test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26404 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26405 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26406 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26407which seems to be undefined. Please make sure it is defined." >&5
26408echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26409which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026410
Martin v. Löwiseba40652007-08-30 20:10:57 +000026411 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026412 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026413 -) cat "$tmp/out"; rm -f "$tmp/out";;
26414 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026415 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026416 ;;
26417 :H)
26418 #
26419 # CONFIG_HEADER
26420 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026421_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026422
Martin v. Löwiseba40652007-08-30 20:10:57 +000026423# Transform confdefs.h into a sed script `conftest.defines', that
26424# substitutes the proper values into config.h.in to produce config.h.
26425rm -f conftest.defines conftest.tail
26426# First, append a space to every undef/define line, to ease matching.
26427echo 's/$/ /' >conftest.defines
26428# Then, protect against being on the right side of a sed subst, or in
26429# an unquoted here document, in config.status. If some macros were
26430# called several times there might be several #defines for the same
26431# symbol, which is useless. But do not sort them, since the last
26432# AC_DEFINE must be honored.
26433ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26434# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26435# NAME is the cpp macro being defined, VALUE is the value it is being given.
26436# PARAMS is the parameter list in the macro definition--in most cases, it's
26437# just an empty string.
26438ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26439ac_dB='\\)[ (].*,\\1define\\2'
26440ac_dC=' '
26441ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026442
Martin v. Löwiseba40652007-08-30 20:10:57 +000026443uniq confdefs.h |
26444 sed -n '
26445 t rset
26446 :rset
26447 s/^[ ]*#[ ]*define[ ][ ]*//
26448 t ok
26449 d
26450 :ok
26451 s/[\\&,]/\\&/g
26452 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26453 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26454 ' >>conftest.defines
26455
26456# Remove the space that was appended to ease matching.
26457# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026458# example, in the case of _POSIX_SOURCE, which is predefined and required
26459# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026460# (The regexp can be short, since the line contains either #define or #undef.)
26461echo 's/ $//
26462s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000026463
Martin v. Löwiseba40652007-08-30 20:10:57 +000026464# Break up conftest.defines:
26465ac_max_sed_lines=50
26466
26467# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26468# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26469# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26470# et cetera.
26471ac_in='$ac_file_inputs'
26472ac_out='"$tmp/out1"'
26473ac_nxt='"$tmp/out2"'
26474
26475while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000026476do
Martin v. Löwiseba40652007-08-30 20:10:57 +000026477 # Write a here document:
26478 cat >>$CONFIG_STATUS <<_ACEOF
26479 # First, check the format of the line:
26480 cat >"\$tmp/defines.sed" <<\\CEOF
26481/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26482/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26483b
26484:def
26485_ACEOF
26486 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000026487 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026488 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26489 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26490 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26491 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000026492 rm -f conftest.defines
26493 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000026494done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026495rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000026496
Martin v. Löwiseba40652007-08-30 20:10:57 +000026497echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026498cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026499 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026500 echo "/* $configure_input */" >"$tmp/config.h"
26501 cat "$ac_result" >>"$tmp/config.h"
26502 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026503 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26504echo "$as_me: $ac_file is unchanged" >&6;}
26505 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026506 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000026507 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026508 fi
26509 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026510 echo "/* $configure_input */"
26511 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026512 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026513 rm -f "$tmp/out12"
26514 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026515
Martin v. Löwiseba40652007-08-30 20:10:57 +000026516
26517 esac
26518
26519done # for ac_tag
26520
Guido van Rossum627b2d71993-12-24 10:39:16 +000026521
Martin v. Löwis11437992002-04-12 09:54:03 +000026522{ (exit 0); exit 0; }
26523_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026524chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026525ac_clean_files=$ac_clean_files_save
26526
26527
26528# configure is writing to config.log, and then calls config.status.
26529# config.status does its own redirection, appending to config.log.
26530# Unfortunately, on DOS this fails, as config.log is still kept open
26531# by configure, so config.status won't be able to write to it; its
26532# output is simply discarded. So we exec the FD to /dev/null,
26533# effectively closing config.log, so it can be properly (re)opened and
26534# appended to by config.status. When coming back to configure, we
26535# need to make the FD available again.
26536if test "$no_create" != yes; then
26537 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026538 ac_config_status_args=
26539 test "$silent" = yes &&
26540 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026541 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026542 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026543 exec 5>>config.log
26544 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26545 # would make configure fail if this is the last instruction.
26546 $ac_cs_success || { (exit 1); exit 1; }
26547fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026548
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026549
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026550echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026551if test ! -f Modules/Setup
26552then
26553 cp $srcdir/Modules/Setup.dist Modules/Setup
26554fi
26555
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026556echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026557if test ! -f Modules/Setup.local
26558then
26559 echo "# Edit this file for local setup changes" >Modules/Setup.local
26560fi
26561
26562echo "creating Makefile"
26563$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26564 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026565 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000026566
26567case $ac_sys_system in
26568BeOS)
26569 { echo "$as_me:$LINENO: WARNING:
26570
26571 Support for BeOS is deprecated as of Python 2.6.
26572 See PEP 11 for the gory details.
26573 " >&5
26574echo "$as_me: WARNING:
26575
26576 Support for BeOS is deprecated as of Python 2.6.
26577 See PEP 11 for the gory details.
26578 " >&2;}
26579 ;;
26580*) ;;
26581esac
26582
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026583mv config.c Modules