blob: f6010ef047688a61c8cf0bf0fd2efd113664146e [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002# From configure.in Revision: 63545 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004# Generated by GNU Autoconf 2.61 for python 2.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000049 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000053 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
Martin v. Löwis11437992002-04-12 09:54:03 +0000115 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116done
117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
138echo X/"$0" |
139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
164 if test $as_have_required = yes && (eval ":
165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Neal Norwitz9be57322006-08-18 05:39:20 +0000578PACKAGE_VERSION='2.6'
579PACKAGE_STRING='python 2.6'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000580PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660PYTHONFRAMEWORK
Ronald Oussoren580c7fe2008-05-02 19:45:11 +0000661PYTHONFRAMEWORKIDENTIFIER
Martin v. Löwiseba40652007-08-30 20:10:57 +0000662PYTHONFRAMEWORKDIR
663PYTHONFRAMEWORKPREFIX
664PYTHONFRAMEWORKINSTALLDIR
665FRAMEWORKINSTALLFIRST
666FRAMEWORKINSTALLLAST
667FRAMEWORKALTINSTALLFIRST
668FRAMEWORKALTINSTALLLAST
669FRAMEWORKUNIXTOOLSPREFIX
670MACHDEP
671SGI_ABI
672EXTRAPLATDIR
673EXTRAMACHDEPPATH
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697RANLIB
698AR
699SVNVERSION
700INSTALL_PROGRAM
701INSTALL_SCRIPT
702INSTALL_DATA
703LN
704OPT
705BASECFLAGS
706OTHER_LIBTOOL_OPT
707LIBTOOL_CRUFT
708SO
709LDSHARED
710BLDSHARED
711CCSHARED
712LINKFORSHARED
713CFLAGSFORSHARED
714SHLIBS
715USE_SIGNAL_MODULE
716SIGNAL_OBJS
717USE_THREAD_MODULE
718LDLAST
719THREADOBJ
720DLINCLDIR
721DYNLOADFILE
722MACHDEP_OBJS
723TRUE
724LIBOBJS
725HAVE_GETHOSTBYNAME_R_6_ARG
726HAVE_GETHOSTBYNAME_R_5_ARG
727HAVE_GETHOSTBYNAME_R_3_ARG
728HAVE_GETHOSTBYNAME_R
729HAVE_GETHOSTBYNAME
730LIBM
731LIBC
732UNICODE_OBJS
733THREADHEADERS
734SRCDIRS
735LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000736ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000737 ac_precious_vars='build_alias
738host_alias
739target_alias
740CC
741CFLAGS
742LDFLAGS
743LIBS
744CPPFLAGS
745CPP'
746
Guido van Rossum627b2d71993-12-24 10:39:16 +0000747
Guido van Rossum7f43da71994-08-01 12:15:30 +0000748# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000749ac_init_help=
750ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000751# The variables have the same names as the options, with
752# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000754exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756no_recursion=
757prefix=NONE
758program_prefix=NONE
759program_suffix=NONE
760program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000761silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000762site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000765x_includes=NONE
766x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000767
768# Installation directory options.
769# These are left unexpanded so users can "make install exec_prefix=/foo"
770# and all the variables that are supposed to be based on exec_prefix
771# by default will actually change.
772# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000773# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000774bindir='${exec_prefix}/bin'
775sbindir='${exec_prefix}/sbin'
776libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000777datarootdir='${prefix}/share'
778datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000779sysconfdir='${prefix}/etc'
780sharedstatedir='${prefix}/com'
781localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000782includedir='${prefix}/include'
783oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000784docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
785infodir='${datarootdir}/info'
786htmldir='${docdir}'
787dvidir='${docdir}'
788pdfdir='${docdir}'
789psdir='${docdir}'
790libdir='${exec_prefix}/lib'
791localedir='${datarootdir}/locale'
792mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000795ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000797do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798 # If the previous option needs an argument, assign it.
799 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000800 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801 ac_prev=
802 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000803 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804
Martin v. Löwiseba40652007-08-30 20:10:57 +0000805 case $ac_option in
806 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
807 *) ac_optarg=yes ;;
808 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000810 # Accept the important Cygnus configure options, so we can diagnose typos.
811
Martin v. Löwiseba40652007-08-30 20:10:57 +0000812 case $ac_dashdash$ac_option in
813 --)
814 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816 -bindir | --bindir | --bindi | --bind | --bin | --bi)
817 ac_prev=bindir ;;
818 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000819 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820
821 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000822 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000826 -cache-file | --cache-file | --cache-fil | --cache-fi \
827 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
828 ac_prev=cache_file ;;
829 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
830 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000831 cache_file=$ac_optarg ;;
832
833 --config-cache | -C)
834 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835
Martin v. Löwiseba40652007-08-30 20:10:57 +0000836 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000839 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840
Martin v. Löwiseba40652007-08-30 20:10:57 +0000841 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
842 | --dataroo | --dataro | --datar)
843 ac_prev=datarootdir ;;
844 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
845 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
846 datarootdir=$ac_optarg ;;
847
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000851 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
853 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000854 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
855 eval enable_$ac_feature=no ;;
856
857 -docdir | --docdir | --docdi | --doc | --do)
858 ac_prev=docdir ;;
859 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
860 docdir=$ac_optarg ;;
861
862 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
863 ac_prev=dvidir ;;
864 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
865 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866
867 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000868 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000870 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000871 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
872 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000873 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
874 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
877 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
878 | --exec | --exe | --ex)
879 ac_prev=exec_prefix ;;
880 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
881 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
882 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000883 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884
885 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886 # Obsolete; use --with-gas.
887 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
Martin v. Löwis11437992002-04-12 09:54:03 +0000889 -help | --help | --hel | --he | -h)
890 ac_init_help=long ;;
891 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
892 ac_init_help=recursive ;;
893 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
894 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
896 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Martin v. Löwiseba40652007-08-30 20:10:57 +0000901 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
902 ac_prev=htmldir ;;
903 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
904 | --ht=*)
905 htmldir=$ac_optarg ;;
906
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907 -includedir | --includedir | --includedi | --included | --include \
908 | --includ | --inclu | --incl | --inc)
909 ac_prev=includedir ;;
910 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
911 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913
914 -infodir | --infodir | --infodi | --infod | --info | --inf)
915 ac_prev=infodir ;;
916 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -libdir | --libdir | --libdi | --libd)
920 ac_prev=libdir ;;
921 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923
924 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
925 | --libexe | --libex | --libe)
926 ac_prev=libexecdir ;;
927 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
928 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
Martin v. Löwiseba40652007-08-30 20:10:57 +0000931 -localedir | --localedir | --localedi | --localed | --locale)
932 ac_prev=localedir ;;
933 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
934 localedir=$ac_optarg ;;
935
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000937 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 ac_prev=localstatedir ;;
939 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942
943 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
944 ac_prev=mandir ;;
945 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949 # Obsolete; use --without-fp.
950 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
952 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954 no_create=yes ;;
955
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
957 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
958 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
961 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
962 | --oldin | --oldi | --old | --ol | --o)
963 ac_prev=oldincludedir ;;
964 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
965 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
966 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
970 ac_prev=prefix ;;
971 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
974 -program-prefix | --program-prefix | --program-prefi | --program-pref \
975 | --program-pre | --program-pr | --program-p)
976 ac_prev=program_prefix ;;
977 -program-prefix=* | --program-prefix=* | --program-prefi=* \
978 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
981 -program-suffix | --program-suffix | --program-suffi | --program-suff \
982 | --program-suf | --program-su | --program-s)
983 ac_prev=program_suffix ;;
984 -program-suffix=* | --program-suffix=* | --program-suffi=* \
985 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -program-transform-name | --program-transform-name \
989 | --program-transform-nam | --program-transform-na \
990 | --program-transform-n | --program-transform- \
991 | --program-transform | --program-transfor \
992 | --program-transfo | --program-transf \
993 | --program-trans | --program-tran \
994 | --progr-tra | --program-tr | --program-t)
995 ac_prev=program_transform_name ;;
996 -program-transform-name=* | --program-transform-name=* \
997 | --program-transform-nam=* | --program-transform-na=* \
998 | --program-transform-n=* | --program-transform-=* \
999 | --program-transform=* | --program-transfor=* \
1000 | --program-transfo=* | --program-transf=* \
1001 | --program-trans=* | --program-tran=* \
1002 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Martin v. Löwiseba40652007-08-30 20:10:57 +00001005 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1006 ac_prev=pdfdir ;;
1007 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1008 pdfdir=$ac_optarg ;;
1009
1010 -psdir | --psdir | --psdi | --psd | --ps)
1011 ac_prev=psdir ;;
1012 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1013 psdir=$ac_optarg ;;
1014
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1016 | -silent | --silent | --silen | --sile | --sil)
1017 silent=yes ;;
1018
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1020 ac_prev=sbindir ;;
1021 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1022 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024
1025 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1026 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1027 | --sharedst | --shareds | --shared | --share | --shar \
1028 | --sha | --sh)
1029 ac_prev=sharedstatedir ;;
1030 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1031 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1032 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1033 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001036 -site | --site | --sit)
1037 ac_prev=site ;;
1038 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1042 ac_prev=srcdir ;;
1043 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1047 | --syscon | --sysco | --sysc | --sys | --sy)
1048 ac_prev=sysconfdir ;;
1049 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1050 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
1058 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1059 verbose=yes ;;
1060
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 -version | --version | --versio | --versi | --vers | -V)
1062 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
1064 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001066 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001067 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 { echo "$as_me: error: invalid package name: $ac_package" >&2
1069 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001070 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1071 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001076 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 { echo "$as_me: error: invalid package name: $ac_package" >&2
1078 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001079 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1080 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 --x)
1083 # Obsolete; use --with-x.
1084 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1087 | --x-incl | --x-inc | --x-in | --x-i)
1088 ac_prev=x_includes ;;
1089 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1090 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1094 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1095 ac_prev=x_libraries ;;
1096 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1097 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 -*) { echo "$as_me: error: unrecognized option: $ac_option
1101Try \`$0 --help' for more information." >&2
1102 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 ;;
1104
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 *=*)
1106 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1107 # Reject names that are not valid shell variable names.
1108 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1109 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1110 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001111 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 export $ac_envvar ;;
1113
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 # FIXME: should be removed in autoconf 3.0.
1116 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1117 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1118 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1119 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120 ;;
1121
1122 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001123done
1124
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1127 { echo "$as_me: error: missing argument to $ac_option" >&2
1128 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129fi
1130
Martin v. Löwiseba40652007-08-30 20:10:57 +00001131# Be sure to have absolute directory names.
1132for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1133 datadir sysconfdir sharedstatedir localstatedir includedir \
1134 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1135 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001137 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139 [\\/$]* | ?:[\\/]* ) continue;;
1140 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001142 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1143 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001144done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001145
Martin v. Löwis11437992002-04-12 09:54:03 +00001146# There might be people who depend on the old broken behavior: `$host'
1147# used to hold the argument of --host etc.
1148# FIXME: To remove some day.
1149build=$build_alias
1150host=$host_alias
1151target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153# FIXME: To remove some day.
1154if test "x$host_alias" != x; then
1155 if test "x$build_alias" = x; then
1156 cross_compiling=maybe
1157 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1158 If a cross compiler is detected then cross compile mode will be used." >&2
1159 elif test "x$build_alias" != "x$host_alias"; then
1160 cross_compiling=yes
1161 fi
1162fi
1163
1164ac_tool_prefix=
1165test -n "$host_alias" && ac_tool_prefix=$host_alias-
1166
1167test "$silent" = yes && exec 6>/dev/null
1168
Guido van Rossum627b2d71993-12-24 10:39:16 +00001169
Martin v. Löwiseba40652007-08-30 20:10:57 +00001170ac_pwd=`pwd` && test -n "$ac_pwd" &&
1171ac_ls_di=`ls -di .` &&
1172ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1173 { echo "$as_me: error: Working directory cannot be determined" >&2
1174 { (exit 1); exit 1; }; }
1175test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1176 { echo "$as_me: error: pwd does not report name of working directory" >&2
1177 { (exit 1); exit 1; }; }
1178
1179
Guido van Rossum627b2d71993-12-24 10:39:16 +00001180# Find the source files, if location was not specified.
1181if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001183 # Try the directory containing this script, then the parent directory.
1184 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001185$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001186 X"$0" : 'X\(//\)[^/]' \| \
1187 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001188 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001189echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1191 s//\1/
1192 q
1193 }
1194 /^X\(\/\/\)[^/].*/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)$/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\).*/{
1203 s//\1/
1204 q
1205 }
1206 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001208 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001209 srcdir=..
1210 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211else
1212 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001214if test ! -r "$srcdir/$ac_unique_file"; then
1215 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1216 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001219ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1220ac_abs_confdir=`(
1221 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001222 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223 pwd)`
1224# When building in place, set srcdir=.
1225if test "$ac_abs_confdir" = "$ac_pwd"; then
1226 srcdir=.
1227fi
1228# Remove unnecessary trailing slashes from srcdir.
1229# Double slashes in file names in object file debugging info
1230# mess up M-x gdb in Emacs.
1231case $srcdir in
1232*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1233esac
1234for ac_var in $ac_precious_vars; do
1235 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1236 eval ac_env_${ac_var}_value=\$${ac_var}
1237 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1239done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001240
Martin v. Löwis11437992002-04-12 09:54:03 +00001241#
1242# Report the --help message.
1243#
1244if test "$ac_init_help" = "long"; then
1245 # Omit some internal or obsolete options to make the list less imposing.
1246 # This message is too long to be a string in the A/UX 3.1 sh.
1247 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001248\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001249
1250Usage: $0 [OPTION]... [VAR=VALUE]...
1251
1252To assign environment variables (e.g., CC, CFLAGS...), specify them as
1253VAR=VALUE. See below for descriptions of some of the useful variables.
1254
1255Defaults for the options are specified in brackets.
1256
1257Configuration:
1258 -h, --help display this help and exit
1259 --help=short display options specific to this package
1260 --help=recursive display the short help of all the included packages
1261 -V, --version display version information and exit
1262 -q, --quiet, --silent do not print \`checking...' messages
1263 --cache-file=FILE cache test results in FILE [disabled]
1264 -C, --config-cache alias for \`--cache-file=config.cache'
1265 -n, --no-create do not create output files
1266 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1267
Martin v. Löwis11437992002-04-12 09:54:03 +00001268Installation directories:
1269 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001270 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001272 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
1274By default, \`make install' will install all the files in
1275\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1276an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1277for instance \`--prefix=\$HOME'.
1278
1279For better control, use the options below.
1280
1281Fine tuning of the installation directories:
1282 --bindir=DIR user executables [EPREFIX/bin]
1283 --sbindir=DIR system admin executables [EPREFIX/sbin]
1284 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001285 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1286 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1287 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1288 --libdir=DIR object code libraries [EPREFIX/lib]
1289 --includedir=DIR C header files [PREFIX/include]
1290 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001291 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1292 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1293 --infodir=DIR info documentation [DATAROOTDIR/info]
1294 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1295 --mandir=DIR man documentation [DATAROOTDIR/man]
1296 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1297 --htmldir=DIR html documentation [DOCDIR]
1298 --dvidir=DIR dvi documentation [DOCDIR]
1299 --pdfdir=DIR pdf documentation [DOCDIR]
1300 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001301_ACEOF
1302
1303 cat <<\_ACEOF
1304_ACEOF
1305fi
1306
1307if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001308 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001309 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001311 cat <<\_ACEOF
1312
1313Optional Features:
1314 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1315 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001316 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001317 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001318 --enable-framework[=INSTALLDIR]
1319 Build (MacOSX|Darwin) framework
1320 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001321 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
1325 --enable-unicode[=ucs[24]]
1326 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001331 --with-framework-name=FRAMEWORK
1332 specify an alternate name of the framework built
1333 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001335 --with-cxx-main=<compiler>
1336 compile main() and link python executable with C++
1337 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --with-suffix=.exe set executable suffix
1339 --with-pydebug build with Py_DEBUG defined
1340 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001341 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001342 --with-signal-module disable/enable signal module
1343 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1344 --with(out)-threads[=DIRECTORY]
1345 disable/enable thread support
1346 --with(out)-thread[=DIRECTORY]
1347 deprecated; use --with(out)-threads
1348 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001350 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001351 --with(out)-pymalloc disable/enable specialized mallocs
1352 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001353 --with-fpectl enable SIGFPE catching
1354 --with-libm=STRING math library
1355 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001356
1357Some influential environment variables:
1358 CC C compiler command
1359 CFLAGS C compiler flags
1360 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1361 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001362 LIBS libraries to pass to the linker, e.g. -l<library>
1363 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1364 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001365 CPP C preprocessor
1366
1367Use these variables to override the choices made by `configure' or to help
1368it to find libraries and programs with nonstandard names/locations.
1369
Martin v. Löwis1d459062005-03-14 21:23:33 +00001370Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001371_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001372ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001373fi
1374
1375if test "$ac_init_help" = "recursive"; then
1376 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001378 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 ac_builddir=.
1380
Martin v. Löwiseba40652007-08-30 20:10:57 +00001381case "$ac_dir" in
1382.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1383*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385 # A ".." for each directory in $ac_dir_suffix.
1386 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1387 case $ac_top_builddir_sub in
1388 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1389 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1390 esac ;;
1391esac
1392ac_abs_top_builddir=$ac_pwd
1393ac_abs_builddir=$ac_pwd$ac_dir_suffix
1394# for backward compatibility:
1395ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
1397case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 ac_top_srcdir=$ac_top_builddir_sub
1401 ac_abs_top_srcdir=$ac_pwd ;;
1402 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001403 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001404 ac_top_srcdir=$srcdir
1405 ac_abs_top_srcdir=$srcdir ;;
1406 *) # Relative name.
1407 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1408 ac_top_srcdir=$ac_top_build_prefix$srcdir
1409 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001410esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001412
Martin v. Löwiseba40652007-08-30 20:10:57 +00001413 cd "$ac_dir" || { ac_status=$?; continue; }
1414 # Check for guested configure.
1415 if test -f "$ac_srcdir/configure.gnu"; then
1416 echo &&
1417 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1418 elif test -f "$ac_srcdir/configure"; then
1419 echo &&
1420 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 else
1422 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001423 fi || ac_status=$?
1424 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 done
1426fi
1427
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001429if $ac_init_version; then
1430 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001431python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001432generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001433
Martin v. Löwiseba40652007-08-30 20:10:57 +00001434Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14352002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001436This configure script is free software; the Free Software Foundation
1437gives unlimited permission to copy, distribute and modify it.
1438_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001442This file contains any messages produced by compilers while
1443running configure, to aid debugging if configure makes a mistake.
1444
Neal Norwitz9be57322006-08-18 05:39:20 +00001445It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001447
1448 $ $0 $@
1449
1450_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001452{
1453cat <<_ASUNAME
1454## --------- ##
1455## Platform. ##
1456## --------- ##
1457
1458hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1459uname -m = `(uname -m) 2>/dev/null || echo unknown`
1460uname -r = `(uname -r) 2>/dev/null || echo unknown`
1461uname -s = `(uname -s) 2>/dev/null || echo unknown`
1462uname -v = `(uname -v) 2>/dev/null || echo unknown`
1463
1464/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1465/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1466
1467/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1468/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1469/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001470/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001471/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1472/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1473/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1474
1475_ASUNAME
1476
1477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1478for as_dir in $PATH
1479do
1480 IFS=$as_save_IFS
1481 test -z "$as_dir" && as_dir=.
1482 echo "PATH: $as_dir"
1483done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001484IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001485
1486} >&5
1487
1488cat >&5 <<_ACEOF
1489
1490
1491## ----------- ##
1492## Core tests. ##
1493## ----------- ##
1494
1495_ACEOF
1496
1497
1498# Keep a trace of the command line.
1499# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001500# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001501# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001502# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001503ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001504ac_configure_args0=
1505ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001506ac_must_keep_next=false
1507for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001508do
Skip Montanaro6dead952003-09-25 14:50:04 +00001509 for ac_arg
1510 do
1511 case $ac_arg in
1512 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1513 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1514 | -silent | --silent | --silen | --sile | --sil)
1515 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001516 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001517 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1518 esac
1519 case $ac_pass in
1520 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1521 2)
1522 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1523 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001524 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001525 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001526 case $ac_arg in
1527 *=* | --config-cache | -C | -disable-* | --disable-* \
1528 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1529 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1530 | -with-* | --with-* | -without-* | --without-* | --x)
1531 case "$ac_configure_args0 " in
1532 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1533 esac
1534 ;;
1535 -* ) ac_must_keep_next=true ;;
1536 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001537 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001538 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001539 ;;
1540 esac
1541 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001542done
Skip Montanaro6dead952003-09-25 14:50:04 +00001543$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1544$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 +00001545
1546# When interrupted or exit'd, cleanup temporary files, and complete
1547# config.log. We remove comments because anyway the quotes in there
1548# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001549# WARNING: Use '\'' to represent an apostrophe within the trap.
1550# 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 +00001551trap 'exit_status=$?
1552 # Save into config.log some information that might help in debugging.
1553 {
1554 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001555
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 cat <<\_ASBOX
1557## ---------------- ##
1558## Cache variables. ##
1559## ---------------- ##
1560_ASBOX
1561 echo
1562 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563(
1564 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1565 eval ac_val=\$$ac_var
1566 case $ac_val in #(
1567 *${as_nl}*)
1568 case $ac_var in #(
1569 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1570echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1571 esac
1572 case $ac_var in #(
1573 _ | IFS | as_nl) ;; #(
1574 *) $as_unset $ac_var ;;
1575 esac ;;
1576 esac
1577 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001579 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1580 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582 "s/'\''/'\''\\\\'\'''\''/g;
1583 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1584 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001585 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001586 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001587 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588 esac |
1589 sort
1590)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001592
1593 cat <<\_ASBOX
1594## ----------------- ##
1595## Output variables. ##
1596## ----------------- ##
1597_ASBOX
1598 echo
1599 for ac_var in $ac_subst_vars
1600 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 eval ac_val=\$$ac_var
1602 case $ac_val in
1603 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1604 esac
1605 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001606 done | sort
1607 echo
1608
1609 if test -n "$ac_subst_files"; then
1610 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001611## ------------------- ##
1612## File substitutions. ##
1613## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001614_ASBOX
1615 echo
1616 for ac_var in $ac_subst_files
1617 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618 eval ac_val=\$$ac_var
1619 case $ac_val in
1620 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1621 esac
1622 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001623 done | sort
1624 echo
1625 fi
1626
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 if test -s confdefs.h; then
1628 cat <<\_ASBOX
1629## ----------- ##
1630## confdefs.h. ##
1631## ----------- ##
1632_ASBOX
1633 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001634 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 echo
1636 fi
1637 test "$ac_signal" != 0 &&
1638 echo "$as_me: caught signal $ac_signal"
1639 echo "$as_me: exit $exit_status"
1640 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001641 rm -f core *.core core.conftest.* &&
1642 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001644' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001645for ac_signal in 1 2 13 15; do
1646 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1647done
1648ac_signal=0
1649
1650# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001651rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001652
1653# Predefined preprocessor variables.
1654
1655cat >>confdefs.h <<_ACEOF
1656#define PACKAGE_NAME "$PACKAGE_NAME"
1657_ACEOF
1658
1659
1660cat >>confdefs.h <<_ACEOF
1661#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1662_ACEOF
1663
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_VERSION "$PACKAGE_VERSION"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_STRING "$PACKAGE_STRING"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1677_ACEOF
1678
1679
1680# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001681# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001682if test -n "$CONFIG_SITE"; then
1683 set x "$CONFIG_SITE"
1684elif test "x$prefix" != xNONE; then
1685 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1686else
1687 set x "$ac_default_prefix/share/config.site" \
1688 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001690shift
1691for ac_site_file
1692do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001694 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1695echo "$as_me: loading site script $ac_site_file" >&6;}
1696 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001697 . "$ac_site_file"
1698 fi
1699done
1700
1701if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001702 # Some versions of bash will fail to source /dev/null (special
1703 # files actually), so we avoid doing that.
1704 if test -f "$cache_file"; then
1705 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1706echo "$as_me: loading cache $cache_file" >&6;}
1707 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001708 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1709 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001710 esac
1711 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712else
Martin v. Löwis11437992002-04-12 09:54:03 +00001713 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1714echo "$as_me: creating cache $cache_file" >&6;}
1715 >$cache_file
1716fi
1717
1718# Check that the precious variables saved in the cache have kept the same
1719# value.
1720ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001721for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1723 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001724 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1725 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001726 case $ac_old_set,$ac_new_set in
1727 set,)
1728 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1729echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1730 ac_cache_corrupted=: ;;
1731 ,set)
1732 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1733echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1734 ac_cache_corrupted=: ;;
1735 ,);;
1736 *)
1737 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001739echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001740 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001741echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001742 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001743echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001744 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 fi;;
1746 esac
1747 # Pass precious variables to config.status.
1748 if test "$ac_new_set" = set; then
1749 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001750 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001751 *) ac_arg=$ac_var=$ac_new_val ;;
1752 esac
1753 case " $ac_configure_args " in
1754 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1755 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1756 esac
1757 fi
1758done
1759if $ac_cache_corrupted; then
1760 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1761echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1762 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1763echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1764 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001765fi
1766
Martin v. Löwiseba40652007-08-30 20:10:57 +00001767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
Guido van Rossum7f43da71994-08-01 12:15:30 +00001791ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1795ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001796
Guido van Rossum627b2d71993-12-24 10:39:16 +00001797
Michael W. Hudson54241132001-12-07 15:38:26 +00001798
Martin v. Löwiseba40652007-08-30 20:10:57 +00001799ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001800
1801
Martin v. Löwis11437992002-04-12 09:54:03 +00001802
1803
1804
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001805
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001806
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001807# We don't use PACKAGE_ variables, and they cause conflicts
1808# with other autoconf-based packages that include Python.h
1809grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1810rm confdefs.h
1811mv confdefs.h.new confdefs.h
1812
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001813
Neal Norwitz9be57322006-08-18 05:39:20 +00001814VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001815
Martin v. Löwis1142de32002-03-29 16:28:31 +00001816
1817SOVERSION=1.0
1818
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001819# The later defininition of _XOPEN_SOURCE disables certain features
1820# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1821
1822cat >>confdefs.h <<\_ACEOF
1823#define _GNU_SOURCE 1
1824_ACEOF
1825
1826
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001827# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1828# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1829# them.
1830
1831cat >>confdefs.h <<\_ACEOF
1832#define _NETBSD_SOURCE 1
1833_ACEOF
1834
1835
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001836# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1837# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1838# them.
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define __BSD_VISIBLE 1
1842_ACEOF
1843
1844
Martin v. Löwisd6320502004-08-12 13:45:08 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1847
1848cat >>confdefs.h <<\_ACEOF
1849#define _BSD_TYPES 1
1850_ACEOF
1851
1852
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001853define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001854
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001855# Arguments passed to configure.
1856
1857CONFIG_ARGS="$ac_configure_args"
1858
Martin v. Löwiseba40652007-08-30 20:10:57 +00001859# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001860if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001861 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001862 case $enableval in
1863 yes)
1864 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1865 ;;
1866 esac
1867 case $enableval in
1868 no)
1869 UNIVERSALSDK=
1870 enable_universalsdk=
1871 ;;
1872 *)
1873 UNIVERSALSDK=$enableval
1874 ;;
1875 esac
1876
1877else
1878
1879 UNIVERSALSDK=
1880 enable_universalsdk=
1881
Martin v. Löwiseba40652007-08-30 20:10:57 +00001882fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001883
1884
Martin v. Löwiseba40652007-08-30 20:10:57 +00001885
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001886
1887# Check whether --with-framework-name was given.
1888if test "${with_framework_name+set}" = set; then
1889 withval=$with_framework_name;
1890 PYTHONFRAMEWORK=${withval}
1891 PYTHONFRAMEWORKDIR=${withval}.framework
1892 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1893
1894else
1895
1896 PYTHONFRAMEWORK=Python
1897 PYTHONFRAMEWORKDIR=Python.framework
1898 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1899
1900fi
1901
Martin v. Löwiseba40652007-08-30 20:10:57 +00001902# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001903if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001904 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001905 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001906 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001907 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001908 esac
1909 case $enableval in
1910 no)
1911 PYTHONFRAMEWORK=
1912 PYTHONFRAMEWORKDIR=no-framework
1913 PYTHONFRAMEWORKPREFIX=
1914 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001915 FRAMEWORKINSTALLFIRST=
1916 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001917 FRAMEWORKALTINSTALLFIRST=
1918 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001919 if test "x${prefix}" = "xNONE"; then
1920 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1921 else
1922 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1923 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001924 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001925 ;;
1926 *)
1927 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001928 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001929 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1930 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5b787322006-06-06 19:50:24 +00001931 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1932 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001933 if test "x${prefix}" = "xNONE" ; then
1934 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1935 else
1936 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1937 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001938 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001939
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001940 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001941 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001942 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001943
Martin v. Löwiseba40652007-08-30 20:10:57 +00001944 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001945
Martin v. Löwiseba40652007-08-30 20:10:57 +00001946 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001947
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001948 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1949
1950 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1951
Jack Jansene578a632001-08-15 01:27:14 +00001952 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001953
Guido van Rossum563e7081996-09-10 18:20:48 +00001954else
Martin v. Löwis11437992002-04-12 09:54:03 +00001955
Jack Jansene578a632001-08-15 01:27:14 +00001956 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001957 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001958 PYTHONFRAMEWORKPREFIX=
1959 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001960 FRAMEWORKINSTALLFIRST=
1961 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001962 FRAMEWORKALTINSTALLFIRST=
1963 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001964 if test "x${prefix}" = "xNONE" ; then
1965 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1966 else
1967 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1968 fi
Jack Jansene578a632001-08-15 01:27:14 +00001969 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001970
Martin v. Löwiseba40652007-08-30 20:10:57 +00001971fi
1972
Michael W. Hudson54241132001-12-07 15:38:26 +00001973
1974
1975
1976
Jack Jansene578a632001-08-15 01:27:14 +00001977
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001978
1979
Ronald Oussoren5b787322006-06-06 19:50:24 +00001980
1981
1982
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001983
Jack Jansene578a632001-08-15 01:27:14 +00001984##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001985## AC_HELP_STRING(--with-dyld,
1986## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001987##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001988# Set name for machine-dependent library files
1989
Martin v. Löwiseba40652007-08-30 20:10:57 +00001990{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1991echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001992if test -z "$MACHDEP"
1993then
Guido van Rossum563e7081996-09-10 18:20:48 +00001994 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001995 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1996 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001997 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001998 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001999 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002000 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002001 ac_md_system=`echo $ac_sys_system |
2002 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2003 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002004 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002005 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002006
Guido van Rossum07397971997-04-29 21:49:50 +00002007 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002008 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002009 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002010 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002011 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002012 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002013 esac
2014fi
Guido van Rossum91922671997-10-09 20:24:13 +00002015
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002016# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2017# disable features if it is defined, without any means to access these
2018# features as extensions. For these systems, we skip the definition of
2019# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2020# some feature, make sure there is no alternative way to access this
2021# feature. Also, when using wildcards, make sure you have verified the
2022# need for not defining _XOPEN_SOURCE on all systems matching the
2023# wildcard, and that the wildcard does not include future systems
2024# (which may remove their limitations).
2025case $ac_sys_system/$ac_sys_release in
2026 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2027 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002028 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz4bc2c092006-09-05 02:57:01 +00002029 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002030 define_xopen_source=no
2031 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2032 # also defined. This can be overridden by defining _BSD_SOURCE
2033 # As this has a different meaning on Linux, only define it on OpenBSD
2034
2035cat >>confdefs.h <<\_ACEOF
2036#define _BSD_SOURCE 1
2037_ACEOF
2038
2039 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002040 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2041 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2042 # Marc Recht
2043 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2044 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002045 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2046 # of union __?sigval. Reported by Stuart Bishop.
2047 SunOS/5.6)
2048 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002049 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2050 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002051 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002052 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002053 define_xopen_source=no;;
2054 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002055 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002056 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002057 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002058 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2059 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2060 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2061 # This should hopefully be fixed in FreeBSD 4.9
2062 FreeBSD/4.8* | Darwin/6* )
2063 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002064 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2065 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2066 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002067 AIX/4)
2068 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002069 AIX/5)
2070 if test `uname -r` -eq 1; then
2071 define_xopen_source=no
2072 fi
2073 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002074 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2075 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002076 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002077 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002078 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002079 define_xopen_source=no
2080 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002081 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2082 # defining NI_NUMERICHOST.
2083 QNX/6.3.2)
2084 define_xopen_source=no
2085 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002086
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002087esac
2088
2089if test $define_xopen_source = yes
2090then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002091 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2092 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002093 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2094 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002095 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002096 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002097
2098cat >>confdefs.h <<\_ACEOF
2099#define _XOPEN_SOURCE 500
2100_ACEOF
2101
2102 ;;
2103 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002104
2105cat >>confdefs.h <<\_ACEOF
2106#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002107_ACEOF
2108
Skip Montanarof0d5f792004-08-15 14:08:23 +00002109 ;;
2110 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002111
2112 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2113 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2114 # several APIs are not declared. Since this is also needed in some
2115 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002116 # except for Solaris 10, where it must not be defined,
2117 # as it implies XPG4.2
2118 case $ac_sys_system/$ac_sys_release in
2119 SunOS/5.10)
2120 ;;
2121 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002122
2123cat >>confdefs.h <<\_ACEOF
2124#define _XOPEN_SOURCE_EXTENDED 1
2125_ACEOF
2126
Martin v. Löwis7dece662005-11-26 11:38:24 +00002127 ;;
2128 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002129
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002130
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002131cat >>confdefs.h <<\_ACEOF
2132#define _POSIX_C_SOURCE 200112L
2133_ACEOF
2134
2135
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002136fi
2137
Guido van Rossum91922671997-10-09 20:24:13 +00002138#
2139# SGI compilers allow the specification of the both the ABI and the
2140# ISA on the command line. Depending on the values of these switches,
2141# different and often incompatable code will be generated.
2142#
2143# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2144# thus supply support for various ABI/ISA combinations. The MACHDEP
2145# variable is also adjusted.
2146#
2147
2148if test ! -z "$SGI_ABI"
2149then
2150 CC="cc $SGI_ABI"
2151 LDFLAGS="$SGI_ABI $LDFLAGS"
2152 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002154{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2155echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002156
Jack Jansen83f898c2002-12-30 22:23:40 +00002157# And add extra plat-mac for darwin
2158
Jack Jansen7b59b422003-03-17 15:44:10 +00002159
Martin v. Löwiseba40652007-08-30 20:10:57 +00002160{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2161echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002162if test -z "$EXTRAPLATDIR"
2163then
2164 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002165 darwin)
2166 EXTRAPLATDIR="\$(PLATMACDIRS)"
2167 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2168 ;;
2169 *)
2170 EXTRAPLATDIR=""
2171 EXTRAMACHDEPPATH=""
2172 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002173 esac
2174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002175{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2176echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002177
Jack Jansen6b08a402004-06-03 12:41:45 +00002178# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2179# it may influence the way we can build extensions, so distutils
2180# needs to check it
2181
Ronald Oussoren988117f2006-04-29 11:31:35 +00002182
Jack Jansen6b08a402004-06-03 12:41:45 +00002183CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002184EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002185
Mark Dickinson65134662008-04-25 16:11:04 +00002186{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2187echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2188ac_sys_machine=`uname -m`
2189{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2190echo "${ECHO_T}$ac_sys_machine" >&6; }
2191
Guido van Rossum627b2d71993-12-24 10:39:16 +00002192# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002193
2194# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2195# for debug/optimization stuff. BASECFLAGS is for flags that are required
2196# just to get things to compile and link. Users are free to override OPT
2197# when running configure or make. The build should not break if they do.
2198# BASECFLAGS should generally not be messed with, however.
2199
2200# XXX shouldn't some/most/all of this code be merged with the stuff later
2201# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002202{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2203echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002204
Martin v. Löwiseba40652007-08-30 20:10:57 +00002205# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002206if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002207 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002208 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002209 no) CC=cc
2210 without_gcc=yes;;
2211 yes) CC=gcc
2212 without_gcc=no;;
2213 *) CC=$withval
2214 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002215 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002216else
Martin v. Löwis11437992002-04-12 09:54:03 +00002217
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002218 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002219 AIX*) CC=cc_r
2220 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002221 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002222 case $BE_HOST_CPU in
2223 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002224 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002225 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002226 BASECFLAGS="$BASECFLAGS -export pragma"
2227 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002228 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002229 ;;
2230 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002231 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002232 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002233 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002234 ;;
2235 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002236 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2237echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2238 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002239 ;;
2240 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002241 AR="\$(srcdir)/Modules/ar_beos"
2242 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002243 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002244 Monterey*)
2245 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002246 without_gcc=;;
2247 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002248 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002249fi
2250
2251{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2252echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002253
Guido van Rossum8b131c51995-03-09 14:10:13 +00002254# If the user switches compilers, we can't believe the cache
2255if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2256then
Martin v. Löwis11437992002-04-12 09:54:03 +00002257 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2258(it is also a good idea to do 'make clean' before compiling)" >&5
2259echo "$as_me: error: cached CC is different -- throw away $cache_file
2260(it is also a good idea to do 'make clean' before compiling)" >&2;}
2261 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002262fi
2263
Martin v. Löwis11437992002-04-12 09:54:03 +00002264ac_ext=c
2265ac_cpp='$CPP $CPPFLAGS'
2266ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2267ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2268ac_compiler_gnu=$ac_cv_c_compiler_gnu
2269if test -n "$ac_tool_prefix"; then
2270 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2271set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002272{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2273echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002274if test "${ac_cv_prog_CC+set}" = set; then
2275 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002276else
2277 if test -n "$CC"; then
2278 ac_cv_prog_CC="$CC" # Let the user override the test.
2279else
Martin v. Löwis11437992002-04-12 09:54:03 +00002280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2281for as_dir in $PATH
2282do
2283 IFS=$as_save_IFS
2284 test -z "$as_dir" && as_dir=.
2285 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002286 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 +00002287 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2288 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2289 break 2
2290 fi
2291done
2292done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002293IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002294
Jack Jansendd19cf82001-12-06 22:36:17 +00002295fi
2296fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002297CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002298if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002299 { echo "$as_me:$LINENO: result: $CC" >&5
2300echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002301else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002302 { echo "$as_me:$LINENO: result: no" >&5
2303echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002304fi
2305
Martin v. Löwiseba40652007-08-30 20:10:57 +00002306
Martin v. Löwis11437992002-04-12 09:54:03 +00002307fi
2308if test -z "$ac_cv_prog_CC"; then
2309 ac_ct_CC=$CC
2310 # Extract the first word of "gcc", so it can be a program name with args.
2311set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002312{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002314if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2315 echo $ECHO_N "(cached) $ECHO_C" >&6
2316else
2317 if test -n "$ac_ct_CC"; then
2318 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2319else
2320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2321for as_dir in $PATH
2322do
2323 IFS=$as_save_IFS
2324 test -z "$as_dir" && as_dir=.
2325 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002326 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 +00002327 ac_cv_prog_ac_ct_CC="gcc"
2328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2329 break 2
2330 fi
2331done
2332done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002333IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002334
2335fi
2336fi
2337ac_ct_CC=$ac_cv_prog_ac_ct_CC
2338if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002339 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2340echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002341else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002342 { echo "$as_me:$LINENO: result: no" >&5
2343echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002344fi
2345
Martin v. Löwiseba40652007-08-30 20:10:57 +00002346 if test "x$ac_ct_CC" = x; then
2347 CC=""
2348 else
2349 case $cross_compiling:$ac_tool_warned in
2350yes:)
2351{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2352whose name does not start with the host triplet. If you think this
2353configuration is useful to you, please write to autoconf@gnu.org." >&5
2354echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2355whose name does not start with the host triplet. If you think this
2356configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2357ac_tool_warned=yes ;;
2358esac
2359 CC=$ac_ct_CC
2360 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002361else
2362 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002363fi
2364
Jack Jansendd19cf82001-12-06 22:36:17 +00002365if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002366 if test -n "$ac_tool_prefix"; then
2367 # 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 +00002368set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002369{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2370echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002371if test "${ac_cv_prog_CC+set}" = set; then
2372 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002373else
2374 if test -n "$CC"; then
2375 ac_cv_prog_CC="$CC" # Let the user override the test.
2376else
Martin v. Löwis11437992002-04-12 09:54:03 +00002377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2378for as_dir in $PATH
2379do
2380 IFS=$as_save_IFS
2381 test -z "$as_dir" && as_dir=.
2382 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002383 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 +00002384 ac_cv_prog_CC="${ac_tool_prefix}cc"
2385 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2386 break 2
2387 fi
2388done
2389done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002390IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002391
2392fi
2393fi
2394CC=$ac_cv_prog_CC
2395if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002396 { echo "$as_me:$LINENO: result: $CC" >&5
2397echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002398else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002399 { echo "$as_me:$LINENO: result: no" >&5
2400echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002401fi
2402
Martin v. Löwiseba40652007-08-30 20:10:57 +00002403
Martin v. Löwis11437992002-04-12 09:54:03 +00002404 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002405fi
2406if test -z "$CC"; then
2407 # Extract the first word of "cc", so it can be a program name with args.
2408set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002409{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2410echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002411if test "${ac_cv_prog_CC+set}" = set; then
2412 echo $ECHO_N "(cached) $ECHO_C" >&6
2413else
2414 if test -n "$CC"; then
2415 ac_cv_prog_CC="$CC" # Let the user override the test.
2416else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002417 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2419for as_dir in $PATH
2420do
2421 IFS=$as_save_IFS
2422 test -z "$as_dir" && as_dir=.
2423 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002424 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 +00002425 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2426 ac_prog_rejected=yes
2427 continue
2428 fi
2429 ac_cv_prog_CC="cc"
2430 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2431 break 2
2432 fi
2433done
2434done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002435IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002436
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002437if test $ac_prog_rejected = yes; then
2438 # We found a bogon in the path, so make sure we never use it.
2439 set dummy $ac_cv_prog_CC
2440 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002442 # We chose a different compiler from the bogus one.
2443 # However, it has the same basename, so the bogon will be chosen
2444 # first if we set CC to just the basename; use the full file name.
2445 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002447 fi
2448fi
2449fi
2450fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002451CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002452if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002453 { echo "$as_me:$LINENO: result: $CC" >&5
2454echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002455else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002456 { echo "$as_me:$LINENO: result: no" >&5
2457echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002458fi
2459
Martin v. Löwiseba40652007-08-30 20:10:57 +00002460
Martin v. Löwis11437992002-04-12 09:54:03 +00002461fi
2462if test -z "$CC"; then
2463 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 do
2466 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2467set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2469echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002470if test "${ac_cv_prog_CC+set}" = set; then
2471 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002472else
2473 if test -n "$CC"; then
2474 ac_cv_prog_CC="$CC" # Let the user override the test.
2475else
Martin v. Löwis11437992002-04-12 09:54:03 +00002476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2477for as_dir in $PATH
2478do
2479 IFS=$as_save_IFS
2480 test -z "$as_dir" && as_dir=.
2481 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002482 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 +00002483 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2484 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2485 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002486 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002487done
2488done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002489IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002490
2491fi
2492fi
2493CC=$ac_cv_prog_CC
2494if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002495 { echo "$as_me:$LINENO: result: $CC" >&5
2496echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002497else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002498 { echo "$as_me:$LINENO: result: no" >&5
2499echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002500fi
2501
Martin v. Löwiseba40652007-08-30 20:10:57 +00002502
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 test -n "$CC" && break
2504 done
2505fi
2506if test -z "$CC"; then
2507 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002509do
2510 # Extract the first word of "$ac_prog", so it can be a program name with args.
2511set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2513echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002514if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2515 echo $ECHO_N "(cached) $ECHO_C" >&6
2516else
2517 if test -n "$ac_ct_CC"; then
2518 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2519else
2520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2521for as_dir in $PATH
2522do
2523 IFS=$as_save_IFS
2524 test -z "$as_dir" && as_dir=.
2525 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002526 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 +00002527 ac_cv_prog_ac_ct_CC="$ac_prog"
2528 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2529 break 2
2530 fi
2531done
2532done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002533IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002534
Martin v. Löwis11437992002-04-12 09:54:03 +00002535fi
2536fi
2537ac_ct_CC=$ac_cv_prog_ac_ct_CC
2538if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2540echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002541else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002542 { echo "$as_me:$LINENO: result: no" >&5
2543echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002544fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002545
Martin v. Löwiseba40652007-08-30 20:10:57 +00002546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 test -n "$ac_ct_CC" && break
2548done
Michael W. Hudson54241132001-12-07 15:38:26 +00002549
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550 if test "x$ac_ct_CC" = x; then
2551 CC=""
2552 else
2553 case $cross_compiling:$ac_tool_warned in
2554yes:)
2555{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2556whose name does not start with the host triplet. If you think this
2557configuration is useful to you, please write to autoconf@gnu.org." >&5
2558echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2559whose name does not start with the host triplet. If you think this
2560configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2561ac_tool_warned=yes ;;
2562esac
2563 CC=$ac_ct_CC
2564 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002565fi
2566
2567fi
2568
2569
Skip Montanaro6dead952003-09-25 14:50:04 +00002570test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2571See \`config.log' for more details." >&5
2572echo "$as_me: error: no acceptable C compiler found in \$PATH
2573See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 { (exit 1); exit 1; }; }
2575
2576# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002578ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002579{ (ac_try="$ac_compiler --version >&5"
2580case "(($ac_try" in
2581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2582 *) ac_try_echo=$ac_try;;
2583esac
2584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2585 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 ac_status=$?
2587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2588 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589{ (ac_try="$ac_compiler -v >&5"
2590case "(($ac_try" in
2591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2592 *) ac_try_echo=$ac_try;;
2593esac
2594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2595 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 ac_status=$?
2597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2598 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002599{ (ac_try="$ac_compiler -V >&5"
2600case "(($ac_try" in
2601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2602 *) ac_try_echo=$ac_try;;
2603esac
2604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2605 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 ac_status=$?
2607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2608 (exit $ac_status); }
2609
2610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002611/* confdefs.h. */
2612_ACEOF
2613cat confdefs.h >>conftest.$ac_ext
2614cat >>conftest.$ac_ext <<_ACEOF
2615/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617int
2618main ()
2619{
2620
2621 ;
2622 return 0;
2623}
2624_ACEOF
2625ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002626ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002627# Try to create an executable without -o first, disregard a.out.
2628# It will help us diagnose broken compilers, and finding out an intuition
2629# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002630{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2631echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002632ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002633#
2634# List of possible output files, starting from the most likely.
2635# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2636# only as a last resort. b.out is created by i960 compilers.
2637ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2638#
2639# The IRIX 6 linker writes into existing files which may not be
2640# executable, retaining their permissions. Remove them first so a
2641# subsequent execution test works.
2642ac_rmfiles=
2643for ac_file in $ac_files
2644do
2645 case $ac_file in
2646 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2647 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2648 esac
2649done
2650rm -f $ac_rmfiles
2651
2652if { (ac_try="$ac_link_default"
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_link_default") 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); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002662 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2663# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2664# in a Makefile. We should not override ac_cv_exeext if it was cached,
2665# so that the user can short-circuit this test for compilers unknown to
2666# Autoconf.
2667for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002668do
2669 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002671 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002672 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002673 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002674 # We found the default executable, but exeext='' is most
2675 # certainly right.
2676 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002677 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002678 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2679 then :; else
2680 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2681 fi
2682 # We set ac_cv_exeext here because the later test for it is not
2683 # safe: cross compilers may not add the suffix if given an `-o'
2684 # argument, so we may need to know it at that point already.
2685 # Even if this section looks crufty: it has the advantage of
2686 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002687 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002688 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002689 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002690 esac
2691done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002692test "$ac_cv_exeext" = no && ac_cv_exeext=
2693
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002694else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002695 ac_file=''
2696fi
2697
2698{ echo "$as_me:$LINENO: result: $ac_file" >&5
2699echo "${ECHO_T}$ac_file" >&6; }
2700if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002702sed 's/^/| /' conftest.$ac_ext >&5
2703
2704{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2705See \`config.log' for more details." >&5
2706echo "$as_me: error: C compiler cannot create executables
2707See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002709fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002710
Martin v. Löwis11437992002-04-12 09:54:03 +00002711ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002712
Martin v. Löwiseba40652007-08-30 20:10:57 +00002713# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002714# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002715{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2716echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002717# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2718# If not cross compiling, check that we can run a simple program.
2719if test "$cross_compiling" != yes; then
2720 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002721 { (case "(($ac_try" in
2722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2723 *) ac_try_echo=$ac_try;;
2724esac
2725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2726 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 ac_status=$?
2728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2729 (exit $ac_status); }; }; then
2730 cross_compiling=no
2731 else
2732 if test "$cross_compiling" = maybe; then
2733 cross_compiling=yes
2734 else
2735 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002736If you meant to cross compile, use \`--host'.
2737See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002738echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002739If you meant to cross compile, use \`--host'.
2740See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 { (exit 1); exit 1; }; }
2742 fi
2743 fi
2744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002745{ echo "$as_me:$LINENO: result: yes" >&5
2746echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002747
Skip Montanaro6dead952003-09-25 14:50:04 +00002748rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002749ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002750# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002751# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002752{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2753echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2754{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2755echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002756
Martin v. Löwiseba40652007-08-30 20:10:57 +00002757{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2758echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2759if { (ac_try="$ac_link"
2760case "(($ac_try" in
2761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2762 *) ac_try_echo=$ac_try;;
2763esac
2764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2765 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002766 ac_status=$?
2767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2768 (exit $ac_status); }; then
2769 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2770# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2771# work properly (i.e., refer to `conftest.exe'), while it won't with
2772# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002773for ac_file in conftest.exe conftest conftest.*; do
2774 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002776 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002777 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002778 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 * ) break;;
2780 esac
2781done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002782else
Skip Montanaro6dead952003-09-25 14:50:04 +00002783 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2784See \`config.log' for more details." >&5
2785echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2786See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002788fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002789
Martin v. Löwis11437992002-04-12 09:54:03 +00002790rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002791{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2792echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002793
2794rm -f conftest.$ac_ext
2795EXEEXT=$ac_cv_exeext
2796ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2798echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002799if test "${ac_cv_objext+set}" = set; then
2800 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002801else
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002803/* confdefs.h. */
2804_ACEOF
2805cat confdefs.h >>conftest.$ac_ext
2806cat >>conftest.$ac_ext <<_ACEOF
2807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002808
Martin v. Löwis11437992002-04-12 09:54:03 +00002809int
2810main ()
2811{
2812
2813 ;
2814 return 0;
2815}
2816_ACEOF
2817rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002818if { (ac_try="$ac_compile"
2819case "(($ac_try" in
2820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2821 *) ac_try_echo=$ac_try;;
2822esac
2823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2824 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002825 ac_status=$?
2826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2827 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002828 for ac_file in conftest.o conftest.obj conftest.*; do
2829 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002830 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002831 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002832 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2833 break;;
2834 esac
2835done
2836else
2837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002838sed 's/^/| /' conftest.$ac_ext >&5
2839
2840{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2841See \`config.log' for more details." >&5
2842echo "$as_me: error: cannot compute suffix of object files: cannot compile
2843See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 { (exit 1); exit 1; }; }
2845fi
2846
2847rm -f conftest.$ac_cv_objext conftest.$ac_ext
2848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002849{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2850echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002851OBJEXT=$ac_cv_objext
2852ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002853{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2854echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855if test "${ac_cv_c_compiler_gnu+set}" = set; then
2856 echo $ECHO_N "(cached) $ECHO_C" >&6
2857else
2858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002859/* confdefs.h. */
2860_ACEOF
2861cat confdefs.h >>conftest.$ac_ext
2862cat >>conftest.$ac_ext <<_ACEOF
2863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002864
Martin v. Löwis11437992002-04-12 09:54:03 +00002865int
2866main ()
2867{
2868#ifndef __GNUC__
2869 choke me
2870#endif
2871
2872 ;
2873 return 0;
2874}
2875_ACEOF
2876rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002877if { (ac_try="$ac_compile"
2878case "(($ac_try" in
2879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2880 *) ac_try_echo=$ac_try;;
2881esac
2882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2883 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002885 grep -v '^ *+' conftest.er1 >conftest.err
2886 rm -f conftest.er1
2887 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002889 (exit $ac_status); } && {
2890 test -z "$ac_c_werror_flag" ||
2891 test ! -s conftest.err
2892 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002893 ac_compiler_gnu=yes
2894else
2895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002896sed 's/^/| /' conftest.$ac_ext >&5
2897
Martin v. Löwiseba40652007-08-30 20:10:57 +00002898 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002900
2901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002902ac_cv_c_compiler_gnu=$ac_compiler_gnu
2903
2904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002905{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2906echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002907GCC=`test $ac_compiler_gnu = yes && echo yes`
2908ac_test_CFLAGS=${CFLAGS+set}
2909ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002910{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2911echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002912if test "${ac_cv_prog_cc_g+set}" = set; then
2913 echo $ECHO_N "(cached) $ECHO_C" >&6
2914else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002915 ac_save_c_werror_flag=$ac_c_werror_flag
2916 ac_c_werror_flag=yes
2917 ac_cv_prog_cc_g=no
2918 CFLAGS="-g"
2919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002920/* confdefs.h. */
2921_ACEOF
2922cat confdefs.h >>conftest.$ac_ext
2923cat >>conftest.$ac_ext <<_ACEOF
2924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002925
Martin v. Löwis11437992002-04-12 09:54:03 +00002926int
2927main ()
2928{
2929
2930 ;
2931 return 0;
2932}
2933_ACEOF
2934rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002935if { (ac_try="$ac_compile"
2936case "(($ac_try" in
2937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2938 *) ac_try_echo=$ac_try;;
2939esac
2940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002943 grep -v '^ *+' conftest.er1 >conftest.err
2944 rm -f conftest.er1
2945 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002947 (exit $ac_status); } && {
2948 test -z "$ac_c_werror_flag" ||
2949 test ! -s conftest.err
2950 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002951 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002952else
Martin v. Löwis11437992002-04-12 09:54:03 +00002953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002954sed 's/^/| /' conftest.$ac_ext >&5
2955
Martin v. Löwiseba40652007-08-30 20:10:57 +00002956 CFLAGS=""
2957 cat >conftest.$ac_ext <<_ACEOF
2958/* confdefs.h. */
2959_ACEOF
2960cat confdefs.h >>conftest.$ac_ext
2961cat >>conftest.$ac_ext <<_ACEOF
2962/* end confdefs.h. */
2963
2964int
2965main ()
2966{
2967
2968 ;
2969 return 0;
2970}
2971_ACEOF
2972rm -f conftest.$ac_objext
2973if { (ac_try="$ac_compile"
2974case "(($ac_try" in
2975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2976 *) ac_try_echo=$ac_try;;
2977esac
2978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2979 (eval "$ac_compile") 2>conftest.er1
2980 ac_status=$?
2981 grep -v '^ *+' conftest.er1 >conftest.err
2982 rm -f conftest.er1
2983 cat conftest.err >&5
2984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2985 (exit $ac_status); } && {
2986 test -z "$ac_c_werror_flag" ||
2987 test ! -s conftest.err
2988 } && test -s conftest.$ac_objext; then
2989 :
2990else
2991 echo "$as_me: failed program was:" >&5
2992sed 's/^/| /' conftest.$ac_ext >&5
2993
2994 ac_c_werror_flag=$ac_save_c_werror_flag
2995 CFLAGS="-g"
2996 cat >conftest.$ac_ext <<_ACEOF
2997/* confdefs.h. */
2998_ACEOF
2999cat confdefs.h >>conftest.$ac_ext
3000cat >>conftest.$ac_ext <<_ACEOF
3001/* end confdefs.h. */
3002
3003int
3004main ()
3005{
3006
3007 ;
3008 return 0;
3009}
3010_ACEOF
3011rm -f conftest.$ac_objext
3012if { (ac_try="$ac_compile"
3013case "(($ac_try" in
3014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3015 *) ac_try_echo=$ac_try;;
3016esac
3017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3018 (eval "$ac_compile") 2>conftest.er1
3019 ac_status=$?
3020 grep -v '^ *+' conftest.er1 >conftest.err
3021 rm -f conftest.er1
3022 cat conftest.err >&5
3023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3024 (exit $ac_status); } && {
3025 test -z "$ac_c_werror_flag" ||
3026 test ! -s conftest.err
3027 } && test -s conftest.$ac_objext; then
3028 ac_cv_prog_cc_g=yes
3029else
3030 echo "$as_me: failed program was:" >&5
3031sed 's/^/| /' conftest.$ac_ext >&5
3032
3033
Guido van Rossum627b2d71993-12-24 10:39:16 +00003034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003035
3036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003038
3039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3040fi
3041
3042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3043 ac_c_werror_flag=$ac_save_c_werror_flag
3044fi
3045{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3046echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003047if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003048 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003049elif test $ac_cv_prog_cc_g = yes; then
3050 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003051 CFLAGS="-g -O2"
3052 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003053 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003054 fi
3055else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003056 if test "$GCC" = yes; then
3057 CFLAGS="-O2"
3058 else
3059 CFLAGS=
3060 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003062{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3063echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3064if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003065 echo $ECHO_N "(cached) $ECHO_C" >&6
3066else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003067 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003068ac_save_CC=$CC
3069cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003070/* confdefs.h. */
3071_ACEOF
3072cat confdefs.h >>conftest.$ac_ext
3073cat >>conftest.$ac_ext <<_ACEOF
3074/* end confdefs.h. */
3075#include <stdarg.h>
3076#include <stdio.h>
3077#include <sys/types.h>
3078#include <sys/stat.h>
3079/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3080struct buf { int x; };
3081FILE * (*rcsopen) (struct buf *, struct stat *, int);
3082static char *e (p, i)
3083 char **p;
3084 int i;
3085{
3086 return p[i];
3087}
3088static char *f (char * (*g) (char **, int), char **p, ...)
3089{
3090 char *s;
3091 va_list v;
3092 va_start (v,p);
3093 s = g (p, va_arg (v,int));
3094 va_end (v);
3095 return s;
3096}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003097
3098/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3099 function prototypes and stuff, but not '\xHH' hex character constants.
3100 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003101 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003102 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3103 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003104 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003105int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3106
Martin v. Löwiseba40652007-08-30 20:10:57 +00003107/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3108 inside strings and character constants. */
3109#define FOO(x) 'x'
3110int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3111
Skip Montanaro6dead952003-09-25 14:50:04 +00003112int test (int i, double x);
3113struct s1 {int (*f) (int a);};
3114struct s2 {int (*f) (double a);};
3115int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3116int argc;
3117char **argv;
3118int
3119main ()
3120{
3121return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3122 ;
3123 return 0;
3124}
3125_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003126for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3127 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003128do
3129 CC="$ac_save_CC $ac_arg"
3130 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003131if { (ac_try="$ac_compile"
3132case "(($ac_try" in
3133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3134 *) ac_try_echo=$ac_try;;
3135esac
3136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3137 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003139 grep -v '^ *+' conftest.er1 >conftest.err
3140 rm -f conftest.er1
3141 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003143 (exit $ac_status); } && {
3144 test -z "$ac_c_werror_flag" ||
3145 test ! -s conftest.err
3146 } && test -s conftest.$ac_objext; then
3147 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003148else
3149 echo "$as_me: failed program was:" >&5
3150sed 's/^/| /' conftest.$ac_ext >&5
3151
Martin v. Löwiseba40652007-08-30 20:10:57 +00003152
Skip Montanaro6dead952003-09-25 14:50:04 +00003153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003154
3155rm -f core conftest.err conftest.$ac_objext
3156 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003157done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003158rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003159CC=$ac_save_CC
3160
3161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003162# AC_CACHE_VAL
3163case "x$ac_cv_prog_cc_c89" in
3164 x)
3165 { echo "$as_me:$LINENO: result: none needed" >&5
3166echo "${ECHO_T}none needed" >&6; } ;;
3167 xno)
3168 { echo "$as_me:$LINENO: result: unsupported" >&5
3169echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003170 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003171 CC="$CC $ac_cv_prog_cc_c89"
3172 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3173echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003174esac
3175
Skip Montanaro6dead952003-09-25 14:50:04 +00003176
Martin v. Löwis11437992002-04-12 09:54:03 +00003177ac_ext=c
3178ac_cpp='$CPP $CPPFLAGS'
3179ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3180ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3181ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003182
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003183
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003184
3185
Martin v. Löwiseba40652007-08-30 20:10:57 +00003186{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3187echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003188
Martin v. Löwiseba40652007-08-30 20:10:57 +00003189# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003190if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003191 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003192
3193 case $withval in
3194 no) with_cxx_main=no
3195 MAINCC='$(CC)';;
3196 yes) with_cxx_main=yes
3197 MAINCC='$(CXX)';;
3198 *) with_cxx_main=yes
3199 MAINCC=$withval
3200 if test -z "$CXX"
3201 then
3202 CXX=$withval
3203 fi;;
3204 esac
3205else
3206
3207 with_cxx_main=no
3208 MAINCC='$(CC)'
3209
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210fi
3211
3212{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3213echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003214
3215preset_cxx="$CXX"
3216if test -z "$CXX"
3217then
3218 case "$CC" in
3219 gcc) # Extract the first word of "g++", so it can be a program name with args.
3220set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3222echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003223if test "${ac_cv_path_CXX+set}" = set; then
3224 echo $ECHO_N "(cached) $ECHO_C" >&6
3225else
3226 case $CXX in
3227 [\\/]* | ?:[\\/]*)
3228 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3229 ;;
3230 *)
3231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3232for as_dir in notfound
3233do
3234 IFS=$as_save_IFS
3235 test -z "$as_dir" && as_dir=.
3236 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003237 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 +00003238 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3239 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3240 break 2
3241 fi
3242done
3243done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003244IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003245
3246 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3247 ;;
3248esac
3249fi
3250CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003251if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003252 { echo "$as_me:$LINENO: result: $CXX" >&5
3253echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003254else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003255 { echo "$as_me:$LINENO: result: no" >&5
3256echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003258
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003259 ;;
3260 cc) # Extract the first word of "c++", so it can be a program name with args.
3261set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3263echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003264if test "${ac_cv_path_CXX+set}" = set; then
3265 echo $ECHO_N "(cached) $ECHO_C" >&6
3266else
3267 case $CXX in
3268 [\\/]* | ?:[\\/]*)
3269 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3270 ;;
3271 *)
3272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3273for as_dir in notfound
3274do
3275 IFS=$as_save_IFS
3276 test -z "$as_dir" && as_dir=.
3277 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003278 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 +00003279 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3280 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3281 break 2
3282 fi
3283done
3284done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003285IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003286
3287 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3288 ;;
3289esac
3290fi
3291CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003292if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003293 { echo "$as_me:$LINENO: result: $CXX" >&5
3294echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003295else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003296 { echo "$as_me:$LINENO: result: no" >&5
3297echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003299
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003300 ;;
3301 esac
3302 if test "$CXX" = "notfound"
3303 then
3304 CXX=""
3305 fi
3306fi
3307if test -z "$CXX"
3308then
3309 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3310do
3311 # Extract the first word of "$ac_prog", so it can be a program name with args.
3312set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3314echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003315if test "${ac_cv_prog_CXX+set}" = set; then
3316 echo $ECHO_N "(cached) $ECHO_C" >&6
3317else
3318 if test -n "$CXX"; then
3319 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3320else
3321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3322for as_dir in $PATH
3323do
3324 IFS=$as_save_IFS
3325 test -z "$as_dir" && as_dir=.
3326 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003327 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 +00003328 ac_cv_prog_CXX="$ac_prog"
3329 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3330 break 2
3331 fi
3332done
3333done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003334IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003335
3336fi
3337fi
3338CXX=$ac_cv_prog_CXX
3339if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003340 { echo "$as_me:$LINENO: result: $CXX" >&5
3341echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003342else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003343 { echo "$as_me:$LINENO: result: no" >&5
3344echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003345fi
3346
Martin v. Löwiseba40652007-08-30 20:10:57 +00003347
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003348 test -n "$CXX" && break
3349done
3350test -n "$CXX" || CXX="notfound"
3351
3352 if test "$CXX" = "notfound"
3353 then
3354 CXX=""
3355 fi
3356fi
3357if test "$preset_cxx" != "$CXX"
3358then
3359 { echo "$as_me:$LINENO: WARNING:
3360
3361 By default, distutils will build C++ extension modules with \"$CXX\".
3362 If this is not intended, then set CXX on the configure command line.
3363 " >&5
3364echo "$as_me: WARNING:
3365
3366 By default, distutils will build C++ extension modules with \"$CXX\".
3367 If this is not intended, then set CXX on the configure command line.
3368 " >&2;}
3369fi
3370
3371
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003372# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003373
3374ac_ext=c
3375ac_cpp='$CPP $CPPFLAGS'
3376ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3377ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3378ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003379{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3380echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003381# On Suns, sometimes $CPP names a directory.
3382if test -n "$CPP" && test -d "$CPP"; then
3383 CPP=
3384fi
3385if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003386 if test "${ac_cv_prog_CPP+set}" = set; then
3387 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003388else
Martin v. Löwis11437992002-04-12 09:54:03 +00003389 # Double quotes because CPP needs to be expanded
3390 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3391 do
3392 ac_preproc_ok=false
3393for ac_c_preproc_warn_flag in '' yes
3394do
3395 # Use a header file that comes with gcc, so configuring glibc
3396 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003397 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3398 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003399 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003400 # not just through cpp. "Syntax error" is here to catch this case.
3401 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003402/* confdefs.h. */
3403_ACEOF
3404cat confdefs.h >>conftest.$ac_ext
3405cat >>conftest.$ac_ext <<_ACEOF
3406/* end confdefs.h. */
3407#ifdef __STDC__
3408# include <limits.h>
3409#else
3410# include <assert.h>
3411#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003412 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003413_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003414if { (ac_try="$ac_cpp conftest.$ac_ext"
3415case "(($ac_try" in
3416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3417 *) ac_try_echo=$ac_try;;
3418esac
3419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3420 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003421 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003422 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 rm -f conftest.er1
3424 cat conftest.err >&5
3425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003426 (exit $ac_status); } >/dev/null && {
3427 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3428 test ! -s conftest.err
3429 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003430 :
3431else
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003433sed 's/^/| /' conftest.$ac_ext >&5
3434
Martin v. Löwis11437992002-04-12 09:54:03 +00003435 # Broken: fails on valid input.
3436continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003438
Martin v. Löwis11437992002-04-12 09:54:03 +00003439rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003440
Martin v. Löwiseba40652007-08-30 20:10:57 +00003441 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003442 # can be detected and how.
3443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003444/* confdefs.h. */
3445_ACEOF
3446cat confdefs.h >>conftest.$ac_ext
3447cat >>conftest.$ac_ext <<_ACEOF
3448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003449#include <ac_nonexistent.h>
3450_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003451if { (ac_try="$ac_cpp conftest.$ac_ext"
3452case "(($ac_try" in
3453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3454 *) ac_try_echo=$ac_try;;
3455esac
3456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3457 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003458 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003459 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003460 rm -f conftest.er1
3461 cat conftest.err >&5
3462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003463 (exit $ac_status); } >/dev/null && {
3464 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3465 test ! -s conftest.err
3466 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 # Broken: success on invalid input.
3468continue
3469else
3470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003471sed 's/^/| /' conftest.$ac_ext >&5
3472
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 # Passes both tests.
3474ac_preproc_ok=:
3475break
3476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003477
Martin v. Löwis11437992002-04-12 09:54:03 +00003478rm -f conftest.err conftest.$ac_ext
3479
3480done
3481# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3482rm -f conftest.err conftest.$ac_ext
3483if $ac_preproc_ok; then
3484 break
3485fi
3486
3487 done
3488 ac_cv_prog_CPP=$CPP
3489
3490fi
3491 CPP=$ac_cv_prog_CPP
3492else
3493 ac_cv_prog_CPP=$CPP
3494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003495{ echo "$as_me:$LINENO: result: $CPP" >&5
3496echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003497ac_preproc_ok=false
3498for ac_c_preproc_warn_flag in '' yes
3499do
3500 # Use a header file that comes with gcc, so configuring glibc
3501 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003502 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3503 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003504 # On the NeXT, cc -E runs the code through the compiler's parser,
3505 # not just through cpp. "Syntax error" is here to catch this case.
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. */
3512#ifdef __STDC__
3513# include <limits.h>
3514#else
3515# include <assert.h>
3516#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003517 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003518_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003519if { (ac_try="$ac_cpp conftest.$ac_ext"
3520case "(($ac_try" in
3521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3522 *) ac_try_echo=$ac_try;;
3523esac
3524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3525 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003526 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003527 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 rm -f conftest.er1
3529 cat conftest.err >&5
3530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003531 (exit $ac_status); } >/dev/null && {
3532 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3533 test ! -s conftest.err
3534 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 :
3536else
3537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003538sed 's/^/| /' conftest.$ac_ext >&5
3539
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 # Broken: fails on valid input.
3541continue
3542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544rm -f conftest.err conftest.$ac_ext
3545
Martin v. Löwiseba40652007-08-30 20:10:57 +00003546 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 # can be detected and how.
3548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003549/* confdefs.h. */
3550_ACEOF
3551cat confdefs.h >>conftest.$ac_ext
3552cat >>conftest.$ac_ext <<_ACEOF
3553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003554#include <ac_nonexistent.h>
3555_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003556if { (ac_try="$ac_cpp conftest.$ac_ext"
3557case "(($ac_try" in
3558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3559 *) ac_try_echo=$ac_try;;
3560esac
3561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3562 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003563 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003564 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 rm -f conftest.er1
3566 cat conftest.err >&5
3567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003568 (exit $ac_status); } >/dev/null && {
3569 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3570 test ! -s conftest.err
3571 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 # Broken: success on invalid input.
3573continue
3574else
3575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003576sed 's/^/| /' conftest.$ac_ext >&5
3577
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 # Passes both tests.
3579ac_preproc_ok=:
3580break
3581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003582
Martin v. Löwis11437992002-04-12 09:54:03 +00003583rm -f conftest.err conftest.$ac_ext
3584
3585done
3586# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3587rm -f conftest.err conftest.$ac_ext
3588if $ac_preproc_ok; then
3589 :
3590else
Skip Montanaro6dead952003-09-25 14:50:04 +00003591 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3592See \`config.log' for more details." >&5
3593echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3594See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 { (exit 1); exit 1; }; }
3596fi
3597
3598ac_ext=c
3599ac_cpp='$CPP $CPPFLAGS'
3600ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3601ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3602ac_compiler_gnu=$ac_cv_c_compiler_gnu
3603
3604
Martin v. Löwiseba40652007-08-30 20:10:57 +00003605{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3606echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3607if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003608 echo $ECHO_N "(cached) $ECHO_C" >&6
3609else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003610 # Extract the first word of "grep ggrep" to use in msg output
3611if test -z "$GREP"; then
3612set dummy grep ggrep; ac_prog_name=$2
3613if test "${ac_cv_path_GREP+set}" = set; then
3614 echo $ECHO_N "(cached) $ECHO_C" >&6
3615else
3616 ac_path_GREP_found=false
3617# Loop through the user's path and test for each of PROGNAME-LIST
3618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3619for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3620do
3621 IFS=$as_save_IFS
3622 test -z "$as_dir" && as_dir=.
3623 for ac_prog in grep ggrep; do
3624 for ac_exec_ext in '' $ac_executable_extensions; do
3625 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3626 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3627 # Check for GNU ac_path_GREP and select it if it is found.
3628 # Check for GNU $ac_path_GREP
3629case `"$ac_path_GREP" --version 2>&1` in
3630*GNU*)
3631 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3632*)
3633 ac_count=0
3634 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3635 while :
3636 do
3637 cat "conftest.in" "conftest.in" >"conftest.tmp"
3638 mv "conftest.tmp" "conftest.in"
3639 cp "conftest.in" "conftest.nl"
3640 echo 'GREP' >> "conftest.nl"
3641 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3642 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3643 ac_count=`expr $ac_count + 1`
3644 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3645 # Best one so far, save it but keep looking for a better one
3646 ac_cv_path_GREP="$ac_path_GREP"
3647 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003648 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003649 # 10*(2^10) chars as input seems more than enough
3650 test $ac_count -gt 10 && break
3651 done
3652 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3653esac
3654
3655
3656 $ac_path_GREP_found && break 3
3657 done
3658done
3659
3660done
3661IFS=$as_save_IFS
3662
3663
Skip Montanaro6dead952003-09-25 14:50:04 +00003664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003665
3666GREP="$ac_cv_path_GREP"
3667if test -z "$GREP"; then
3668 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3669echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3670 { (exit 1); exit 1; }; }
3671fi
3672
3673else
3674 ac_cv_path_GREP=$GREP
3675fi
3676
3677
3678fi
3679{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3680echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3681 GREP="$ac_cv_path_GREP"
3682
3683
3684{ echo "$as_me:$LINENO: checking for egrep" >&5
3685echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3686if test "${ac_cv_path_EGREP+set}" = set; then
3687 echo $ECHO_N "(cached) $ECHO_C" >&6
3688else
3689 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3690 then ac_cv_path_EGREP="$GREP -E"
3691 else
3692 # Extract the first word of "egrep" to use in msg output
3693if test -z "$EGREP"; then
3694set dummy egrep; ac_prog_name=$2
3695if test "${ac_cv_path_EGREP+set}" = set; then
3696 echo $ECHO_N "(cached) $ECHO_C" >&6
3697else
3698 ac_path_EGREP_found=false
3699# Loop through the user's path and test for each of PROGNAME-LIST
3700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3701for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3702do
3703 IFS=$as_save_IFS
3704 test -z "$as_dir" && as_dir=.
3705 for ac_prog in egrep; do
3706 for ac_exec_ext in '' $ac_executable_extensions; do
3707 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3708 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3709 # Check for GNU ac_path_EGREP and select it if it is found.
3710 # Check for GNU $ac_path_EGREP
3711case `"$ac_path_EGREP" --version 2>&1` in
3712*GNU*)
3713 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3714*)
3715 ac_count=0
3716 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3717 while :
3718 do
3719 cat "conftest.in" "conftest.in" >"conftest.tmp"
3720 mv "conftest.tmp" "conftest.in"
3721 cp "conftest.in" "conftest.nl"
3722 echo 'EGREP' >> "conftest.nl"
3723 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3724 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3725 ac_count=`expr $ac_count + 1`
3726 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3727 # Best one so far, save it but keep looking for a better one
3728 ac_cv_path_EGREP="$ac_path_EGREP"
3729 ac_path_EGREP_max=$ac_count
3730 fi
3731 # 10*(2^10) chars as input seems more than enough
3732 test $ac_count -gt 10 && break
3733 done
3734 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3735esac
3736
3737
3738 $ac_path_EGREP_found && break 3
3739 done
3740done
3741
3742done
3743IFS=$as_save_IFS
3744
3745
3746fi
3747
3748EGREP="$ac_cv_path_EGREP"
3749if test -z "$EGREP"; then
3750 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3751echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3752 { (exit 1); exit 1; }; }
3753fi
3754
3755else
3756 ac_cv_path_EGREP=$EGREP
3757fi
3758
3759
3760 fi
3761fi
3762{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3763echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3764 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003765
3766
Martin v. Löwis11437992002-04-12 09:54:03 +00003767
Martin v. Löwiseba40652007-08-30 20:10:57 +00003768{ echo "$as_me:$LINENO: checking for AIX" >&5
3769echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003770cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003771/* confdefs.h. */
3772_ACEOF
3773cat confdefs.h >>conftest.$ac_ext
3774cat >>conftest.$ac_ext <<_ACEOF
3775/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003776#ifdef _AIX
3777 yes
3778#endif
3779
Martin v. Löwis11437992002-04-12 09:54:03 +00003780_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003782 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003783 { echo "$as_me:$LINENO: result: yes" >&5
3784echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003785cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003786#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003787_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003788
3789else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790 { echo "$as_me:$LINENO: result: no" >&5
3791echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003792fi
3793rm -f conftest*
3794
Michael W. Hudson54241132001-12-07 15:38:26 +00003795
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003796
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003797# Check for unsupported systems
3798case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003799atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003800 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3801 echo See README for details.
3802 exit 1;;
3803esac
3804
Michael W. Hudson54241132001-12-07 15:38:26 +00003805
Martin v. Löwiseba40652007-08-30 20:10:57 +00003806{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3807echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003808
Martin v. Löwiseba40652007-08-30 20:10:57 +00003809# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003810if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003811 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003812 case $withval in
3813 no) EXEEXT=;;
3814 yes) EXEEXT=.exe;;
3815 *) EXEEXT=$withval;;
3816 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003817fi
3818
3819{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3820echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003821
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003822# Test whether we're running on a non-case-sensitive system, in which
3823# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003824
Martin v. Löwiseba40652007-08-30 20:10:57 +00003825{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3826echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003827if test ! -d CaseSensitiveTestDir; then
3828mkdir CaseSensitiveTestDir
3829fi
3830
3831if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003832then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003833 { echo "$as_me:$LINENO: result: yes" >&5
3834echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003835 BUILDEXEEXT=.exe
3836else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837 { echo "$as_me:$LINENO: result: no" >&5
3838echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003839 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003840fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003841rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003842
Guido van Rossumdd997f71998-10-07 19:58:26 +00003843case $MACHDEP in
3844bsdos*)
3845 case $CC in
3846 gcc) CC="$CC -D_HAVE_BSDI";;
3847 esac;;
3848esac
3849
Guido van Rossum24b1e751997-08-21 02:29:16 +00003850case $ac_sys_system in
3851hp*|HP*)
3852 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003853 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003854 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003855Monterey*)
3856 case $CC in
3857 cc) CC="$CC -Wl,-Bexport";;
3858 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003859SunOS*)
3860 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003861
3862cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003863#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003864_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003865
3866 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003867esac
3868
Michael W. Hudson54241132001-12-07 15:38:26 +00003869
3870
Martin v. Löwiseba40652007-08-30 20:10:57 +00003871{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3872echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003873if test -z "$LIBRARY"
3874then
3875 LIBRARY='libpython$(VERSION).a'
3876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003877{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3878echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003879
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003880# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003881# name of the library into which to insert object files). BLDLIBRARY is also
3882# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3883# is blank as the main program is not linked directly against LDLIBRARY.
3884# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3885# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3886# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3887# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003888#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003889# RUNSHARED is used to run shared python without installed libraries
3890#
3891# INSTSONAME is the name of the shared library that will be use to install
3892# on the system - some systems like version suffix, others don't
3893
3894
Michael W. Hudson54241132001-12-07 15:38:26 +00003895
3896
3897
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003898
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003899LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003900BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003901INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003902DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003903LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003904RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003905
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003906# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003907# If CXX is set, and if it is needed to link a main function that was
3908# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3909# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003910# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003911# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003912
Martin v. Löwiseba40652007-08-30 20:10:57 +00003913{ echo "$as_me:$LINENO: checking LINKCC" >&5
3914echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003915if test -z "$LINKCC"
3916then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003917 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003918 case $ac_sys_system in
3919 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003920 exp_extra="\"\""
3921 if test $ac_sys_release -ge 5 -o \
3922 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3923 exp_extra="."
3924 fi
3925 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003926 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003927 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003928 QNX*)
3929 # qcc must be used because the other compilers do not
3930 # support -N.
3931 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003932 esac
3933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003934{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3935echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003936
Martin v. Löwiseba40652007-08-30 20:10:57 +00003937{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3938echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3939# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003940if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003941 enableval=$enable_shared;
3942fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003943
Martin v. Löwis1142de32002-03-29 16:28:31 +00003944
3945if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003946then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003947 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003948 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003949 enable_shared="yes";;
3950 *)
3951 enable_shared="no";;
3952 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003954{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3955echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003956
Martin v. Löwiseba40652007-08-30 20:10:57 +00003957{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3958echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3959# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003960if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003961 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003962 CC="$CC -pg"
3963 if test "$cross_compiling" = yes; then
3964 ac_enable_profiling="no"
3965else
3966 cat >conftest.$ac_ext <<_ACEOF
3967/* confdefs.h. */
3968_ACEOF
3969cat confdefs.h >>conftest.$ac_ext
3970cat >>conftest.$ac_ext <<_ACEOF
3971/* end confdefs.h. */
3972int main() { return 0; }
3973_ACEOF
3974rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003975if { (ac_try="$ac_link"
3976case "(($ac_try" in
3977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3978 *) ac_try_echo=$ac_try;;
3979esac
3980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3981 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003982 ac_status=$?
3983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3984 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00003985 { (case "(($ac_try" in
3986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3987 *) ac_try_echo=$ac_try;;
3988esac
3989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3990 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003991 ac_status=$?
3992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3993 (exit $ac_status); }; }; then
3994 ac_enable_profiling="yes"
3995else
3996 echo "$as_me: program exited with status $ac_status" >&5
3997echo "$as_me: failed program was:" >&5
3998sed 's/^/| /' conftest.$ac_ext >&5
3999
4000( exit $ac_status )
4001ac_enable_profiling="no"
4002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004003rm -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 +00004004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004005
4006
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004007 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004008fi
4009
4010{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4011echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004012
4013case "$ac_enable_profiling" in
4014 "yes")
4015 BASECFLAGS="-pg $BASECFLAGS"
4016 LDFLAGS="-pg $LDFLAGS"
4017 ;;
4018esac
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 LDLIBRARY" >&5
4021echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004022
Guido van Rossumb8552162001-09-05 14:58:11 +00004023# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4024# library that we build, but we do not want to link against it (we
4025# will find it with a -framework option). For this reason there is an
4026# extra variable BLDLIBRARY against which Python and the extension
4027# modules are linked, BLDLIBRARY. This is normally the same as
4028# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004029if test "$enable_framework"
4030then
4031 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004032 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004033 BLDLIBRARY=''
4034else
4035 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004036fi
Jack Jansene578a632001-08-15 01:27:14 +00004037
Martin v. Löwis1142de32002-03-29 16:28:31 +00004038# Other platforms follow
4039if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004040
4041cat >>confdefs.h <<\_ACEOF
4042#define Py_ENABLE_SHARED 1
4043_ACEOF
4044
Martin v. Löwis1142de32002-03-29 16:28:31 +00004045 case $ac_sys_system in
4046 BeOS*)
4047 LDLIBRARY='libpython$(VERSION).so'
4048 ;;
4049 CYGWIN*)
4050 LDLIBRARY='libpython$(VERSION).dll.a'
4051 DLLLIBRARY='libpython$(VERSION).dll'
4052 ;;
4053 SunOS*)
4054 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004055 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004056 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004057 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004058 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004059 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004060 LDLIBRARY='libpython$(VERSION).so'
4061 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004062 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004063 case $ac_sys_system in
4064 FreeBSD*)
4065 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4066 ;;
4067 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004068 INSTSONAME="$LDLIBRARY".$SOVERSION
4069 ;;
4070 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004071 case `uname -m` in
4072 ia64)
4073 LDLIBRARY='libpython$(VERSION).so'
4074 ;;
4075 *)
4076 LDLIBRARY='libpython$(VERSION).sl'
4077 ;;
4078 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004079 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004080 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004081 ;;
4082 OSF*)
4083 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004084 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004085 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004086 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004087 atheos*)
4088 LDLIBRARY='libpython$(VERSION).so'
4089 BLDLIBRARY='-L. -lpython$(VERSION)'
4090 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4091 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004092 esac
Jason Tishler30765592003-09-04 11:04:06 +00004093else # shared is disabled
4094 case $ac_sys_system in
4095 CYGWIN*)
4096 BLDLIBRARY='$(LIBRARY)'
4097 LDLIBRARY='libpython$(VERSION).dll.a'
4098 ;;
4099 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004100fi
4101
Martin v. Löwiseba40652007-08-30 20:10:57 +00004102{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4103echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004104
Martin v. Löwis11437992002-04-12 09:54:03 +00004105if test -n "$ac_tool_prefix"; then
4106 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4107set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004108{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4109echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004110if test "${ac_cv_prog_RANLIB+set}" = set; then
4111 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004112else
4113 if test -n "$RANLIB"; then
4114 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4115else
Martin v. Löwis11437992002-04-12 09:54:03 +00004116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4117for as_dir in $PATH
4118do
4119 IFS=$as_save_IFS
4120 test -z "$as_dir" && as_dir=.
4121 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004122 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 +00004123 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4124 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4125 break 2
4126 fi
4127done
4128done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004129IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004130
Guido van Rossum627b2d71993-12-24 10:39:16 +00004131fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004132fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004133RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004135 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4136echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004137else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004138 { echo "$as_me:$LINENO: result: no" >&5
4139echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004140fi
4141
Martin v. Löwiseba40652007-08-30 20:10:57 +00004142
Martin v. Löwis11437992002-04-12 09:54:03 +00004143fi
4144if test -z "$ac_cv_prog_RANLIB"; then
4145 ac_ct_RANLIB=$RANLIB
4146 # Extract the first word of "ranlib", so it can be a program name with args.
4147set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004148{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4149echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004150if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4151 echo $ECHO_N "(cached) $ECHO_C" >&6
4152else
4153 if test -n "$ac_ct_RANLIB"; then
4154 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4155else
4156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4157for as_dir in $PATH
4158do
4159 IFS=$as_save_IFS
4160 test -z "$as_dir" && as_dir=.
4161 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004162 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 +00004163 ac_cv_prog_ac_ct_RANLIB="ranlib"
4164 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4165 break 2
4166 fi
4167done
4168done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004169IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004170
Martin v. Löwis11437992002-04-12 09:54:03 +00004171fi
4172fi
4173ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4174if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004175 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4176echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004177else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004178 { echo "$as_me:$LINENO: result: no" >&5
4179echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004180fi
4181
Martin v. Löwiseba40652007-08-30 20:10:57 +00004182 if test "x$ac_ct_RANLIB" = x; then
4183 RANLIB=":"
4184 else
4185 case $cross_compiling:$ac_tool_warned in
4186yes:)
4187{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4188whose name does not start with the host triplet. If you think this
4189configuration is useful to you, please write to autoconf@gnu.org." >&5
4190echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4191whose name does not start with the host triplet. If you think this
4192configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4193ac_tool_warned=yes ;;
4194esac
4195 RANLIB=$ac_ct_RANLIB
4196 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004197else
4198 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004199fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004200
4201
Guido van Rossum7f43da71994-08-01 12:15:30 +00004202for ac_prog in ar aal
4203do
Martin v. Löwis11437992002-04-12 09:54:03 +00004204 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004205set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004206{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4207echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004208if test "${ac_cv_prog_AR+set}" = set; then
4209 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004210else
4211 if test -n "$AR"; then
4212 ac_cv_prog_AR="$AR" # Let the user override the test.
4213else
Martin v. Löwis11437992002-04-12 09:54:03 +00004214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4215for as_dir in $PATH
4216do
4217 IFS=$as_save_IFS
4218 test -z "$as_dir" && as_dir=.
4219 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004220 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 +00004221 ac_cv_prog_AR="$ac_prog"
4222 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4223 break 2
4224 fi
4225done
4226done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004227IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004228
Guido van Rossum7f43da71994-08-01 12:15:30 +00004229fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004230fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004231AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004233 { echo "$as_me:$LINENO: result: $AR" >&5
4234echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004235else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004236 { echo "$as_me:$LINENO: result: no" >&5
4237echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004239
Martin v. Löwiseba40652007-08-30 20:10:57 +00004240
Martin v. Löwis11437992002-04-12 09:54:03 +00004241 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004242done
4243test -n "$AR" || AR="ar"
4244
Michael W. Hudson54241132001-12-07 15:38:26 +00004245
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004246
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004247# Extract the first word of "svnversion", so it can be a program name with args.
4248set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004249{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4250echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004251if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4252 echo $ECHO_N "(cached) $ECHO_C" >&6
4253else
4254 if test -n "$SVNVERSION"; then
4255 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4256else
4257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4258for as_dir in $PATH
4259do
4260 IFS=$as_save_IFS
4261 test -z "$as_dir" && as_dir=.
4262 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004263 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 +00004264 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004265 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4266 break 2
4267 fi
4268done
4269done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004270IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004271
Martin v. Löwisff600232006-04-03 19:12:32 +00004272 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004273fi
4274fi
4275SVNVERSION=$ac_cv_prog_SVNVERSION
4276if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004277 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4278echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004279else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004280 { echo "$as_me:$LINENO: result: no" >&5
4281echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004282fi
4283
Martin v. Löwiseba40652007-08-30 20:10:57 +00004284
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004285if test $SVNVERSION = found
4286then
4287 SVNVERSION="svnversion \$(srcdir)"
4288else
4289 SVNVERSION="echo exported"
4290fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004291
Neil Schemenauera42c8272001-03-31 00:01:55 +00004292case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004293bsdos*|hp*|HP*)
4294 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004295 if test -z "$INSTALL"
4296 then
4297 INSTALL="${srcdir}/install-sh -c"
4298 fi
4299esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004300ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004301for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4302 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004303 ac_aux_dir=$ac_dir
4304 ac_install_sh="$ac_aux_dir/install-sh -c"
4305 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004306 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004307 ac_aux_dir=$ac_dir
4308 ac_install_sh="$ac_aux_dir/install.sh -c"
4309 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004310 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004311 ac_aux_dir=$ac_dir
4312 ac_install_sh="$ac_aux_dir/shtool install -c"
4313 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004314 fi
4315done
4316if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004317 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4318echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004319 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004321
4322# These three variables are undocumented and unsupported,
4323# and are intended to be withdrawn in a future Autoconf release.
4324# They can cause serious problems if a builder's source tree is in a directory
4325# whose full name contains unusual characters.
4326ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4327ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4328ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4329
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004330
4331# Find a good install program. We prefer a C program (faster),
4332# so one script is as good as another. But avoid the broken or
4333# incompatible versions:
4334# SysV /etc/install, /usr/sbin/install
4335# SunOS /usr/etc/install
4336# IRIX /sbin/install
4337# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004338# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004339# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4340# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4341# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004342# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004343# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004344{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4345echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004346if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004347if test "${ac_cv_path_install+set}" = set; then
4348 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004349else
Martin v. Löwis11437992002-04-12 09:54:03 +00004350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4351for as_dir in $PATH
4352do
4353 IFS=$as_save_IFS
4354 test -z "$as_dir" && as_dir=.
4355 # Account for people who put trailing slashes in PATH elements.
4356case $as_dir/ in
4357 ./ | .// | /cC/* | \
4358 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004359 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004360 /usr/ucb/* ) ;;
4361 *)
4362 # OSF1 and SCO ODT 3.0 have their own names for install.
4363 # Don't use installbsd from OSF since it installs stuff as root
4364 # by default.
4365 for ac_prog in ginstall scoinst install; do
4366 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004367 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 +00004368 if test $ac_prog = install &&
4369 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4370 # AIX install. It has an incompatible calling convention.
4371 :
4372 elif test $ac_prog = install &&
4373 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4374 # program-specific install script used by HP pwplus--don't use.
4375 :
4376 else
4377 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4378 break 3
4379 fi
4380 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004381 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004382 done
4383 ;;
4384esac
4385done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004386IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004387
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004388
4389fi
4390 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004391 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004392 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004393 # As a last resort, use the slow shell script. Don't cache a
4394 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004395 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004396 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004397 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004398 fi
4399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004400{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4401echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004402
4403# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4404# It thinks the first close brace ends the variable substitution.
4405test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4406
Martin v. Löwis11437992002-04-12 09:54:03 +00004407test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004408
4409test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4410
Michael W. Hudson54241132001-12-07 15:38:26 +00004411
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004412# Not every filesystem supports hard links
4413
4414if test -z "$LN" ; then
4415 case $ac_sys_system in
4416 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004417 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004418 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004419 *) LN=ln;;
4420 esac
4421fi
4422
Fred Drake109d9862001-07-11 06:27:56 +00004423# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004424{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4425echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004426
Martin v. Löwiseba40652007-08-30 20:10:57 +00004427# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004428if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004429 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004430if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004431then
4432
4433cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004434#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004435_ACEOF
4436
Martin v. Löwiseba40652007-08-30 20:10:57 +00004437 { echo "$as_me:$LINENO: result: yes" >&5
4438echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004439 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004440else { echo "$as_me:$LINENO: result: no" >&5
4441echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004442fi
4443else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004444 { echo "$as_me:$LINENO: result: no" >&5
4445echo "${ECHO_T}no" >&6; }
4446fi
4447
Fred Drake109d9862001-07-11 06:27:56 +00004448
Skip Montanarodecc6a42003-01-01 20:07:49 +00004449# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4450# merged with this chunk of code?
4451
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004452# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004453# ------------------------
4454# (The following bit of code is complicated enough - please keep things
4455# indented properly. Just pretend you're editing Python code. ;-)
4456
4457# There are two parallel sets of case statements below, one that checks to
4458# see if OPT was set and one that does BASECFLAGS setting based upon
4459# compiler and platform. BASECFLAGS tweaks need to be made even if the
4460# user set OPT.
4461
4462# tweak OPT based on compiler and platform, only if the user didn't set
4463# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004464
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004465if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004466then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004467 case $GCC in
4468 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004469 if test "$CC" != 'g++' ; then
4470 STRICT_PROTO="-Wstrict-prototypes"
4471 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004472 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4473 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4474 WRAP="-fwrapv"
4475 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004476 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004477 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004478 if test "$Py_DEBUG" = 'true' ; then
4479 # Optimization messes up debuggers, so turn it off for
4480 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004481 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004482 else
Thomas Hellere5529592007-12-13 21:20:29 +00004483 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004484 fi
4485 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004486 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004487 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004488 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004489 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004490 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004491 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4492 ;;
4493 esac
Fred Drake109d9862001-07-11 06:27:56 +00004494 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004495
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004496 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004497 OPT="-O"
4498 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004499 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004500
4501 # The current (beta) Monterey compiler dies with optimizations
4502 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004503 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004504 Monterey*)
4505 OPT=""
4506 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004507 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004508
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004509fi
4510
Skip Montanarodecc6a42003-01-01 20:07:49 +00004511
4512# tweak BASECFLAGS based on compiler and platform
4513case $GCC in
4514yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004515 # Python violates C99 rules, by casting between incompatible
4516 # pointer types. GCC may generate bad code as a result of that,
4517 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004518 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4519echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004520 ac_save_cc="$CC"
4521 CC="$CC -fno-strict-aliasing"
4522 if test "$cross_compiling" = yes; then
4523 ac_cv_no_strict_aliasing_ok=no
4524else
4525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004526/* confdefs.h. */
4527_ACEOF
4528cat confdefs.h >>conftest.$ac_ext
4529cat >>conftest.$ac_ext <<_ACEOF
4530/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004531int main() { return 0; }
4532_ACEOF
4533rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004534if { (ac_try="$ac_link"
4535case "(($ac_try" in
4536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4537 *) ac_try_echo=$ac_try;;
4538esac
4539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4540 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004541 ac_status=$?
4542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004544 { (case "(($ac_try" in
4545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4546 *) ac_try_echo=$ac_try;;
4547esac
4548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4549 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004550 ac_status=$?
4551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4552 (exit $ac_status); }; }; then
4553 ac_cv_no_strict_aliasing_ok=yes
4554else
4555 echo "$as_me: program exited with status $ac_status" >&5
4556echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004557sed 's/^/| /' conftest.$ac_ext >&5
4558
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004559( exit $ac_status )
4560ac_cv_no_strict_aliasing_ok=no
4561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004562rm -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 +00004563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004564
4565
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004566 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004567 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4568echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004569 if test $ac_cv_no_strict_aliasing_ok = yes
4570 then
4571 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4572 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004573
4574 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4575 # support. Without this, treatment of subnormals doesn't follow
4576 # the standard.
4577 case $ac_sys_machine in
4578 alpha*)
4579 BASECFLAGS="$BASECFLAGS -mieee"
4580 ;;
4581 esac
4582
Skip Montanarodecc6a42003-01-01 20:07:49 +00004583 case $ac_sys_system in
4584 SCO_SV*)
4585 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4586 ;;
4587 # is there any other compiler on Darwin besides gcc?
4588 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004589 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4590 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren988117f2006-04-29 11:31:35 +00004591 if test "${enable_universalsdk}"; then
4592 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4593 fi
4594
Skip Montanarodecc6a42003-01-01 20:07:49 +00004595 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004596 OSF*)
4597 BASECFLAGS="$BASECFLAGS -mieee"
4598 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004599 esac
4600 ;;
4601
4602*)
4603 case $ac_sys_system in
4604 OpenUNIX*|UnixWare*)
4605 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4606 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004607 OSF*)
4608 BASECFLAGS="$BASECFLAGS -ieee -std"
4609 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004610 SCO_SV*)
4611 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4612 ;;
4613 esac
4614 ;;
4615esac
4616
Fred Drakee1ceaa02001-12-04 20:55:47 +00004617if test "$Py_DEBUG" = 'true'; then
4618 :
4619else
4620 OPT="-DNDEBUG $OPT"
4621fi
4622
Guido van Rossum563e7081996-09-10 18:20:48 +00004623if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004624then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004625 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004626fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004627
Neal Norwitz020c46a2006-01-07 21:39:28 +00004628# disable check for icc since it seems to pass, but generates a warning
4629if test "$CC" = icc
4630then
4631 ac_cv_opt_olimit_ok=no
4632fi
4633
Martin v. Löwiseba40652007-08-30 20:10:57 +00004634{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4635echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004636if test "${ac_cv_opt_olimit_ok+set}" = set; then
4637 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004638else
4639 ac_save_cc="$CC"
4640CC="$CC -OPT:Olimit=0"
4641if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004642 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004643else
Martin v. Löwis11437992002-04-12 09:54:03 +00004644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004645/* confdefs.h. */
4646_ACEOF
4647cat confdefs.h >>conftest.$ac_ext
4648cat >>conftest.$ac_ext <<_ACEOF
4649/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004650int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004651_ACEOF
4652rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004653if { (ac_try="$ac_link"
4654case "(($ac_try" in
4655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4656 *) ac_try_echo=$ac_try;;
4657esac
4658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4659 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004660 ac_status=$?
4661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4662 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004663 { (case "(($ac_try" in
4664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4665 *) ac_try_echo=$ac_try;;
4666esac
4667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4668 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004669 ac_status=$?
4670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4671 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004672 ac_cv_opt_olimit_ok=yes
4673else
Martin v. Löwis11437992002-04-12 09:54:03 +00004674 echo "$as_me: program exited with status $ac_status" >&5
4675echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004676sed 's/^/| /' conftest.$ac_ext >&5
4677
Martin v. Löwis11437992002-04-12 09:54:03 +00004678( exit $ac_status )
4679ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004681rm -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 +00004682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004683
4684
Guido van Rossum91922671997-10-09 20:24:13 +00004685CC="$ac_save_cc"
4686fi
4687
Martin v. Löwiseba40652007-08-30 20:10:57 +00004688{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4689echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004690if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004691 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004692 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4693 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4694 # environment?
4695 Darwin*)
4696 ;;
4697 *)
4698 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4699 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004700 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004701else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004702 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4703echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004704 if test "${ac_cv_olimit_ok+set}" = set; then
4705 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004706else
4707 ac_save_cc="$CC"
4708 CC="$CC -Olimit 1500"
4709 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004710 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004711else
Martin v. Löwis11437992002-04-12 09:54:03 +00004712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004713/* confdefs.h. */
4714_ACEOF
4715cat confdefs.h >>conftest.$ac_ext
4716cat >>conftest.$ac_ext <<_ACEOF
4717/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004718int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004719_ACEOF
4720rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004721if { (ac_try="$ac_link"
4722case "(($ac_try" in
4723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4724 *) ac_try_echo=$ac_try;;
4725esac
4726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4727 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004728 ac_status=$?
4729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4730 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004731 { (case "(($ac_try" in
4732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4733 *) ac_try_echo=$ac_try;;
4734esac
4735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4736 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004737 ac_status=$?
4738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4739 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004740 ac_cv_olimit_ok=yes
4741else
Martin v. Löwis11437992002-04-12 09:54:03 +00004742 echo "$as_me: program exited with status $ac_status" >&5
4743echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004744sed 's/^/| /' conftest.$ac_ext >&5
4745
Martin v. Löwis11437992002-04-12 09:54:03 +00004746( exit $ac_status )
4747ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004749rm -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 +00004750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004751
4752
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004753 CC="$ac_save_cc"
4754fi
4755
Martin v. Löwiseba40652007-08-30 20:10:57 +00004756 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4757echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004758 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004759 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004760 fi
4761fi
4762
Martin v. Löwisaac13162006-10-19 10:58:46 +00004763# Check whether GCC supports PyArg_ParseTuple format
4764if test "$GCC" = "yes"
4765then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004766 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4767echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004768 save_CFLAGS=$CFLAGS
4769 CFLAGS="$CFLAGS -Werror"
4770 cat >conftest.$ac_ext <<_ACEOF
4771/* confdefs.h. */
4772_ACEOF
4773cat confdefs.h >>conftest.$ac_ext
4774cat >>conftest.$ac_ext <<_ACEOF
4775/* end confdefs.h. */
4776
4777 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4778
4779int
4780main ()
4781{
4782
4783 ;
4784 return 0;
4785}
4786_ACEOF
4787rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004788if { (ac_try="$ac_compile"
4789case "(($ac_try" in
4790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4791 *) ac_try_echo=$ac_try;;
4792esac
4793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004795 ac_status=$?
4796 grep -v '^ *+' conftest.er1 >conftest.err
4797 rm -f conftest.er1
4798 cat conftest.err >&5
4799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004800 (exit $ac_status); } && {
4801 test -z "$ac_c_werror_flag" ||
4802 test ! -s conftest.err
4803 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004804
4805cat >>confdefs.h <<\_ACEOF
4806#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4807_ACEOF
4808
Martin v. Löwiseba40652007-08-30 20:10:57 +00004809 { echo "$as_me:$LINENO: result: yes" >&5
4810echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004811else
4812 echo "$as_me: failed program was:" >&5
4813sed 's/^/| /' conftest.$ac_ext >&5
4814
Martin v. Löwiseba40652007-08-30 20:10:57 +00004815 { echo "$as_me:$LINENO: result: no" >&5
4816echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004817
4818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004819
4820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004821 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004822fi
4823
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004824# On some compilers, pthreads are available without further options
4825# (e.g. MacOS X). On some of these systems, the compiler will not
4826# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4827# So we have to see first whether pthreads are available without
4828# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004829{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4830echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004831if test "${ac_cv_pthread_is_default+set}" = set; then
4832 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004833else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004834 if test "$cross_compiling" = yes; then
4835 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004836else
Martin v. Löwis11437992002-04-12 09:54:03 +00004837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004838/* confdefs.h. */
4839_ACEOF
4840cat confdefs.h >>conftest.$ac_ext
4841cat >>conftest.$ac_ext <<_ACEOF
4842/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004843
Martin v. Löwis130fb172001-07-19 11:00:41 +00004844#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004845
4846void* routine(void* p){return NULL;}
4847
4848int main(){
4849 pthread_t p;
4850 if(pthread_create(&p,NULL,routine,NULL)!=0)
4851 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004852 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004853 return 0;
4854}
4855
Martin v. Löwis11437992002-04-12 09:54:03 +00004856_ACEOF
4857rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004858if { (ac_try="$ac_link"
4859case "(($ac_try" in
4860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4861 *) ac_try_echo=$ac_try;;
4862esac
4863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4864 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004865 ac_status=$?
4866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4867 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004868 { (case "(($ac_try" in
4869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4870 *) ac_try_echo=$ac_try;;
4871esac
4872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4873 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004874 ac_status=$?
4875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4876 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004877
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004878 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004879 ac_cv_kthread=no
4880 ac_cv_pthread=no
4881
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004882else
Martin v. Löwis11437992002-04-12 09:54:03 +00004883 echo "$as_me: program exited with status $ac_status" >&5
4884echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004885sed 's/^/| /' conftest.$ac_ext >&5
4886
Martin v. Löwis11437992002-04-12 09:54:03 +00004887( exit $ac_status )
4888ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004890rm -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 +00004891fi
4892
Martin v. Löwiseba40652007-08-30 20:10:57 +00004893
4894
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004895fi
4896
Martin v. Löwiseba40652007-08-30 20:10:57 +00004897{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4898echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004899
Michael W. Hudson54241132001-12-07 15:38:26 +00004900
Martin v. Löwis11437992002-04-12 09:54:03 +00004901if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004902then
4903 ac_cv_kpthread=no
4904else
4905# -Kpthread, if available, provides the right #defines
4906# and linker options to make pthread_create available
4907# Some compilers won't report that they do not support -Kpthread,
4908# so we need to run a program to see whether it really made the
4909# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004910{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4911echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004912if test "${ac_cv_kpthread+set}" = set; then
4913 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004914else
4915 ac_save_cc="$CC"
4916CC="$CC -Kpthread"
4917if test "$cross_compiling" = yes; then
4918 ac_cv_kpthread=no
4919else
Martin v. Löwis11437992002-04-12 09:54:03 +00004920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004921/* confdefs.h. */
4922_ACEOF
4923cat confdefs.h >>conftest.$ac_ext
4924cat >>conftest.$ac_ext <<_ACEOF
4925/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004926
4927#include <pthread.h>
4928
4929void* routine(void* p){return NULL;}
4930
4931int main(){
4932 pthread_t p;
4933 if(pthread_create(&p,NULL,routine,NULL)!=0)
4934 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004935 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004936 return 0;
4937}
4938
Martin v. Löwis11437992002-04-12 09:54:03 +00004939_ACEOF
4940rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004941if { (ac_try="$ac_link"
4942case "(($ac_try" in
4943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4944 *) ac_try_echo=$ac_try;;
4945esac
4946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4947 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004948 ac_status=$?
4949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4950 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004951 { (case "(($ac_try" in
4952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4953 *) ac_try_echo=$ac_try;;
4954esac
4955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4956 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004957 ac_status=$?
4958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4959 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004960 ac_cv_kpthread=yes
4961else
Martin v. Löwis11437992002-04-12 09:54:03 +00004962 echo "$as_me: program exited with status $ac_status" >&5
4963echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004964sed 's/^/| /' conftest.$ac_ext >&5
4965
Martin v. Löwis11437992002-04-12 09:54:03 +00004966( exit $ac_status )
4967ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004969rm -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 +00004970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004971
4972
Martin v. Löwis130fb172001-07-19 11:00:41 +00004973CC="$ac_save_cc"
4974fi
4975
Martin v. Löwiseba40652007-08-30 20:10:57 +00004976{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4977echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004978fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004979
Skip Montanarod8d39a02003-07-10 20:44:10 +00004980if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004981then
4982# -Kthread, if available, provides the right #defines
4983# and linker options to make pthread_create available
4984# Some compilers won't report that they do not support -Kthread,
4985# so we need to run a program to see whether it really made the
4986# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004987{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4988echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004989if test "${ac_cv_kthread+set}" = set; then
4990 echo $ECHO_N "(cached) $ECHO_C" >&6
4991else
4992 ac_save_cc="$CC"
4993CC="$CC -Kthread"
4994if test "$cross_compiling" = yes; then
4995 ac_cv_kthread=no
4996else
4997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004998/* confdefs.h. */
4999_ACEOF
5000cat confdefs.h >>conftest.$ac_ext
5001cat >>conftest.$ac_ext <<_ACEOF
5002/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005003
5004#include <pthread.h>
5005
5006void* routine(void* p){return NULL;}
5007
5008int main(){
5009 pthread_t p;
5010 if(pthread_create(&p,NULL,routine,NULL)!=0)
5011 return 1;
5012 (void)pthread_detach(p);
5013 return 0;
5014}
5015
5016_ACEOF
5017rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005018if { (ac_try="$ac_link"
5019case "(($ac_try" in
5020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5021 *) ac_try_echo=$ac_try;;
5022esac
5023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5024 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005025 ac_status=$?
5026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005028 { (case "(($ac_try" in
5029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5030 *) ac_try_echo=$ac_try;;
5031esac
5032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5033 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005034 ac_status=$?
5035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5036 (exit $ac_status); }; }; then
5037 ac_cv_kthread=yes
5038else
5039 echo "$as_me: program exited with status $ac_status" >&5
5040echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005041sed 's/^/| /' conftest.$ac_ext >&5
5042
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005043( exit $ac_status )
5044ac_cv_kthread=no
5045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005046rm -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 +00005047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005048
5049
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005050CC="$ac_save_cc"
5051fi
5052
Martin v. Löwiseba40652007-08-30 20:10:57 +00005053{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5054echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005055fi
5056
Skip Montanarod8d39a02003-07-10 20:44:10 +00005057if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005058then
5059# -pthread, if available, provides the right #defines
5060# and linker options to make pthread_create available
5061# Some compilers won't report that they do not support -pthread,
5062# so we need to run a program to see whether it really made the
5063# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005064{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5065echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005066if test "${ac_cv_thread+set}" = set; then
5067 echo $ECHO_N "(cached) $ECHO_C" >&6
5068else
5069 ac_save_cc="$CC"
5070CC="$CC -pthread"
5071if test "$cross_compiling" = yes; then
5072 ac_cv_pthread=no
5073else
5074 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005075/* confdefs.h. */
5076_ACEOF
5077cat confdefs.h >>conftest.$ac_ext
5078cat >>conftest.$ac_ext <<_ACEOF
5079/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005080
5081#include <pthread.h>
5082
5083void* routine(void* p){return NULL;}
5084
5085int main(){
5086 pthread_t p;
5087 if(pthread_create(&p,NULL,routine,NULL)!=0)
5088 return 1;
5089 (void)pthread_detach(p);
5090 return 0;
5091}
5092
5093_ACEOF
5094rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005095if { (ac_try="$ac_link"
5096case "(($ac_try" in
5097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5098 *) ac_try_echo=$ac_try;;
5099esac
5100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5101 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005102 ac_status=$?
5103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5104 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005105 { (case "(($ac_try" in
5106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5107 *) ac_try_echo=$ac_try;;
5108esac
5109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5110 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005111 ac_status=$?
5112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5113 (exit $ac_status); }; }; then
5114 ac_cv_pthread=yes
5115else
5116 echo "$as_me: program exited with status $ac_status" >&5
5117echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005118sed 's/^/| /' conftest.$ac_ext >&5
5119
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005120( exit $ac_status )
5121ac_cv_pthread=no
5122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005123rm -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 +00005124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005125
5126
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005127CC="$ac_save_cc"
5128fi
5129
Martin v. Löwiseba40652007-08-30 20:10:57 +00005130{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5131echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005132fi
5133
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005134# If we have set a CC compiler flag for thread support then
5135# check if it works for CXX, too.
5136ac_cv_cxx_thread=no
5137if test ! -z "$CXX"
5138then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005139{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5140echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005141ac_save_cxx="$CXX"
5142
5143if test "$ac_cv_kpthread" = "yes"
5144then
5145 CXX="$CXX -Kpthread"
5146 ac_cv_cxx_thread=yes
5147elif test "$ac_cv_kthread" = "yes"
5148then
5149 CXX="$CXX -Kthread"
5150 ac_cv_cxx_thread=yes
5151elif test "$ac_cv_pthread" = "yes"
5152then
5153 CXX="$CXX -pthread"
5154 ac_cv_cxx_thread=yes
5155fi
5156
5157if test $ac_cv_cxx_thread = yes
5158then
5159 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5160 $CXX -c conftest.$ac_ext 2>&5
5161 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5162 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5163 then
5164 ac_cv_cxx_thread=yes
5165 else
5166 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005167 fi
5168 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005170{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5171echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005172fi
5173CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005174
Michael W. Hudson54241132001-12-07 15:38:26 +00005175
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005176# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005177{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5178echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005179if test "${ac_cv_header_stdc+set}" = set; then
5180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005181else
Martin v. Löwis11437992002-04-12 09:54:03 +00005182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005183/* confdefs.h. */
5184_ACEOF
5185cat confdefs.h >>conftest.$ac_ext
5186cat >>conftest.$ac_ext <<_ACEOF
5187/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005188#include <stdlib.h>
5189#include <stdarg.h>
5190#include <string.h>
5191#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005192
Skip Montanaro6dead952003-09-25 14:50:04 +00005193int
5194main ()
5195{
5196
5197 ;
5198 return 0;
5199}
Martin v. Löwis11437992002-04-12 09:54:03 +00005200_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005201rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005202if { (ac_try="$ac_compile"
5203case "(($ac_try" in
5204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5205 *) ac_try_echo=$ac_try;;
5206esac
5207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005210 grep -v '^ *+' conftest.er1 >conftest.err
5211 rm -f conftest.er1
5212 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005214 (exit $ac_status); } && {
5215 test -z "$ac_c_werror_flag" ||
5216 test ! -s conftest.err
5217 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005218 ac_cv_header_stdc=yes
5219else
Martin v. Löwis11437992002-04-12 09:54:03 +00005220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005221sed 's/^/| /' conftest.$ac_ext >&5
5222
Martin v. Löwiseba40652007-08-30 20:10:57 +00005223 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005225
5226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005227
5228if test $ac_cv_header_stdc = yes; then
5229 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005231/* confdefs.h. */
5232_ACEOF
5233cat confdefs.h >>conftest.$ac_ext
5234cat >>conftest.$ac_ext <<_ACEOF
5235/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005236#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005237
5238_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005239if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005240 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005241 :
5242else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005243 ac_cv_header_stdc=no
5244fi
5245rm -f conftest*
5246
5247fi
5248
5249if test $ac_cv_header_stdc = yes; then
5250 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005252/* confdefs.h. */
5253_ACEOF
5254cat confdefs.h >>conftest.$ac_ext
5255cat >>conftest.$ac_ext <<_ACEOF
5256/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005257#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005258
5259_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005261 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005262 :
5263else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005264 ac_cv_header_stdc=no
5265fi
5266rm -f conftest*
5267
5268fi
5269
5270if test $ac_cv_header_stdc = yes; then
5271 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005272 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005273 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005274else
Martin v. Löwis11437992002-04-12 09:54:03 +00005275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005276/* confdefs.h. */
5277_ACEOF
5278cat confdefs.h >>conftest.$ac_ext
5279cat >>conftest.$ac_ext <<_ACEOF
5280/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005281#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005282#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005283#if ((' ' & 0x0FF) == 0x020)
5284# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5285# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5286#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005287# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005288 (('a' <= (c) && (c) <= 'i') \
5289 || ('j' <= (c) && (c) <= 'r') \
5290 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005291# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5292#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005293
Martin v. Löwis11437992002-04-12 09:54:03 +00005294#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5295int
5296main ()
5297{
5298 int i;
5299 for (i = 0; i < 256; i++)
5300 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005301 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005302 return 2;
5303 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005304}
5305_ACEOF
5306rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005307if { (ac_try="$ac_link"
5308case "(($ac_try" in
5309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5310 *) ac_try_echo=$ac_try;;
5311esac
5312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5313 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005314 ac_status=$?
5315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005317 { (case "(($ac_try" in
5318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5319 *) ac_try_echo=$ac_try;;
5320esac
5321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5322 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005323 ac_status=$?
5324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5325 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005326 :
5327else
Martin v. Löwis11437992002-04-12 09:54:03 +00005328 echo "$as_me: program exited with status $ac_status" >&5
5329echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005330sed 's/^/| /' conftest.$ac_ext >&5
5331
Martin v. Löwis11437992002-04-12 09:54:03 +00005332( exit $ac_status )
5333ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5336fi
5337
5338
Michael W. Hudson54241132001-12-07 15:38:26 +00005339fi
5340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005341{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5342echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005343if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005344
5345cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005346#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005347_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005348
5349fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005350
Skip Montanarob9820a32004-01-17 00:16:12 +00005351# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005362 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005363do
5364as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005365{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5366echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5367if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005368 echo $ECHO_N "(cached) $ECHO_C" >&6
5369else
5370 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005371/* confdefs.h. */
5372_ACEOF
5373cat confdefs.h >>conftest.$ac_ext
5374cat >>conftest.$ac_ext <<_ACEOF
5375/* end confdefs.h. */
5376$ac_includes_default
5377
5378#include <$ac_header>
5379_ACEOF
5380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005381if { (ac_try="$ac_compile"
5382case "(($ac_try" in
5383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5384 *) ac_try_echo=$ac_try;;
5385esac
5386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5387 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005389 grep -v '^ *+' conftest.er1 >conftest.err
5390 rm -f conftest.er1
5391 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005393 (exit $ac_status); } && {
5394 test -z "$ac_c_werror_flag" ||
5395 test ! -s conftest.err
5396 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005397 eval "$as_ac_Header=yes"
5398else
5399 echo "$as_me: failed program was:" >&5
5400sed 's/^/| /' conftest.$ac_ext >&5
5401
Martin v. Löwiseba40652007-08-30 20:10:57 +00005402 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005404
5405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005407ac_res=`eval echo '${'$as_ac_Header'}'`
5408 { echo "$as_me:$LINENO: result: $ac_res" >&5
5409echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005410if test `eval echo '${'$as_ac_Header'}'` = yes; then
5411 cat >>confdefs.h <<_ACEOF
5412#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5413_ACEOF
5414
5415fi
5416
5417done
5418
5419
Martin v. Löwis11437992002-04-12 09:54:03 +00005420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
Anthony Baxter8a560de2004-10-13 15:30:56 +00005456
Martin v. Löwisc3001752005-01-23 09:27:24 +00005457
Martin v. Löwis11017b12006-01-14 18:12:57 +00005458
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005459
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005460
5461
5462
5463
5464
5465
5466
5467
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005468
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005469
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005470
5471
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005472
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005473
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005474for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5475fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005476ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005477shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005478unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005479sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5480sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005481sys/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 +00005482sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005483sys/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 +00005484sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005485bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005486do
Martin v. Löwis11437992002-04-12 09:54:03 +00005487as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005488if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5489 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5490echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5491if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005492 echo $ECHO_N "(cached) $ECHO_C" >&6
5493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005494ac_res=`eval echo '${'$as_ac_Header'}'`
5495 { echo "$as_me:$LINENO: result: $ac_res" >&5
5496echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005497else
Martin v. Löwis11437992002-04-12 09:54:03 +00005498 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005499{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5500echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005501cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005502/* confdefs.h. */
5503_ACEOF
5504cat confdefs.h >>conftest.$ac_ext
5505cat >>conftest.$ac_ext <<_ACEOF
5506/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005507$ac_includes_default
5508#include <$ac_header>
5509_ACEOF
5510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005511if { (ac_try="$ac_compile"
5512case "(($ac_try" in
5513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5514 *) ac_try_echo=$ac_try;;
5515esac
5516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005519 grep -v '^ *+' conftest.er1 >conftest.err
5520 rm -f conftest.er1
5521 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005523 (exit $ac_status); } && {
5524 test -z "$ac_c_werror_flag" ||
5525 test ! -s conftest.err
5526 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005527 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005528else
Martin v. Löwis11437992002-04-12 09:54:03 +00005529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005530sed 's/^/| /' conftest.$ac_ext >&5
5531
Martin v. Löwiseba40652007-08-30 20:10:57 +00005532 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005534
5535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5536{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5537echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005538
5539# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005540{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5541echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005543/* confdefs.h. */
5544_ACEOF
5545cat confdefs.h >>conftest.$ac_ext
5546cat >>conftest.$ac_ext <<_ACEOF
5547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005548#include <$ac_header>
5549_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005550if { (ac_try="$ac_cpp conftest.$ac_ext"
5551case "(($ac_try" in
5552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5553 *) ac_try_echo=$ac_try;;
5554esac
5555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5556 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005557 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005558 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005559 rm -f conftest.er1
5560 cat conftest.err >&5
5561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005562 (exit $ac_status); } >/dev/null && {
5563 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5564 test ! -s conftest.err
5565 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005566 ac_header_preproc=yes
5567else
5568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005569sed 's/^/| /' conftest.$ac_ext >&5
5570
Martin v. Löwis11437992002-04-12 09:54:03 +00005571 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005573
Martin v. Löwis11437992002-04-12 09:54:03 +00005574rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005575{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5576echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005577
5578# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005579case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5580 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005581 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5582echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005583 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5584echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5585 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005586 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005587 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005588 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5589echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005590 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5591echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5592 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5593echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5594 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5595echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005596 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5597echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005598 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5599echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005600 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005601## ------------------------------------------------ ##
5602## Report this to http://www.python.org/python-bugs ##
5603## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005604_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005605 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005606 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005607esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005608{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5609echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5610if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005611 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005612else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005613 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005615ac_res=`eval echo '${'$as_ac_Header'}'`
5616 { echo "$as_me:$LINENO: result: $ac_res" >&5
5617echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005618
5619fi
5620if test `eval echo '${'$as_ac_Header'}'` = yes; then
5621 cat >>confdefs.h <<_ACEOF
5622#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5623_ACEOF
5624
5625fi
5626
Guido van Rossum627b2d71993-12-24 10:39:16 +00005627done
5628
Martin v. Löwis11437992002-04-12 09:54:03 +00005629
5630
5631
5632
5633
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005634ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005635for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5636 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005637{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5638echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5639if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005640 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005641else
Martin v. Löwis11437992002-04-12 09:54:03 +00005642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005643/* confdefs.h. */
5644_ACEOF
5645cat confdefs.h >>conftest.$ac_ext
5646cat >>conftest.$ac_ext <<_ACEOF
5647/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005648#include <sys/types.h>
5649#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005650
Martin v. Löwis11437992002-04-12 09:54:03 +00005651int
5652main ()
5653{
5654if ((DIR *) 0)
5655return 0;
5656 ;
5657 return 0;
5658}
5659_ACEOF
5660rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005661if { (ac_try="$ac_compile"
5662case "(($ac_try" in
5663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5664 *) ac_try_echo=$ac_try;;
5665esac
5666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005669 grep -v '^ *+' conftest.er1 >conftest.err
5670 rm -f conftest.er1
5671 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005673 (exit $ac_status); } && {
5674 test -z "$ac_c_werror_flag" ||
5675 test ! -s conftest.err
5676 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005677 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005678else
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005680sed 's/^/| /' conftest.$ac_ext >&5
5681
Martin v. Löwiseba40652007-08-30 20:10:57 +00005682 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005684
5685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005687ac_res=`eval echo '${'$as_ac_Header'}'`
5688 { echo "$as_me:$LINENO: result: $ac_res" >&5
5689echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005690if test `eval echo '${'$as_ac_Header'}'` = yes; then
5691 cat >>confdefs.h <<_ACEOF
5692#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5693_ACEOF
5694
5695ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005696fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005697
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005698done
5699# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5700if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005701 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5702echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005703if test "${ac_cv_search_opendir+set}" = set; then
5704 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005705else
Martin v. Löwis11437992002-04-12 09:54:03 +00005706 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005707cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005708/* confdefs.h. */
5709_ACEOF
5710cat confdefs.h >>conftest.$ac_ext
5711cat >>conftest.$ac_ext <<_ACEOF
5712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005713
Martin v. Löwiseba40652007-08-30 20:10:57 +00005714/* Override any GCC internal prototype to avoid an error.
5715 Use char because int might match the return type of a GCC
5716 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005717#ifdef __cplusplus
5718extern "C"
5719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005720char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005721int
5722main ()
5723{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005724return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005725 ;
5726 return 0;
5727}
5728_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005729for ac_lib in '' dir; do
5730 if test -z "$ac_lib"; then
5731 ac_res="none required"
5732 else
5733 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005734 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005735 fi
5736 rm -f conftest.$ac_objext conftest$ac_exeext
5737if { (ac_try="$ac_link"
5738case "(($ac_try" in
5739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5740 *) ac_try_echo=$ac_try;;
5741esac
5742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5743 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005744 ac_status=$?
5745 grep -v '^ *+' conftest.er1 >conftest.err
5746 rm -f conftest.er1
5747 cat conftest.err >&5
5748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005749 (exit $ac_status); } && {
5750 test -z "$ac_c_werror_flag" ||
5751 test ! -s conftest.err
5752 } && test -s conftest$ac_exeext &&
5753 $as_test_x conftest$ac_exeext; then
5754 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005755else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005756 echo "$as_me: failed program was:" >&5
5757sed 's/^/| /' conftest.$ac_ext >&5
5758
Martin v. Löwiseba40652007-08-30 20:10:57 +00005759
Brett Cannon19fab762007-06-02 03:02:29 +00005760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005761
5762rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5763 conftest$ac_exeext
5764 if test "${ac_cv_search_opendir+set}" = set; then
5765 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005767done
5768if test "${ac_cv_search_opendir+set}" = set; then
5769 :
5770else
5771 ac_cv_search_opendir=no
5772fi
5773rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005774LIBS=$ac_func_search_save_LIBS
5775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005776{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5777echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5778ac_res=$ac_cv_search_opendir
5779if test "$ac_res" != no; then
5780 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005781
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005782fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005783
Michael W. Hudson54241132001-12-07 15:38:26 +00005784else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005785 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5786echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005787if test "${ac_cv_search_opendir+set}" = set; then
5788 echo $ECHO_N "(cached) $ECHO_C" >&6
5789else
5790 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005791cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005792/* confdefs.h. */
5793_ACEOF
5794cat confdefs.h >>conftest.$ac_ext
5795cat >>conftest.$ac_ext <<_ACEOF
5796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005797
Martin v. Löwiseba40652007-08-30 20:10:57 +00005798/* Override any GCC internal prototype to avoid an error.
5799 Use char because int might match the return type of a GCC
5800 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005801#ifdef __cplusplus
5802extern "C"
5803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005804char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005805int
5806main ()
5807{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005808return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005809 ;
5810 return 0;
5811}
5812_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005813for ac_lib in '' x; do
5814 if test -z "$ac_lib"; then
5815 ac_res="none required"
5816 else
5817 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005818 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005819 fi
5820 rm -f conftest.$ac_objext conftest$ac_exeext
5821if { (ac_try="$ac_link"
5822case "(($ac_try" in
5823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5824 *) ac_try_echo=$ac_try;;
5825esac
5826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5827 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005828 ac_status=$?
5829 grep -v '^ *+' conftest.er1 >conftest.err
5830 rm -f conftest.er1
5831 cat conftest.err >&5
5832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005833 (exit $ac_status); } && {
5834 test -z "$ac_c_werror_flag" ||
5835 test ! -s conftest.err
5836 } && test -s conftest$ac_exeext &&
5837 $as_test_x conftest$ac_exeext; then
5838 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005839else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005840 echo "$as_me: failed program was:" >&5
5841sed 's/^/| /' conftest.$ac_ext >&5
5842
Martin v. Löwiseba40652007-08-30 20:10:57 +00005843
Brett Cannon19fab762007-06-02 03:02:29 +00005844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005845
5846rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5847 conftest$ac_exeext
5848 if test "${ac_cv_search_opendir+set}" = set; then
5849 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005851done
5852if test "${ac_cv_search_opendir+set}" = set; then
5853 :
5854else
5855 ac_cv_search_opendir=no
5856fi
5857rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005858LIBS=$ac_func_search_save_LIBS
5859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005860{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5861echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5862ac_res=$ac_cv_search_opendir
5863if test "$ac_res" != no; then
5864 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005865
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005866fi
5867
5868fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005869
Martin v. Löwiseba40652007-08-30 20:10:57 +00005870{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5871echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005872if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5873 echo $ECHO_N "(cached) $ECHO_C" >&6
5874else
5875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005876/* confdefs.h. */
5877_ACEOF
5878cat confdefs.h >>conftest.$ac_ext
5879cat >>conftest.$ac_ext <<_ACEOF
5880/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005881#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005882int
5883main ()
5884{
5885return makedev(0, 0);
5886 ;
5887 return 0;
5888}
5889_ACEOF
5890rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005891if { (ac_try="$ac_link"
5892case "(($ac_try" in
5893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5894 *) ac_try_echo=$ac_try;;
5895esac
5896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5897 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005899 grep -v '^ *+' conftest.er1 >conftest.err
5900 rm -f conftest.er1
5901 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005903 (exit $ac_status); } && {
5904 test -z "$ac_c_werror_flag" ||
5905 test ! -s conftest.err
5906 } && test -s conftest$ac_exeext &&
5907 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005908 ac_cv_header_sys_types_h_makedev=yes
5909else
5910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005911sed 's/^/| /' conftest.$ac_ext >&5
5912
Martin v. Löwiseba40652007-08-30 20:10:57 +00005913 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915
5916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005917 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005918
5919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005920{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5921echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005922
5923if test $ac_cv_header_sys_types_h_makedev = no; then
5924if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005925 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5926echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005927if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5928 echo $ECHO_N "(cached) $ECHO_C" >&6
5929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005930{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5931echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005932else
5933 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005934{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5935echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005936cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005937/* confdefs.h. */
5938_ACEOF
5939cat confdefs.h >>conftest.$ac_ext
5940cat >>conftest.$ac_ext <<_ACEOF
5941/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005942$ac_includes_default
5943#include <sys/mkdev.h>
5944_ACEOF
5945rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005946if { (ac_try="$ac_compile"
5947case "(($ac_try" in
5948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5949 *) ac_try_echo=$ac_try;;
5950esac
5951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005954 grep -v '^ *+' conftest.er1 >conftest.err
5955 rm -f conftest.er1
5956 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005958 (exit $ac_status); } && {
5959 test -z "$ac_c_werror_flag" ||
5960 test ! -s conftest.err
5961 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005962 ac_header_compiler=yes
5963else
5964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005965sed 's/^/| /' conftest.$ac_ext >&5
5966
Martin v. Löwiseba40652007-08-30 20:10:57 +00005967 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005969
5970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5971{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5972echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005973
5974# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005975{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5976echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005977cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005978/* confdefs.h. */
5979_ACEOF
5980cat confdefs.h >>conftest.$ac_ext
5981cat >>conftest.$ac_ext <<_ACEOF
5982/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005983#include <sys/mkdev.h>
5984_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005985if { (ac_try="$ac_cpp conftest.$ac_ext"
5986case "(($ac_try" in
5987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5988 *) ac_try_echo=$ac_try;;
5989esac
5990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5991 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005992 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005993 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005994 rm -f conftest.er1
5995 cat conftest.err >&5
5996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005997 (exit $ac_status); } >/dev/null && {
5998 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5999 test ! -s conftest.err
6000 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006001 ac_header_preproc=yes
6002else
6003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006004sed 's/^/| /' conftest.$ac_ext >&5
6005
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006006 ac_header_preproc=no
6007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006008
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006009rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006010{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6011echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006012
6013# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006014case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6015 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006016 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6017echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006018 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6019echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6020 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006021 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006022 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006023 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6024echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006025 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6026echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6027 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6028echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6029 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6030echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006031 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6032echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006033 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6034echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006035 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006036## ------------------------------------------------ ##
6037## Report this to http://www.python.org/python-bugs ##
6038## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006039_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006040 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006041 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006042esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006043{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6044echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6046 echo $ECHO_N "(cached) $ECHO_C" >&6
6047else
6048 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006050{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6051echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006052
6053fi
6054if test $ac_cv_header_sys_mkdev_h = yes; then
6055
6056cat >>confdefs.h <<\_ACEOF
6057#define MAJOR_IN_MKDEV 1
6058_ACEOF
6059
6060fi
6061
6062
6063
6064 if test $ac_cv_header_sys_mkdev_h = no; then
6065 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006066 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6067echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6069 echo $ECHO_N "(cached) $ECHO_C" >&6
6070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006071{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6072echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073else
6074 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006075{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6076echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006077cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006078/* confdefs.h. */
6079_ACEOF
6080cat confdefs.h >>conftest.$ac_ext
6081cat >>conftest.$ac_ext <<_ACEOF
6082/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006083$ac_includes_default
6084#include <sys/sysmacros.h>
6085_ACEOF
6086rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006087if { (ac_try="$ac_compile"
6088case "(($ac_try" in
6089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6090 *) ac_try_echo=$ac_try;;
6091esac
6092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6093 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006095 grep -v '^ *+' conftest.er1 >conftest.err
6096 rm -f conftest.er1
6097 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006099 (exit $ac_status); } && {
6100 test -z "$ac_c_werror_flag" ||
6101 test ! -s conftest.err
6102 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103 ac_header_compiler=yes
6104else
6105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006106sed 's/^/| /' conftest.$ac_ext >&5
6107
Martin v. Löwiseba40652007-08-30 20:10:57 +00006108 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006110
6111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6112{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6113echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114
6115# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006116{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6117echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006119/* confdefs.h. */
6120_ACEOF
6121cat confdefs.h >>conftest.$ac_ext
6122cat >>conftest.$ac_ext <<_ACEOF
6123/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006124#include <sys/sysmacros.h>
6125_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006126if { (ac_try="$ac_cpp conftest.$ac_ext"
6127case "(($ac_try" in
6128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6129 *) ac_try_echo=$ac_try;;
6130esac
6131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6132 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006133 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006134 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135 rm -f conftest.er1
6136 cat conftest.err >&5
6137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006138 (exit $ac_status); } >/dev/null && {
6139 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6140 test ! -s conftest.err
6141 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142 ac_header_preproc=yes
6143else
6144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006145sed 's/^/| /' conftest.$ac_ext >&5
6146
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147 ac_header_preproc=no
6148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006149
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006151{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6152echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153
6154# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006155case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6156 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006157 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6158echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006159 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6160echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6161 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006162 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006163 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006164 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6165echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006166 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6167echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6168 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6169echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6170 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6171echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006172 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6173echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006174 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6175echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006176 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006177## ------------------------------------------------ ##
6178## Report this to http://www.python.org/python-bugs ##
6179## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006180_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006181 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006182 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006184{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6185echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6187 echo $ECHO_N "(cached) $ECHO_C" >&6
6188else
6189 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006191{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6192echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006193
6194fi
6195if test $ac_cv_header_sys_sysmacros_h = yes; then
6196
6197cat >>confdefs.h <<\_ACEOF
6198#define MAJOR_IN_SYSMACROS 1
6199_ACEOF
6200
6201fi
6202
6203
6204 fi
6205fi
6206
Michael W. Hudson54241132001-12-07 15:38:26 +00006207
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006208# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006209
6210for ac_header in term.h
6211do
6212as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006213{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6214echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6215if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006216 echo $ECHO_N "(cached) $ECHO_C" >&6
6217else
6218 cat >conftest.$ac_ext <<_ACEOF
6219/* confdefs.h. */
6220_ACEOF
6221cat confdefs.h >>conftest.$ac_ext
6222cat >>conftest.$ac_ext <<_ACEOF
6223/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006224
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006225#ifdef HAVE_CURSES_H
6226#include <curses.h>
6227#endif
6228
6229
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006230#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006231_ACEOF
6232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006233if { (ac_try="$ac_compile"
6234case "(($ac_try" in
6235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6236 *) ac_try_echo=$ac_try;;
6237esac
6238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006240 ac_status=$?
6241 grep -v '^ *+' conftest.er1 >conftest.err
6242 rm -f conftest.er1
6243 cat conftest.err >&5
6244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006245 (exit $ac_status); } && {
6246 test -z "$ac_c_werror_flag" ||
6247 test ! -s conftest.err
6248 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006249 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006250else
6251 echo "$as_me: failed program was:" >&5
6252sed 's/^/| /' conftest.$ac_ext >&5
6253
Martin v. Löwiseba40652007-08-30 20:10:57 +00006254 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006256
6257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006259ac_res=`eval echo '${'$as_ac_Header'}'`
6260 { echo "$as_me:$LINENO: result: $ac_res" >&5
6261echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006262if test `eval echo '${'$as_ac_Header'}'` = yes; then
6263 cat >>confdefs.h <<_ACEOF
6264#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6265_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006266
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006267fi
6268
6269done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006270
6271
Martin v. Löwis11017b12006-01-14 18:12:57 +00006272# On Linux, netlink.h requires asm/types.h
6273
6274for ac_header in linux/netlink.h
6275do
6276as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006277{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6278echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6279if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006280 echo $ECHO_N "(cached) $ECHO_C" >&6
6281else
6282 cat >conftest.$ac_ext <<_ACEOF
6283/* confdefs.h. */
6284_ACEOF
6285cat confdefs.h >>conftest.$ac_ext
6286cat >>conftest.$ac_ext <<_ACEOF
6287/* end confdefs.h. */
6288
6289#ifdef HAVE_ASM_TYPES_H
6290#include <asm/types.h>
6291#endif
6292#ifdef HAVE_SYS_SOCKET_H
6293#include <sys/socket.h>
6294#endif
6295
6296
6297#include <$ac_header>
6298_ACEOF
6299rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006300if { (ac_try="$ac_compile"
6301case "(($ac_try" in
6302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6303 *) ac_try_echo=$ac_try;;
6304esac
6305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006307 ac_status=$?
6308 grep -v '^ *+' conftest.er1 >conftest.err
6309 rm -f conftest.er1
6310 cat conftest.err >&5
6311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006312 (exit $ac_status); } && {
6313 test -z "$ac_c_werror_flag" ||
6314 test ! -s conftest.err
6315 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006316 eval "$as_ac_Header=yes"
6317else
6318 echo "$as_me: failed program was:" >&5
6319sed 's/^/| /' conftest.$ac_ext >&5
6320
Martin v. Löwiseba40652007-08-30 20:10:57 +00006321 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006323
6324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006326ac_res=`eval echo '${'$as_ac_Header'}'`
6327 { echo "$as_me:$LINENO: result: $ac_res" >&5
6328echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006329if test `eval echo '${'$as_ac_Header'}'` = yes; then
6330 cat >>confdefs.h <<_ACEOF
6331#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6332_ACEOF
6333
6334fi
6335
6336done
6337
6338
Guido van Rossum627b2d71993-12-24 10:39:16 +00006339# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006340was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006341{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6342echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006343cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006344/* confdefs.h. */
6345_ACEOF
6346cat confdefs.h >>conftest.$ac_ext
6347cat >>conftest.$ac_ext <<_ACEOF
6348/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006349#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006350
6351_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006353 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006354 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006355else
Martin v. Löwis11437992002-04-12 09:54:03 +00006356
6357
6358cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006359#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006360_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006361
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006362
Guido van Rossum627b2d71993-12-24 10:39:16 +00006363fi
6364rm -f conftest*
6365
Martin v. Löwiseba40652007-08-30 20:10:57 +00006366{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6367echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006368
Neal Norwitz11690112002-07-30 01:08:28 +00006369# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006370{ echo "$as_me:$LINENO: checking for makedev" >&5
6371echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006372cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006373/* confdefs.h. */
6374_ACEOF
6375cat confdefs.h >>conftest.$ac_ext
6376cat >>conftest.$ac_ext <<_ACEOF
6377/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006378#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006379int
6380main ()
6381{
6382 makedev(0, 0)
6383 ;
6384 return 0;
6385}
6386_ACEOF
6387rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006388if { (ac_try="$ac_link"
6389case "(($ac_try" in
6390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6391 *) ac_try_echo=$ac_try;;
6392esac
6393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6394 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006396 grep -v '^ *+' conftest.er1 >conftest.err
6397 rm -f conftest.er1
6398 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006400 (exit $ac_status); } && {
6401 test -z "$ac_c_werror_flag" ||
6402 test ! -s conftest.err
6403 } && test -s conftest$ac_exeext &&
6404 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006405 ac_cv_has_makedev=yes
6406else
6407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006408sed 's/^/| /' conftest.$ac_ext >&5
6409
Martin v. Löwiseba40652007-08-30 20:10:57 +00006410 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006412
6413rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006414 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006415if test "$ac_cv_has_makedev" = "no"; then
6416 # we didn't link, try if _OSF_SOURCE will allow us to link
6417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006418/* confdefs.h. */
6419_ACEOF
6420cat confdefs.h >>conftest.$ac_ext
6421cat >>conftest.$ac_ext <<_ACEOF
6422/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006423
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006424#define _OSF_SOURCE 1
6425#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006426
Neal Norwitz11690112002-07-30 01:08:28 +00006427int
6428main ()
6429{
6430 makedev(0, 0)
6431 ;
6432 return 0;
6433}
6434_ACEOF
6435rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006436if { (ac_try="$ac_link"
6437case "(($ac_try" in
6438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6439 *) ac_try_echo=$ac_try;;
6440esac
6441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6442 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006444 grep -v '^ *+' conftest.er1 >conftest.err
6445 rm -f conftest.er1
6446 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006448 (exit $ac_status); } && {
6449 test -z "$ac_c_werror_flag" ||
6450 test ! -s conftest.err
6451 } && test -s conftest$ac_exeext &&
6452 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006453 ac_cv_has_makedev=yes
6454else
6455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006456sed 's/^/| /' conftest.$ac_ext >&5
6457
Martin v. Löwiseba40652007-08-30 20:10:57 +00006458 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006460
6461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006462 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006463 if test "$ac_cv_has_makedev" = "yes"; then
6464
6465cat >>confdefs.h <<\_ACEOF
6466#define _OSF_SOURCE 1
6467_ACEOF
6468
6469 fi
6470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006471{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6472echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006473if test "$ac_cv_has_makedev" = "yes"; then
6474
6475cat >>confdefs.h <<\_ACEOF
6476#define HAVE_MAKEDEV 1
6477_ACEOF
6478
6479fi
6480
Martin v. Löwis399a6892002-10-04 10:22:02 +00006481# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6482# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6483# defined, but the compiler does not support pragma redefine_extname,
6484# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6485# structures (such as rlimit64) without declaring them. As a
6486# work-around, disable LFS on such configurations
6487
6488use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006489{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6490echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006492/* confdefs.h. */
6493_ACEOF
6494cat confdefs.h >>conftest.$ac_ext
6495cat >>conftest.$ac_ext <<_ACEOF
6496/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006497
6498#define _LARGEFILE_SOURCE 1
6499#define _FILE_OFFSET_BITS 64
6500#include <sys/resource.h>
6501
Martin v. Löwis399a6892002-10-04 10:22:02 +00006502int
6503main ()
6504{
6505struct rlimit foo;
6506 ;
6507 return 0;
6508}
6509_ACEOF
6510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006511if { (ac_try="$ac_compile"
6512case "(($ac_try" in
6513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6514 *) ac_try_echo=$ac_try;;
6515esac
6516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006519 grep -v '^ *+' conftest.er1 >conftest.err
6520 rm -f conftest.er1
6521 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006523 (exit $ac_status); } && {
6524 test -z "$ac_c_werror_flag" ||
6525 test ! -s conftest.err
6526 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006527 sol_lfs_bug=no
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 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006534
6535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6536{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6537echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006538if test "$sol_lfs_bug" = "yes"; then
6539 use_lfs=no
6540fi
6541
6542if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006543# Two defines needed to enable largefile support on various platforms
6544# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006545
Martin v. Löwis11437992002-04-12 09:54:03 +00006546cat >>confdefs.h <<\_ACEOF
6547#define _LARGEFILE_SOURCE 1
6548_ACEOF
6549
6550
6551cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006552#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006553_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006554
Martin v. Löwis399a6892002-10-04 10:22:02 +00006555fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006556
Guido van Rossum84e7b241996-08-19 21:59:00 +00006557# Add some code to confdefs.h so that the test for off_t works on SCO
6558cat >> confdefs.h <<\EOF
6559#if defined(SCO_DS)
6560#undef _OFF_T
6561#endif
6562EOF
6563
Guido van Rossumef2255b2000-03-10 22:30:29 +00006564# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006565{ echo "$as_me:$LINENO: checking for mode_t" >&5
6566echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006567if test "${ac_cv_type_mode_t+set}" = set; then
6568 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006569else
Martin v. Löwis11437992002-04-12 09:54:03 +00006570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006571/* confdefs.h. */
6572_ACEOF
6573cat confdefs.h >>conftest.$ac_ext
6574cat >>conftest.$ac_ext <<_ACEOF
6575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006576$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006577typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006578int
6579main ()
6580{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006582 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006583if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006584 return 0;
6585 ;
6586 return 0;
6587}
6588_ACEOF
6589rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006590if { (ac_try="$ac_compile"
6591case "(($ac_try" in
6592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6593 *) ac_try_echo=$ac_try;;
6594esac
6595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6596 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006598 grep -v '^ *+' conftest.er1 >conftest.err
6599 rm -f conftest.er1
6600 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006602 (exit $ac_status); } && {
6603 test -z "$ac_c_werror_flag" ||
6604 test ! -s conftest.err
6605 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006606 ac_cv_type_mode_t=yes
6607else
Martin v. Löwis11437992002-04-12 09:54:03 +00006608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006609sed 's/^/| /' conftest.$ac_ext >&5
6610
Martin v. Löwiseba40652007-08-30 20:10:57 +00006611 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006613
6614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006616{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6617echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006618if test $ac_cv_type_mode_t = yes; then
6619 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006620else
Martin v. Löwis11437992002-04-12 09:54:03 +00006621
6622cat >>confdefs.h <<_ACEOF
6623#define mode_t int
6624_ACEOF
6625
6626fi
6627
Martin v. Löwiseba40652007-08-30 20:10:57 +00006628{ echo "$as_me:$LINENO: checking for off_t" >&5
6629echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006630if test "${ac_cv_type_off_t+set}" = set; then
6631 echo $ECHO_N "(cached) $ECHO_C" >&6
6632else
6633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006634/* confdefs.h. */
6635_ACEOF
6636cat confdefs.h >>conftest.$ac_ext
6637cat >>conftest.$ac_ext <<_ACEOF
6638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006639$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006640typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006641int
6642main ()
6643{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006644if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006645 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006646if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006647 return 0;
6648 ;
6649 return 0;
6650}
6651_ACEOF
6652rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006653if { (ac_try="$ac_compile"
6654case "(($ac_try" in
6655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6656 *) ac_try_echo=$ac_try;;
6657esac
6658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6659 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006661 grep -v '^ *+' conftest.er1 >conftest.err
6662 rm -f conftest.er1
6663 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006665 (exit $ac_status); } && {
6666 test -z "$ac_c_werror_flag" ||
6667 test ! -s conftest.err
6668 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006669 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006670else
Martin v. Löwis11437992002-04-12 09:54:03 +00006671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006672sed 's/^/| /' conftest.$ac_ext >&5
6673
Martin v. Löwiseba40652007-08-30 20:10:57 +00006674 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006676
6677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006679{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6680echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006681if test $ac_cv_type_off_t = yes; then
6682 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006683else
Martin v. Löwis11437992002-04-12 09:54:03 +00006684
6685cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006686#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006687_ACEOF
6688
6689fi
6690
Martin v. Löwiseba40652007-08-30 20:10:57 +00006691{ echo "$as_me:$LINENO: checking for pid_t" >&5
6692echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006693if test "${ac_cv_type_pid_t+set}" = set; then
6694 echo $ECHO_N "(cached) $ECHO_C" >&6
6695else
6696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006697/* confdefs.h. */
6698_ACEOF
6699cat confdefs.h >>conftest.$ac_ext
6700cat >>conftest.$ac_ext <<_ACEOF
6701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006702$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006703typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006704int
6705main ()
6706{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006707if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006708 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006709if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006710 return 0;
6711 ;
6712 return 0;
6713}
6714_ACEOF
6715rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006716if { (ac_try="$ac_compile"
6717case "(($ac_try" in
6718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6719 *) ac_try_echo=$ac_try;;
6720esac
6721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6722 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006723 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006724 grep -v '^ *+' conftest.er1 >conftest.err
6725 rm -f conftest.er1
6726 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006728 (exit $ac_status); } && {
6729 test -z "$ac_c_werror_flag" ||
6730 test ! -s conftest.err
6731 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006732 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006733else
Martin v. Löwis11437992002-04-12 09:54:03 +00006734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006735sed 's/^/| /' conftest.$ac_ext >&5
6736
Martin v. Löwiseba40652007-08-30 20:10:57 +00006737 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006739
6740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006742{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6743echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006744if test $ac_cv_type_pid_t = yes; then
6745 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006746else
Martin v. Löwis11437992002-04-12 09:54:03 +00006747
6748cat >>confdefs.h <<_ACEOF
6749#define pid_t int
6750_ACEOF
6751
6752fi
6753
Martin v. Löwiseba40652007-08-30 20:10:57 +00006754{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6755echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006756if test "${ac_cv_type_signal+set}" = set; then
6757 echo $ECHO_N "(cached) $ECHO_C" >&6
6758else
6759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006760/* confdefs.h. */
6761_ACEOF
6762cat confdefs.h >>conftest.$ac_ext
6763cat >>conftest.$ac_ext <<_ACEOF
6764/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006765#include <sys/types.h>
6766#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006767
Martin v. Löwis11437992002-04-12 09:54:03 +00006768int
6769main ()
6770{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006771return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006772 ;
6773 return 0;
6774}
6775_ACEOF
6776rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777if { (ac_try="$ac_compile"
6778case "(($ac_try" in
6779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6780 *) ac_try_echo=$ac_try;;
6781esac
6782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6783 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006785 grep -v '^ *+' conftest.er1 >conftest.err
6786 rm -f conftest.er1
6787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006789 (exit $ac_status); } && {
6790 test -z "$ac_c_werror_flag" ||
6791 test ! -s conftest.err
6792 } && test -s conftest.$ac_objext; then
6793 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006794else
Martin v. Löwis11437992002-04-12 09:54:03 +00006795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006796sed 's/^/| /' conftest.$ac_ext >&5
6797
Martin v. Löwiseba40652007-08-30 20:10:57 +00006798 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006800
6801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006803{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6804echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006805
Martin v. Löwis11437992002-04-12 09:54:03 +00006806cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006807#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006808_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006809
Michael W. Hudson54241132001-12-07 15:38:26 +00006810
Martin v. Löwiseba40652007-08-30 20:10:57 +00006811{ echo "$as_me:$LINENO: checking for size_t" >&5
6812echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006813if test "${ac_cv_type_size_t+set}" = set; then
6814 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006815else
Martin v. Löwis11437992002-04-12 09:54:03 +00006816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006817/* confdefs.h. */
6818_ACEOF
6819cat confdefs.h >>conftest.$ac_ext
6820cat >>conftest.$ac_ext <<_ACEOF
6821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006822$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006823typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006824int
6825main ()
6826{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006827if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006828 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006829if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006830 return 0;
6831 ;
6832 return 0;
6833}
6834_ACEOF
6835rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006836if { (ac_try="$ac_compile"
6837case "(($ac_try" in
6838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6839 *) ac_try_echo=$ac_try;;
6840esac
6841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006843 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006844 grep -v '^ *+' conftest.er1 >conftest.err
6845 rm -f conftest.er1
6846 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006848 (exit $ac_status); } && {
6849 test -z "$ac_c_werror_flag" ||
6850 test ! -s conftest.err
6851 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006852 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006853else
Martin v. Löwis11437992002-04-12 09:54:03 +00006854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006855sed 's/^/| /' conftest.$ac_ext >&5
6856
Martin v. Löwiseba40652007-08-30 20:10:57 +00006857 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859
6860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006862{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6863echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006864if test $ac_cv_type_size_t = yes; then
6865 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006866else
Martin v. Löwis11437992002-04-12 09:54:03 +00006867
6868cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006869#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006870_ACEOF
6871
6872fi
6873
Martin v. Löwiseba40652007-08-30 20:10:57 +00006874{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6875echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006876if test "${ac_cv_type_uid_t+set}" = set; then
6877 echo $ECHO_N "(cached) $ECHO_C" >&6
6878else
6879 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006880/* confdefs.h. */
6881_ACEOF
6882cat confdefs.h >>conftest.$ac_ext
6883cat >>conftest.$ac_ext <<_ACEOF
6884/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006885#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006886
6887_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006889 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006890 ac_cv_type_uid_t=yes
6891else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006892 ac_cv_type_uid_t=no
6893fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006894rm -f conftest*
6895
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006896fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006897{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6898echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006899if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006900
Martin v. Löwis11437992002-04-12 09:54:03 +00006901cat >>confdefs.h <<\_ACEOF
6902#define uid_t int
6903_ACEOF
6904
6905
6906cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006907#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006908_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006909
6910fi
6911
Martin v. Löwiseba40652007-08-30 20:10:57 +00006912{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6913echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006914if test "${ac_cv_type_ssize_t+set}" = set; then
6915 echo $ECHO_N "(cached) $ECHO_C" >&6
6916else
6917 cat >conftest.$ac_ext <<_ACEOF
6918/* confdefs.h. */
6919_ACEOF
6920cat confdefs.h >>conftest.$ac_ext
6921cat >>conftest.$ac_ext <<_ACEOF
6922/* end confdefs.h. */
6923$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006924typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006925int
6926main ()
6927{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006928if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006929 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006930if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006931 return 0;
6932 ;
6933 return 0;
6934}
6935_ACEOF
6936rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006937if { (ac_try="$ac_compile"
6938case "(($ac_try" in
6939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6940 *) ac_try_echo=$ac_try;;
6941esac
6942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6943 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006944 ac_status=$?
6945 grep -v '^ *+' conftest.er1 >conftest.err
6946 rm -f conftest.er1
6947 cat conftest.err >&5
6948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006949 (exit $ac_status); } && {
6950 test -z "$ac_c_werror_flag" ||
6951 test ! -s conftest.err
6952 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006953 ac_cv_type_ssize_t=yes
6954else
6955 echo "$as_me: failed program was:" >&5
6956sed 's/^/| /' conftest.$ac_ext >&5
6957
Martin v. Löwiseba40652007-08-30 20:10:57 +00006958 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006960
6961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006963{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6964echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006965if test $ac_cv_type_ssize_t = yes; then
6966
6967cat >>confdefs.h <<\_ACEOF
6968#define HAVE_SSIZE_T 1
6969_ACEOF
6970
6971fi
6972
Jack Jansendd19cf82001-12-06 22:36:17 +00006973
Michael W. Hudson54241132001-12-07 15:38:26 +00006974# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006975# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006976{ echo "$as_me:$LINENO: checking for int" >&5
6977echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006978if test "${ac_cv_type_int+set}" = set; then
6979 echo $ECHO_N "(cached) $ECHO_C" >&6
6980else
6981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006982/* confdefs.h. */
6983_ACEOF
6984cat confdefs.h >>conftest.$ac_ext
6985cat >>conftest.$ac_ext <<_ACEOF
6986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006987$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006988typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006989int
6990main ()
6991{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006992if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006993 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006994if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006995 return 0;
6996 ;
6997 return 0;
6998}
6999_ACEOF
7000rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007001if { (ac_try="$ac_compile"
7002case "(($ac_try" in
7003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7004 *) ac_try_echo=$ac_try;;
7005esac
7006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7007 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007009 grep -v '^ *+' conftest.er1 >conftest.err
7010 rm -f conftest.er1
7011 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007013 (exit $ac_status); } && {
7014 test -z "$ac_c_werror_flag" ||
7015 test ! -s conftest.err
7016 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007017 ac_cv_type_int=yes
7018else
7019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007020sed 's/^/| /' conftest.$ac_ext >&5
7021
Martin v. Löwiseba40652007-08-30 20:10:57 +00007022 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007023fi
Brett Cannon19fab762007-06-02 03:02:29 +00007024
Martin v. Löwiseba40652007-08-30 20:10:57 +00007025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7026fi
7027{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7028echo "${ECHO_T}$ac_cv_type_int" >&6; }
7029
7030# The cast to long int works around a bug in the HP C Compiler
7031# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7032# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7033# This bug is HP SR number 8606223364.
7034{ echo "$as_me:$LINENO: checking size of int" >&5
7035echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007036if test "${ac_cv_sizeof_int+set}" = set; then
7037 echo $ECHO_N "(cached) $ECHO_C" >&6
7038else
Martin v. Löwis11437992002-04-12 09:54:03 +00007039 if test "$cross_compiling" = yes; then
7040 # Depending upon the size, compute the lo and hi bounds.
7041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007042/* confdefs.h. */
7043_ACEOF
7044cat confdefs.h >>conftest.$ac_ext
7045cat >>conftest.$ac_ext <<_ACEOF
7046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007047$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007048 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007049int
7050main ()
7051{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007052static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007053test_array [0] = 0
7054
7055 ;
7056 return 0;
7057}
7058_ACEOF
7059rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007060if { (ac_try="$ac_compile"
7061case "(($ac_try" in
7062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7063 *) ac_try_echo=$ac_try;;
7064esac
7065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7066 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007068 grep -v '^ *+' conftest.er1 >conftest.err
7069 rm -f conftest.er1
7070 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007072 (exit $ac_status); } && {
7073 test -z "$ac_c_werror_flag" ||
7074 test ! -s conftest.err
7075 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007076 ac_lo=0 ac_mid=0
7077 while :; do
7078 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007079/* confdefs.h. */
7080_ACEOF
7081cat confdefs.h >>conftest.$ac_ext
7082cat >>conftest.$ac_ext <<_ACEOF
7083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007084$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007085 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007086int
7087main ()
7088{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007089static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007090test_array [0] = 0
7091
7092 ;
7093 return 0;
7094}
7095_ACEOF
7096rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007097if { (ac_try="$ac_compile"
7098case "(($ac_try" in
7099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7100 *) ac_try_echo=$ac_try;;
7101esac
7102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007105 grep -v '^ *+' conftest.er1 >conftest.err
7106 rm -f conftest.er1
7107 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007109 (exit $ac_status); } && {
7110 test -z "$ac_c_werror_flag" ||
7111 test ! -s conftest.err
7112 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007113 ac_hi=$ac_mid; break
7114else
7115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007116sed 's/^/| /' conftest.$ac_ext >&5
7117
Martin v. Löwiseba40652007-08-30 20:10:57 +00007118 ac_lo=`expr $ac_mid + 1`
7119 if test $ac_lo -le $ac_mid; then
7120 ac_lo= ac_hi=
7121 break
7122 fi
7123 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007125
7126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007127 done
7128else
7129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007130sed 's/^/| /' conftest.$ac_ext >&5
7131
Martin v. Löwiseba40652007-08-30 20:10:57 +00007132 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007133/* confdefs.h. */
7134_ACEOF
7135cat confdefs.h >>conftest.$ac_ext
7136cat >>conftest.$ac_ext <<_ACEOF
7137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007138$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007139 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007140int
7141main ()
7142{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007143static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007144test_array [0] = 0
7145
7146 ;
7147 return 0;
7148}
7149_ACEOF
7150rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007151if { (ac_try="$ac_compile"
7152case "(($ac_try" in
7153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7154 *) ac_try_echo=$ac_try;;
7155esac
7156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7157 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007159 grep -v '^ *+' conftest.er1 >conftest.err
7160 rm -f conftest.er1
7161 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007163 (exit $ac_status); } && {
7164 test -z "$ac_c_werror_flag" ||
7165 test ! -s conftest.err
7166 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007167 ac_hi=-1 ac_mid=-1
7168 while :; do
7169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007170/* confdefs.h. */
7171_ACEOF
7172cat confdefs.h >>conftest.$ac_ext
7173cat >>conftest.$ac_ext <<_ACEOF
7174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007175$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007176 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007177int
7178main ()
7179{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007180static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007181test_array [0] = 0
7182
7183 ;
7184 return 0;
7185}
7186_ACEOF
7187rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007188if { (ac_try="$ac_compile"
7189case "(($ac_try" in
7190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7191 *) ac_try_echo=$ac_try;;
7192esac
7193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7194 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007196 grep -v '^ *+' conftest.er1 >conftest.err
7197 rm -f conftest.er1
7198 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007200 (exit $ac_status); } && {
7201 test -z "$ac_c_werror_flag" ||
7202 test ! -s conftest.err
7203 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007204 ac_lo=$ac_mid; break
7205else
7206 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007207sed 's/^/| /' conftest.$ac_ext >&5
7208
Martin v. Löwiseba40652007-08-30 20:10:57 +00007209 ac_hi=`expr '(' $ac_mid ')' - 1`
7210 if test $ac_mid -le $ac_hi; then
7211 ac_lo= ac_hi=
7212 break
7213 fi
7214 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007216
7217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007218 done
7219else
7220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007221sed 's/^/| /' conftest.$ac_ext >&5
7222
Martin v. Löwiseba40652007-08-30 20:10:57 +00007223 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007225
7226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007228
7229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007230# Binary search between lo and hi bounds.
7231while test "x$ac_lo" != "x$ac_hi"; do
7232 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7233 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007234/* confdefs.h. */
7235_ACEOF
7236cat confdefs.h >>conftest.$ac_ext
7237cat >>conftest.$ac_ext <<_ACEOF
7238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007239$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007240 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007241int
7242main ()
7243{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007244static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007245test_array [0] = 0
7246
7247 ;
7248 return 0;
7249}
7250_ACEOF
7251rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007252if { (ac_try="$ac_compile"
7253case "(($ac_try" in
7254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7255 *) ac_try_echo=$ac_try;;
7256esac
7257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7258 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007260 grep -v '^ *+' conftest.er1 >conftest.err
7261 rm -f conftest.er1
7262 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007264 (exit $ac_status); } && {
7265 test -z "$ac_c_werror_flag" ||
7266 test ! -s conftest.err
7267 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007268 ac_hi=$ac_mid
7269else
7270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007271sed 's/^/| /' conftest.$ac_ext >&5
7272
Martin v. Löwiseba40652007-08-30 20:10:57 +00007273 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007275
7276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007277done
7278case $ac_lo in
7279?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007280'') if test "$ac_cv_type_int" = yes; then
7281 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007282See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007283echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007284See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007285 { (exit 77); exit 77; }; }
7286 else
7287 ac_cv_sizeof_int=0
7288 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007289esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007290else
Martin v. Löwis11437992002-04-12 09:54:03 +00007291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007292/* confdefs.h. */
7293_ACEOF
7294cat confdefs.h >>conftest.$ac_ext
7295cat >>conftest.$ac_ext <<_ACEOF
7296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007297$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007298 typedef int ac__type_sizeof_;
7299static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7300static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007301#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007302#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007303int
7304main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007305{
Martin v. Löwis11437992002-04-12 09:54:03 +00007306
7307 FILE *f = fopen ("conftest.val", "w");
7308 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007309 return 1;
7310 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007311 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007312 long int i = longval ();
7313 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7314 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007315 fprintf (f, "%ld\n", i);
7316 }
7317 else
7318 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007319 unsigned long int i = ulongval ();
7320 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7321 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007322 fprintf (f, "%lu\n", i);
7323 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007324 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007325
7326 ;
7327 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007328}
Martin v. Löwis11437992002-04-12 09:54:03 +00007329_ACEOF
7330rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007331if { (ac_try="$ac_link"
7332case "(($ac_try" in
7333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7334 *) ac_try_echo=$ac_try;;
7335esac
7336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7337 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007338 ac_status=$?
7339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7340 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007341 { (case "(($ac_try" in
7342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7343 *) ac_try_echo=$ac_try;;
7344esac
7345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7346 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007347 ac_status=$?
7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7349 (exit $ac_status); }; }; then
7350 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007351else
Martin v. Löwis11437992002-04-12 09:54:03 +00007352 echo "$as_me: program exited with status $ac_status" >&5
7353echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007354sed 's/^/| /' conftest.$ac_ext >&5
7355
Martin v. Löwis11437992002-04-12 09:54:03 +00007356( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007357if test "$ac_cv_type_int" = yes; then
7358 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007359See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007360echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007361See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007362 { (exit 77); exit 77; }; }
7363 else
7364 ac_cv_sizeof_int=0
7365 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007367rm -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 +00007368fi
7369rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007371{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7372echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7373
7374
7375
Martin v. Löwis11437992002-04-12 09:54:03 +00007376cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007377#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007378_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007379
7380
Martin v. Löwiseba40652007-08-30 20:10:57 +00007381{ echo "$as_me:$LINENO: checking for long" >&5
7382echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007383if test "${ac_cv_type_long+set}" = set; then
7384 echo $ECHO_N "(cached) $ECHO_C" >&6
7385else
7386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007387/* confdefs.h. */
7388_ACEOF
7389cat confdefs.h >>conftest.$ac_ext
7390cat >>conftest.$ac_ext <<_ACEOF
7391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007392$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007393typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007394int
7395main ()
7396{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007397if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007398 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007399if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007400 return 0;
7401 ;
7402 return 0;
7403}
7404_ACEOF
7405rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007406if { (ac_try="$ac_compile"
7407case "(($ac_try" in
7408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7409 *) ac_try_echo=$ac_try;;
7410esac
7411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7412 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007414 grep -v '^ *+' conftest.er1 >conftest.err
7415 rm -f conftest.er1
7416 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007418 (exit $ac_status); } && {
7419 test -z "$ac_c_werror_flag" ||
7420 test ! -s conftest.err
7421 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 ac_cv_type_long=yes
7423else
7424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007425sed 's/^/| /' conftest.$ac_ext >&5
7426
Martin v. Löwiseba40652007-08-30 20:10:57 +00007427 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007428fi
Brett Cannon19fab762007-06-02 03:02:29 +00007429
Martin v. Löwiseba40652007-08-30 20:10:57 +00007430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7431fi
7432{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7433echo "${ECHO_T}$ac_cv_type_long" >&6; }
7434
7435# The cast to long int works around a bug in the HP C Compiler
7436# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7437# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7438# This bug is HP SR number 8606223364.
7439{ echo "$as_me:$LINENO: checking size of long" >&5
7440echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007441if test "${ac_cv_sizeof_long+set}" = set; then
7442 echo $ECHO_N "(cached) $ECHO_C" >&6
7443else
Martin v. Löwis11437992002-04-12 09:54:03 +00007444 if test "$cross_compiling" = yes; then
7445 # Depending upon the size, compute the lo and hi bounds.
7446cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007447/* confdefs.h. */
7448_ACEOF
7449cat confdefs.h >>conftest.$ac_ext
7450cat >>conftest.$ac_ext <<_ACEOF
7451/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007452$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007453 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007454int
7455main ()
7456{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007457static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007458test_array [0] = 0
7459
7460 ;
7461 return 0;
7462}
7463_ACEOF
7464rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007465if { (ac_try="$ac_compile"
7466case "(($ac_try" in
7467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7468 *) ac_try_echo=$ac_try;;
7469esac
7470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7471 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007473 grep -v '^ *+' conftest.er1 >conftest.err
7474 rm -f conftest.er1
7475 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007477 (exit $ac_status); } && {
7478 test -z "$ac_c_werror_flag" ||
7479 test ! -s conftest.err
7480 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007481 ac_lo=0 ac_mid=0
7482 while :; do
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 +00007490 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007491int
7492main ()
7493{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007495test_array [0] = 0
7496
7497 ;
7498 return 0;
7499}
7500_ACEOF
7501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007502if { (ac_try="$ac_compile"
7503case "(($ac_try" in
7504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7505 *) ac_try_echo=$ac_try;;
7506esac
7507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007510 grep -v '^ *+' conftest.er1 >conftest.err
7511 rm -f conftest.er1
7512 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007514 (exit $ac_status); } && {
7515 test -z "$ac_c_werror_flag" ||
7516 test ! -s conftest.err
7517 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007518 ac_hi=$ac_mid; break
7519else
7520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007521sed 's/^/| /' conftest.$ac_ext >&5
7522
Martin v. Löwiseba40652007-08-30 20:10:57 +00007523 ac_lo=`expr $ac_mid + 1`
7524 if test $ac_lo -le $ac_mid; then
7525 ac_lo= ac_hi=
7526 break
7527 fi
7528 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007530
7531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007532 done
7533else
7534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007535sed 's/^/| /' conftest.$ac_ext >&5
7536
Martin v. Löwiseba40652007-08-30 20:10:57 +00007537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007538/* confdefs.h. */
7539_ACEOF
7540cat confdefs.h >>conftest.$ac_ext
7541cat >>conftest.$ac_ext <<_ACEOF
7542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007543$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007544 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007545int
7546main ()
7547{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007548static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007549test_array [0] = 0
7550
7551 ;
7552 return 0;
7553}
7554_ACEOF
7555rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007556if { (ac_try="$ac_compile"
7557case "(($ac_try" in
7558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7559 *) ac_try_echo=$ac_try;;
7560esac
7561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007564 grep -v '^ *+' conftest.er1 >conftest.err
7565 rm -f conftest.er1
7566 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007568 (exit $ac_status); } && {
7569 test -z "$ac_c_werror_flag" ||
7570 test ! -s conftest.err
7571 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007572 ac_hi=-1 ac_mid=-1
7573 while :; do
7574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007575/* confdefs.h. */
7576_ACEOF
7577cat confdefs.h >>conftest.$ac_ext
7578cat >>conftest.$ac_ext <<_ACEOF
7579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007580$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007581 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007582int
7583main ()
7584{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007585static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007586test_array [0] = 0
7587
7588 ;
7589 return 0;
7590}
7591_ACEOF
7592rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007593if { (ac_try="$ac_compile"
7594case "(($ac_try" in
7595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7596 *) ac_try_echo=$ac_try;;
7597esac
7598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7599 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007601 grep -v '^ *+' conftest.er1 >conftest.err
7602 rm -f conftest.er1
7603 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007605 (exit $ac_status); } && {
7606 test -z "$ac_c_werror_flag" ||
7607 test ! -s conftest.err
7608 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007609 ac_lo=$ac_mid; break
7610else
7611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007612sed 's/^/| /' conftest.$ac_ext >&5
7613
Martin v. Löwiseba40652007-08-30 20:10:57 +00007614 ac_hi=`expr '(' $ac_mid ')' - 1`
7615 if test $ac_mid -le $ac_hi; then
7616 ac_lo= ac_hi=
7617 break
7618 fi
7619 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007621
7622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007623 done
7624else
7625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007626sed 's/^/| /' conftest.$ac_ext >&5
7627
Martin v. Löwiseba40652007-08-30 20:10:57 +00007628 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007630
7631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007633
7634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007635# Binary search between lo and hi bounds.
7636while test "x$ac_lo" != "x$ac_hi"; do
7637 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007639/* confdefs.h. */
7640_ACEOF
7641cat confdefs.h >>conftest.$ac_ext
7642cat >>conftest.$ac_ext <<_ACEOF
7643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007644$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007645 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007646int
7647main ()
7648{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007650test_array [0] = 0
7651
7652 ;
7653 return 0;
7654}
7655_ACEOF
7656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007657if { (ac_try="$ac_compile"
7658case "(($ac_try" in
7659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7660 *) ac_try_echo=$ac_try;;
7661esac
7662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007665 grep -v '^ *+' conftest.er1 >conftest.err
7666 rm -f conftest.er1
7667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007669 (exit $ac_status); } && {
7670 test -z "$ac_c_werror_flag" ||
7671 test ! -s conftest.err
7672 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 ac_hi=$ac_mid
7674else
7675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007676sed 's/^/| /' conftest.$ac_ext >&5
7677
Martin v. Löwiseba40652007-08-30 20:10:57 +00007678 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007680
7681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007682done
7683case $ac_lo in
7684?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007685'') if test "$ac_cv_type_long" = yes; then
7686 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007687See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007688echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007689See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007690 { (exit 77); exit 77; }; }
7691 else
7692 ac_cv_sizeof_long=0
7693 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007694esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007695else
Martin v. Löwis11437992002-04-12 09:54:03 +00007696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007697/* confdefs.h. */
7698_ACEOF
7699cat confdefs.h >>conftest.$ac_ext
7700cat >>conftest.$ac_ext <<_ACEOF
7701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007702$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007703 typedef long ac__type_sizeof_;
7704static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7705static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007706#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007707#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007708int
7709main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007710{
Martin v. Löwis11437992002-04-12 09:54:03 +00007711
7712 FILE *f = fopen ("conftest.val", "w");
7713 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 return 1;
7715 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007717 long int i = longval ();
7718 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7719 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007720 fprintf (f, "%ld\n", i);
7721 }
7722 else
7723 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007724 unsigned long int i = ulongval ();
7725 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7726 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 fprintf (f, "%lu\n", i);
7728 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007729 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007730
7731 ;
7732 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007733}
Martin v. Löwis11437992002-04-12 09:54:03 +00007734_ACEOF
7735rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007736if { (ac_try="$ac_link"
7737case "(($ac_try" in
7738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7739 *) ac_try_echo=$ac_try;;
7740esac
7741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7742 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 ac_status=$?
7744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7745 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007746 { (case "(($ac_try" in
7747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7748 *) ac_try_echo=$ac_try;;
7749esac
7750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7751 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 ac_status=$?
7753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7754 (exit $ac_status); }; }; then
7755 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007756else
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 echo "$as_me: program exited with status $ac_status" >&5
7758echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007759sed 's/^/| /' conftest.$ac_ext >&5
7760
Martin v. Löwis11437992002-04-12 09:54:03 +00007761( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762if test "$ac_cv_type_long" = yes; then
7763 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007764See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007765echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007766See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007767 { (exit 77); exit 77; }; }
7768 else
7769 ac_cv_sizeof_long=0
7770 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007772rm -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 +00007773fi
7774rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007776{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7777echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7778
7779
7780
Martin v. Löwis11437992002-04-12 09:54:03 +00007781cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007782#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007783_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007784
7785
Martin v. Löwiseba40652007-08-30 20:10:57 +00007786{ echo "$as_me:$LINENO: checking for void *" >&5
7787echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007788if test "${ac_cv_type_void_p+set}" = set; then
7789 echo $ECHO_N "(cached) $ECHO_C" >&6
7790else
7791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007792/* confdefs.h. */
7793_ACEOF
7794cat confdefs.h >>conftest.$ac_ext
7795cat >>conftest.$ac_ext <<_ACEOF
7796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007797$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007798typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007799int
7800main ()
7801{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007802if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007803 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007804if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 return 0;
7806 ;
7807 return 0;
7808}
7809_ACEOF
7810rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007811if { (ac_try="$ac_compile"
7812case "(($ac_try" in
7813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7814 *) ac_try_echo=$ac_try;;
7815esac
7816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7817 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007819 grep -v '^ *+' conftest.er1 >conftest.err
7820 rm -f conftest.er1
7821 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007823 (exit $ac_status); } && {
7824 test -z "$ac_c_werror_flag" ||
7825 test ! -s conftest.err
7826 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 ac_cv_type_void_p=yes
7828else
7829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007830sed 's/^/| /' conftest.$ac_ext >&5
7831
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007833fi
Brett Cannon19fab762007-06-02 03:02:29 +00007834
Martin v. Löwiseba40652007-08-30 20:10:57 +00007835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7836fi
7837{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7838echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7839
7840# The cast to long int works around a bug in the HP C Compiler
7841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7843# This bug is HP SR number 8606223364.
7844{ echo "$as_me:$LINENO: checking size of void *" >&5
7845echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007846if test "${ac_cv_sizeof_void_p+set}" = set; then
7847 echo $ECHO_N "(cached) $ECHO_C" >&6
7848else
Martin v. Löwis11437992002-04-12 09:54:03 +00007849 if test "$cross_compiling" = yes; then
7850 # Depending upon the size, compute the lo and hi bounds.
7851cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007852/* confdefs.h. */
7853_ACEOF
7854cat confdefs.h >>conftest.$ac_ext
7855cat >>conftest.$ac_ext <<_ACEOF
7856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007857$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007858 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007859int
7860main ()
7861{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007862static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007863test_array [0] = 0
7864
7865 ;
7866 return 0;
7867}
7868_ACEOF
7869rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870if { (ac_try="$ac_compile"
7871case "(($ac_try" in
7872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7873 *) ac_try_echo=$ac_try;;
7874esac
7875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7876 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007878 grep -v '^ *+' conftest.er1 >conftest.err
7879 rm -f conftest.er1
7880 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007882 (exit $ac_status); } && {
7883 test -z "$ac_c_werror_flag" ||
7884 test ! -s conftest.err
7885 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 ac_lo=0 ac_mid=0
7887 while :; do
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 +00007895 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007896int
7897main ()
7898{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007899static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007900test_array [0] = 0
7901
7902 ;
7903 return 0;
7904}
7905_ACEOF
7906rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007907if { (ac_try="$ac_compile"
7908case "(($ac_try" in
7909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7910 *) ac_try_echo=$ac_try;;
7911esac
7912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007915 grep -v '^ *+' conftest.er1 >conftest.err
7916 rm -f conftest.er1
7917 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007919 (exit $ac_status); } && {
7920 test -z "$ac_c_werror_flag" ||
7921 test ! -s conftest.err
7922 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 ac_hi=$ac_mid; break
7924else
7925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007926sed 's/^/| /' conftest.$ac_ext >&5
7927
Martin v. Löwiseba40652007-08-30 20:10:57 +00007928 ac_lo=`expr $ac_mid + 1`
7929 if test $ac_lo -le $ac_mid; then
7930 ac_lo= ac_hi=
7931 break
7932 fi
7933 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007935
7936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007937 done
7938else
7939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007940sed 's/^/| /' conftest.$ac_ext >&5
7941
Martin v. Löwiseba40652007-08-30 20:10:57 +00007942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007943/* confdefs.h. */
7944_ACEOF
7945cat confdefs.h >>conftest.$ac_ext
7946cat >>conftest.$ac_ext <<_ACEOF
7947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007948$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007949 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007950int
7951main ()
7952{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007953static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007954test_array [0] = 0
7955
7956 ;
7957 return 0;
7958}
7959_ACEOF
7960rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007961if { (ac_try="$ac_compile"
7962case "(($ac_try" in
7963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7964 *) ac_try_echo=$ac_try;;
7965esac
7966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7967 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007969 grep -v '^ *+' conftest.er1 >conftest.err
7970 rm -f conftest.er1
7971 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007973 (exit $ac_status); } && {
7974 test -z "$ac_c_werror_flag" ||
7975 test ! -s conftest.err
7976 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007977 ac_hi=-1 ac_mid=-1
7978 while :; do
7979 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007980/* confdefs.h. */
7981_ACEOF
7982cat confdefs.h >>conftest.$ac_ext
7983cat >>conftest.$ac_ext <<_ACEOF
7984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007985$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007987int
7988main ()
7989{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007990static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007991test_array [0] = 0
7992
7993 ;
7994 return 0;
7995}
7996_ACEOF
7997rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007998if { (ac_try="$ac_compile"
7999case "(($ac_try" in
8000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8001 *) ac_try_echo=$ac_try;;
8002esac
8003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008006 grep -v '^ *+' conftest.er1 >conftest.err
8007 rm -f conftest.er1
8008 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008010 (exit $ac_status); } && {
8011 test -z "$ac_c_werror_flag" ||
8012 test ! -s conftest.err
8013 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008014 ac_lo=$ac_mid; break
8015else
8016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008017sed 's/^/| /' conftest.$ac_ext >&5
8018
Martin v. Löwiseba40652007-08-30 20:10:57 +00008019 ac_hi=`expr '(' $ac_mid ')' - 1`
8020 if test $ac_mid -le $ac_hi; then
8021 ac_lo= ac_hi=
8022 break
8023 fi
8024 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008026
8027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 done
8029else
8030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008031sed 's/^/| /' conftest.$ac_ext >&5
8032
Martin v. Löwiseba40652007-08-30 20:10:57 +00008033 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008035
8036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008038
8039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008040# Binary search between lo and hi bounds.
8041while test "x$ac_lo" != "x$ac_hi"; do
8042 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008044/* confdefs.h. */
8045_ACEOF
8046cat confdefs.h >>conftest.$ac_ext
8047cat >>conftest.$ac_ext <<_ACEOF
8048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008049$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008050 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008051int
8052main ()
8053{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008054static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008055test_array [0] = 0
8056
8057 ;
8058 return 0;
8059}
8060_ACEOF
8061rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008062if { (ac_try="$ac_compile"
8063case "(($ac_try" in
8064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8065 *) ac_try_echo=$ac_try;;
8066esac
8067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8068 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008070 grep -v '^ *+' conftest.er1 >conftest.err
8071 rm -f conftest.er1
8072 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008074 (exit $ac_status); } && {
8075 test -z "$ac_c_werror_flag" ||
8076 test ! -s conftest.err
8077 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 ac_hi=$ac_mid
8079else
8080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008081sed 's/^/| /' conftest.$ac_ext >&5
8082
Martin v. Löwiseba40652007-08-30 20:10:57 +00008083 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008085
8086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008087done
8088case $ac_lo in
8089?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008090'') if test "$ac_cv_type_void_p" = yes; then
8091 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008092See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008093echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008094See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008095 { (exit 77); exit 77; }; }
8096 else
8097 ac_cv_sizeof_void_p=0
8098 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008099esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008100else
Martin v. Löwis11437992002-04-12 09:54:03 +00008101 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008102/* confdefs.h. */
8103_ACEOF
8104cat confdefs.h >>conftest.$ac_ext
8105cat >>conftest.$ac_ext <<_ACEOF
8106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008107$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008108 typedef void * ac__type_sizeof_;
8109static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8110static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008111#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008112#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008113int
8114main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008115{
Martin v. Löwis11437992002-04-12 09:54:03 +00008116
8117 FILE *f = fopen ("conftest.val", "w");
8118 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 return 1;
8120 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008122 long int i = longval ();
8123 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8124 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008125 fprintf (f, "%ld\n", i);
8126 }
8127 else
8128 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008129 unsigned long int i = ulongval ();
8130 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8131 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 fprintf (f, "%lu\n", i);
8133 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008134 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008135
8136 ;
8137 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008138}
Martin v. Löwis11437992002-04-12 09:54:03 +00008139_ACEOF
8140rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008141if { (ac_try="$ac_link"
8142case "(($ac_try" in
8143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8144 *) ac_try_echo=$ac_try;;
8145esac
8146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8147 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 ac_status=$?
8149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8150 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008151 { (case "(($ac_try" in
8152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8153 *) ac_try_echo=$ac_try;;
8154esac
8155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8156 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008157 ac_status=$?
8158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8159 (exit $ac_status); }; }; then
8160 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008161else
Martin v. Löwis11437992002-04-12 09:54:03 +00008162 echo "$as_me: program exited with status $ac_status" >&5
8163echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008164sed 's/^/| /' conftest.$ac_ext >&5
8165
Martin v. Löwis11437992002-04-12 09:54:03 +00008166( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008167if test "$ac_cv_type_void_p" = yes; then
8168 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008169See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008170echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008171See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008172 { (exit 77); exit 77; }; }
8173 else
8174 ac_cv_sizeof_void_p=0
8175 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008177rm -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 +00008178fi
8179rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8182echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8183
8184
8185
Martin v. Löwis11437992002-04-12 09:54:03 +00008186cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008187#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008188_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008189
8190
Martin v. Löwiseba40652007-08-30 20:10:57 +00008191{ echo "$as_me:$LINENO: checking for short" >&5
8192echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008193if test "${ac_cv_type_short+set}" = set; then
8194 echo $ECHO_N "(cached) $ECHO_C" >&6
8195else
8196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008197/* confdefs.h. */
8198_ACEOF
8199cat confdefs.h >>conftest.$ac_ext
8200cat >>conftest.$ac_ext <<_ACEOF
8201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008202$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008203typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008204int
8205main ()
8206{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008207if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008208 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008209if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 return 0;
8211 ;
8212 return 0;
8213}
8214_ACEOF
8215rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008216if { (ac_try="$ac_compile"
8217case "(($ac_try" in
8218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8219 *) ac_try_echo=$ac_try;;
8220esac
8221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8222 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008224 grep -v '^ *+' conftest.er1 >conftest.err
8225 rm -f conftest.er1
8226 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008228 (exit $ac_status); } && {
8229 test -z "$ac_c_werror_flag" ||
8230 test ! -s conftest.err
8231 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 ac_cv_type_short=yes
8233else
8234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008235sed 's/^/| /' conftest.$ac_ext >&5
8236
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008238fi
Brett Cannon19fab762007-06-02 03:02:29 +00008239
Martin v. Löwiseba40652007-08-30 20:10:57 +00008240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8241fi
8242{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8243echo "${ECHO_T}$ac_cv_type_short" >&6; }
8244
8245# The cast to long int works around a bug in the HP C Compiler
8246# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8247# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8248# This bug is HP SR number 8606223364.
8249{ echo "$as_me:$LINENO: checking size of short" >&5
8250echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008251if test "${ac_cv_sizeof_short+set}" = set; then
8252 echo $ECHO_N "(cached) $ECHO_C" >&6
8253else
Martin v. Löwis11437992002-04-12 09:54:03 +00008254 if test "$cross_compiling" = yes; then
8255 # Depending upon the size, compute the lo and hi bounds.
8256cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008257/* confdefs.h. */
8258_ACEOF
8259cat confdefs.h >>conftest.$ac_ext
8260cat >>conftest.$ac_ext <<_ACEOF
8261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008262$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008263 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008264int
8265main ()
8266{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008267static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008268test_array [0] = 0
8269
8270 ;
8271 return 0;
8272}
8273_ACEOF
8274rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275if { (ac_try="$ac_compile"
8276case "(($ac_try" in
8277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8278 *) ac_try_echo=$ac_try;;
8279esac
8280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008283 grep -v '^ *+' conftest.er1 >conftest.err
8284 rm -f conftest.er1
8285 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008287 (exit $ac_status); } && {
8288 test -z "$ac_c_werror_flag" ||
8289 test ! -s conftest.err
8290 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 ac_lo=0 ac_mid=0
8292 while :; do
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 +00008300 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008301int
8302main ()
8303{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008304static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008305test_array [0] = 0
8306
8307 ;
8308 return 0;
8309}
8310_ACEOF
8311rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008312if { (ac_try="$ac_compile"
8313case "(($ac_try" in
8314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8315 *) ac_try_echo=$ac_try;;
8316esac
8317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8318 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008320 grep -v '^ *+' conftest.er1 >conftest.err
8321 rm -f conftest.er1
8322 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008324 (exit $ac_status); } && {
8325 test -z "$ac_c_werror_flag" ||
8326 test ! -s conftest.err
8327 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008328 ac_hi=$ac_mid; break
8329else
8330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008331sed 's/^/| /' conftest.$ac_ext >&5
8332
Martin v. Löwiseba40652007-08-30 20:10:57 +00008333 ac_lo=`expr $ac_mid + 1`
8334 if test $ac_lo -le $ac_mid; then
8335 ac_lo= ac_hi=
8336 break
8337 fi
8338 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008340
8341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008342 done
8343else
8344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008345sed 's/^/| /' conftest.$ac_ext >&5
8346
Martin v. Löwiseba40652007-08-30 20:10:57 +00008347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008348/* confdefs.h. */
8349_ACEOF
8350cat confdefs.h >>conftest.$ac_ext
8351cat >>conftest.$ac_ext <<_ACEOF
8352/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008353$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008354 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008355int
8356main ()
8357{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008358static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008359test_array [0] = 0
8360
8361 ;
8362 return 0;
8363}
8364_ACEOF
8365rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008366if { (ac_try="$ac_compile"
8367case "(($ac_try" in
8368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8369 *) ac_try_echo=$ac_try;;
8370esac
8371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8372 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008374 grep -v '^ *+' conftest.er1 >conftest.err
8375 rm -f conftest.er1
8376 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008378 (exit $ac_status); } && {
8379 test -z "$ac_c_werror_flag" ||
8380 test ! -s conftest.err
8381 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008382 ac_hi=-1 ac_mid=-1
8383 while :; do
8384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008385/* confdefs.h. */
8386_ACEOF
8387cat confdefs.h >>conftest.$ac_ext
8388cat >>conftest.$ac_ext <<_ACEOF
8389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008390$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008391 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008392int
8393main ()
8394{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008395static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008396test_array [0] = 0
8397
8398 ;
8399 return 0;
8400}
8401_ACEOF
8402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008403if { (ac_try="$ac_compile"
8404case "(($ac_try" in
8405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8406 *) ac_try_echo=$ac_try;;
8407esac
8408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008411 grep -v '^ *+' conftest.er1 >conftest.err
8412 rm -f conftest.er1
8413 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008415 (exit $ac_status); } && {
8416 test -z "$ac_c_werror_flag" ||
8417 test ! -s conftest.err
8418 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008419 ac_lo=$ac_mid; break
8420else
8421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008422sed 's/^/| /' conftest.$ac_ext >&5
8423
Martin v. Löwiseba40652007-08-30 20:10:57 +00008424 ac_hi=`expr '(' $ac_mid ')' - 1`
8425 if test $ac_mid -le $ac_hi; then
8426 ac_lo= ac_hi=
8427 break
8428 fi
8429 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008431
8432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 done
8434else
8435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008436sed 's/^/| /' conftest.$ac_ext >&5
8437
Martin v. Löwiseba40652007-08-30 20:10:57 +00008438 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008440
8441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008443
8444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008445# Binary search between lo and hi bounds.
8446while test "x$ac_lo" != "x$ac_hi"; do
8447 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008449/* confdefs.h. */
8450_ACEOF
8451cat confdefs.h >>conftest.$ac_ext
8452cat >>conftest.$ac_ext <<_ACEOF
8453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008454$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008455 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008456int
8457main ()
8458{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008460test_array [0] = 0
8461
8462 ;
8463 return 0;
8464}
8465_ACEOF
8466rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008467if { (ac_try="$ac_compile"
8468case "(($ac_try" in
8469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8470 *) ac_try_echo=$ac_try;;
8471esac
8472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8473 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008475 grep -v '^ *+' conftest.er1 >conftest.err
8476 rm -f conftest.er1
8477 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008479 (exit $ac_status); } && {
8480 test -z "$ac_c_werror_flag" ||
8481 test ! -s conftest.err
8482 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 ac_hi=$ac_mid
8484else
8485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008486sed 's/^/| /' conftest.$ac_ext >&5
8487
Martin v. Löwiseba40652007-08-30 20:10:57 +00008488 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008490
8491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008492done
8493case $ac_lo in
8494?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008495'') if test "$ac_cv_type_short" = yes; then
8496 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008497See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008498echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008499See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008500 { (exit 77); exit 77; }; }
8501 else
8502 ac_cv_sizeof_short=0
8503 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008504esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008505else
Martin v. Löwis11437992002-04-12 09:54:03 +00008506 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008507/* confdefs.h. */
8508_ACEOF
8509cat confdefs.h >>conftest.$ac_ext
8510cat >>conftest.$ac_ext <<_ACEOF
8511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008512$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008513 typedef short ac__type_sizeof_;
8514static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8515static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008516#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008517#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008518int
8519main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008520{
Martin v. Löwis11437992002-04-12 09:54:03 +00008521
8522 FILE *f = fopen ("conftest.val", "w");
8523 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 return 1;
8525 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008527 long int i = longval ();
8528 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8529 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 fprintf (f, "%ld\n", i);
8531 }
8532 else
8533 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008534 unsigned long int i = ulongval ();
8535 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8536 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 fprintf (f, "%lu\n", i);
8538 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008539 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008540
8541 ;
8542 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008543}
Martin v. Löwis11437992002-04-12 09:54:03 +00008544_ACEOF
8545rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008546if { (ac_try="$ac_link"
8547case "(($ac_try" in
8548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8549 *) ac_try_echo=$ac_try;;
8550esac
8551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8552 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 ac_status=$?
8554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8555 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556 { (case "(($ac_try" in
8557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8558 *) ac_try_echo=$ac_try;;
8559esac
8560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8561 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 ac_status=$?
8563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8564 (exit $ac_status); }; }; then
8565 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008566else
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 echo "$as_me: program exited with status $ac_status" >&5
8568echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008569sed 's/^/| /' conftest.$ac_ext >&5
8570
Martin v. Löwis11437992002-04-12 09:54:03 +00008571( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008572if test "$ac_cv_type_short" = yes; then
8573 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008574See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008575echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008576See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008577 { (exit 77); exit 77; }; }
8578 else
8579 ac_cv_sizeof_short=0
8580 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008582rm -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 +00008583fi
8584rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008586{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8587echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8588
8589
8590
Martin v. Löwis11437992002-04-12 09:54:03 +00008591cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008592#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008593_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008594
8595
Martin v. Löwiseba40652007-08-30 20:10:57 +00008596{ echo "$as_me:$LINENO: checking for float" >&5
8597echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008598if test "${ac_cv_type_float+set}" = set; then
8599 echo $ECHO_N "(cached) $ECHO_C" >&6
8600else
8601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008602/* confdefs.h. */
8603_ACEOF
8604cat confdefs.h >>conftest.$ac_ext
8605cat >>conftest.$ac_ext <<_ACEOF
8606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008607$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008608typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008609int
8610main ()
8611{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008612if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008613 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008614if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 return 0;
8616 ;
8617 return 0;
8618}
8619_ACEOF
8620rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008621if { (ac_try="$ac_compile"
8622case "(($ac_try" in
8623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8624 *) ac_try_echo=$ac_try;;
8625esac
8626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8627 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008629 grep -v '^ *+' conftest.er1 >conftest.err
8630 rm -f conftest.er1
8631 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008633 (exit $ac_status); } && {
8634 test -z "$ac_c_werror_flag" ||
8635 test ! -s conftest.err
8636 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 ac_cv_type_float=yes
8638else
8639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008640sed 's/^/| /' conftest.$ac_ext >&5
8641
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008643fi
Brett Cannon19fab762007-06-02 03:02:29 +00008644
Martin v. Löwiseba40652007-08-30 20:10:57 +00008645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8646fi
8647{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8648echo "${ECHO_T}$ac_cv_type_float" >&6; }
8649
8650# The cast to long int works around a bug in the HP C Compiler
8651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8653# This bug is HP SR number 8606223364.
8654{ echo "$as_me:$LINENO: checking size of float" >&5
8655echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008656if test "${ac_cv_sizeof_float+set}" = set; then
8657 echo $ECHO_N "(cached) $ECHO_C" >&6
8658else
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 if test "$cross_compiling" = yes; then
8660 # Depending upon the size, compute the lo and hi bounds.
8661cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008662/* confdefs.h. */
8663_ACEOF
8664cat confdefs.h >>conftest.$ac_ext
8665cat >>conftest.$ac_ext <<_ACEOF
8666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008668 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008669int
8670main ()
8671{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008672static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008673test_array [0] = 0
8674
8675 ;
8676 return 0;
8677}
8678_ACEOF
8679rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680if { (ac_try="$ac_compile"
8681case "(($ac_try" in
8682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8683 *) ac_try_echo=$ac_try;;
8684esac
8685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008688 grep -v '^ *+' conftest.er1 >conftest.err
8689 rm -f conftest.er1
8690 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008692 (exit $ac_status); } && {
8693 test -z "$ac_c_werror_flag" ||
8694 test ! -s conftest.err
8695 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 ac_lo=0 ac_mid=0
8697 while :; do
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 +00008705 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008706int
8707main ()
8708{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008709static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008710test_array [0] = 0
8711
8712 ;
8713 return 0;
8714}
8715_ACEOF
8716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008717if { (ac_try="$ac_compile"
8718case "(($ac_try" in
8719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8720 *) ac_try_echo=$ac_try;;
8721esac
8722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008725 grep -v '^ *+' conftest.er1 >conftest.err
8726 rm -f conftest.er1
8727 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008729 (exit $ac_status); } && {
8730 test -z "$ac_c_werror_flag" ||
8731 test ! -s conftest.err
8732 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 ac_hi=$ac_mid; break
8734else
8735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008736sed 's/^/| /' conftest.$ac_ext >&5
8737
Martin v. Löwiseba40652007-08-30 20:10:57 +00008738 ac_lo=`expr $ac_mid + 1`
8739 if test $ac_lo -le $ac_mid; then
8740 ac_lo= ac_hi=
8741 break
8742 fi
8743 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008745
8746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 done
8748else
8749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008750sed 's/^/| /' conftest.$ac_ext >&5
8751
Martin v. Löwiseba40652007-08-30 20:10:57 +00008752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008753/* confdefs.h. */
8754_ACEOF
8755cat confdefs.h >>conftest.$ac_ext
8756cat >>conftest.$ac_ext <<_ACEOF
8757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008758$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008759 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008760int
8761main ()
8762{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008763static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008764test_array [0] = 0
8765
8766 ;
8767 return 0;
8768}
8769_ACEOF
8770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008771if { (ac_try="$ac_compile"
8772case "(($ac_try" in
8773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8774 *) ac_try_echo=$ac_try;;
8775esac
8776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008779 grep -v '^ *+' conftest.er1 >conftest.err
8780 rm -f conftest.er1
8781 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008783 (exit $ac_status); } && {
8784 test -z "$ac_c_werror_flag" ||
8785 test ! -s conftest.err
8786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 ac_hi=-1 ac_mid=-1
8788 while :; do
8789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008790/* confdefs.h. */
8791_ACEOF
8792cat confdefs.h >>conftest.$ac_ext
8793cat >>conftest.$ac_ext <<_ACEOF
8794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008795$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008796 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008797int
8798main ()
8799{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008800static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008801test_array [0] = 0
8802
8803 ;
8804 return 0;
8805}
8806_ACEOF
8807rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008808if { (ac_try="$ac_compile"
8809case "(($ac_try" in
8810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8811 *) ac_try_echo=$ac_try;;
8812esac
8813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8814 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008816 grep -v '^ *+' conftest.er1 >conftest.err
8817 rm -f conftest.er1
8818 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008820 (exit $ac_status); } && {
8821 test -z "$ac_c_werror_flag" ||
8822 test ! -s conftest.err
8823 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008824 ac_lo=$ac_mid; break
8825else
8826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008827sed 's/^/| /' conftest.$ac_ext >&5
8828
Martin v. Löwiseba40652007-08-30 20:10:57 +00008829 ac_hi=`expr '(' $ac_mid ')' - 1`
8830 if test $ac_mid -le $ac_hi; then
8831 ac_lo= ac_hi=
8832 break
8833 fi
8834 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008836
8837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 done
8839else
8840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008841sed 's/^/| /' conftest.$ac_ext >&5
8842
Martin v. Löwiseba40652007-08-30 20:10:57 +00008843 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008845
8846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008848
8849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008850# Binary search between lo and hi bounds.
8851while test "x$ac_lo" != "x$ac_hi"; do
8852 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008854/* confdefs.h. */
8855_ACEOF
8856cat confdefs.h >>conftest.$ac_ext
8857cat >>conftest.$ac_ext <<_ACEOF
8858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008859$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008860 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008861int
8862main ()
8863{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008864static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008865test_array [0] = 0
8866
8867 ;
8868 return 0;
8869}
8870_ACEOF
8871rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008872if { (ac_try="$ac_compile"
8873case "(($ac_try" in
8874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8875 *) ac_try_echo=$ac_try;;
8876esac
8877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8878 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008880 grep -v '^ *+' conftest.er1 >conftest.err
8881 rm -f conftest.er1
8882 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008884 (exit $ac_status); } && {
8885 test -z "$ac_c_werror_flag" ||
8886 test ! -s conftest.err
8887 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 ac_hi=$ac_mid
8889else
8890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008891sed 's/^/| /' conftest.$ac_ext >&5
8892
Martin v. Löwiseba40652007-08-30 20:10:57 +00008893 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008895
8896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008897done
8898case $ac_lo in
8899?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008900'') if test "$ac_cv_type_float" = yes; then
8901 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008902See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008903echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008904See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008905 { (exit 77); exit 77; }; }
8906 else
8907 ac_cv_sizeof_float=0
8908 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008909esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008910else
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008912/* confdefs.h. */
8913_ACEOF
8914cat confdefs.h >>conftest.$ac_ext
8915cat >>conftest.$ac_ext <<_ACEOF
8916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008917$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008918 typedef float ac__type_sizeof_;
8919static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8920static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008921#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008922#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008923int
8924main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008925{
Martin v. Löwis11437992002-04-12 09:54:03 +00008926
8927 FILE *f = fopen ("conftest.val", "w");
8928 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929 return 1;
8930 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008931 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008932 long int i = longval ();
8933 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8934 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 fprintf (f, "%ld\n", i);
8936 }
8937 else
8938 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008939 unsigned long int i = ulongval ();
8940 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8941 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 fprintf (f, "%lu\n", i);
8943 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008944 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008945
8946 ;
8947 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008948}
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
8950rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008951if { (ac_try="$ac_link"
8952case "(($ac_try" in
8953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8954 *) ac_try_echo=$ac_try;;
8955esac
8956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8957 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 ac_status=$?
8959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8960 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008961 { (case "(($ac_try" in
8962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8963 *) ac_try_echo=$ac_try;;
8964esac
8965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8966 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 ac_status=$?
8968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8969 (exit $ac_status); }; }; then
8970 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008971else
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 echo "$as_me: program exited with status $ac_status" >&5
8973echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008974sed 's/^/| /' conftest.$ac_ext >&5
8975
Martin v. Löwis11437992002-04-12 09:54:03 +00008976( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977if test "$ac_cv_type_float" = yes; then
8978 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008979See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008980echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008981See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008982 { (exit 77); exit 77; }; }
8983 else
8984 ac_cv_sizeof_float=0
8985 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008987rm -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 +00008988fi
8989rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008991{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8992echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
8993
8994
8995
Martin v. Löwis11437992002-04-12 09:54:03 +00008996cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008997#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008998_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008999
9000
Martin v. Löwiseba40652007-08-30 20:10:57 +00009001{ echo "$as_me:$LINENO: checking for double" >&5
9002echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009003if test "${ac_cv_type_double+set}" = set; then
9004 echo $ECHO_N "(cached) $ECHO_C" >&6
9005else
9006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009007/* confdefs.h. */
9008_ACEOF
9009cat confdefs.h >>conftest.$ac_ext
9010cat >>conftest.$ac_ext <<_ACEOF
9011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009012$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009013typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009014int
9015main ()
9016{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009017if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009018 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009019if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 return 0;
9021 ;
9022 return 0;
9023}
9024_ACEOF
9025rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009026if { (ac_try="$ac_compile"
9027case "(($ac_try" in
9028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9029 *) ac_try_echo=$ac_try;;
9030esac
9031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9032 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009034 grep -v '^ *+' conftest.er1 >conftest.err
9035 rm -f conftest.er1
9036 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009038 (exit $ac_status); } && {
9039 test -z "$ac_c_werror_flag" ||
9040 test ! -s conftest.err
9041 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 ac_cv_type_double=yes
9043else
9044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009045sed 's/^/| /' conftest.$ac_ext >&5
9046
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009048fi
Brett Cannon19fab762007-06-02 03:02:29 +00009049
Martin v. Löwiseba40652007-08-30 20:10:57 +00009050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9051fi
9052{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9053echo "${ECHO_T}$ac_cv_type_double" >&6; }
9054
9055# The cast to long int works around a bug in the HP C Compiler
9056# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9057# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9058# This bug is HP SR number 8606223364.
9059{ echo "$as_me:$LINENO: checking size of double" >&5
9060echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009061if test "${ac_cv_sizeof_double+set}" = set; then
9062 echo $ECHO_N "(cached) $ECHO_C" >&6
9063else
Martin v. Löwis11437992002-04-12 09:54:03 +00009064 if test "$cross_compiling" = yes; then
9065 # Depending upon the size, compute the lo and hi bounds.
9066cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009067/* confdefs.h. */
9068_ACEOF
9069cat confdefs.h >>conftest.$ac_ext
9070cat >>conftest.$ac_ext <<_ACEOF
9071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009072$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009073 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009074int
9075main ()
9076{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009077static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009078test_array [0] = 0
9079
9080 ;
9081 return 0;
9082}
9083_ACEOF
9084rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085if { (ac_try="$ac_compile"
9086case "(($ac_try" in
9087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9088 *) ac_try_echo=$ac_try;;
9089esac
9090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9091 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009093 grep -v '^ *+' conftest.er1 >conftest.err
9094 rm -f conftest.er1
9095 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009097 (exit $ac_status); } && {
9098 test -z "$ac_c_werror_flag" ||
9099 test ! -s conftest.err
9100 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 ac_lo=0 ac_mid=0
9102 while :; do
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 +00009110 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009111int
9112main ()
9113{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009114static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009115test_array [0] = 0
9116
9117 ;
9118 return 0;
9119}
9120_ACEOF
9121rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009122if { (ac_try="$ac_compile"
9123case "(($ac_try" in
9124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9125 *) ac_try_echo=$ac_try;;
9126esac
9127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9128 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009130 grep -v '^ *+' conftest.er1 >conftest.err
9131 rm -f conftest.er1
9132 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009134 (exit $ac_status); } && {
9135 test -z "$ac_c_werror_flag" ||
9136 test ! -s conftest.err
9137 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 ac_hi=$ac_mid; break
9139else
9140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009141sed 's/^/| /' conftest.$ac_ext >&5
9142
Martin v. Löwiseba40652007-08-30 20:10:57 +00009143 ac_lo=`expr $ac_mid + 1`
9144 if test $ac_lo -le $ac_mid; then
9145 ac_lo= ac_hi=
9146 break
9147 fi
9148 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009150
9151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009152 done
9153else
9154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009155sed 's/^/| /' conftest.$ac_ext >&5
9156
Martin v. Löwiseba40652007-08-30 20:10:57 +00009157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009158/* confdefs.h. */
9159_ACEOF
9160cat confdefs.h >>conftest.$ac_ext
9161cat >>conftest.$ac_ext <<_ACEOF
9162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009163$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009164 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009165int
9166main ()
9167{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009168static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009169test_array [0] = 0
9170
9171 ;
9172 return 0;
9173}
9174_ACEOF
9175rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009176if { (ac_try="$ac_compile"
9177case "(($ac_try" in
9178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9179 *) ac_try_echo=$ac_try;;
9180esac
9181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9182 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009184 grep -v '^ *+' conftest.er1 >conftest.err
9185 rm -f conftest.er1
9186 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009188 (exit $ac_status); } && {
9189 test -z "$ac_c_werror_flag" ||
9190 test ! -s conftest.err
9191 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009192 ac_hi=-1 ac_mid=-1
9193 while :; do
9194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009195/* confdefs.h. */
9196_ACEOF
9197cat confdefs.h >>conftest.$ac_ext
9198cat >>conftest.$ac_ext <<_ACEOF
9199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009200$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009201 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009202int
9203main ()
9204{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009205static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009206test_array [0] = 0
9207
9208 ;
9209 return 0;
9210}
9211_ACEOF
9212rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009213if { (ac_try="$ac_compile"
9214case "(($ac_try" in
9215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9216 *) ac_try_echo=$ac_try;;
9217esac
9218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9219 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009221 grep -v '^ *+' conftest.er1 >conftest.err
9222 rm -f conftest.er1
9223 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009225 (exit $ac_status); } && {
9226 test -z "$ac_c_werror_flag" ||
9227 test ! -s conftest.err
9228 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009229 ac_lo=$ac_mid; break
9230else
9231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009232sed 's/^/| /' conftest.$ac_ext >&5
9233
Martin v. Löwiseba40652007-08-30 20:10:57 +00009234 ac_hi=`expr '(' $ac_mid ')' - 1`
9235 if test $ac_mid -le $ac_hi; then
9236 ac_lo= ac_hi=
9237 break
9238 fi
9239 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009241
9242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 done
9244else
9245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009246sed 's/^/| /' conftest.$ac_ext >&5
9247
Martin v. Löwiseba40652007-08-30 20:10:57 +00009248 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009250
9251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009253
9254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009255# Binary search between lo and hi bounds.
9256while test "x$ac_lo" != "x$ac_hi"; do
9257 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9258 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009259/* confdefs.h. */
9260_ACEOF
9261cat confdefs.h >>conftest.$ac_ext
9262cat >>conftest.$ac_ext <<_ACEOF
9263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009264$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009265 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009266int
9267main ()
9268{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009269static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009270test_array [0] = 0
9271
9272 ;
9273 return 0;
9274}
9275_ACEOF
9276rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009277if { (ac_try="$ac_compile"
9278case "(($ac_try" in
9279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9280 *) ac_try_echo=$ac_try;;
9281esac
9282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9283 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009285 grep -v '^ *+' conftest.er1 >conftest.err
9286 rm -f conftest.er1
9287 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009289 (exit $ac_status); } && {
9290 test -z "$ac_c_werror_flag" ||
9291 test ! -s conftest.err
9292 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 ac_hi=$ac_mid
9294else
9295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009296sed 's/^/| /' conftest.$ac_ext >&5
9297
Martin v. Löwiseba40652007-08-30 20:10:57 +00009298 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009300
9301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009302done
9303case $ac_lo in
9304?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009305'') if test "$ac_cv_type_double" = yes; then
9306 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009307See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009308echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009309See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009310 { (exit 77); exit 77; }; }
9311 else
9312 ac_cv_sizeof_double=0
9313 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009314esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009315else
Martin v. Löwis11437992002-04-12 09:54:03 +00009316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009317/* confdefs.h. */
9318_ACEOF
9319cat confdefs.h >>conftest.$ac_ext
9320cat >>conftest.$ac_ext <<_ACEOF
9321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009322$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009323 typedef double ac__type_sizeof_;
9324static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9325static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009326#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009327#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009328int
9329main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009330{
Martin v. Löwis11437992002-04-12 09:54:03 +00009331
9332 FILE *f = fopen ("conftest.val", "w");
9333 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334 return 1;
9335 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009336 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009337 long int i = longval ();
9338 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9339 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 fprintf (f, "%ld\n", i);
9341 }
9342 else
9343 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009344 unsigned long int i = ulongval ();
9345 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9346 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 fprintf (f, "%lu\n", i);
9348 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009349 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009350
9351 ;
9352 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009353}
Martin v. Löwis11437992002-04-12 09:54:03 +00009354_ACEOF
9355rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009356if { (ac_try="$ac_link"
9357case "(($ac_try" in
9358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9359 *) ac_try_echo=$ac_try;;
9360esac
9361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9362 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 ac_status=$?
9364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9365 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009366 { (case "(($ac_try" in
9367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9368 *) ac_try_echo=$ac_try;;
9369esac
9370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9371 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 ac_status=$?
9373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9374 (exit $ac_status); }; }; then
9375 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009376else
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 echo "$as_me: program exited with status $ac_status" >&5
9378echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009379sed 's/^/| /' conftest.$ac_ext >&5
9380
Martin v. Löwis11437992002-04-12 09:54:03 +00009381( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009382if test "$ac_cv_type_double" = yes; then
9383 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009384See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009385echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009386See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009387 { (exit 77); exit 77; }; }
9388 else
9389 ac_cv_sizeof_double=0
9390 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009392rm -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 +00009393fi
9394rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009396{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9397echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9398
9399
9400
Martin v. Löwis11437992002-04-12 09:54:03 +00009401cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009402#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009403_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009404
9405
Martin v. Löwiseba40652007-08-30 20:10:57 +00009406{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9407echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009408if test "${ac_cv_type_fpos_t+set}" = set; then
9409 echo $ECHO_N "(cached) $ECHO_C" >&6
9410else
9411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009412/* confdefs.h. */
9413_ACEOF
9414cat confdefs.h >>conftest.$ac_ext
9415cat >>conftest.$ac_ext <<_ACEOF
9416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009417$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009418typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009419int
9420main ()
9421{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009422if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009424if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 return 0;
9426 ;
9427 return 0;
9428}
9429_ACEOF
9430rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009431if { (ac_try="$ac_compile"
9432case "(($ac_try" in
9433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9434 *) ac_try_echo=$ac_try;;
9435esac
9436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009439 grep -v '^ *+' conftest.er1 >conftest.err
9440 rm -f conftest.er1
9441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009443 (exit $ac_status); } && {
9444 test -z "$ac_c_werror_flag" ||
9445 test ! -s conftest.err
9446 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 ac_cv_type_fpos_t=yes
9448else
9449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009450sed 's/^/| /' conftest.$ac_ext >&5
9451
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009453fi
Brett Cannon19fab762007-06-02 03:02:29 +00009454
Martin v. Löwiseba40652007-08-30 20:10:57 +00009455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9456fi
9457{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9458echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9459
9460# The cast to long int works around a bug in the HP C Compiler
9461# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9462# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9463# This bug is HP SR number 8606223364.
9464{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9465echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009466if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9467 echo $ECHO_N "(cached) $ECHO_C" >&6
9468else
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 if test "$cross_compiling" = yes; then
9470 # Depending upon the size, compute the lo and hi bounds.
9471cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009472/* confdefs.h. */
9473_ACEOF
9474cat confdefs.h >>conftest.$ac_ext
9475cat >>conftest.$ac_ext <<_ACEOF
9476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009477$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009478 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009479int
9480main ()
9481{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009483test_array [0] = 0
9484
9485 ;
9486 return 0;
9487}
9488_ACEOF
9489rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490if { (ac_try="$ac_compile"
9491case "(($ac_try" in
9492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9493 *) ac_try_echo=$ac_try;;
9494esac
9495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009498 grep -v '^ *+' conftest.er1 >conftest.err
9499 rm -f conftest.er1
9500 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502 (exit $ac_status); } && {
9503 test -z "$ac_c_werror_flag" ||
9504 test ! -s conftest.err
9505 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 ac_lo=0 ac_mid=0
9507 while :; do
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 +00009515 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009516int
9517main ()
9518{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009519static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009520test_array [0] = 0
9521
9522 ;
9523 return 0;
9524}
9525_ACEOF
9526rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009527if { (ac_try="$ac_compile"
9528case "(($ac_try" in
9529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9530 *) ac_try_echo=$ac_try;;
9531esac
9532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009535 grep -v '^ *+' conftest.er1 >conftest.err
9536 rm -f conftest.er1
9537 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009539 (exit $ac_status); } && {
9540 test -z "$ac_c_werror_flag" ||
9541 test ! -s conftest.err
9542 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ac_hi=$ac_mid; break
9544else
9545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009546sed 's/^/| /' conftest.$ac_ext >&5
9547
Martin v. Löwiseba40652007-08-30 20:10:57 +00009548 ac_lo=`expr $ac_mid + 1`
9549 if test $ac_lo -le $ac_mid; then
9550 ac_lo= ac_hi=
9551 break
9552 fi
9553 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009555
9556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009557 done
9558else
9559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009560sed 's/^/| /' conftest.$ac_ext >&5
9561
Martin v. Löwiseba40652007-08-30 20:10:57 +00009562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009563/* confdefs.h. */
9564_ACEOF
9565cat confdefs.h >>conftest.$ac_ext
9566cat >>conftest.$ac_ext <<_ACEOF
9567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009568$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009569 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009570int
9571main ()
9572{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009573static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009574test_array [0] = 0
9575
9576 ;
9577 return 0;
9578}
9579_ACEOF
9580rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009581if { (ac_try="$ac_compile"
9582case "(($ac_try" in
9583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9584 *) ac_try_echo=$ac_try;;
9585esac
9586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009589 grep -v '^ *+' conftest.er1 >conftest.err
9590 rm -f conftest.er1
9591 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009593 (exit $ac_status); } && {
9594 test -z "$ac_c_werror_flag" ||
9595 test ! -s conftest.err
9596 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009597 ac_hi=-1 ac_mid=-1
9598 while :; do
9599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009600/* confdefs.h. */
9601_ACEOF
9602cat confdefs.h >>conftest.$ac_ext
9603cat >>conftest.$ac_ext <<_ACEOF
9604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009605$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009607int
9608main ()
9609{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009610static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009611test_array [0] = 0
9612
9613 ;
9614 return 0;
9615}
9616_ACEOF
9617rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009618if { (ac_try="$ac_compile"
9619case "(($ac_try" in
9620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9621 *) ac_try_echo=$ac_try;;
9622esac
9623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9624 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009626 grep -v '^ *+' conftest.er1 >conftest.err
9627 rm -f conftest.er1
9628 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009630 (exit $ac_status); } && {
9631 test -z "$ac_c_werror_flag" ||
9632 test ! -s conftest.err
9633 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009634 ac_lo=$ac_mid; break
9635else
9636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009637sed 's/^/| /' conftest.$ac_ext >&5
9638
Martin v. Löwiseba40652007-08-30 20:10:57 +00009639 ac_hi=`expr '(' $ac_mid ')' - 1`
9640 if test $ac_mid -le $ac_hi; then
9641 ac_lo= ac_hi=
9642 break
9643 fi
9644 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009646
9647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 done
9649else
9650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009651sed 's/^/| /' conftest.$ac_ext >&5
9652
Martin v. Löwiseba40652007-08-30 20:10:57 +00009653 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009655
9656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009658
9659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009660# Binary search between lo and hi bounds.
9661while test "x$ac_lo" != "x$ac_hi"; do
9662 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009664/* confdefs.h. */
9665_ACEOF
9666cat confdefs.h >>conftest.$ac_ext
9667cat >>conftest.$ac_ext <<_ACEOF
9668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009669$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009670 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009671int
9672main ()
9673{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009674static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009675test_array [0] = 0
9676
9677 ;
9678 return 0;
9679}
9680_ACEOF
9681rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009682if { (ac_try="$ac_compile"
9683case "(($ac_try" in
9684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9685 *) ac_try_echo=$ac_try;;
9686esac
9687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009690 grep -v '^ *+' conftest.er1 >conftest.err
9691 rm -f conftest.er1
9692 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009694 (exit $ac_status); } && {
9695 test -z "$ac_c_werror_flag" ||
9696 test ! -s conftest.err
9697 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 ac_hi=$ac_mid
9699else
9700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009701sed 's/^/| /' conftest.$ac_ext >&5
9702
Martin v. Löwiseba40652007-08-30 20:10:57 +00009703 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009705
9706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009707done
9708case $ac_lo in
9709?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009710'') if test "$ac_cv_type_fpos_t" = yes; then
9711 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009712See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009713echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009714See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009715 { (exit 77); exit 77; }; }
9716 else
9717 ac_cv_sizeof_fpos_t=0
9718 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009719esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009720else
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009722/* confdefs.h. */
9723_ACEOF
9724cat confdefs.h >>conftest.$ac_ext
9725cat >>conftest.$ac_ext <<_ACEOF
9726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009727$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009728 typedef fpos_t ac__type_sizeof_;
9729static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9730static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009731#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009732#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009733int
9734main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009735{
Martin v. Löwis11437992002-04-12 09:54:03 +00009736
9737 FILE *f = fopen ("conftest.val", "w");
9738 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739 return 1;
9740 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009742 long int i = longval ();
9743 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9744 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 fprintf (f, "%ld\n", i);
9746 }
9747 else
9748 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009749 unsigned long int i = ulongval ();
9750 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9751 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 fprintf (f, "%lu\n", i);
9753 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009754 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009755
9756 ;
9757 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009758}
Martin v. Löwis11437992002-04-12 09:54:03 +00009759_ACEOF
9760rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009761if { (ac_try="$ac_link"
9762case "(($ac_try" in
9763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9764 *) ac_try_echo=$ac_try;;
9765esac
9766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9767 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_status=$?
9769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9770 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009771 { (case "(($ac_try" in
9772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9773 *) ac_try_echo=$ac_try;;
9774esac
9775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9776 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_status=$?
9778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9779 (exit $ac_status); }; }; then
9780 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009781else
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 echo "$as_me: program exited with status $ac_status" >&5
9783echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009784sed 's/^/| /' conftest.$ac_ext >&5
9785
Martin v. Löwis11437992002-04-12 09:54:03 +00009786( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009787if test "$ac_cv_type_fpos_t" = yes; then
9788 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009789See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009790echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009791See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009792 { (exit 77); exit 77; }; }
9793 else
9794 ac_cv_sizeof_fpos_t=0
9795 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009797rm -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 +00009798fi
9799rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009801{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9802echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9803
9804
9805
Martin v. Löwis11437992002-04-12 09:54:03 +00009806cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009807#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009808_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009809
Michael W. Hudson54241132001-12-07 15:38:26 +00009810
Martin v. Löwiseba40652007-08-30 20:10:57 +00009811{ echo "$as_me:$LINENO: checking for size_t" >&5
9812echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009813if test "${ac_cv_type_size_t+set}" = set; then
9814 echo $ECHO_N "(cached) $ECHO_C" >&6
9815else
9816 cat >conftest.$ac_ext <<_ACEOF
9817/* confdefs.h. */
9818_ACEOF
9819cat confdefs.h >>conftest.$ac_ext
9820cat >>conftest.$ac_ext <<_ACEOF
9821/* end confdefs.h. */
9822$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009823typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009824int
9825main ()
9826{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009827if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009828 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009829if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009830 return 0;
9831 ;
9832 return 0;
9833}
9834_ACEOF
9835rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009836if { (ac_try="$ac_compile"
9837case "(($ac_try" in
9838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9839 *) ac_try_echo=$ac_try;;
9840esac
9841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009843 ac_status=$?
9844 grep -v '^ *+' conftest.er1 >conftest.err
9845 rm -f conftest.er1
9846 cat conftest.err >&5
9847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009848 (exit $ac_status); } && {
9849 test -z "$ac_c_werror_flag" ||
9850 test ! -s conftest.err
9851 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009852 ac_cv_type_size_t=yes
9853else
9854 echo "$as_me: failed program was:" >&5
9855sed 's/^/| /' conftest.$ac_ext >&5
9856
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009858fi
Brett Cannon19fab762007-06-02 03:02:29 +00009859
Martin v. Löwiseba40652007-08-30 20:10:57 +00009860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9861fi
9862{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9863echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9864
9865# The cast to long int works around a bug in the HP C Compiler
9866# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9867# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9868# This bug is HP SR number 8606223364.
9869{ echo "$as_me:$LINENO: checking size of size_t" >&5
9870echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009871if test "${ac_cv_sizeof_size_t+set}" = set; then
9872 echo $ECHO_N "(cached) $ECHO_C" >&6
9873else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009874 if test "$cross_compiling" = yes; then
9875 # Depending upon the size, compute the lo and hi bounds.
9876cat >conftest.$ac_ext <<_ACEOF
9877/* confdefs.h. */
9878_ACEOF
9879cat confdefs.h >>conftest.$ac_ext
9880cat >>conftest.$ac_ext <<_ACEOF
9881/* end confdefs.h. */
9882$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009883 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009884int
9885main ()
9886{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009888test_array [0] = 0
9889
9890 ;
9891 return 0;
9892}
9893_ACEOF
9894rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895if { (ac_try="$ac_compile"
9896case "(($ac_try" in
9897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9898 *) ac_try_echo=$ac_try;;
9899esac
9900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009902 ac_status=$?
9903 grep -v '^ *+' conftest.er1 >conftest.err
9904 rm -f conftest.er1
9905 cat conftest.err >&5
9906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907 (exit $ac_status); } && {
9908 test -z "$ac_c_werror_flag" ||
9909 test ! -s conftest.err
9910 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009911 ac_lo=0 ac_mid=0
9912 while :; do
9913 cat >conftest.$ac_ext <<_ACEOF
9914/* confdefs.h. */
9915_ACEOF
9916cat confdefs.h >>conftest.$ac_ext
9917cat >>conftest.$ac_ext <<_ACEOF
9918/* end confdefs.h. */
9919$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009920 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009921int
9922main ()
9923{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009924static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009925test_array [0] = 0
9926
9927 ;
9928 return 0;
9929}
9930_ACEOF
9931rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009932if { (ac_try="$ac_compile"
9933case "(($ac_try" in
9934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9935 *) ac_try_echo=$ac_try;;
9936esac
9937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9938 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009939 ac_status=$?
9940 grep -v '^ *+' conftest.er1 >conftest.err
9941 rm -f conftest.er1
9942 cat conftest.err >&5
9943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009944 (exit $ac_status); } && {
9945 test -z "$ac_c_werror_flag" ||
9946 test ! -s conftest.err
9947 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009948 ac_hi=$ac_mid; break
9949else
9950 echo "$as_me: failed program was:" >&5
9951sed 's/^/| /' conftest.$ac_ext >&5
9952
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953 ac_lo=`expr $ac_mid + 1`
9954 if test $ac_lo -le $ac_mid; then
9955 ac_lo= ac_hi=
9956 break
9957 fi
9958 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009960
9961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009962 done
9963else
9964 echo "$as_me: failed program was:" >&5
9965sed 's/^/| /' conftest.$ac_ext >&5
9966
Martin v. Löwiseba40652007-08-30 20:10:57 +00009967 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009968/* confdefs.h. */
9969_ACEOF
9970cat confdefs.h >>conftest.$ac_ext
9971cat >>conftest.$ac_ext <<_ACEOF
9972/* end confdefs.h. */
9973$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009974 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009975int
9976main ()
9977{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009978static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009979test_array [0] = 0
9980
9981 ;
9982 return 0;
9983}
9984_ACEOF
9985rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009986if { (ac_try="$ac_compile"
9987case "(($ac_try" in
9988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9989 *) ac_try_echo=$ac_try;;
9990esac
9991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009993 ac_status=$?
9994 grep -v '^ *+' conftest.er1 >conftest.err
9995 rm -f conftest.er1
9996 cat conftest.err >&5
9997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009998 (exit $ac_status); } && {
9999 test -z "$ac_c_werror_flag" ||
10000 test ! -s conftest.err
10001 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010002 ac_hi=-1 ac_mid=-1
10003 while :; do
10004 cat >conftest.$ac_ext <<_ACEOF
10005/* confdefs.h. */
10006_ACEOF
10007cat confdefs.h >>conftest.$ac_ext
10008cat >>conftest.$ac_ext <<_ACEOF
10009/* end confdefs.h. */
10010$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010011 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010012int
10013main ()
10014{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010015static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010016test_array [0] = 0
10017
10018 ;
10019 return 0;
10020}
10021_ACEOF
10022rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010023if { (ac_try="$ac_compile"
10024case "(($ac_try" in
10025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10026 *) ac_try_echo=$ac_try;;
10027esac
10028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10029 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010030 ac_status=$?
10031 grep -v '^ *+' conftest.er1 >conftest.err
10032 rm -f conftest.er1
10033 cat conftest.err >&5
10034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010035 (exit $ac_status); } && {
10036 test -z "$ac_c_werror_flag" ||
10037 test ! -s conftest.err
10038 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010039 ac_lo=$ac_mid; break
10040else
10041 echo "$as_me: failed program was:" >&5
10042sed 's/^/| /' conftest.$ac_ext >&5
10043
Martin v. Löwiseba40652007-08-30 20:10:57 +000010044 ac_hi=`expr '(' $ac_mid ')' - 1`
10045 if test $ac_mid -le $ac_hi; then
10046 ac_lo= ac_hi=
10047 break
10048 fi
10049 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010051
10052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010053 done
10054else
10055 echo "$as_me: failed program was:" >&5
10056sed 's/^/| /' conftest.$ac_ext >&5
10057
Martin v. Löwiseba40652007-08-30 20:10:57 +000010058 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010060
10061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010063
10064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010065# Binary search between lo and hi bounds.
10066while test "x$ac_lo" != "x$ac_hi"; do
10067 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10068 cat >conftest.$ac_ext <<_ACEOF
10069/* confdefs.h. */
10070_ACEOF
10071cat confdefs.h >>conftest.$ac_ext
10072cat >>conftest.$ac_ext <<_ACEOF
10073/* end confdefs.h. */
10074$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010075 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010076int
10077main ()
10078{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010079static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010080test_array [0] = 0
10081
10082 ;
10083 return 0;
10084}
10085_ACEOF
10086rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010087if { (ac_try="$ac_compile"
10088case "(($ac_try" in
10089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10090 *) ac_try_echo=$ac_try;;
10091esac
10092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10093 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010094 ac_status=$?
10095 grep -v '^ *+' conftest.er1 >conftest.err
10096 rm -f conftest.er1
10097 cat conftest.err >&5
10098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010099 (exit $ac_status); } && {
10100 test -z "$ac_c_werror_flag" ||
10101 test ! -s conftest.err
10102 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010103 ac_hi=$ac_mid
10104else
10105 echo "$as_me: failed program was:" >&5
10106sed 's/^/| /' conftest.$ac_ext >&5
10107
Martin v. Löwiseba40652007-08-30 20:10:57 +000010108 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010110
10111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010112done
10113case $ac_lo in
10114?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010115'') if test "$ac_cv_type_size_t" = yes; then
10116 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010117See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010118echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010119See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010120 { (exit 77); exit 77; }; }
10121 else
10122 ac_cv_sizeof_size_t=0
10123 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010124esac
10125else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010126 cat >conftest.$ac_ext <<_ACEOF
10127/* confdefs.h. */
10128_ACEOF
10129cat confdefs.h >>conftest.$ac_ext
10130cat >>conftest.$ac_ext <<_ACEOF
10131/* end confdefs.h. */
10132$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010133 typedef size_t ac__type_sizeof_;
10134static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10135static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010136#include <stdio.h>
10137#include <stdlib.h>
10138int
10139main ()
10140{
10141
10142 FILE *f = fopen ("conftest.val", "w");
10143 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144 return 1;
10145 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010146 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010147 long int i = longval ();
10148 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10149 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010150 fprintf (f, "%ld\n", i);
10151 }
10152 else
10153 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010154 unsigned long int i = ulongval ();
10155 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10156 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010157 fprintf (f, "%lu\n", i);
10158 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010159 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010160
10161 ;
10162 return 0;
10163}
10164_ACEOF
10165rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010166if { (ac_try="$ac_link"
10167case "(($ac_try" in
10168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10169 *) ac_try_echo=$ac_try;;
10170esac
10171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10172 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010173 ac_status=$?
10174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10175 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010176 { (case "(($ac_try" in
10177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10178 *) ac_try_echo=$ac_try;;
10179esac
10180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10181 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010182 ac_status=$?
10183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10184 (exit $ac_status); }; }; then
10185 ac_cv_sizeof_size_t=`cat conftest.val`
10186else
10187 echo "$as_me: program exited with status $ac_status" >&5
10188echo "$as_me: failed program was:" >&5
10189sed 's/^/| /' conftest.$ac_ext >&5
10190
10191( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010192if test "$ac_cv_type_size_t" = yes; then
10193 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010194See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010195echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010196See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010197 { (exit 77); exit 77; }; }
10198 else
10199 ac_cv_sizeof_size_t=0
10200 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010202rm -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 +000010203fi
10204rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010206{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10207echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10208
10209
10210
Martin v. Löwis18e16552006-02-15 17:27:45 +000010211cat >>confdefs.h <<_ACEOF
10212#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10213_ACEOF
10214
10215
Christian Heimes951cc0f2008-01-31 23:08:23 +000010216{ echo "$as_me:$LINENO: checking for pid_t" >&5
10217echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10218if test "${ac_cv_type_pid_t+set}" = set; then
10219 echo $ECHO_N "(cached) $ECHO_C" >&6
10220else
10221 cat >conftest.$ac_ext <<_ACEOF
10222/* confdefs.h. */
10223_ACEOF
10224cat confdefs.h >>conftest.$ac_ext
10225cat >>conftest.$ac_ext <<_ACEOF
10226/* end confdefs.h. */
10227$ac_includes_default
10228typedef pid_t ac__type_new_;
10229int
10230main ()
10231{
10232if ((ac__type_new_ *) 0)
10233 return 0;
10234if (sizeof (ac__type_new_))
10235 return 0;
10236 ;
10237 return 0;
10238}
10239_ACEOF
10240rm -f conftest.$ac_objext
10241if { (ac_try="$ac_compile"
10242case "(($ac_try" in
10243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10244 *) ac_try_echo=$ac_try;;
10245esac
10246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10247 (eval "$ac_compile") 2>conftest.er1
10248 ac_status=$?
10249 grep -v '^ *+' conftest.er1 >conftest.err
10250 rm -f conftest.er1
10251 cat conftest.err >&5
10252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10253 (exit $ac_status); } && {
10254 test -z "$ac_c_werror_flag" ||
10255 test ! -s conftest.err
10256 } && test -s conftest.$ac_objext; then
10257 ac_cv_type_pid_t=yes
10258else
10259 echo "$as_me: failed program was:" >&5
10260sed 's/^/| /' conftest.$ac_ext >&5
10261
10262 ac_cv_type_pid_t=no
10263fi
10264
10265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10266fi
10267{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10268echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10269
10270# The cast to long int works around a bug in the HP C Compiler
10271# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10272# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10273# This bug is HP SR number 8606223364.
10274{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10275echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10276if test "${ac_cv_sizeof_pid_t+set}" = set; then
10277 echo $ECHO_N "(cached) $ECHO_C" >&6
10278else
10279 if test "$cross_compiling" = yes; then
10280 # Depending upon the size, compute the lo and hi bounds.
10281cat >conftest.$ac_ext <<_ACEOF
10282/* confdefs.h. */
10283_ACEOF
10284cat confdefs.h >>conftest.$ac_ext
10285cat >>conftest.$ac_ext <<_ACEOF
10286/* end confdefs.h. */
10287$ac_includes_default
10288 typedef pid_t ac__type_sizeof_;
10289int
10290main ()
10291{
10292static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10293test_array [0] = 0
10294
10295 ;
10296 return 0;
10297}
10298_ACEOF
10299rm -f conftest.$ac_objext
10300if { (ac_try="$ac_compile"
10301case "(($ac_try" in
10302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10303 *) ac_try_echo=$ac_try;;
10304esac
10305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10306 (eval "$ac_compile") 2>conftest.er1
10307 ac_status=$?
10308 grep -v '^ *+' conftest.er1 >conftest.err
10309 rm -f conftest.er1
10310 cat conftest.err >&5
10311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10312 (exit $ac_status); } && {
10313 test -z "$ac_c_werror_flag" ||
10314 test ! -s conftest.err
10315 } && test -s conftest.$ac_objext; then
10316 ac_lo=0 ac_mid=0
10317 while :; do
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
10325 typedef pid_t ac__type_sizeof_;
10326int
10327main ()
10328{
10329static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10330test_array [0] = 0
10331
10332 ;
10333 return 0;
10334}
10335_ACEOF
10336rm -f conftest.$ac_objext
10337if { (ac_try="$ac_compile"
10338case "(($ac_try" in
10339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10340 *) ac_try_echo=$ac_try;;
10341esac
10342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10343 (eval "$ac_compile") 2>conftest.er1
10344 ac_status=$?
10345 grep -v '^ *+' conftest.er1 >conftest.err
10346 rm -f conftest.er1
10347 cat conftest.err >&5
10348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10349 (exit $ac_status); } && {
10350 test -z "$ac_c_werror_flag" ||
10351 test ! -s conftest.err
10352 } && test -s conftest.$ac_objext; then
10353 ac_hi=$ac_mid; break
10354else
10355 echo "$as_me: failed program was:" >&5
10356sed 's/^/| /' conftest.$ac_ext >&5
10357
10358 ac_lo=`expr $ac_mid + 1`
10359 if test $ac_lo -le $ac_mid; then
10360 ac_lo= ac_hi=
10361 break
10362 fi
10363 ac_mid=`expr 2 '*' $ac_mid + 1`
10364fi
10365
10366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10367 done
10368else
10369 echo "$as_me: failed program was:" >&5
10370sed 's/^/| /' conftest.$ac_ext >&5
10371
10372 cat >conftest.$ac_ext <<_ACEOF
10373/* confdefs.h. */
10374_ACEOF
10375cat confdefs.h >>conftest.$ac_ext
10376cat >>conftest.$ac_ext <<_ACEOF
10377/* end confdefs.h. */
10378$ac_includes_default
10379 typedef pid_t ac__type_sizeof_;
10380int
10381main ()
10382{
10383static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10384test_array [0] = 0
10385
10386 ;
10387 return 0;
10388}
10389_ACEOF
10390rm -f conftest.$ac_objext
10391if { (ac_try="$ac_compile"
10392case "(($ac_try" in
10393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10394 *) ac_try_echo=$ac_try;;
10395esac
10396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10397 (eval "$ac_compile") 2>conftest.er1
10398 ac_status=$?
10399 grep -v '^ *+' conftest.er1 >conftest.err
10400 rm -f conftest.er1
10401 cat conftest.err >&5
10402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10403 (exit $ac_status); } && {
10404 test -z "$ac_c_werror_flag" ||
10405 test ! -s conftest.err
10406 } && test -s conftest.$ac_objext; then
10407 ac_hi=-1 ac_mid=-1
10408 while :; do
10409 cat >conftest.$ac_ext <<_ACEOF
10410/* confdefs.h. */
10411_ACEOF
10412cat confdefs.h >>conftest.$ac_ext
10413cat >>conftest.$ac_ext <<_ACEOF
10414/* end confdefs.h. */
10415$ac_includes_default
10416 typedef pid_t ac__type_sizeof_;
10417int
10418main ()
10419{
10420static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10421test_array [0] = 0
10422
10423 ;
10424 return 0;
10425}
10426_ACEOF
10427rm -f conftest.$ac_objext
10428if { (ac_try="$ac_compile"
10429case "(($ac_try" in
10430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10431 *) ac_try_echo=$ac_try;;
10432esac
10433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10434 (eval "$ac_compile") 2>conftest.er1
10435 ac_status=$?
10436 grep -v '^ *+' conftest.er1 >conftest.err
10437 rm -f conftest.er1
10438 cat conftest.err >&5
10439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10440 (exit $ac_status); } && {
10441 test -z "$ac_c_werror_flag" ||
10442 test ! -s conftest.err
10443 } && test -s conftest.$ac_objext; then
10444 ac_lo=$ac_mid; break
10445else
10446 echo "$as_me: failed program was:" >&5
10447sed 's/^/| /' conftest.$ac_ext >&5
10448
10449 ac_hi=`expr '(' $ac_mid ')' - 1`
10450 if test $ac_mid -le $ac_hi; then
10451 ac_lo= ac_hi=
10452 break
10453 fi
10454 ac_mid=`expr 2 '*' $ac_mid`
10455fi
10456
10457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10458 done
10459else
10460 echo "$as_me: failed program was:" >&5
10461sed 's/^/| /' conftest.$ac_ext >&5
10462
10463 ac_lo= ac_hi=
10464fi
10465
10466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10467fi
10468
10469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10470# Binary search between lo and hi bounds.
10471while test "x$ac_lo" != "x$ac_hi"; do
10472 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10473 cat >conftest.$ac_ext <<_ACEOF
10474/* confdefs.h. */
10475_ACEOF
10476cat confdefs.h >>conftest.$ac_ext
10477cat >>conftest.$ac_ext <<_ACEOF
10478/* end confdefs.h. */
10479$ac_includes_default
10480 typedef pid_t ac__type_sizeof_;
10481int
10482main ()
10483{
10484static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10485test_array [0] = 0
10486
10487 ;
10488 return 0;
10489}
10490_ACEOF
10491rm -f conftest.$ac_objext
10492if { (ac_try="$ac_compile"
10493case "(($ac_try" in
10494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10495 *) ac_try_echo=$ac_try;;
10496esac
10497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10498 (eval "$ac_compile") 2>conftest.er1
10499 ac_status=$?
10500 grep -v '^ *+' conftest.er1 >conftest.err
10501 rm -f conftest.er1
10502 cat conftest.err >&5
10503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10504 (exit $ac_status); } && {
10505 test -z "$ac_c_werror_flag" ||
10506 test ! -s conftest.err
10507 } && test -s conftest.$ac_objext; then
10508 ac_hi=$ac_mid
10509else
10510 echo "$as_me: failed program was:" >&5
10511sed 's/^/| /' conftest.$ac_ext >&5
10512
10513 ac_lo=`expr '(' $ac_mid ')' + 1`
10514fi
10515
10516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10517done
10518case $ac_lo in
10519?*) ac_cv_sizeof_pid_t=$ac_lo;;
10520'') if test "$ac_cv_type_pid_t" = yes; then
10521 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10522See \`config.log' for more details." >&5
10523echo "$as_me: error: cannot compute sizeof (pid_t)
10524See \`config.log' for more details." >&2;}
10525 { (exit 77); exit 77; }; }
10526 else
10527 ac_cv_sizeof_pid_t=0
10528 fi ;;
10529esac
10530else
10531 cat >conftest.$ac_ext <<_ACEOF
10532/* confdefs.h. */
10533_ACEOF
10534cat confdefs.h >>conftest.$ac_ext
10535cat >>conftest.$ac_ext <<_ACEOF
10536/* end confdefs.h. */
10537$ac_includes_default
10538 typedef pid_t ac__type_sizeof_;
10539static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10540static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10541#include <stdio.h>
10542#include <stdlib.h>
10543int
10544main ()
10545{
10546
10547 FILE *f = fopen ("conftest.val", "w");
10548 if (! f)
10549 return 1;
10550 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10551 {
10552 long int i = longval ();
10553 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10554 return 1;
10555 fprintf (f, "%ld\n", i);
10556 }
10557 else
10558 {
10559 unsigned long int i = ulongval ();
10560 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10561 return 1;
10562 fprintf (f, "%lu\n", i);
10563 }
10564 return ferror (f) || fclose (f) != 0;
10565
10566 ;
10567 return 0;
10568}
10569_ACEOF
10570rm -f conftest$ac_exeext
10571if { (ac_try="$ac_link"
10572case "(($ac_try" in
10573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10574 *) ac_try_echo=$ac_try;;
10575esac
10576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10577 (eval "$ac_link") 2>&5
10578 ac_status=$?
10579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10580 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10581 { (case "(($ac_try" in
10582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10583 *) ac_try_echo=$ac_try;;
10584esac
10585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10586 (eval "$ac_try") 2>&5
10587 ac_status=$?
10588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10589 (exit $ac_status); }; }; then
10590 ac_cv_sizeof_pid_t=`cat conftest.val`
10591else
10592 echo "$as_me: program exited with status $ac_status" >&5
10593echo "$as_me: failed program was:" >&5
10594sed 's/^/| /' conftest.$ac_ext >&5
10595
10596( exit $ac_status )
10597if test "$ac_cv_type_pid_t" = yes; then
10598 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10599See \`config.log' for more details." >&5
10600echo "$as_me: error: cannot compute sizeof (pid_t)
10601See \`config.log' for more details." >&2;}
10602 { (exit 77); exit 77; }; }
10603 else
10604 ac_cv_sizeof_pid_t=0
10605 fi
10606fi
10607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10608fi
10609rm -f conftest.val
10610fi
10611{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10612echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10613
10614
10615
10616cat >>confdefs.h <<_ACEOF
10617#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10618_ACEOF
10619
10620
Michael W. Hudson54241132001-12-07 15:38:26 +000010621
Martin v. Löwiseba40652007-08-30 20:10:57 +000010622{ echo "$as_me:$LINENO: checking for long long support" >&5
10623echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010624have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010626/* confdefs.h. */
10627_ACEOF
10628cat confdefs.h >>conftest.$ac_ext
10629cat >>conftest.$ac_ext <<_ACEOF
10630/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010631
Martin v. Löwis11437992002-04-12 09:54:03 +000010632int
10633main ()
10634{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010635long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 ;
10637 return 0;
10638}
10639_ACEOF
10640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010641if { (ac_try="$ac_compile"
10642case "(($ac_try" in
10643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10644 *) ac_try_echo=$ac_try;;
10645esac
10646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010649 grep -v '^ *+' conftest.er1 >conftest.err
10650 rm -f conftest.er1
10651 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010653 (exit $ac_status); } && {
10654 test -z "$ac_c_werror_flag" ||
10655 test ! -s conftest.err
10656 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010657
10658
10659cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010660#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010661_ACEOF
10662
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010663 have_long_long=yes
10664
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010665else
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010667sed 's/^/| /' conftest.$ac_ext >&5
10668
Martin v. Löwiseba40652007-08-30 20:10:57 +000010669
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010671
10672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10673{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10674echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010675if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010676{ echo "$as_me:$LINENO: checking for long long" >&5
10677echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010678if test "${ac_cv_type_long_long+set}" = set; then
10679 echo $ECHO_N "(cached) $ECHO_C" >&6
10680else
10681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010682/* confdefs.h. */
10683_ACEOF
10684cat confdefs.h >>conftest.$ac_ext
10685cat >>conftest.$ac_ext <<_ACEOF
10686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010687$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010688typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010689int
10690main ()
10691{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010692if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010694if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 return 0;
10696 ;
10697 return 0;
10698}
10699_ACEOF
10700rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010701if { (ac_try="$ac_compile"
10702case "(($ac_try" in
10703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10704 *) ac_try_echo=$ac_try;;
10705esac
10706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010709 grep -v '^ *+' conftest.er1 >conftest.err
10710 rm -f conftest.er1
10711 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010713 (exit $ac_status); } && {
10714 test -z "$ac_c_werror_flag" ||
10715 test ! -s conftest.err
10716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 ac_cv_type_long_long=yes
10718else
10719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010720sed 's/^/| /' conftest.$ac_ext >&5
10721
Martin v. Löwiseba40652007-08-30 20:10:57 +000010722 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010723fi
Brett Cannon19fab762007-06-02 03:02:29 +000010724
Martin v. Löwiseba40652007-08-30 20:10:57 +000010725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10726fi
10727{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10728echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10729
10730# The cast to long int works around a bug in the HP C Compiler
10731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10733# This bug is HP SR number 8606223364.
10734{ echo "$as_me:$LINENO: checking size of long long" >&5
10735echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010736if test "${ac_cv_sizeof_long_long+set}" = set; then
10737 echo $ECHO_N "(cached) $ECHO_C" >&6
10738else
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 if test "$cross_compiling" = yes; then
10740 # Depending upon the size, compute the lo and hi bounds.
10741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010742/* confdefs.h. */
10743_ACEOF
10744cat confdefs.h >>conftest.$ac_ext
10745cat >>conftest.$ac_ext <<_ACEOF
10746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010747$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010748 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010749int
10750main ()
10751{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010752static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010753test_array [0] = 0
10754
10755 ;
10756 return 0;
10757}
10758_ACEOF
10759rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010760if { (ac_try="$ac_compile"
10761case "(($ac_try" in
10762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10763 *) ac_try_echo=$ac_try;;
10764esac
10765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010768 grep -v '^ *+' conftest.er1 >conftest.err
10769 rm -f conftest.er1
10770 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010772 (exit $ac_status); } && {
10773 test -z "$ac_c_werror_flag" ||
10774 test ! -s conftest.err
10775 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010776 ac_lo=0 ac_mid=0
10777 while :; do
10778 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010779/* confdefs.h. */
10780_ACEOF
10781cat confdefs.h >>conftest.$ac_ext
10782cat >>conftest.$ac_ext <<_ACEOF
10783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010784$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010785 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010786int
10787main ()
10788{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010789static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010790test_array [0] = 0
10791
10792 ;
10793 return 0;
10794}
10795_ACEOF
10796rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010797if { (ac_try="$ac_compile"
10798case "(($ac_try" in
10799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10800 *) ac_try_echo=$ac_try;;
10801esac
10802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10803 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010805 grep -v '^ *+' conftest.er1 >conftest.err
10806 rm -f conftest.er1
10807 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010809 (exit $ac_status); } && {
10810 test -z "$ac_c_werror_flag" ||
10811 test ! -s conftest.err
10812 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 ac_hi=$ac_mid; break
10814else
10815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010816sed 's/^/| /' conftest.$ac_ext >&5
10817
Martin v. Löwiseba40652007-08-30 20:10:57 +000010818 ac_lo=`expr $ac_mid + 1`
10819 if test $ac_lo -le $ac_mid; then
10820 ac_lo= ac_hi=
10821 break
10822 fi
10823 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010825
10826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010827 done
10828else
10829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010830sed 's/^/| /' conftest.$ac_ext >&5
10831
Martin v. Löwiseba40652007-08-30 20:10:57 +000010832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010833/* confdefs.h. */
10834_ACEOF
10835cat confdefs.h >>conftest.$ac_ext
10836cat >>conftest.$ac_ext <<_ACEOF
10837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010838$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010839 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010840int
10841main ()
10842{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010843static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010844test_array [0] = 0
10845
10846 ;
10847 return 0;
10848}
10849_ACEOF
10850rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010851if { (ac_try="$ac_compile"
10852case "(($ac_try" in
10853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10854 *) ac_try_echo=$ac_try;;
10855esac
10856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10857 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010859 grep -v '^ *+' conftest.er1 >conftest.err
10860 rm -f conftest.er1
10861 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010863 (exit $ac_status); } && {
10864 test -z "$ac_c_werror_flag" ||
10865 test ! -s conftest.err
10866 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010867 ac_hi=-1 ac_mid=-1
10868 while :; do
10869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010870/* confdefs.h. */
10871_ACEOF
10872cat confdefs.h >>conftest.$ac_ext
10873cat >>conftest.$ac_ext <<_ACEOF
10874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010875$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010876 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010877int
10878main ()
10879{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010880static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010881test_array [0] = 0
10882
10883 ;
10884 return 0;
10885}
10886_ACEOF
10887rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010888if { (ac_try="$ac_compile"
10889case "(($ac_try" in
10890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10891 *) ac_try_echo=$ac_try;;
10892esac
10893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010896 grep -v '^ *+' conftest.er1 >conftest.err
10897 rm -f conftest.er1
10898 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010900 (exit $ac_status); } && {
10901 test -z "$ac_c_werror_flag" ||
10902 test ! -s conftest.err
10903 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010904 ac_lo=$ac_mid; break
10905else
10906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010907sed 's/^/| /' conftest.$ac_ext >&5
10908
Martin v. Löwiseba40652007-08-30 20:10:57 +000010909 ac_hi=`expr '(' $ac_mid ')' - 1`
10910 if test $ac_mid -le $ac_hi; then
10911 ac_lo= ac_hi=
10912 break
10913 fi
10914 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010916
10917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 done
10919else
10920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010921sed 's/^/| /' conftest.$ac_ext >&5
10922
Martin v. Löwiseba40652007-08-30 20:10:57 +000010923 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010925
10926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010928
10929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010930# Binary search between lo and hi bounds.
10931while test "x$ac_lo" != "x$ac_hi"; do
10932 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010934/* confdefs.h. */
10935_ACEOF
10936cat confdefs.h >>conftest.$ac_ext
10937cat >>conftest.$ac_ext <<_ACEOF
10938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010939$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010940 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010941int
10942main ()
10943{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010944static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010945test_array [0] = 0
10946
10947 ;
10948 return 0;
10949}
10950_ACEOF
10951rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010952if { (ac_try="$ac_compile"
10953case "(($ac_try" in
10954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10955 *) ac_try_echo=$ac_try;;
10956esac
10957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010960 grep -v '^ *+' conftest.er1 >conftest.err
10961 rm -f conftest.er1
10962 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010964 (exit $ac_status); } && {
10965 test -z "$ac_c_werror_flag" ||
10966 test ! -s conftest.err
10967 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 ac_hi=$ac_mid
10969else
10970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010971sed 's/^/| /' conftest.$ac_ext >&5
10972
Martin v. Löwiseba40652007-08-30 20:10:57 +000010973 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010975
10976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010977done
10978case $ac_lo in
10979?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010980'') if test "$ac_cv_type_long_long" = yes; then
10981 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010982See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010983echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010984See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010985 { (exit 77); exit 77; }; }
10986 else
10987 ac_cv_sizeof_long_long=0
10988 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010989esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010990else
Martin v. Löwis11437992002-04-12 09:54:03 +000010991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010992/* confdefs.h. */
10993_ACEOF
10994cat confdefs.h >>conftest.$ac_ext
10995cat >>conftest.$ac_ext <<_ACEOF
10996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010997$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010998 typedef long long ac__type_sizeof_;
10999static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11000static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011001#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011002#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011003int
11004main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011005{
Martin v. Löwis11437992002-04-12 09:54:03 +000011006
11007 FILE *f = fopen ("conftest.val", "w");
11008 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011009 return 1;
11010 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011011 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011012 long int i = longval ();
11013 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11014 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011015 fprintf (f, "%ld\n", i);
11016 }
11017 else
11018 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011019 unsigned long int i = ulongval ();
11020 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11021 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 fprintf (f, "%lu\n", i);
11023 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011024 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011025
11026 ;
11027 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011028}
Martin v. Löwis11437992002-04-12 09:54:03 +000011029_ACEOF
11030rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011031if { (ac_try="$ac_link"
11032case "(($ac_try" in
11033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11034 *) ac_try_echo=$ac_try;;
11035esac
11036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11037 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 ac_status=$?
11039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11040 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011041 { (case "(($ac_try" in
11042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11043 *) ac_try_echo=$ac_try;;
11044esac
11045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11046 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 ac_status=$?
11048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11049 (exit $ac_status); }; }; then
11050 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011051else
Martin v. Löwis11437992002-04-12 09:54:03 +000011052 echo "$as_me: program exited with status $ac_status" >&5
11053echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011054sed 's/^/| /' conftest.$ac_ext >&5
11055
Martin v. Löwis11437992002-04-12 09:54:03 +000011056( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011057if test "$ac_cv_type_long_long" = yes; then
11058 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011059See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011060echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011061See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011062 { (exit 77); exit 77; }; }
11063 else
11064 ac_cv_sizeof_long_long=0
11065 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011067rm -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 +000011068fi
11069rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011071{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11072echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11073
11074
11075
Martin v. Löwis11437992002-04-12 09:54:03 +000011076cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011077#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011078_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011079
Michael W. Hudson54241132001-12-07 15:38:26 +000011080
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011081fi
11082
Martin v. Löwiseba40652007-08-30 20:10:57 +000011083{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11084echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011085have_c99_bool=no
11086cat >conftest.$ac_ext <<_ACEOF
11087/* confdefs.h. */
11088_ACEOF
11089cat confdefs.h >>conftest.$ac_ext
11090cat >>conftest.$ac_ext <<_ACEOF
11091/* end confdefs.h. */
11092
11093int
11094main ()
11095{
11096_Bool x; x = (_Bool)0;
11097 ;
11098 return 0;
11099}
11100_ACEOF
11101rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011102if { (ac_try="$ac_compile"
11103case "(($ac_try" in
11104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11105 *) ac_try_echo=$ac_try;;
11106esac
11107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011109 ac_status=$?
11110 grep -v '^ *+' conftest.er1 >conftest.err
11111 rm -f conftest.er1
11112 cat conftest.err >&5
11113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011114 (exit $ac_status); } && {
11115 test -z "$ac_c_werror_flag" ||
11116 test ! -s conftest.err
11117 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011118
11119
11120cat >>confdefs.h <<\_ACEOF
11121#define HAVE_C99_BOOL 1
11122_ACEOF
11123
11124 have_c99_bool=yes
11125
11126else
11127 echo "$as_me: failed program was:" >&5
11128sed 's/^/| /' conftest.$ac_ext >&5
11129
Martin v. Löwiseba40652007-08-30 20:10:57 +000011130
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011132
11133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11134{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11135echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011136if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011137{ echo "$as_me:$LINENO: checking for _Bool" >&5
11138echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011139if test "${ac_cv_type__Bool+set}" = set; then
11140 echo $ECHO_N "(cached) $ECHO_C" >&6
11141else
11142 cat >conftest.$ac_ext <<_ACEOF
11143/* confdefs.h. */
11144_ACEOF
11145cat confdefs.h >>conftest.$ac_ext
11146cat >>conftest.$ac_ext <<_ACEOF
11147/* end confdefs.h. */
11148$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011149typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011150int
11151main ()
11152{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011153if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011154 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011155if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011156 return 0;
11157 ;
11158 return 0;
11159}
11160_ACEOF
11161rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011162if { (ac_try="$ac_compile"
11163case "(($ac_try" in
11164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11165 *) ac_try_echo=$ac_try;;
11166esac
11167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011169 ac_status=$?
11170 grep -v '^ *+' conftest.er1 >conftest.err
11171 rm -f conftest.er1
11172 cat conftest.err >&5
11173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011174 (exit $ac_status); } && {
11175 test -z "$ac_c_werror_flag" ||
11176 test ! -s conftest.err
11177 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011178 ac_cv_type__Bool=yes
11179else
11180 echo "$as_me: failed program was:" >&5
11181sed 's/^/| /' conftest.$ac_ext >&5
11182
Martin v. Löwiseba40652007-08-30 20:10:57 +000011183 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011184fi
Brett Cannon19fab762007-06-02 03:02:29 +000011185
Martin v. Löwiseba40652007-08-30 20:10:57 +000011186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11187fi
11188{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11189echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11190
11191# The cast to long int works around a bug in the HP C Compiler
11192# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11193# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11194# This bug is HP SR number 8606223364.
11195{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11196echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011197if test "${ac_cv_sizeof__Bool+set}" = set; then
11198 echo $ECHO_N "(cached) $ECHO_C" >&6
11199else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011200 if test "$cross_compiling" = yes; then
11201 # Depending upon the size, compute the lo and hi bounds.
11202cat >conftest.$ac_ext <<_ACEOF
11203/* confdefs.h. */
11204_ACEOF
11205cat confdefs.h >>conftest.$ac_ext
11206cat >>conftest.$ac_ext <<_ACEOF
11207/* end confdefs.h. */
11208$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011209 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011210int
11211main ()
11212{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011214test_array [0] = 0
11215
11216 ;
11217 return 0;
11218}
11219_ACEOF
11220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011221if { (ac_try="$ac_compile"
11222case "(($ac_try" in
11223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11224 *) ac_try_echo=$ac_try;;
11225esac
11226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011228 ac_status=$?
11229 grep -v '^ *+' conftest.er1 >conftest.err
11230 rm -f conftest.er1
11231 cat conftest.err >&5
11232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011233 (exit $ac_status); } && {
11234 test -z "$ac_c_werror_flag" ||
11235 test ! -s conftest.err
11236 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011237 ac_lo=0 ac_mid=0
11238 while :; do
11239 cat >conftest.$ac_ext <<_ACEOF
11240/* confdefs.h. */
11241_ACEOF
11242cat confdefs.h >>conftest.$ac_ext
11243cat >>conftest.$ac_ext <<_ACEOF
11244/* end confdefs.h. */
11245$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011246 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011247int
11248main ()
11249{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011251test_array [0] = 0
11252
11253 ;
11254 return 0;
11255}
11256_ACEOF
11257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011258if { (ac_try="$ac_compile"
11259case "(($ac_try" in
11260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11261 *) ac_try_echo=$ac_try;;
11262esac
11263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011265 ac_status=$?
11266 grep -v '^ *+' conftest.er1 >conftest.err
11267 rm -f conftest.er1
11268 cat conftest.err >&5
11269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011270 (exit $ac_status); } && {
11271 test -z "$ac_c_werror_flag" ||
11272 test ! -s conftest.err
11273 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011274 ac_hi=$ac_mid; break
11275else
11276 echo "$as_me: failed program was:" >&5
11277sed 's/^/| /' conftest.$ac_ext >&5
11278
Martin v. Löwiseba40652007-08-30 20:10:57 +000011279 ac_lo=`expr $ac_mid + 1`
11280 if test $ac_lo -le $ac_mid; then
11281 ac_lo= ac_hi=
11282 break
11283 fi
11284 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011286
11287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011288 done
11289else
11290 echo "$as_me: failed program was:" >&5
11291sed 's/^/| /' conftest.$ac_ext >&5
11292
Martin v. Löwiseba40652007-08-30 20:10:57 +000011293 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011294/* confdefs.h. */
11295_ACEOF
11296cat confdefs.h >>conftest.$ac_ext
11297cat >>conftest.$ac_ext <<_ACEOF
11298/* end confdefs.h. */
11299$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011300 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011301int
11302main ()
11303{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011304static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011305test_array [0] = 0
11306
11307 ;
11308 return 0;
11309}
11310_ACEOF
11311rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011312if { (ac_try="$ac_compile"
11313case "(($ac_try" in
11314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11315 *) ac_try_echo=$ac_try;;
11316esac
11317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11318 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011319 ac_status=$?
11320 grep -v '^ *+' conftest.er1 >conftest.err
11321 rm -f conftest.er1
11322 cat conftest.err >&5
11323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011324 (exit $ac_status); } && {
11325 test -z "$ac_c_werror_flag" ||
11326 test ! -s conftest.err
11327 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011328 ac_hi=-1 ac_mid=-1
11329 while :; do
11330 cat >conftest.$ac_ext <<_ACEOF
11331/* confdefs.h. */
11332_ACEOF
11333cat confdefs.h >>conftest.$ac_ext
11334cat >>conftest.$ac_ext <<_ACEOF
11335/* end confdefs.h. */
11336$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011337 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011338int
11339main ()
11340{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011341static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011342test_array [0] = 0
11343
11344 ;
11345 return 0;
11346}
11347_ACEOF
11348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349if { (ac_try="$ac_compile"
11350case "(($ac_try" in
11351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11352 *) ac_try_echo=$ac_try;;
11353esac
11354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011356 ac_status=$?
11357 grep -v '^ *+' conftest.er1 >conftest.err
11358 rm -f conftest.er1
11359 cat conftest.err >&5
11360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011361 (exit $ac_status); } && {
11362 test -z "$ac_c_werror_flag" ||
11363 test ! -s conftest.err
11364 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011365 ac_lo=$ac_mid; break
11366else
11367 echo "$as_me: failed program was:" >&5
11368sed 's/^/| /' conftest.$ac_ext >&5
11369
Martin v. Löwiseba40652007-08-30 20:10:57 +000011370 ac_hi=`expr '(' $ac_mid ')' - 1`
11371 if test $ac_mid -le $ac_hi; then
11372 ac_lo= ac_hi=
11373 break
11374 fi
11375 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011377
11378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011379 done
11380else
11381 echo "$as_me: failed program was:" >&5
11382sed 's/^/| /' conftest.$ac_ext >&5
11383
Martin v. Löwiseba40652007-08-30 20:10:57 +000011384 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011386
11387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011389
11390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011391# Binary search between lo and hi bounds.
11392while test "x$ac_lo" != "x$ac_hi"; do
11393 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11394 cat >conftest.$ac_ext <<_ACEOF
11395/* confdefs.h. */
11396_ACEOF
11397cat confdefs.h >>conftest.$ac_ext
11398cat >>conftest.$ac_ext <<_ACEOF
11399/* end confdefs.h. */
11400$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011401 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011402int
11403main ()
11404{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011405static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011406test_array [0] = 0
11407
11408 ;
11409 return 0;
11410}
11411_ACEOF
11412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011413if { (ac_try="$ac_compile"
11414case "(($ac_try" in
11415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11416 *) ac_try_echo=$ac_try;;
11417esac
11418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011420 ac_status=$?
11421 grep -v '^ *+' conftest.er1 >conftest.err
11422 rm -f conftest.er1
11423 cat conftest.err >&5
11424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011425 (exit $ac_status); } && {
11426 test -z "$ac_c_werror_flag" ||
11427 test ! -s conftest.err
11428 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011429 ac_hi=$ac_mid
11430else
11431 echo "$as_me: failed program was:" >&5
11432sed 's/^/| /' conftest.$ac_ext >&5
11433
Martin v. Löwiseba40652007-08-30 20:10:57 +000011434 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011436
11437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011438done
11439case $ac_lo in
11440?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011441'') if test "$ac_cv_type__Bool" = yes; then
11442 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011443See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011444echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011445See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011446 { (exit 77); exit 77; }; }
11447 else
11448 ac_cv_sizeof__Bool=0
11449 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011450esac
11451else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011452 cat >conftest.$ac_ext <<_ACEOF
11453/* confdefs.h. */
11454_ACEOF
11455cat confdefs.h >>conftest.$ac_ext
11456cat >>conftest.$ac_ext <<_ACEOF
11457/* end confdefs.h. */
11458$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011459 typedef _Bool ac__type_sizeof_;
11460static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11461static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011462#include <stdio.h>
11463#include <stdlib.h>
11464int
11465main ()
11466{
11467
11468 FILE *f = fopen ("conftest.val", "w");
11469 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011470 return 1;
11471 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011472 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011473 long int i = longval ();
11474 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11475 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011476 fprintf (f, "%ld\n", i);
11477 }
11478 else
11479 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011480 unsigned long int i = ulongval ();
11481 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11482 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011483 fprintf (f, "%lu\n", i);
11484 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011485 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011486
11487 ;
11488 return 0;
11489}
11490_ACEOF
11491rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011492if { (ac_try="$ac_link"
11493case "(($ac_try" in
11494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11495 *) ac_try_echo=$ac_try;;
11496esac
11497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11498 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011499 ac_status=$?
11500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11501 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011502 { (case "(($ac_try" in
11503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11504 *) ac_try_echo=$ac_try;;
11505esac
11506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11507 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011508 ac_status=$?
11509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11510 (exit $ac_status); }; }; then
11511 ac_cv_sizeof__Bool=`cat conftest.val`
11512else
11513 echo "$as_me: program exited with status $ac_status" >&5
11514echo "$as_me: failed program was:" >&5
11515sed 's/^/| /' conftest.$ac_ext >&5
11516
11517( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011518if test "$ac_cv_type__Bool" = yes; then
11519 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011520See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011521echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011522See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011523 { (exit 77); exit 77; }; }
11524 else
11525 ac_cv_sizeof__Bool=0
11526 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011528rm -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 +000011529fi
11530rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11533echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11534
11535
11536
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011537cat >>confdefs.h <<_ACEOF
11538#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11539_ACEOF
11540
11541
11542fi
11543
Martin v. Löwiseba40652007-08-30 20:10:57 +000011544{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11545echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011546if test "${ac_cv_type_uintptr_t+set}" = set; then
11547 echo $ECHO_N "(cached) $ECHO_C" >&6
11548else
11549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011550/* confdefs.h. */
11551_ACEOF
11552cat confdefs.h >>conftest.$ac_ext
11553cat >>conftest.$ac_ext <<_ACEOF
11554/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011555#ifdef HAVE_STDINT_H
11556 #include <stdint.h>
11557 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011558
Martin v. Löwiseba40652007-08-30 20:10:57 +000011559typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011560int
11561main ()
11562{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011563if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011564 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011566 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 ;
11568 return 0;
11569}
11570_ACEOF
11571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572if { (ac_try="$ac_compile"
11573case "(($ac_try" in
11574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11575 *) ac_try_echo=$ac_try;;
11576esac
11577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011580 grep -v '^ *+' conftest.er1 >conftest.err
11581 rm -f conftest.er1
11582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011584 (exit $ac_status); } && {
11585 test -z "$ac_c_werror_flag" ||
11586 test ! -s conftest.err
11587 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011588 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011589else
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011591sed 's/^/| /' conftest.$ac_ext >&5
11592
Martin v. Löwiseba40652007-08-30 20:10:57 +000011593 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011595
11596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011598{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11599echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011600if test $ac_cv_type_uintptr_t = yes; then
11601
11602cat >>confdefs.h <<_ACEOF
11603#define HAVE_UINTPTR_T 1
11604_ACEOF
11605
Martin v. Löwiseba40652007-08-30 20:10:57 +000011606{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11607echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011608if test "${ac_cv_type_uintptr_t+set}" = set; then
11609 echo $ECHO_N "(cached) $ECHO_C" >&6
11610else
11611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011612/* confdefs.h. */
11613_ACEOF
11614cat confdefs.h >>conftest.$ac_ext
11615cat >>conftest.$ac_ext <<_ACEOF
11616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011617$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011618typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011619int
11620main ()
11621{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011622if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011623 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011624if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011625 return 0;
11626 ;
11627 return 0;
11628}
11629_ACEOF
11630rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011631if { (ac_try="$ac_compile"
11632case "(($ac_try" in
11633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11634 *) ac_try_echo=$ac_try;;
11635esac
11636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011639 grep -v '^ *+' conftest.er1 >conftest.err
11640 rm -f conftest.er1
11641 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011643 (exit $ac_status); } && {
11644 test -z "$ac_c_werror_flag" ||
11645 test ! -s conftest.err
11646 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011647 ac_cv_type_uintptr_t=yes
11648else
11649 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011650sed 's/^/| /' conftest.$ac_ext >&5
11651
Martin v. Löwiseba40652007-08-30 20:10:57 +000011652 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011653fi
Brett Cannon19fab762007-06-02 03:02:29 +000011654
Martin v. Löwiseba40652007-08-30 20:10:57 +000011655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11656fi
11657{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11658echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11659
11660# The cast to long int works around a bug in the HP C Compiler
11661# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11662# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11663# This bug is HP SR number 8606223364.
11664{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11665echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011666if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11667 echo $ECHO_N "(cached) $ECHO_C" >&6
11668else
Martin v. Löwis11437992002-04-12 09:54:03 +000011669 if test "$cross_compiling" = yes; then
11670 # Depending upon the size, compute the lo and hi bounds.
11671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011672/* confdefs.h. */
11673_ACEOF
11674cat confdefs.h >>conftest.$ac_ext
11675cat >>conftest.$ac_ext <<_ACEOF
11676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011677$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011678 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011679int
11680main ()
11681{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011682static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011683test_array [0] = 0
11684
11685 ;
11686 return 0;
11687}
11688_ACEOF
11689rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011690if { (ac_try="$ac_compile"
11691case "(($ac_try" in
11692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11693 *) ac_try_echo=$ac_try;;
11694esac
11695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011698 grep -v '^ *+' conftest.er1 >conftest.err
11699 rm -f conftest.er1
11700 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011702 (exit $ac_status); } && {
11703 test -z "$ac_c_werror_flag" ||
11704 test ! -s conftest.err
11705 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011706 ac_lo=0 ac_mid=0
11707 while :; do
11708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011709/* confdefs.h. */
11710_ACEOF
11711cat confdefs.h >>conftest.$ac_ext
11712cat >>conftest.$ac_ext <<_ACEOF
11713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011714$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011715 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011716int
11717main ()
11718{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011719static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011720test_array [0] = 0
11721
11722 ;
11723 return 0;
11724}
11725_ACEOF
11726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011727if { (ac_try="$ac_compile"
11728case "(($ac_try" in
11729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11730 *) ac_try_echo=$ac_try;;
11731esac
11732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011735 grep -v '^ *+' conftest.er1 >conftest.err
11736 rm -f conftest.er1
11737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011739 (exit $ac_status); } && {
11740 test -z "$ac_c_werror_flag" ||
11741 test ! -s conftest.err
11742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011743 ac_hi=$ac_mid; break
11744else
11745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011746sed 's/^/| /' conftest.$ac_ext >&5
11747
Martin v. Löwiseba40652007-08-30 20:10:57 +000011748 ac_lo=`expr $ac_mid + 1`
11749 if test $ac_lo -le $ac_mid; then
11750 ac_lo= ac_hi=
11751 break
11752 fi
11753 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011755
11756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011757 done
11758else
11759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011760sed 's/^/| /' conftest.$ac_ext >&5
11761
Martin v. Löwiseba40652007-08-30 20:10:57 +000011762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011763/* confdefs.h. */
11764_ACEOF
11765cat confdefs.h >>conftest.$ac_ext
11766cat >>conftest.$ac_ext <<_ACEOF
11767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011768$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011769 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011770int
11771main ()
11772{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011773static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011774test_array [0] = 0
11775
11776 ;
11777 return 0;
11778}
11779_ACEOF
11780rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011781if { (ac_try="$ac_compile"
11782case "(($ac_try" in
11783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11784 *) ac_try_echo=$ac_try;;
11785esac
11786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011789 grep -v '^ *+' conftest.er1 >conftest.err
11790 rm -f conftest.er1
11791 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011793 (exit $ac_status); } && {
11794 test -z "$ac_c_werror_flag" ||
11795 test ! -s conftest.err
11796 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011797 ac_hi=-1 ac_mid=-1
11798 while :; do
11799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011800/* confdefs.h. */
11801_ACEOF
11802cat confdefs.h >>conftest.$ac_ext
11803cat >>conftest.$ac_ext <<_ACEOF
11804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011805$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011806 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011807int
11808main ()
11809{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011810static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011811test_array [0] = 0
11812
11813 ;
11814 return 0;
11815}
11816_ACEOF
11817rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011818if { (ac_try="$ac_compile"
11819case "(($ac_try" in
11820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11821 *) ac_try_echo=$ac_try;;
11822esac
11823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011826 grep -v '^ *+' conftest.er1 >conftest.err
11827 rm -f conftest.er1
11828 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011830 (exit $ac_status); } && {
11831 test -z "$ac_c_werror_flag" ||
11832 test ! -s conftest.err
11833 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011834 ac_lo=$ac_mid; break
11835else
11836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011837sed 's/^/| /' conftest.$ac_ext >&5
11838
Martin v. Löwiseba40652007-08-30 20:10:57 +000011839 ac_hi=`expr '(' $ac_mid ')' - 1`
11840 if test $ac_mid -le $ac_hi; then
11841 ac_lo= ac_hi=
11842 break
11843 fi
11844 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011846
11847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 done
11849else
11850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011851sed 's/^/| /' conftest.$ac_ext >&5
11852
Martin v. Löwiseba40652007-08-30 20:10:57 +000011853 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011855
11856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011858
11859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011860# Binary search between lo and hi bounds.
11861while test "x$ac_lo" != "x$ac_hi"; do
11862 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11863 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011864/* confdefs.h. */
11865_ACEOF
11866cat confdefs.h >>conftest.$ac_ext
11867cat >>conftest.$ac_ext <<_ACEOF
11868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011869$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011870 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011871int
11872main ()
11873{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011874static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011875test_array [0] = 0
11876
11877 ;
11878 return 0;
11879}
11880_ACEOF
11881rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011882if { (ac_try="$ac_compile"
11883case "(($ac_try" in
11884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11885 *) ac_try_echo=$ac_try;;
11886esac
11887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011890 grep -v '^ *+' conftest.er1 >conftest.err
11891 rm -f conftest.er1
11892 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011894 (exit $ac_status); } && {
11895 test -z "$ac_c_werror_flag" ||
11896 test ! -s conftest.err
11897 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011898 ac_hi=$ac_mid
11899else
11900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011901sed 's/^/| /' conftest.$ac_ext >&5
11902
Martin v. Löwiseba40652007-08-30 20:10:57 +000011903 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011905
11906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011907done
11908case $ac_lo in
11909?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011910'') if test "$ac_cv_type_uintptr_t" = yes; then
11911 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011912See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011913echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011914See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011915 { (exit 77); exit 77; }; }
11916 else
11917 ac_cv_sizeof_uintptr_t=0
11918 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011919esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011920else
Martin v. Löwis11437992002-04-12 09:54:03 +000011921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011922/* confdefs.h. */
11923_ACEOF
11924cat confdefs.h >>conftest.$ac_ext
11925cat >>conftest.$ac_ext <<_ACEOF
11926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011927$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011928 typedef uintptr_t ac__type_sizeof_;
11929static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11930static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011931#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011932#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011933int
11934main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011935{
Martin v. Löwis11437992002-04-12 09:54:03 +000011936
11937 FILE *f = fopen ("conftest.val", "w");
11938 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011939 return 1;
11940 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011941 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011942 long int i = longval ();
11943 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11944 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011945 fprintf (f, "%ld\n", i);
11946 }
11947 else
11948 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011949 unsigned long int i = ulongval ();
11950 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11951 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011952 fprintf (f, "%lu\n", i);
11953 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011954 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011955
11956 ;
11957 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011958}
Martin v. Löwis11437992002-04-12 09:54:03 +000011959_ACEOF
11960rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011961if { (ac_try="$ac_link"
11962case "(($ac_try" in
11963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11964 *) ac_try_echo=$ac_try;;
11965esac
11966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11967 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011968 ac_status=$?
11969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11970 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011971 { (case "(($ac_try" in
11972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11973 *) ac_try_echo=$ac_try;;
11974esac
11975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11976 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011977 ac_status=$?
11978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11979 (exit $ac_status); }; }; then
11980 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011981else
Martin v. Löwis11437992002-04-12 09:54:03 +000011982 echo "$as_me: program exited with status $ac_status" >&5
11983echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011984sed 's/^/| /' conftest.$ac_ext >&5
11985
Martin v. Löwis11437992002-04-12 09:54:03 +000011986( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011987if test "$ac_cv_type_uintptr_t" = yes; then
11988 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011989See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011990echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011991See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011992 { (exit 77); exit 77; }; }
11993 else
11994 ac_cv_sizeof_uintptr_t=0
11995 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011997rm -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 +000011998fi
11999rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012001{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12002echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12003
12004
12005
Martin v. Löwis11437992002-04-12 09:54:03 +000012006cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012007#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012008_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012009
Michael W. Hudson54241132001-12-07 15:38:26 +000012010
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012011fi
12012
Martin v. Löwisebe26702006-10-02 14:55:51 +000012013
12014
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012015# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012016{ echo "$as_me:$LINENO: checking size of off_t" >&5
12017echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012018if test "${ac_cv_sizeof_off_t+set}" = set; then
12019 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012020else
12021 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012022 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012023else
Martin v. Löwis11437992002-04-12 09:54:03 +000012024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012025/* confdefs.h. */
12026_ACEOF
12027cat confdefs.h >>conftest.$ac_ext
12028cat >>conftest.$ac_ext <<_ACEOF
12029/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012030#include <stdio.h>
12031#include <sys/types.h>
12032main()
12033{
12034 FILE *f=fopen("conftestval", "w");
12035 if (!f) exit(1);
12036 fprintf(f, "%d\n", sizeof(off_t));
12037 exit(0);
12038}
Martin v. Löwis11437992002-04-12 09:54:03 +000012039_ACEOF
12040rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012041if { (ac_try="$ac_link"
12042case "(($ac_try" in
12043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12044 *) ac_try_echo=$ac_try;;
12045esac
12046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12047 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012048 ac_status=$?
12049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12050 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012051 { (case "(($ac_try" in
12052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12053 *) ac_try_echo=$ac_try;;
12054esac
12055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12056 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012057 ac_status=$?
12058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12059 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012060 ac_cv_sizeof_off_t=`cat conftestval`
12061else
Martin v. Löwis11437992002-04-12 09:54:03 +000012062 echo "$as_me: program exited with status $ac_status" >&5
12063echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012064sed 's/^/| /' conftest.$ac_ext >&5
12065
Martin v. Löwis11437992002-04-12 09:54:03 +000012066( exit $ac_status )
12067ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012069rm -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 +000012070fi
12071
Martin v. Löwiseba40652007-08-30 20:10:57 +000012072
12073
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012074fi
12075
Martin v. Löwiseba40652007-08-30 20:10:57 +000012076{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12077echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012078
12079cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012080#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012081_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012082
Michael W. Hudson54241132001-12-07 15:38:26 +000012083
Martin v. Löwiseba40652007-08-30 20:10:57 +000012084{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12085echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012086if test "$have_long_long" = yes -a \
12087 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12088 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012089
Martin v. Löwis11437992002-04-12 09:54:03 +000012090cat >>confdefs.h <<\_ACEOF
12091#define HAVE_LARGEFILE_SUPPORT 1
12092_ACEOF
12093
Martin v. Löwiseba40652007-08-30 20:10:57 +000012094 { echo "$as_me:$LINENO: result: yes" >&5
12095echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012096else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012097 { echo "$as_me:$LINENO: result: no" >&5
12098echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012099fi
12100
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012101# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012102{ echo "$as_me:$LINENO: checking size of time_t" >&5
12103echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012104if test "${ac_cv_sizeof_time_t+set}" = set; then
12105 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012106else
12107 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012108 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012109else
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012111/* confdefs.h. */
12112_ACEOF
12113cat confdefs.h >>conftest.$ac_ext
12114cat >>conftest.$ac_ext <<_ACEOF
12115/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012116#include <stdio.h>
12117#include <time.h>
12118main()
12119{
12120 FILE *f=fopen("conftestval", "w");
12121 if (!f) exit(1);
12122 fprintf(f, "%d\n", sizeof(time_t));
12123 exit(0);
12124}
Martin v. Löwis11437992002-04-12 09:54:03 +000012125_ACEOF
12126rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012127if { (ac_try="$ac_link"
12128case "(($ac_try" in
12129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12130 *) ac_try_echo=$ac_try;;
12131esac
12132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12133 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 ac_status=$?
12135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012137 { (case "(($ac_try" in
12138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12139 *) ac_try_echo=$ac_try;;
12140esac
12141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12142 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012143 ac_status=$?
12144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12145 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012146 ac_cv_sizeof_time_t=`cat conftestval`
12147else
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 echo "$as_me: program exited with status $ac_status" >&5
12149echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012150sed 's/^/| /' conftest.$ac_ext >&5
12151
Martin v. Löwis11437992002-04-12 09:54:03 +000012152( exit $ac_status )
12153ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012155rm -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 +000012156fi
12157
Martin v. Löwiseba40652007-08-30 20:10:57 +000012158
12159
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012160fi
12161
Martin v. Löwiseba40652007-08-30 20:10:57 +000012162{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12163echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012164
12165cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012166#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012167_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012168
Michael W. Hudson54241132001-12-07 15:38:26 +000012169
12170
Trent Mick635f6fb2000-08-23 21:33:05 +000012171# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012172ac_save_cc="$CC"
12173if test "$ac_cv_kpthread" = "yes"
12174then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012175elif test "$ac_cv_kthread" = "yes"
12176then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012177elif test "$ac_cv_pthread" = "yes"
12178then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012180{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12181echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012182have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012184/* confdefs.h. */
12185_ACEOF
12186cat confdefs.h >>conftest.$ac_ext
12187cat >>conftest.$ac_ext <<_ACEOF
12188/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012189#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012190int
12191main ()
12192{
Guido van Rossum12580492000-09-24 16:47:19 +000012193pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012194 ;
12195 return 0;
12196}
12197_ACEOF
12198rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012199if { (ac_try="$ac_compile"
12200case "(($ac_try" in
12201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12202 *) ac_try_echo=$ac_try;;
12203esac
12204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012207 grep -v '^ *+' conftest.er1 >conftest.err
12208 rm -f conftest.er1
12209 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012211 (exit $ac_status); } && {
12212 test -z "$ac_c_werror_flag" ||
12213 test ! -s conftest.err
12214 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012215 have_pthread_t=yes
12216else
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012218sed 's/^/| /' conftest.$ac_ext >&5
12219
Martin v. Löwiseba40652007-08-30 20:10:57 +000012220
Trent Mick635f6fb2000-08-23 21:33:05 +000012221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012222
12223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12224{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12225echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012226if test "$have_pthread_t" = yes ; then
12227 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012228 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12229echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12231 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012232else
12233 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012234 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012235else
Martin v. Löwis11437992002-04-12 09:54:03 +000012236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012237/* confdefs.h. */
12238_ACEOF
12239cat confdefs.h >>conftest.$ac_ext
12240cat >>conftest.$ac_ext <<_ACEOF
12241/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012242#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012243#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012244 main()
12245 {
12246 FILE *f=fopen("conftestval", "w");
12247 if (!f) exit(1);
12248 fprintf(f, "%d\n", sizeof(pthread_t));
12249 exit(0);
12250 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012251_ACEOF
12252rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012253if { (ac_try="$ac_link"
12254case "(($ac_try" in
12255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12256 *) ac_try_echo=$ac_try;;
12257esac
12258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12259 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012260 ac_status=$?
12261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12262 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012263 { (case "(($ac_try" in
12264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12265 *) ac_try_echo=$ac_try;;
12266esac
12267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12268 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 ac_status=$?
12270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12271 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012272 ac_cv_sizeof_pthread_t=`cat conftestval`
12273else
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 echo "$as_me: program exited with status $ac_status" >&5
12275echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012276sed 's/^/| /' conftest.$ac_ext >&5
12277
Martin v. Löwis11437992002-04-12 09:54:03 +000012278( exit $ac_status )
12279ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012281rm -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 +000012282fi
12283
Martin v. Löwiseba40652007-08-30 20:10:57 +000012284
12285
Trent Mick635f6fb2000-08-23 21:33:05 +000012286fi
12287
Martin v. Löwiseba40652007-08-30 20:10:57 +000012288 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12289echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012290
12291cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012292#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012293_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012294
12295fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012296CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012297
Martin v. Löwiseba40652007-08-30 20:10:57 +000012298{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12299echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12300# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012301if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012302 enableval=$enable_toolbox_glue;
12303fi
Jack Jansene578a632001-08-15 01:27:14 +000012304
12305
12306if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012307then
Jack Jansene578a632001-08-15 01:27:14 +000012308 case $ac_sys_system/$ac_sys_release in
12309 Darwin/*)
12310 enable_toolbox_glue="yes";;
12311 *)
12312 enable_toolbox_glue="no";;
12313 esac
12314fi
12315case "$enable_toolbox_glue" in
12316yes)
Jack Jansene578a632001-08-15 01:27:14 +000012317 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012318 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012319
12320cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012321#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012322_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012323
12324 ;;
12325*)
Jack Jansene578a632001-08-15 01:27:14 +000012326 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012327 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012328 ;;
12329esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012330{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12331echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012332
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012333
12334case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012335 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012336 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12337 ;;
12338 Darwin/*)
12339 OTHER_LIBTOOL_OPT=""
12340 ;;
12341esac
12342
12343
12344case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012345 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012346 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12347 if test "${enable_universalsdk}"; then
12348 :
12349 else
12350 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12351 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012352 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012353 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012354 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012355 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12356 if test ${gcc_version} '<' 4.0
12357 then
12358 LIBTOOL_CRUFT="-lcc_dynamic"
12359 else
12360 LIBTOOL_CRUFT=""
12361 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012362 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012363 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012364 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012365esac
12366
Martin v. Löwiseba40652007-08-30 20:10:57 +000012367{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12368echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012369if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012370then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012371 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012373 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012374
Martin v. Löwis11437992002-04-12 09:54:03 +000012375cat >>confdefs.h <<\_ACEOF
12376#define WITH_NEXT_FRAMEWORK 1
12377_ACEOF
12378
Martin v. Löwiseba40652007-08-30 20:10:57 +000012379 { echo "$as_me:$LINENO: result: yes" >&5
12380echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012381else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382 { echo "$as_me:$LINENO: result: no" >&5
12383echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012384fi
12385
Martin v. Löwiseba40652007-08-30 20:10:57 +000012386{ echo "$as_me:$LINENO: checking for dyld" >&5
12387echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012388case $ac_sys_system/$ac_sys_release in
12389 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012390
Martin v. Löwis11437992002-04-12 09:54:03 +000012391cat >>confdefs.h <<\_ACEOF
12392#define WITH_DYLD 1
12393_ACEOF
12394
Martin v. Löwiseba40652007-08-30 20:10:57 +000012395 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12396echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012397 ;;
12398 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012399 { echo "$as_me:$LINENO: result: no" >&5
12400echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012401 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012402esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012403
Guido van Rossum0a516c91994-09-12 10:58:40 +000012404# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012405
Michael W. Hudson54241132001-12-07 15:38:26 +000012406
12407
12408
12409
Guido van Rossum0a516c91994-09-12 10:58:40 +000012410# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012411# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012412{ echo "$as_me:$LINENO: checking SO" >&5
12413echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012414if test -z "$SO"
12415then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012417 hp*|HP*)
12418 case `uname -m` in
12419 ia64) SO=.so;;
12420 *) SO=.sl;;
12421 esac
12422 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012423 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012424 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012425 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012426else
12427 # this might also be a termcap variable, see #610332
12428 echo
12429 echo '====================================================================='
12430 echo '+ +'
12431 echo '+ WARNING: You have set SO in your environment. +'
12432 echo '+ Do you really mean to change the extension for shared libraries? +'
12433 echo '+ Continuing in 10 seconds to let you to ponder. +'
12434 echo '+ +'
12435 echo '====================================================================='
12436 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012438{ echo "$as_me:$LINENO: result: $SO" >&5
12439echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012440
12441cat >>confdefs.h <<_ACEOF
12442#define SHLIB_EXT "$SO"
12443_ACEOF
12444
Guido van Rossum0a516c91994-09-12 10:58:40 +000012445# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012446# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012447# (Shared libraries in this instance are shared modules to be loaded into
12448# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012449{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12450echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012451if test -z "$LDSHARED"
12452then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012453 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012454 AIX*)
12455 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012456 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012457 ;;
12458 BeOS*)
12459 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012460 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012461 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012462 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012463 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012465 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012466 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012467 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012468 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000012469 hp*|HP*)
12470 if test "$GCC" = "yes"
12471 then LDSHARED='$(CC) -shared'
12472 else LDSHARED='ld -b';
12473 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012474 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012475 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012476 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12477 if test "$enable_framework" ; then
12478 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012479 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12480 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012481 else
12482 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012483 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012484 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012485 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012486 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12487 if test "$enable_framework" ; then
12488 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012489 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12490 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012491 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012492 # No framework, use the Python app as bundle-loader
12493 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012494 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012495 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012496 Darwin/*)
12497 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12498 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012499 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012500 if test ${cur_target} '>' 10.2; then
12501 cur_target=10.3
12502 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012503 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012504
12505 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12506 # environment with a value that is the same as what we'll use
12507 # in the Makefile to ensure that we'll get the same compiler
12508 # environment during configure and build time.
12509 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12510 export MACOSX_DEPLOYMENT_TARGET
12511
Ronald Oussoren988117f2006-04-29 11:31:35 +000012512 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012513 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012514 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012515 if test "${enable_universalsdk}"; then
12516 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12517 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012518 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12519 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012520 else
12521 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12522 if test "$enable_framework" ; then
12523 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012524 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12525 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012526 else
12527 # No framework, use the Python app as bundle-loader
12528 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12529 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12530 fi
12531 fi
12532 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000012533 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012534 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012535 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012536 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012537 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012538 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012539 else
12540 LDSHARED="ld -Bshareable ${LDFLAGS}"
12541 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012542 OpenBSD*)
12543 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12544 then
12545 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12546 else
12547 case `uname -r` in
12548 [01].* | 2.[0-7] | 2.[0-7].*)
12549 LDSHARED="ld -Bshareable ${LDFLAGS}"
12550 ;;
12551 *)
12552 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12553 ;;
12554 esac
12555 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012556 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012557 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012558 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012559 then LDSHARED='$(CC) -shared'
12560 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012561 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012562 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012563 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012564 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012565 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012566 *) LDSHARED="ld";;
12567 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012569{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12570echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012571BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012572# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012573# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012574{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12575echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012576if test -z "$CCSHARED"
12577then
Guido van Rossum07397971997-04-29 21:49:50 +000012578 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012579 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012580 then CCSHARED="-fPIC";
12581 elif test `uname -p` = sparc;
12582 then CCSHARED="-xcode=pic32";
12583 else CCSHARED="-Kpic";
12584 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012585 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012586 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012587 else CCSHARED="+z";
12588 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012589 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012590 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012591 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012592 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012593 if test "$GCC" = "yes"
12594 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012595 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012596 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012597 SCO_SV*)
12598 if test "$GCC" = "yes"
12599 then CCSHARED="-fPIC"
12600 else CCSHARED="-Kpic -belf"
12601 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012602 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012603 IRIX*/6*) case $CC in
12604 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012605 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012606 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012607 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012608 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012610{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12611echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012612# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012613# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012614{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12615echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012616if test -z "$LINKFORSHARED"
12617then
Guido van Rossum07397971997-04-29 21:49:50 +000012618 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012619 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012620 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012621 LINKFORSHARED="-Wl,-E -Wl,+s";;
12622# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012623 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012624 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012625 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012627 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12628 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012629 # not used by the core itself but which needs to be in the core so
12630 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012631 # -prebind is no longer used, because it actually seems to give a
12632 # slowdown in stead of a speedup, maybe due to the large number of
12633 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012634
12635 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012636 if test "$enable_framework"
12637 then
Jack Jansenda49e192005-01-07 13:08:22 +000012638 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012639 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012640 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012641 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012642 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012643 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012644 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012645 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12646 then
12647 LINKFORSHARED="-Wl,--export-dynamic"
12648 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012649 SunOS/5*) case $CC in
12650 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012651 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012652 then
12653 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012654 fi;;
12655 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012656 CYGWIN*)
12657 if test $enable_shared = "no"
12658 then
12659 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12660 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000012661 QNX*)
12662 # -Wl,-E causes the symbols to be added to the dynamic
12663 # symbol table so that they can be found when a module
12664 # is loaded. -N 2048K causes the stack size to be set
12665 # to 2048 kilobytes so that the stack doesn't overflow
12666 # when running test_compile.py.
12667 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012668 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012670{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12671echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012672
Michael W. Hudson54241132001-12-07 15:38:26 +000012673
Martin v. Löwiseba40652007-08-30 20:10:57 +000012674{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12675echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012676if test ! "$LIBRARY" = "$LDLIBRARY"
12677then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012678 case $ac_sys_system in
12679 CYGWIN*)
12680 # Cygwin needs CCSHARED when building extension DLLs
12681 # but not when building the interpreter DLL.
12682 CFLAGSFORSHARED='';;
12683 *)
12684 CFLAGSFORSHARED='$(CCSHARED)'
12685 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012687{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12688echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012689
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012690# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12691# library (with --enable-shared).
12692# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012693# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12694# if it is not required, since it creates a dependency of the shared library
12695# to LIBS. This, in turn, means that applications linking the shared libpython
12696# don't need to link LIBS explicitly. The default should be only changed
12697# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012698
Martin v. Löwiseba40652007-08-30 20:10:57 +000012699{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12700echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012701case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012702 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012703 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012704esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012705{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12706echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012707
12708
Guido van Rossum627b2d71993-12-24 10:39:16 +000012709# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012710
Martin v. Löwiseba40652007-08-30 20:10:57 +000012711{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12712echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012713if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12714 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012715else
Martin v. Löwis11437992002-04-12 09:54:03 +000012716 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012717LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012719/* confdefs.h. */
12720_ACEOF
12721cat confdefs.h >>conftest.$ac_ext
12722cat >>conftest.$ac_ext <<_ACEOF
12723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
Martin v. Löwiseba40652007-08-30 20:10:57 +000012725/* Override any GCC internal prototype to avoid an error.
12726 Use char because int might match the return type of a GCC
12727 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012728#ifdef __cplusplus
12729extern "C"
12730#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012731char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012732int
12733main ()
12734{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012735return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012736 ;
12737 return 0;
12738}
12739_ACEOF
12740rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012741if { (ac_try="$ac_link"
12742case "(($ac_try" in
12743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12744 *) ac_try_echo=$ac_try;;
12745esac
12746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12747 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012749 grep -v '^ *+' conftest.er1 >conftest.err
12750 rm -f conftest.er1
12751 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012753 (exit $ac_status); } && {
12754 test -z "$ac_c_werror_flag" ||
12755 test ! -s conftest.err
12756 } && test -s conftest$ac_exeext &&
12757 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012758 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012759else
Martin v. Löwis11437992002-04-12 09:54:03 +000012760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012761sed 's/^/| /' conftest.$ac_ext >&5
12762
Martin v. Löwiseba40652007-08-30 20:10:57 +000012763 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012765
12766rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012767 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012768LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012770{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12771echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012772if test $ac_cv_lib_dl_dlopen = yes; then
12773 cat >>confdefs.h <<_ACEOF
12774#define HAVE_LIBDL 1
12775_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012776
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012777 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012778
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012779fi
12780 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012781
Martin v. Löwiseba40652007-08-30 20:10:57 +000012782{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12783echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012784if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12785 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012786else
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012788LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012789cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012790/* confdefs.h. */
12791_ACEOF
12792cat confdefs.h >>conftest.$ac_ext
12793cat >>conftest.$ac_ext <<_ACEOF
12794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
Martin v. Löwiseba40652007-08-30 20:10:57 +000012796/* Override any GCC internal prototype to avoid an error.
12797 Use char because int might match the return type of a GCC
12798 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012799#ifdef __cplusplus
12800extern "C"
12801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012802char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012803int
12804main ()
12805{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012806return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 ;
12808 return 0;
12809}
12810_ACEOF
12811rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012812if { (ac_try="$ac_link"
12813case "(($ac_try" in
12814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12815 *) ac_try_echo=$ac_try;;
12816esac
12817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12818 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012820 grep -v '^ *+' conftest.er1 >conftest.err
12821 rm -f conftest.er1
12822 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012824 (exit $ac_status); } && {
12825 test -z "$ac_c_werror_flag" ||
12826 test ! -s conftest.err
12827 } && test -s conftest$ac_exeext &&
12828 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012830else
Martin v. Löwis11437992002-04-12 09:54:03 +000012831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012832sed 's/^/| /' conftest.$ac_ext >&5
12833
Martin v. Löwiseba40652007-08-30 20:10:57 +000012834 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012836
12837rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012838 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012839LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012841{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12842echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012843if test $ac_cv_lib_dld_shl_load = yes; then
12844 cat >>confdefs.h <<_ACEOF
12845#define HAVE_LIBDLD 1
12846_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012847
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012848 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012849
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012850fi
12851 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012852
12853# only check for sem_ini if thread support is requested
12854if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012855 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12856echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012857if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012859else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012860 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012862/* confdefs.h. */
12863_ACEOF
12864cat confdefs.h >>conftest.$ac_ext
12865cat >>conftest.$ac_ext <<_ACEOF
12866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012867
Martin v. Löwiseba40652007-08-30 20:10:57 +000012868/* Override any GCC internal prototype to avoid an error.
12869 Use char because int might match the return type of a GCC
12870 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012871#ifdef __cplusplus
12872extern "C"
12873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012874char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012875int
12876main ()
12877{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012878return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 ;
12880 return 0;
12881}
12882_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012883for ac_lib in '' pthread rt posix4; do
12884 if test -z "$ac_lib"; then
12885 ac_res="none required"
12886 else
12887 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012888 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012889 fi
12890 rm -f conftest.$ac_objext conftest$ac_exeext
12891if { (ac_try="$ac_link"
12892case "(($ac_try" in
12893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12894 *) ac_try_echo=$ac_try;;
12895esac
12896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12897 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012898 ac_status=$?
12899 grep -v '^ *+' conftest.er1 >conftest.err
12900 rm -f conftest.er1
12901 cat conftest.err >&5
12902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012903 (exit $ac_status); } && {
12904 test -z "$ac_c_werror_flag" ||
12905 test ! -s conftest.err
12906 } && test -s conftest$ac_exeext &&
12907 $as_test_x conftest$ac_exeext; then
12908 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012909else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012910 echo "$as_me: failed program was:" >&5
12911sed 's/^/| /' conftest.$ac_ext >&5
12912
Martin v. Löwiseba40652007-08-30 20:10:57 +000012913
Brett Cannon19fab762007-06-02 03:02:29 +000012914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012915
12916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12917 conftest$ac_exeext
12918 if test "${ac_cv_search_sem_init+set}" = set; then
12919 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012921done
12922if test "${ac_cv_search_sem_init+set}" = set; then
12923 :
12924else
12925 ac_cv_search_sem_init=no
12926fi
12927rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012928LIBS=$ac_func_search_save_LIBS
12929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012930{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12931echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12932ac_res=$ac_cv_search_sem_init
12933if test "$ac_res" != no; then
12934 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012935
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012936fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012937 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012938 # posix4 on Solaris 2.6
12939 # pthread (first!) on Linux
12940fi
12941
Martin v. Löwis19d17342003-06-14 21:03:05 +000012942# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012943{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12944echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012945if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12946 echo $ECHO_N "(cached) $ECHO_C" >&6
12947else
12948 ac_check_lib_save_LIBS=$LIBS
12949LIBS="-lintl $LIBS"
12950cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012951/* confdefs.h. */
12952_ACEOF
12953cat confdefs.h >>conftest.$ac_ext
12954cat >>conftest.$ac_ext <<_ACEOF
12955/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012956
Martin v. Löwiseba40652007-08-30 20:10:57 +000012957/* Override any GCC internal prototype to avoid an error.
12958 Use char because int might match the return type of a GCC
12959 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012960#ifdef __cplusplus
12961extern "C"
12962#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012963char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012964int
12965main ()
12966{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012967return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012968 ;
12969 return 0;
12970}
12971_ACEOF
12972rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012973if { (ac_try="$ac_link"
12974case "(($ac_try" in
12975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12976 *) ac_try_echo=$ac_try;;
12977esac
12978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12979 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012981 grep -v '^ *+' conftest.er1 >conftest.err
12982 rm -f conftest.er1
12983 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012985 (exit $ac_status); } && {
12986 test -z "$ac_c_werror_flag" ||
12987 test ! -s conftest.err
12988 } && test -s conftest$ac_exeext &&
12989 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012990 ac_cv_lib_intl_textdomain=yes
12991else
12992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012993sed 's/^/| /' conftest.$ac_ext >&5
12994
Martin v. Löwiseba40652007-08-30 20:10:57 +000012995 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012997
12998rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012999 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013000LIBS=$ac_check_lib_save_LIBS
13001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013002{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13003echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013004if test $ac_cv_lib_intl_textdomain = yes; then
13005
13006cat >>confdefs.h <<\_ACEOF
13007#define WITH_LIBINTL 1
13008_ACEOF
13009
13010fi
13011
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013012
13013# checks for system dependent C++ extensions support
13014case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013015 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13016echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013017 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013018/* confdefs.h. */
13019_ACEOF
13020cat confdefs.h >>conftest.$ac_ext
13021cat >>conftest.$ac_ext <<_ACEOF
13022/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013023#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013024int
13025main ()
13026{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013027loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013028 ;
13029 return 0;
13030}
13031_ACEOF
13032rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013033if { (ac_try="$ac_link"
13034case "(($ac_try" in
13035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13036 *) ac_try_echo=$ac_try;;
13037esac
13038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13039 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013041 grep -v '^ *+' conftest.er1 >conftest.err
13042 rm -f conftest.er1
13043 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013045 (exit $ac_status); } && {
13046 test -z "$ac_c_werror_flag" ||
13047 test ! -s conftest.err
13048 } && test -s conftest$ac_exeext &&
13049 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013050
Martin v. Löwis11437992002-04-12 09:54:03 +000013051cat >>confdefs.h <<\_ACEOF
13052#define AIX_GENUINE_CPLUSPLUS 1
13053_ACEOF
13054
Martin v. Löwiseba40652007-08-30 20:10:57 +000013055 { echo "$as_me:$LINENO: result: yes" >&5
13056echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013057else
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013059sed 's/^/| /' conftest.$ac_ext >&5
13060
Martin v. Löwiseba40652007-08-30 20:10:57 +000013061 { echo "$as_me:$LINENO: result: no" >&5
13062echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013064
13065rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013066 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013067 *) ;;
13068esac
13069
Guido van Rossum70c7f481998-03-26 18:44:10 +000013070# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013071# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013072{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13073echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013074if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13075 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013076else
Martin v. Löwis11437992002-04-12 09:54:03 +000013077 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013078LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013080/* confdefs.h. */
13081_ACEOF
13082cat confdefs.h >>conftest.$ac_ext
13083cat >>conftest.$ac_ext <<_ACEOF
13084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013085
Martin v. Löwiseba40652007-08-30 20:10:57 +000013086/* Override any GCC internal prototype to avoid an error.
13087 Use char because int might match the return type of a GCC
13088 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013089#ifdef __cplusplus
13090extern "C"
13091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013092char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013093int
13094main ()
13095{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013096return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013097 ;
13098 return 0;
13099}
13100_ACEOF
13101rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013102if { (ac_try="$ac_link"
13103case "(($ac_try" in
13104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13105 *) ac_try_echo=$ac_try;;
13106esac
13107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13108 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013110 grep -v '^ *+' conftest.er1 >conftest.err
13111 rm -f conftest.er1
13112 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013114 (exit $ac_status); } && {
13115 test -z "$ac_c_werror_flag" ||
13116 test ! -s conftest.err
13117 } && test -s conftest$ac_exeext &&
13118 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013119 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013120else
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013122sed 's/^/| /' conftest.$ac_ext >&5
13123
Martin v. Löwiseba40652007-08-30 20:10:57 +000013124 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013126
13127rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013128 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013129LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013131{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13132echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013133if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013134 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013135fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013136 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013137{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13138echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013139if test "${ac_cv_lib_socket_socket+set}" = set; then
13140 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013141else
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013143LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013145/* confdefs.h. */
13146_ACEOF
13147cat confdefs.h >>conftest.$ac_ext
13148cat >>conftest.$ac_ext <<_ACEOF
13149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013150
Martin v. Löwiseba40652007-08-30 20:10:57 +000013151/* Override any GCC internal prototype to avoid an error.
13152 Use char because int might match the return type of a GCC
13153 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013154#ifdef __cplusplus
13155extern "C"
13156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013157char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013158int
13159main ()
13160{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013161return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 ;
13163 return 0;
13164}
13165_ACEOF
13166rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013167if { (ac_try="$ac_link"
13168case "(($ac_try" in
13169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13170 *) ac_try_echo=$ac_try;;
13171esac
13172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13173 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013175 grep -v '^ *+' conftest.er1 >conftest.err
13176 rm -f conftest.er1
13177 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013179 (exit $ac_status); } && {
13180 test -z "$ac_c_werror_flag" ||
13181 test ! -s conftest.err
13182 } && test -s conftest$ac_exeext &&
13183 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013184 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013185else
Martin v. Löwis11437992002-04-12 09:54:03 +000013186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013187sed 's/^/| /' conftest.$ac_ext >&5
13188
Martin v. Löwiseba40652007-08-30 20:10:57 +000013189 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013191
13192rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013193 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013194LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013196{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13197echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013198if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013199 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013200fi
13201 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013202
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013203case "$ac_sys_system" in
13204BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013205{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13206echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013207if test "${ac_cv_lib_net_socket+set}" = set; then
13208 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013209else
Martin v. Löwis11437992002-04-12 09:54:03 +000013210 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013211LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013212cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013213/* confdefs.h. */
13214_ACEOF
13215cat confdefs.h >>conftest.$ac_ext
13216cat >>conftest.$ac_ext <<_ACEOF
13217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013218
Martin v. Löwiseba40652007-08-30 20:10:57 +000013219/* Override any GCC internal prototype to avoid an error.
13220 Use char because int might match the return type of a GCC
13221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013222#ifdef __cplusplus
13223extern "C"
13224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013225char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013226int
13227main ()
13228{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013229return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013230 ;
13231 return 0;
13232}
13233_ACEOF
13234rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013235if { (ac_try="$ac_link"
13236case "(($ac_try" in
13237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13238 *) ac_try_echo=$ac_try;;
13239esac
13240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13241 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013243 grep -v '^ *+' conftest.er1 >conftest.err
13244 rm -f conftest.er1
13245 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013247 (exit $ac_status); } && {
13248 test -z "$ac_c_werror_flag" ||
13249 test ! -s conftest.err
13250 } && test -s conftest$ac_exeext &&
13251 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013253else
Martin v. Löwis11437992002-04-12 09:54:03 +000013254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013255sed 's/^/| /' conftest.$ac_ext >&5
13256
Martin v. Löwiseba40652007-08-30 20:10:57 +000013257 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013259
13260rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013261 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013262LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013264{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13265echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013266if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013267 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013268fi
13269 # BeOS
13270;;
13271esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013272
Martin v. Löwiseba40652007-08-30 20:10:57 +000013273{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13274echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013275
Martin v. Löwiseba40652007-08-30 20:10:57 +000013276# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013277if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013278 withval=$with_libs;
13279{ echo "$as_me:$LINENO: result: $withval" >&5
13280echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013281LIBS="$withval $LIBS"
13282
13283else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013284 { echo "$as_me:$LINENO: result: no" >&5
13285echo "${ECHO_T}no" >&6; }
13286fi
13287
Guido van Rossum7f43da71994-08-01 12:15:30 +000013288
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013289# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013290{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13291echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013292
Martin v. Löwiseba40652007-08-30 20:10:57 +000013293# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013294if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013295 withval=$with_system_ffi;
13296fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013297
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013298
Martin v. Löwiseba40652007-08-30 20:10:57 +000013299{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13300echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013301
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013302# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013303
13304
Martin v. Löwiseba40652007-08-30 20:10:57 +000013305{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13306echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013307
Martin v. Löwiseba40652007-08-30 20:10:57 +000013308# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013309if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013310 withval=$with_signal_module;
13311fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013312
13313
13314if test -z "$with_signal_module"
13315then with_signal_module="yes"
13316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013317{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13318echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013319
13320if test "${with_signal_module}" = "yes"; then
13321 USE_SIGNAL_MODULE=""
13322 SIGNAL_OBJS=""
13323else
13324 USE_SIGNAL_MODULE="#"
13325 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13326fi
13327
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013328# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013329
Barry Warsawc0d24d82000-06-29 16:12:00 +000013330USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013331
Martin v. Löwiseba40652007-08-30 20:10:57 +000013332{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13333echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013334
Guido van Rossumec2f0731997-01-22 20:54:01 +000013335
Martin v. Löwiseba40652007-08-30 20:10:57 +000013336# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013337if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013338 withval=$with_dec_threads;
13339{ echo "$as_me:$LINENO: result: $withval" >&5
13340echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013341LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013342if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013343 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013344fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013345else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013346 { echo "$as_me:$LINENO: result: no" >&5
13347echo "${ECHO_T}no" >&6; }
13348fi
13349
Martin v. Löwis11437992002-04-12 09:54:03 +000013350
13351# Templates for things AC_DEFINEd more than once.
13352# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013353
13354
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
13356
13357
13358
13359
Martin v. Löwiseba40652007-08-30 20:10:57 +000013360{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13361echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
Martin v. Löwiseba40652007-08-30 20:10:57 +000013363# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013364if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013365 withval=$with_threads;
13366fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013367
13368
Barry Warsawc0d24d82000-06-29 16:12:00 +000013369# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013370
Martin v. Löwiseba40652007-08-30 20:10:57 +000013371# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013372if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013373 withval=$with_thread; with_threads=$with_thread
13374fi
13375
Barry Warsawc0d24d82000-06-29 16:12:00 +000013376
13377if test -z "$with_threads"
13378then with_threads="yes"
13379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013380{ echo "$as_me:$LINENO: result: $with_threads" >&5
13381echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013382
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013383
Barry Warsawc0d24d82000-06-29 16:12:00 +000013384if test "$with_threads" = "no"
13385then
13386 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013387elif test "$ac_cv_pthread_is_default" = yes
13388then
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013390#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013391_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013392
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013393 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013394 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013395#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013396_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013397
13398 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013399 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013400elif test "$ac_cv_kpthread" = "yes"
13401then
13402 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013403 if test "$ac_cv_cxx_thread" = "yes"; then
13404 CXX="$CXX -Kpthread"
13405 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013406 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013407#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013408_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013409
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013410 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013411 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013412elif test "$ac_cv_kthread" = "yes"
13413then
13414 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013415 if test "$ac_cv_cxx_thread" = "yes"; then
13416 CXX="$CXX -Kthread"
13417 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013418 cat >>confdefs.h <<\_ACEOF
13419#define WITH_THREAD 1
13420_ACEOF
13421
13422 posix_threads=yes
13423 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013424elif test "$ac_cv_pthread" = "yes"
13425then
13426 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013427 if test "$ac_cv_cxx_thread" = "yes"; then
13428 CXX="$CXX -pthread"
13429 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013430 cat >>confdefs.h <<\_ACEOF
13431#define WITH_THREAD 1
13432_ACEOF
13433
13434 posix_threads=yes
13435 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013436else
13437 if test ! -z "$with_threads" -a -d "$with_threads"
13438 then LDFLAGS="$LDFLAGS -L$with_threads"
13439 fi
13440 if test ! -z "$withval" -a -d "$withval"
13441 then LDFLAGS="$LDFLAGS -L$withval"
13442 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013443
13444 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013445 # define _POSIX_THREADS in unistd.h. Some apparently don't
13446 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013447 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13448echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013450/* confdefs.h. */
13451_ACEOF
13452cat confdefs.h >>conftest.$ac_ext
13453cat >>conftest.$ac_ext <<_ACEOF
13454/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013455
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013456#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013457#ifdef _POSIX_THREADS
13458yes
13459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013460
13461_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013462if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013463 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013464 unistd_defines_pthreads=yes
13465else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013466 unistd_defines_pthreads=no
13467fi
13468rm -f conftest*
13469
Martin v. Löwiseba40652007-08-30 20:10:57 +000013470 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13471echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013472
Martin v. Löwis11437992002-04-12 09:54:03 +000013473 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013474#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013475_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013476
Martin v. Löwis11437992002-04-12 09:54:03 +000013477 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013478 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13479echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013480if test "${ac_cv_header_cthreads_h+set}" = set; then
13481 echo $ECHO_N "(cached) $ECHO_C" >&6
13482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013483{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13484echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013485else
Martin v. Löwis11437992002-04-12 09:54:03 +000013486 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013487{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13488echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013490/* confdefs.h. */
13491_ACEOF
13492cat confdefs.h >>conftest.$ac_ext
13493cat >>conftest.$ac_ext <<_ACEOF
13494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013495$ac_includes_default
13496#include <cthreads.h>
13497_ACEOF
13498rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013499if { (ac_try="$ac_compile"
13500case "(($ac_try" in
13501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13502 *) ac_try_echo=$ac_try;;
13503esac
13504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013507 grep -v '^ *+' conftest.er1 >conftest.err
13508 rm -f conftest.er1
13509 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013511 (exit $ac_status); } && {
13512 test -z "$ac_c_werror_flag" ||
13513 test ! -s conftest.err
13514 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013515 ac_header_compiler=yes
13516else
13517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013518sed 's/^/| /' conftest.$ac_ext >&5
13519
Martin v. Löwiseba40652007-08-30 20:10:57 +000013520 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013522
13523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13524{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13525echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
13527# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013528{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13529echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013530cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013531/* confdefs.h. */
13532_ACEOF
13533cat confdefs.h >>conftest.$ac_ext
13534cat >>conftest.$ac_ext <<_ACEOF
13535/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013536#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013537_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013538if { (ac_try="$ac_cpp conftest.$ac_ext"
13539case "(($ac_try" in
13540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13541 *) ac_try_echo=$ac_try;;
13542esac
13543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13544 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013545 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013546 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 rm -f conftest.er1
13548 cat conftest.err >&5
13549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013550 (exit $ac_status); } >/dev/null && {
13551 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13552 test ! -s conftest.err
13553 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013554 ac_header_preproc=yes
13555else
13556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013557sed 's/^/| /' conftest.$ac_ext >&5
13558
Martin v. Löwis11437992002-04-12 09:54:03 +000013559 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013561
Martin v. Löwis11437992002-04-12 09:54:03 +000013562rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013563{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13564echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013565
13566# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013567case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13568 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013569 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13570echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013571 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13572echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13573 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013574 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013575 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013576 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13577echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013578 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13579echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13580 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13581echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13582 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13583echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013584 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13585echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013586 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13587echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013588 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013589## ------------------------------------------------ ##
13590## Report this to http://www.python.org/python-bugs ##
13591## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013592_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013593 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013594 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013595esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013596{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13597echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013598if test "${ac_cv_header_cthreads_h+set}" = set; then
13599 echo $ECHO_N "(cached) $ECHO_C" >&6
13600else
13601 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013603{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13604echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013605
13606fi
13607if test $ac_cv_header_cthreads_h = yes; then
13608 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013609#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013610_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013611
Martin v. Löwis11437992002-04-12 09:54:03 +000013612 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013613#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013614_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013615
Martin v. Löwis11437992002-04-12 09:54:03 +000013616
13617cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013618#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013619_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013620
13621 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013622 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013623else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013624
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013626 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13627echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013628if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13629 echo $ECHO_N "(cached) $ECHO_C" >&6
13630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013631{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13632echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013633else
Martin v. Löwis11437992002-04-12 09:54:03 +000013634 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013635{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13636echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013638/* confdefs.h. */
13639_ACEOF
13640cat confdefs.h >>conftest.$ac_ext
13641cat >>conftest.$ac_ext <<_ACEOF
13642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013643$ac_includes_default
13644#include <mach/cthreads.h>
13645_ACEOF
13646rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013647if { (ac_try="$ac_compile"
13648case "(($ac_try" in
13649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13650 *) ac_try_echo=$ac_try;;
13651esac
13652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013655 grep -v '^ *+' conftest.er1 >conftest.err
13656 rm -f conftest.er1
13657 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013659 (exit $ac_status); } && {
13660 test -z "$ac_c_werror_flag" ||
13661 test ! -s conftest.err
13662 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013663 ac_header_compiler=yes
13664else
13665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013666sed 's/^/| /' conftest.$ac_ext >&5
13667
Martin v. Löwiseba40652007-08-30 20:10:57 +000013668 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013670
13671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13672{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13673echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013674
13675# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013676{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13677echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013678cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013679/* confdefs.h. */
13680_ACEOF
13681cat confdefs.h >>conftest.$ac_ext
13682cat >>conftest.$ac_ext <<_ACEOF
13683/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013684#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013685_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013686if { (ac_try="$ac_cpp conftest.$ac_ext"
13687case "(($ac_try" in
13688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13689 *) ac_try_echo=$ac_try;;
13690esac
13691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13692 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013693 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013694 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 rm -f conftest.er1
13696 cat conftest.err >&5
13697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013698 (exit $ac_status); } >/dev/null && {
13699 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13700 test ! -s conftest.err
13701 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013702 ac_header_preproc=yes
13703else
13704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013705sed 's/^/| /' conftest.$ac_ext >&5
13706
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013709
Martin v. Löwis11437992002-04-12 09:54:03 +000013710rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013711{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13712echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013713
13714# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013715case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13716 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013717 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13718echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013719 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13720echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13721 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013722 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013723 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013724 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13725echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013726 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13727echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13728 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13729echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13730 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13731echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013732 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13733echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013734 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13735echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013736 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013737## ------------------------------------------------ ##
13738## Report this to http://www.python.org/python-bugs ##
13739## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013740_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013741 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013742 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013743esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013744{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13745echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013746if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13747 echo $ECHO_N "(cached) $ECHO_C" >&6
13748else
13749 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013751{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13752echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013753
13754fi
13755if test $ac_cv_header_mach_cthreads_h = yes; then
13756 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013757#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013758_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013759
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013761#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013762_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013763
Martin v. Löwis11437992002-04-12 09:54:03 +000013764
13765cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013766#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013767_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013768
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013769 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013770else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013771
Martin v. Löwiseba40652007-08-30 20:10:57 +000013772 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13773echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013774
Martin v. Löwiseba40652007-08-30 20:10:57 +000013775# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013776if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013777 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13778echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013779 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013780#define WITH_THREAD 1
13781_ACEOF
13782
13783
13784cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013785#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013786_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013787
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013788 LIBS="-lpth $LIBS"
13789 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013790else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013791 { echo "$as_me:$LINENO: result: no" >&5
13792echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013793
13794 # Just looking for pthread_create in libpthread is not enough:
13795 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13796 # So we really have to include pthread.h, and then link.
13797 _libs=$LIBS
13798 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013799 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13800echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013802/* confdefs.h. */
13803_ACEOF
13804cat confdefs.h >>conftest.$ac_ext
13805cat >>conftest.$ac_ext <<_ACEOF
13806/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013807#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013808
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013809void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013810int
13811main ()
13812{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013813
13814pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013815 ;
13816 return 0;
13817}
13818_ACEOF
13819rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013820if { (ac_try="$ac_link"
13821case "(($ac_try" in
13822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13823 *) ac_try_echo=$ac_try;;
13824esac
13825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13826 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013828 grep -v '^ *+' conftest.er1 >conftest.err
13829 rm -f conftest.er1
13830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013832 (exit $ac_status); } && {
13833 test -z "$ac_c_werror_flag" ||
13834 test ! -s conftest.err
13835 } && test -s conftest$ac_exeext &&
13836 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Martin v. Löwiseba40652007-08-30 20:10:57 +000013838 { echo "$as_me:$LINENO: result: yes" >&5
13839echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013841#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013842_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013843
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013844 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013845 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013846else
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013848sed 's/^/| /' conftest.$ac_ext >&5
13849
Martin v. Löwis11437992002-04-12 09:54:03 +000013850
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013851 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013852 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13853echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013854if test "${ac_cv_func_pthread_detach+set}" = set; then
13855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013856else
Martin v. Löwis11437992002-04-12 09:54:03 +000013857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013858/* confdefs.h. */
13859_ACEOF
13860cat confdefs.h >>conftest.$ac_ext
13861cat >>conftest.$ac_ext <<_ACEOF
13862/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013863/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13864 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13865#define pthread_detach innocuous_pthread_detach
13866
Guido van Rossumad678af1998-10-02 14:42:15 +000013867/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013868 which can conflict with char pthread_detach (); below.
13869 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013870 <limits.h> exists even on freestanding compilers. */
13871
13872#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013873# include <limits.h>
13874#else
13875# include <assert.h>
13876#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013877
13878#undef pthread_detach
13879
Martin v. Löwiseba40652007-08-30 20:10:57 +000013880/* Override any GCC internal prototype to avoid an error.
13881 Use char because int might match the return type of a GCC
13882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013883#ifdef __cplusplus
13884extern "C"
13885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013886char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013887/* The GNU C library defines this for functions which it implements
13888 to always fail with ENOSYS. Some functions are actually named
13889 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013890#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013891choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013892#endif
13893
Skip Montanaro6dead952003-09-25 14:50:04 +000013894int
13895main ()
13896{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013897return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013898 ;
13899 return 0;
13900}
13901_ACEOF
13902rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903if { (ac_try="$ac_link"
13904case "(($ac_try" in
13905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13906 *) ac_try_echo=$ac_try;;
13907esac
13908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13909 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013911 grep -v '^ *+' conftest.er1 >conftest.err
13912 rm -f conftest.er1
13913 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013915 (exit $ac_status); } && {
13916 test -z "$ac_c_werror_flag" ||
13917 test ! -s conftest.err
13918 } && test -s conftest$ac_exeext &&
13919 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013921else
Martin v. Löwis11437992002-04-12 09:54:03 +000013922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013923sed 's/^/| /' conftest.$ac_ext >&5
13924
Martin v. Löwiseba40652007-08-30 20:10:57 +000013925 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013927
13928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013929 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13932echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013933if test $ac_cv_func_pthread_detach = yes; then
13934 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013935#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013936_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013937
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013938 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013939 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013940else
Guido van Rossumad678af1998-10-02 14:42:15 +000013941
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013942 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013943 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13944echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013945if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13946 echo $ECHO_N "(cached) $ECHO_C" >&6
13947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013948{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13949echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013950else
13951 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013952{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13953echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013954cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013955/* confdefs.h. */
13956_ACEOF
13957cat confdefs.h >>conftest.$ac_ext
13958cat >>conftest.$ac_ext <<_ACEOF
13959/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013960$ac_includes_default
13961#include <atheos/threads.h>
13962_ACEOF
13963rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013964if { (ac_try="$ac_compile"
13965case "(($ac_try" in
13966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13967 *) ac_try_echo=$ac_try;;
13968esac
13969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13970 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013972 grep -v '^ *+' conftest.er1 >conftest.err
13973 rm -f conftest.er1
13974 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013976 (exit $ac_status); } && {
13977 test -z "$ac_c_werror_flag" ||
13978 test ! -s conftest.err
13979 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013980 ac_header_compiler=yes
13981else
13982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013983sed 's/^/| /' conftest.$ac_ext >&5
13984
Martin v. Löwiseba40652007-08-30 20:10:57 +000013985 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013987
13988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13989{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13990echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013991
13992# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013993{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13994echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013996/* confdefs.h. */
13997_ACEOF
13998cat confdefs.h >>conftest.$ac_ext
13999cat >>conftest.$ac_ext <<_ACEOF
14000/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014001#include <atheos/threads.h>
14002_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014003if { (ac_try="$ac_cpp conftest.$ac_ext"
14004case "(($ac_try" in
14005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14006 *) ac_try_echo=$ac_try;;
14007esac
14008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14009 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014010 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014011 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014012 rm -f conftest.er1
14013 cat conftest.err >&5
14014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014015 (exit $ac_status); } >/dev/null && {
14016 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14017 test ! -s conftest.err
14018 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014019 ac_header_preproc=yes
14020else
14021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014022sed 's/^/| /' conftest.$ac_ext >&5
14023
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014024 ac_header_preproc=no
14025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014026
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014027rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014028{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14029echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014030
14031# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014032case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14033 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014034 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14035echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014036 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14037echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14038 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014039 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014040 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014041 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14042echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014043 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14044echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14045 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14046echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14047 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14048echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014049 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14050echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014051 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14052echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014053 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014054## ------------------------------------------------ ##
14055## Report this to http://www.python.org/python-bugs ##
14056## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014057_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014058 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014059 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014060esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014061{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14062echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014063if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14064 echo $ECHO_N "(cached) $ECHO_C" >&6
14065else
14066 ac_cv_header_atheos_threads_h=$ac_header_preproc
14067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014068{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14069echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014070
14071fi
14072if test $ac_cv_header_atheos_threads_h = yes; then
14073 cat >>confdefs.h <<\_ACEOF
14074#define WITH_THREAD 1
14075_ACEOF
14076
14077
14078cat >>confdefs.h <<\_ACEOF
14079#define ATHEOS_THREADS 1
14080_ACEOF
14081
14082 THREADOBJ="Python/thread.o"
14083else
14084
Martin v. Löwis11437992002-04-12 09:54:03 +000014085 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014086 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14087echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014088if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14089 echo $ECHO_N "(cached) $ECHO_C" >&6
14090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014091{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14092echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014093else
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014095{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14096echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
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$ac_includes_default
14104#include <kernel/OS.h>
14105_ACEOF
14106rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014107if { (ac_try="$ac_compile"
14108case "(($ac_try" in
14109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14110 *) ac_try_echo=$ac_try;;
14111esac
14112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14113 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014115 grep -v '^ *+' conftest.er1 >conftest.err
14116 rm -f conftest.er1
14117 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014119 (exit $ac_status); } && {
14120 test -z "$ac_c_werror_flag" ||
14121 test ! -s conftest.err
14122 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014123 ac_header_compiler=yes
14124else
14125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014126sed 's/^/| /' conftest.$ac_ext >&5
14127
Martin v. Löwiseba40652007-08-30 20:10:57 +000014128 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014130
14131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14132{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14133echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014134
14135# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014136{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14137echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014139/* confdefs.h. */
14140_ACEOF
14141cat confdefs.h >>conftest.$ac_ext
14142cat >>conftest.$ac_ext <<_ACEOF
14143/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014144#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014145_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014146if { (ac_try="$ac_cpp conftest.$ac_ext"
14147case "(($ac_try" in
14148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14149 *) ac_try_echo=$ac_try;;
14150esac
14151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14152 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014153 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014154 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014155 rm -f conftest.er1
14156 cat conftest.err >&5
14157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014158 (exit $ac_status); } >/dev/null && {
14159 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14160 test ! -s conftest.err
14161 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014162 ac_header_preproc=yes
14163else
14164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014165sed 's/^/| /' conftest.$ac_ext >&5
14166
Martin v. Löwis11437992002-04-12 09:54:03 +000014167 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014169
Martin v. Löwis11437992002-04-12 09:54:03 +000014170rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014171{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14172echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014173
Martin v. Löwis11437992002-04-12 09:54:03 +000014174# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014175case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14176 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014177 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14178echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014179 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14180echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14181 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014182 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014183 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014184 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14185echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014186 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14187echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14188 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14189echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14190 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14191echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014192 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14193echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014194 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14195echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014196 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014197## ------------------------------------------------ ##
14198## Report this to http://www.python.org/python-bugs ##
14199## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014200_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014201 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014202 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014203esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014204{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14205echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014206if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14207 echo $ECHO_N "(cached) $ECHO_C" >&6
14208else
14209 ac_cv_header_kernel_OS_h=$ac_header_preproc
14210fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014211{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14212echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014213
14214fi
14215if test $ac_cv_header_kernel_OS_h = yes; then
14216 cat >>confdefs.h <<\_ACEOF
14217#define WITH_THREAD 1
14218_ACEOF
14219
14220
14221cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014222#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014223_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014224
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014225 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014226else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014227
Martin v. Löwiseba40652007-08-30 20:10:57 +000014228 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14229echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014230if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14231 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014232else
Martin v. Löwis11437992002-04-12 09:54:03 +000014233 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014234LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014235cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014236/* confdefs.h. */
14237_ACEOF
14238cat confdefs.h >>conftest.$ac_ext
14239cat >>conftest.$ac_ext <<_ACEOF
14240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014241
Martin v. Löwiseba40652007-08-30 20:10:57 +000014242/* Override any GCC internal prototype to avoid an error.
14243 Use char because int might match the return type of a GCC
14244 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014245#ifdef __cplusplus
14246extern "C"
14247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014248char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014249int
14250main ()
14251{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014252return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014253 ;
14254 return 0;
14255}
14256_ACEOF
14257rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014258if { (ac_try="$ac_link"
14259case "(($ac_try" in
14260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14261 *) ac_try_echo=$ac_try;;
14262esac
14263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14264 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014266 grep -v '^ *+' conftest.er1 >conftest.err
14267 rm -f conftest.er1
14268 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014270 (exit $ac_status); } && {
14271 test -z "$ac_c_werror_flag" ||
14272 test ! -s conftest.err
14273 } && test -s conftest$ac_exeext &&
14274 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014275 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014276else
Martin v. Löwis11437992002-04-12 09:54:03 +000014277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014278sed 's/^/| /' conftest.$ac_ext >&5
14279
Martin v. Löwiseba40652007-08-30 20:10:57 +000014280 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014282
14283rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014284 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014285LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014287{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14288echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014289if test $ac_cv_lib_pthreads_pthread_create = yes; then
14290 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014291#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014292_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014293
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014294 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014295 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014296 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014297else
Greg Steinadf63d62000-07-05 10:38:09 +000014298
Martin v. Löwiseba40652007-08-30 20:10:57 +000014299 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14300echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014301if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14302 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014303else
Martin v. Löwis11437992002-04-12 09:54:03 +000014304 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014305LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014306cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014307/* confdefs.h. */
14308_ACEOF
14309cat confdefs.h >>conftest.$ac_ext
14310cat >>conftest.$ac_ext <<_ACEOF
14311/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014312
Martin v. Löwiseba40652007-08-30 20:10:57 +000014313/* Override any GCC internal prototype to avoid an error.
14314 Use char because int might match the return type of a GCC
14315 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014316#ifdef __cplusplus
14317extern "C"
14318#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014319char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014320int
14321main ()
14322{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014323return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014324 ;
14325 return 0;
14326}
14327_ACEOF
14328rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014329if { (ac_try="$ac_link"
14330case "(($ac_try" in
14331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14332 *) ac_try_echo=$ac_try;;
14333esac
14334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14335 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014337 grep -v '^ *+' conftest.er1 >conftest.err
14338 rm -f conftest.er1
14339 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014341 (exit $ac_status); } && {
14342 test -z "$ac_c_werror_flag" ||
14343 test ! -s conftest.err
14344 } && test -s conftest$ac_exeext &&
14345 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014347else
Martin v. Löwis11437992002-04-12 09:54:03 +000014348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014349sed 's/^/| /' conftest.$ac_ext >&5
14350
Martin v. Löwiseba40652007-08-30 20:10:57 +000014351 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014353
14354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014356LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014358{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14359echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014360if test $ac_cv_lib_c_r_pthread_create = yes; then
14361 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014362#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014363_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014364
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014365 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014366 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014367 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014368else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014369
Martin v. Löwiseba40652007-08-30 20:10:57 +000014370 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14371echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014372if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14373 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014374else
Martin v. Löwis11437992002-04-12 09:54:03 +000014375 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014376LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014377cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014378/* confdefs.h. */
14379_ACEOF
14380cat confdefs.h >>conftest.$ac_ext
14381cat >>conftest.$ac_ext <<_ACEOF
14382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
Martin v. Löwiseba40652007-08-30 20:10:57 +000014384/* Override any GCC internal prototype to avoid an error.
14385 Use char because int might match the return type of a GCC
14386 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014387#ifdef __cplusplus
14388extern "C"
14389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014390char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014391int
14392main ()
14393{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014394return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014395 ;
14396 return 0;
14397}
14398_ACEOF
14399rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014400if { (ac_try="$ac_link"
14401case "(($ac_try" in
14402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14403 *) ac_try_echo=$ac_try;;
14404esac
14405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14406 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014408 grep -v '^ *+' conftest.er1 >conftest.err
14409 rm -f conftest.er1
14410 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014412 (exit $ac_status); } && {
14413 test -z "$ac_c_werror_flag" ||
14414 test ! -s conftest.err
14415 } && test -s conftest$ac_exeext &&
14416 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014417 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014418else
Martin v. Löwis11437992002-04-12 09:54:03 +000014419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014420sed 's/^/| /' conftest.$ac_ext >&5
14421
Martin v. Löwiseba40652007-08-30 20:10:57 +000014422 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014424
14425rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014427LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014429{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14430echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014431if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14432 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014433#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014434_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014435
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014436 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014437 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014438 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014439else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014440
Martin v. Löwiseba40652007-08-30 20:10:57 +000014441 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14442echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014443if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14444 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014445else
Martin v. Löwis11437992002-04-12 09:54:03 +000014446 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014447LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014448cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014449/* confdefs.h. */
14450_ACEOF
14451cat confdefs.h >>conftest.$ac_ext
14452cat >>conftest.$ac_ext <<_ACEOF
14453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014454
Martin v. Löwiseba40652007-08-30 20:10:57 +000014455/* Override any GCC internal prototype to avoid an error.
14456 Use char because int might match the return type of a GCC
14457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014458#ifdef __cplusplus
14459extern "C"
14460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014461char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014462int
14463main ()
14464{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014465return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 ;
14467 return 0;
14468}
14469_ACEOF
14470rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014471if { (ac_try="$ac_link"
14472case "(($ac_try" in
14473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14474 *) ac_try_echo=$ac_try;;
14475esac
14476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14477 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014479 grep -v '^ *+' conftest.er1 >conftest.err
14480 rm -f conftest.er1
14481 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014483 (exit $ac_status); } && {
14484 test -z "$ac_c_werror_flag" ||
14485 test ! -s conftest.err
14486 } && test -s conftest$ac_exeext &&
14487 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014489else
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014491sed 's/^/| /' conftest.$ac_ext >&5
14492
Martin v. Löwiseba40652007-08-30 20:10:57 +000014493 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014495
14496rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014497 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014498LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014500{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14501echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014502if test $ac_cv_lib_cma_pthread_create = yes; then
14503 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014504#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014505_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014506
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014507 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014508 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014509 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014510else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014511
Martin v. Löwis130fb172001-07-19 11:00:41 +000014512 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014513fi
14514
Guido van Rossum627b2d71993-12-24 10:39:16 +000014515
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014516fi
14517
Guido van Rossum0be3e491997-05-22 20:33:33 +000014518fi
14519
Guido van Rossum49545951997-12-02 19:28:29 +000014520fi
14521
Guido van Rossumb93a8621998-05-07 13:27:32 +000014522fi
14523
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014524
Michael W. Hudson54241132001-12-07 15:38:26 +000014525fi
14526
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014527
14528fi
14529
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014531
14532rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014534fi
14535
Martin v. Löwis11437992002-04-12 09:54:03 +000014536fi
14537
14538
14539fi
14540
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014541
Michael W. Hudson54241132001-12-07 15:38:26 +000014542
Martin v. Löwiseba40652007-08-30 20:10:57 +000014543 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14544echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014545if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14546 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014547else
Martin v. Löwis11437992002-04-12 09:54:03 +000014548 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014549LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014550cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014551/* confdefs.h. */
14552_ACEOF
14553cat confdefs.h >>conftest.$ac_ext
14554cat >>conftest.$ac_ext <<_ACEOF
14555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014556
Martin v. Löwiseba40652007-08-30 20:10:57 +000014557/* Override any GCC internal prototype to avoid an error.
14558 Use char because int might match the return type of a GCC
14559 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014560#ifdef __cplusplus
14561extern "C"
14562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014563char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014564int
14565main ()
14566{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014567return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 ;
14569 return 0;
14570}
14571_ACEOF
14572rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014573if { (ac_try="$ac_link"
14574case "(($ac_try" in
14575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14576 *) ac_try_echo=$ac_try;;
14577esac
14578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14579 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014581 grep -v '^ *+' conftest.er1 >conftest.err
14582 rm -f conftest.er1
14583 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014585 (exit $ac_status); } && {
14586 test -z "$ac_c_werror_flag" ||
14587 test ! -s conftest.err
14588 } && test -s conftest$ac_exeext &&
14589 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014591else
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014593sed 's/^/| /' conftest.$ac_ext >&5
14594
Martin v. Löwiseba40652007-08-30 20:10:57 +000014595 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014597
14598rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014599 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014600LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014602{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14603echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014604if test $ac_cv_lib_mpc_usconfig = yes; then
14605 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014606#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014607_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014608
Martin v. Löwis130fb172001-07-19 11:00:41 +000014609 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014610 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014611 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014612fi
14613
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014614
Neal Norwitza978ab02002-11-02 16:58:05 +000014615 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014616 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14617echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014618if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14619 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014620else
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014622LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014623cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014624/* confdefs.h. */
14625_ACEOF
14626cat confdefs.h >>conftest.$ac_ext
14627cat >>conftest.$ac_ext <<_ACEOF
14628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014629
Martin v. Löwiseba40652007-08-30 20:10:57 +000014630/* Override any GCC internal prototype to avoid an error.
14631 Use char because int might match the return type of a GCC
14632 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014633#ifdef __cplusplus
14634extern "C"
14635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014636char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014637int
14638main ()
14639{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014640return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014641 ;
14642 return 0;
14643}
14644_ACEOF
14645rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014646if { (ac_try="$ac_link"
14647case "(($ac_try" in
14648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14649 *) ac_try_echo=$ac_try;;
14650esac
14651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14652 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014654 grep -v '^ *+' conftest.er1 >conftest.err
14655 rm -f conftest.er1
14656 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014658 (exit $ac_status); } && {
14659 test -z "$ac_c_werror_flag" ||
14660 test ! -s conftest.err
14661 } && test -s conftest$ac_exeext &&
14662 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014663 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014664else
Martin v. Löwis11437992002-04-12 09:54:03 +000014665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014666sed 's/^/| /' conftest.$ac_ext >&5
14667
Martin v. Löwiseba40652007-08-30 20:10:57 +000014668 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014670
14671rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014672 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014673LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014675{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14676echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014677if test $ac_cv_lib_thread_thr_create = yes; then
14678 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014679#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014680_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014681
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014682 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014683 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014684 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014685fi
14686
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014687 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014688
Martin v. Löwis130fb172001-07-19 11:00:41 +000014689 if test "$USE_THREAD_MODULE" != "#"
14690 then
14691 # If the above checks didn't disable threads, (at least) OSF1
14692 # needs this '-threads' argument during linking.
14693 case $ac_sys_system in
14694 OSF1) LDLAST=-threads;;
14695 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014696 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014697fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014698
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014699if test "$posix_threads" = "yes"; then
14700 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014701
14702cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014703#define _POSIX_THREADS 1
14704_ACEOF
14705
14706 fi
14707
14708 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14709 case $ac_sys_system/$ac_sys_release in
14710 SunOS/5.6)
14711cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014712#define HAVE_PTHREAD_DESTRUCTOR 1
14713_ACEOF
14714
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014715 ;;
14716 SunOS/5.8)
14717cat >>confdefs.h <<\_ACEOF
14718#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14719_ACEOF
14720
14721 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014722 AIX/5)
14723cat >>confdefs.h <<\_ACEOF
14724#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14725_ACEOF
14726
14727 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014728 esac
14729
Martin v. Löwiseba40652007-08-30 20:10:57 +000014730 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14731echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014732 if test "${ac_cv_pthread_system_supported+set}" = set; then
14733 echo $ECHO_N "(cached) $ECHO_C" >&6
14734else
14735 if test "$cross_compiling" = yes; then
14736 ac_cv_pthread_system_supported=no
14737else
14738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014739/* confdefs.h. */
14740_ACEOF
14741cat confdefs.h >>conftest.$ac_ext
14742cat >>conftest.$ac_ext <<_ACEOF
14743/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014744#include <pthread.h>
14745 void *foo(void *parm) {
14746 return NULL;
14747 }
14748 main() {
14749 pthread_attr_t attr;
14750 pthread_t id;
14751 if (pthread_attr_init(&attr)) exit(-1);
14752 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14753 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14754 exit(0);
14755 }
14756_ACEOF
14757rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014758if { (ac_try="$ac_link"
14759case "(($ac_try" in
14760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14761 *) ac_try_echo=$ac_try;;
14762esac
14763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14764 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014765 ac_status=$?
14766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14767 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014768 { (case "(($ac_try" in
14769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14770 *) ac_try_echo=$ac_try;;
14771esac
14772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14773 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014774 ac_status=$?
14775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14776 (exit $ac_status); }; }; then
14777 ac_cv_pthread_system_supported=yes
14778else
14779 echo "$as_me: program exited with status $ac_status" >&5
14780echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014781sed 's/^/| /' conftest.$ac_ext >&5
14782
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014783( exit $ac_status )
14784ac_cv_pthread_system_supported=no
14785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014786rm -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 +000014787fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014788
Martin v. Löwiseba40652007-08-30 20:10:57 +000014789
14790
Guido van Rossum627b2d71993-12-24 10:39:16 +000014791fi
14792
Martin v. Löwiseba40652007-08-30 20:10:57 +000014793 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14794echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014795 if test "$ac_cv_pthread_system_supported" = "yes"; then
14796
14797cat >>confdefs.h <<\_ACEOF
14798#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14799_ACEOF
14800
14801 fi
14802
14803for ac_func in pthread_sigmask
14804do
14805as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014806{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14807echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14808if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014809 echo $ECHO_N "(cached) $ECHO_C" >&6
14810else
14811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014812/* confdefs.h. */
14813_ACEOF
14814cat confdefs.h >>conftest.$ac_ext
14815cat >>conftest.$ac_ext <<_ACEOF
14816/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014817/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14818 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14819#define $ac_func innocuous_$ac_func
14820
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014821/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014822 which can conflict with char $ac_func (); below.
14823 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014824 <limits.h> exists even on freestanding compilers. */
14825
14826#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014827# include <limits.h>
14828#else
14829# include <assert.h>
14830#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014831
14832#undef $ac_func
14833
Martin v. Löwiseba40652007-08-30 20:10:57 +000014834/* Override any GCC internal prototype to avoid an error.
14835 Use char because int might match the return type of a GCC
14836 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014837#ifdef __cplusplus
14838extern "C"
14839#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014840char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014841/* The GNU C library defines this for functions which it implements
14842 to always fail with ENOSYS. Some functions are actually named
14843 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014844#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014845choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014846#endif
14847
Skip Montanaro6dead952003-09-25 14:50:04 +000014848int
14849main ()
14850{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014851return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014852 ;
14853 return 0;
14854}
14855_ACEOF
14856rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014857if { (ac_try="$ac_link"
14858case "(($ac_try" in
14859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14860 *) ac_try_echo=$ac_try;;
14861esac
14862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14863 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014865 grep -v '^ *+' conftest.er1 >conftest.err
14866 rm -f conftest.er1
14867 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014869 (exit $ac_status); } && {
14870 test -z "$ac_c_werror_flag" ||
14871 test ! -s conftest.err
14872 } && test -s conftest$ac_exeext &&
14873 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014874 eval "$as_ac_var=yes"
14875else
14876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014877sed 's/^/| /' conftest.$ac_ext >&5
14878
Martin v. Löwiseba40652007-08-30 20:10:57 +000014879 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014881
14882rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014883 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014885ac_res=`eval echo '${'$as_ac_var'}'`
14886 { echo "$as_me:$LINENO: result: $ac_res" >&5
14887echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014888if test `eval echo '${'$as_ac_var'}'` = yes; then
14889 cat >>confdefs.h <<_ACEOF
14890#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14891_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014892 case $ac_sys_system in
14893 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014894
Jason Tishlerfac083d2003-07-22 15:20:49 +000014895cat >>confdefs.h <<\_ACEOF
14896#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14897_ACEOF
14898
14899 ;;
14900 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014901fi
14902done
14903
14904fi
14905
14906
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014907# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014908
14909
Martin v. Löwiseba40652007-08-30 20:10:57 +000014910{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14911echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14912# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014913if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014914 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014915 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014916 { echo "$as_me:$LINENO: result: no" >&5
14917echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014918 ipv6=no
14919 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014920 *) { echo "$as_me:$LINENO: result: yes" >&5
14921echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014922 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014923#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014924_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014925
14926 ipv6=yes
14927 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014928 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014929else
Martin v. Löwis11437992002-04-12 09:54:03 +000014930
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014931 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014932 { echo "$as_me:$LINENO: result: no" >&5
14933echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014934 ipv6=no
14935
14936else
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014938/* confdefs.h. */
14939_ACEOF
14940cat confdefs.h >>conftest.$ac_ext
14941cat >>conftest.$ac_ext <<_ACEOF
14942/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014943 /* AF_INET6 available check */
14944#include <sys/types.h>
14945#include <sys/socket.h>
14946main()
14947{
14948 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14949 exit(1);
14950 else
14951 exit(0);
14952}
14953
Martin v. Löwis11437992002-04-12 09:54:03 +000014954_ACEOF
14955rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014956if { (ac_try="$ac_link"
14957case "(($ac_try" in
14958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14959 *) ac_try_echo=$ac_try;;
14960esac
14961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14962 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014963 ac_status=$?
14964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14965 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014966 { (case "(($ac_try" in
14967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14968 *) ac_try_echo=$ac_try;;
14969esac
14970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14971 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 ac_status=$?
14973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14974 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014975 { echo "$as_me:$LINENO: result: yes" >&5
14976echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014977 ipv6=yes
14978else
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 echo "$as_me: program exited with status $ac_status" >&5
14980echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014981sed 's/^/| /' conftest.$ac_ext >&5
14982
Martin v. Löwis11437992002-04-12 09:54:03 +000014983( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014984{ echo "$as_me:$LINENO: result: no" >&5
14985echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014986 ipv6=no
14987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014988rm -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 +000014989fi
14990
Martin v. Löwiseba40652007-08-30 20:10:57 +000014991
14992
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014993if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014994 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14995echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014997/* confdefs.h. */
14998_ACEOF
14999cat confdefs.h >>conftest.$ac_ext
15000cat >>conftest.$ac_ext <<_ACEOF
15001/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015002#include <sys/types.h>
15003#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015004int
15005main ()
15006{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015007struct sockaddr_in6 x;
15008x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 ;
15010 return 0;
15011}
15012_ACEOF
15013rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015014if { (ac_try="$ac_compile"
15015case "(($ac_try" in
15016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15017 *) ac_try_echo=$ac_try;;
15018esac
15019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15020 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015022 grep -v '^ *+' conftest.er1 >conftest.err
15023 rm -f conftest.er1
15024 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015026 (exit $ac_status); } && {
15027 test -z "$ac_c_werror_flag" ||
15028 test ! -s conftest.err
15029 } && test -s conftest.$ac_objext; then
15030 { echo "$as_me:$LINENO: result: yes" >&5
15031echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015032 ipv6=yes
15033else
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015035sed 's/^/| /' conftest.$ac_ext >&5
15036
Martin v. Löwiseba40652007-08-30 20:10:57 +000015037 { echo "$as_me:$LINENO: result: no" >&5
15038echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015039 ipv6=no
15040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015041
15042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015043fi
15044
15045if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015047#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015048_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015049
15050fi
15051
Martin v. Löwiseba40652007-08-30 20:10:57 +000015052fi
15053
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015054
15055ipv6type=unknown
15056ipv6lib=none
15057ipv6trylibc=no
15058
15059if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015060 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15061echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015062 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15063 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015064 case $i in
15065 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015067/* confdefs.h. */
15068_ACEOF
15069cat confdefs.h >>conftest.$ac_ext
15070cat >>conftest.$ac_ext <<_ACEOF
15071/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015072
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015073#include <netinet/in.h>
15074#ifdef IPV6_INRIA_VERSION
15075yes
15076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015077_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015079 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015080 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015081fi
15082rm -f conftest*
15083
15084 ;;
15085 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015087/* confdefs.h. */
15088_ACEOF
15089cat confdefs.h >>conftest.$ac_ext
15090cat >>conftest.$ac_ext <<_ACEOF
15091/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015092
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015093#include <netinet/in.h>
15094#ifdef __KAME__
15095yes
15096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015097_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015099 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015100 ipv6type=$i;
15101 ipv6lib=inet6
15102 ipv6libdir=/usr/local/v6/lib
15103 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015104fi
15105rm -f conftest*
15106
15107 ;;
15108 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015110/* confdefs.h. */
15111_ACEOF
15112cat confdefs.h >>conftest.$ac_ext
15113cat >>conftest.$ac_ext <<_ACEOF
15114/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015115
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015116#include <features.h>
15117#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15118yes
15119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015120_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015121if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015122 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015123 ipv6type=$i;
15124 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015125fi
15126rm -f conftest*
15127
15128 ;;
15129 linux-inet6)
15130 if test -d /usr/inet6; then
15131 ipv6type=$i
15132 ipv6lib=inet6
15133 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015134 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015135 fi
15136 ;;
15137 solaris)
15138 if test -f /etc/netconfig; then
15139 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15140 ipv6type=$i
15141 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015142 fi
15143 fi
15144 ;;
15145 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015147/* confdefs.h. */
15148_ACEOF
15149cat confdefs.h >>conftest.$ac_ext
15150cat >>conftest.$ac_ext <<_ACEOF
15151/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015152
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015153#include <sys/param.h>
15154#ifdef _TOSHIBA_INET6
15155yes
15156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015157_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015159 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015160 ipv6type=$i;
15161 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015162 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015163fi
15164rm -f conftest*
15165
15166 ;;
15167 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015168 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015169/* confdefs.h. */
15170_ACEOF
15171cat confdefs.h >>conftest.$ac_ext
15172cat >>conftest.$ac_ext <<_ACEOF
15173/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015174
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015175#include </usr/local/v6/include/sys/v6config.h>
15176#ifdef __V6D__
15177yes
15178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015179_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015181 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015182 ipv6type=$i;
15183 ipv6lib=v6;
15184 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015185 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015186fi
15187rm -f conftest*
15188
15189 ;;
15190 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015192/* confdefs.h. */
15193_ACEOF
15194cat confdefs.h >>conftest.$ac_ext
15195cat >>conftest.$ac_ext <<_ACEOF
15196/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015197
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015198#include <sys/param.h>
15199#ifdef _ZETA_MINAMI_INET6
15200yes
15201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015202_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015203if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015204 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015205 ipv6type=$i;
15206 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015207 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015208fi
15209rm -f conftest*
15210
15211 ;;
15212 esac
15213 if test "$ipv6type" != "unknown"; then
15214 break
15215 fi
15216 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015217 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15218echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015219fi
15220
15221if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15222 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15223 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15224 echo "using lib$ipv6lib"
15225 else
15226 if test $ipv6trylibc = "yes"; then
15227 echo "using libc"
15228 else
15229 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15230 echo "You need to fetch lib$ipv6lib.a from appropriate"
15231 echo 'ipv6 kit and compile beforehand.'
15232 exit 1
15233 fi
15234 fi
15235fi
15236
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015237# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015238{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15239echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015240
Martin v. Löwiseba40652007-08-30 20:10:57 +000015241# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015242if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015243 withval=$with_doc_strings;
15244fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015245
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015246
15247if test -z "$with_doc_strings"
15248then with_doc_strings="yes"
15249fi
15250if test "$with_doc_strings" != "no"
15251then
15252
15253cat >>confdefs.h <<\_ACEOF
15254#define WITH_DOC_STRINGS 1
15255_ACEOF
15256
15257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015258{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15259echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015260
Neil Schemenauera35c6882001-02-27 04:45:05 +000015261# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015262{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15263echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015264
Martin v. Löwiseba40652007-08-30 20:10:57 +000015265# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015266if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015267 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015268if test "$withval" != no
15269then
15270
15271cat >>confdefs.h <<\_ACEOF
15272#define WITH_TSC 1
15273_ACEOF
15274
Martin v. Löwiseba40652007-08-30 20:10:57 +000015275 { echo "$as_me:$LINENO: result: yes" >&5
15276echo "${ECHO_T}yes" >&6; }
15277else { echo "$as_me:$LINENO: result: no" >&5
15278echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015279fi
15280else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015281 { echo "$as_me:$LINENO: result: no" >&5
15282echo "${ECHO_T}no" >&6; }
15283fi
15284
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015285
15286# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015287{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15288echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015289
Martin v. Löwiseba40652007-08-30 20:10:57 +000015290# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015291if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015292 withval=$with_pymalloc;
15293fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015294
Neil Schemenauera35c6882001-02-27 04:45:05 +000015295
Neil Schemenauer16c22972002-03-22 15:34:49 +000015296if test -z "$with_pymalloc"
15297then with_pymalloc="yes"
15298fi
15299if test "$with_pymalloc" != "no"
15300then
Martin v. Löwis11437992002-04-12 09:54:03 +000015301
15302cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015303#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015304_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015305
15306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015307{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15308echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015309
Barry Warsawef82cd72000-06-30 16:21:01 +000015310# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015311{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15312echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015313
Martin v. Löwiseba40652007-08-30 20:10:57 +000015314# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015315if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015316 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015317if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015318then
15319
15320cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015321#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015322_ACEOF
15323
Martin v. Löwiseba40652007-08-30 20:10:57 +000015324 { echo "$as_me:$LINENO: result: yes" >&5
15325echo "${ECHO_T}yes" >&6; }
15326else { echo "$as_me:$LINENO: result: no" >&5
15327echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015328fi
15329else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015330 { echo "$as_me:$LINENO: result: no" >&5
15331echo "${ECHO_T}no" >&6; }
15332fi
15333
Barry Warsawef82cd72000-06-30 16:21:01 +000015334
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015335# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015336
Guido van Rossum98935bf2001-09-05 19:13:16 +000015337DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015338
Guido van Rossume97ee181999-12-20 21:27:22 +000015339# the dlopen() function means we might want to use dynload_shlib.o. some
15340# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015341
Thomas Wouters3a584202000-08-05 23:28:51 +000015342for ac_func in dlopen
15343do
Martin v. Löwis11437992002-04-12 09:54:03 +000015344as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015345{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15346echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15347if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015348 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015349else
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015351/* confdefs.h. */
15352_ACEOF
15353cat confdefs.h >>conftest.$ac_ext
15354cat >>conftest.$ac_ext <<_ACEOF
15355/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015356/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15357 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15358#define $ac_func innocuous_$ac_func
15359
Guido van Rossume97ee181999-12-20 21:27:22 +000015360/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015361 which can conflict with char $ac_func (); below.
15362 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015363 <limits.h> exists even on freestanding compilers. */
15364
15365#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015366# include <limits.h>
15367#else
15368# include <assert.h>
15369#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015370
15371#undef $ac_func
15372
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373/* Override any GCC internal prototype to avoid an error.
15374 Use char because int might match the return type of a GCC
15375 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015376#ifdef __cplusplus
15377extern "C"
15378#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015379char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015380/* The GNU C library defines this for functions which it implements
15381 to always fail with ENOSYS. Some functions are actually named
15382 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015383#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015384choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015385#endif
15386
Skip Montanaro6dead952003-09-25 14:50:04 +000015387int
15388main ()
15389{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015390return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 ;
15392 return 0;
15393}
15394_ACEOF
15395rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015396if { (ac_try="$ac_link"
15397case "(($ac_try" in
15398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15399 *) ac_try_echo=$ac_try;;
15400esac
15401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15402 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015404 grep -v '^ *+' conftest.er1 >conftest.err
15405 rm -f conftest.er1
15406 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015408 (exit $ac_status); } && {
15409 test -z "$ac_c_werror_flag" ||
15410 test ! -s conftest.err
15411 } && test -s conftest$ac_exeext &&
15412 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015413 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015414else
Martin v. Löwis11437992002-04-12 09:54:03 +000015415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015416sed 's/^/| /' conftest.$ac_ext >&5
15417
Martin v. Löwiseba40652007-08-30 20:10:57 +000015418 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015420
15421rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015422 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015424ac_res=`eval echo '${'$as_ac_var'}'`
15425 { echo "$as_me:$LINENO: result: $ac_res" >&5
15426echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015427if test `eval echo '${'$as_ac_var'}'` = yes; then
15428 cat >>confdefs.h <<_ACEOF
15429#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15430_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015431
Guido van Rossume97ee181999-12-20 21:27:22 +000015432fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015433done
Guido van Rossume97ee181999-12-20 21:27:22 +000015434
Michael W. Hudson54241132001-12-07 15:38:26 +000015435
Guido van Rossume97ee181999-12-20 21:27:22 +000015436# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15437# loading of modules.
15438
Martin v. Löwiseba40652007-08-30 20:10:57 +000015439{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15440echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015441if test -z "$DYNLOADFILE"
15442then
15443 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015444 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15445 if test "$ac_cv_func_dlopen" = yes
15446 then DYNLOADFILE="dynload_shlib.o"
15447 else DYNLOADFILE="dynload_aix.o"
15448 fi
15449 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015450 BeOS*) DYNLOADFILE="dynload_beos.o";;
15451 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015452 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15453 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015454 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015455 *)
15456 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15457 # out any dynamic loading
15458 if test "$ac_cv_func_dlopen" = yes
15459 then DYNLOADFILE="dynload_shlib.o"
15460 else DYNLOADFILE="dynload_stub.o"
15461 fi
15462 ;;
15463 esac
15464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015465{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15466echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015467if test "$DYNLOADFILE" != "dynload_stub.o"
15468then
Martin v. Löwis11437992002-04-12 09:54:03 +000015469
15470cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015471#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015472_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015473
15474fi
15475
Neil Schemenauer4e425612001-06-19 15:44:15 +000015476# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15477
Michael W. Hudson54241132001-12-07 15:38:26 +000015478
Martin v. Löwiseba40652007-08-30 20:10:57 +000015479{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15480echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015481if test -z "$MACHDEP_OBJS"
15482then
Jack Jansene578a632001-08-15 01:27:14 +000015483 MACHDEP_OBJS=$extra_machdep_objs
15484else
15485 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15488echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015489
Guido van Rossum627b2d71993-12-24 10:39:16 +000015490# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
Martin v. Löwisd6320502004-08-12 13:45:08 +000015562
Martin v. Löwisc3001752005-01-23 09:27:24 +000015563
15564
Neal Norwitz05a45592006-03-20 06:30:08 +000015565
15566
Martin v. Löwis382abef2007-02-19 10:55:19 +000015567
15568
Christian Heimes36281872007-11-30 21:11:28 +000015569
Martin v. Löwisaef18b12008-03-24 13:31:16 +000015570
15571
15572for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
15573 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015574 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015575 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015576 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015577 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015578 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015579 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015580 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015581 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015582 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015583 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015584do
Martin v. Löwis11437992002-04-12 09:54:03 +000015585as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015586{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15587echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15588if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015590else
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015592/* confdefs.h. */
15593_ACEOF
15594cat confdefs.h >>conftest.$ac_ext
15595cat >>conftest.$ac_ext <<_ACEOF
15596/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015597/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15598 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15599#define $ac_func innocuous_$ac_func
15600
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015601/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015602 which can conflict with char $ac_func (); below.
15603 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015604 <limits.h> exists even on freestanding compilers. */
15605
15606#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015607# include <limits.h>
15608#else
15609# include <assert.h>
15610#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015611
15612#undef $ac_func
15613
Martin v. Löwiseba40652007-08-30 20:10:57 +000015614/* Override any GCC internal prototype to avoid an error.
15615 Use char because int might match the return type of a GCC
15616 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015617#ifdef __cplusplus
15618extern "C"
15619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015620char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015621/* The GNU C library defines this for functions which it implements
15622 to always fail with ENOSYS. Some functions are actually named
15623 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015624#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015625choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015626#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015627
Skip Montanaro6dead952003-09-25 14:50:04 +000015628int
15629main ()
15630{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015631return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015632 ;
15633 return 0;
15634}
15635_ACEOF
15636rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015637if { (ac_try="$ac_link"
15638case "(($ac_try" in
15639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15640 *) ac_try_echo=$ac_try;;
15641esac
15642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15643 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015645 grep -v '^ *+' conftest.er1 >conftest.err
15646 rm -f conftest.er1
15647 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015649 (exit $ac_status); } && {
15650 test -z "$ac_c_werror_flag" ||
15651 test ! -s conftest.err
15652 } && test -s conftest$ac_exeext &&
15653 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015654 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015655else
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015657sed 's/^/| /' conftest.$ac_ext >&5
15658
Martin v. Löwiseba40652007-08-30 20:10:57 +000015659 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015661
15662rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015663 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015665ac_res=`eval echo '${'$as_ac_var'}'`
15666 { echo "$as_me:$LINENO: result: $ac_res" >&5
15667echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015668if test `eval echo '${'$as_ac_var'}'` = yes; then
15669 cat >>confdefs.h <<_ACEOF
15670#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15671_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015672
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015673fi
15674done
15675
Michael W. Hudson54241132001-12-07 15:38:26 +000015676
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015677# For some functions, having a definition is not sufficient, since
15678# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015679{ echo "$as_me:$LINENO: checking for chroot" >&5
15680echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015682/* confdefs.h. */
15683_ACEOF
15684cat confdefs.h >>conftest.$ac_ext
15685cat >>conftest.$ac_ext <<_ACEOF
15686/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015687#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015688int
15689main ()
15690{
15691void *x=chroot
15692 ;
15693 return 0;
15694}
15695_ACEOF
15696rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015697if { (ac_try="$ac_compile"
15698case "(($ac_try" in
15699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15700 *) ac_try_echo=$ac_try;;
15701esac
15702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015705 grep -v '^ *+' conftest.er1 >conftest.err
15706 rm -f conftest.er1
15707 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015709 (exit $ac_status); } && {
15710 test -z "$ac_c_werror_flag" ||
15711 test ! -s conftest.err
15712 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015713
15714cat >>confdefs.h <<\_ACEOF
15715#define HAVE_CHROOT 1
15716_ACEOF
15717
Martin v. Löwiseba40652007-08-30 20:10:57 +000015718 { echo "$as_me:$LINENO: result: yes" >&5
15719echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015720else
15721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015722sed 's/^/| /' conftest.$ac_ext >&5
15723
Martin v. Löwiseba40652007-08-30 20:10:57 +000015724 { echo "$as_me:$LINENO: result: no" >&5
15725echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015726
15727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015728
15729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15730{ echo "$as_me:$LINENO: checking for link" >&5
15731echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015732cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015733/* confdefs.h. */
15734_ACEOF
15735cat confdefs.h >>conftest.$ac_ext
15736cat >>conftest.$ac_ext <<_ACEOF
15737/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015738#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015739int
15740main ()
15741{
15742void *x=link
15743 ;
15744 return 0;
15745}
15746_ACEOF
15747rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015748if { (ac_try="$ac_compile"
15749case "(($ac_try" in
15750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15751 *) ac_try_echo=$ac_try;;
15752esac
15753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15754 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015756 grep -v '^ *+' conftest.er1 >conftest.err
15757 rm -f conftest.er1
15758 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015760 (exit $ac_status); } && {
15761 test -z "$ac_c_werror_flag" ||
15762 test ! -s conftest.err
15763 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015764
15765cat >>confdefs.h <<\_ACEOF
15766#define HAVE_LINK 1
15767_ACEOF
15768
Martin v. Löwiseba40652007-08-30 20:10:57 +000015769 { echo "$as_me:$LINENO: result: yes" >&5
15770echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015771else
15772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015773sed 's/^/| /' conftest.$ac_ext >&5
15774
Martin v. Löwiseba40652007-08-30 20:10:57 +000015775 { echo "$as_me:$LINENO: result: no" >&5
15776echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015777
15778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015779
15780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15781{ echo "$as_me:$LINENO: checking for symlink" >&5
15782echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015783cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015784/* confdefs.h. */
15785_ACEOF
15786cat confdefs.h >>conftest.$ac_ext
15787cat >>conftest.$ac_ext <<_ACEOF
15788/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015789#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015790int
15791main ()
15792{
15793void *x=symlink
15794 ;
15795 return 0;
15796}
15797_ACEOF
15798rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015799if { (ac_try="$ac_compile"
15800case "(($ac_try" in
15801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15802 *) ac_try_echo=$ac_try;;
15803esac
15804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015807 grep -v '^ *+' conftest.er1 >conftest.err
15808 rm -f conftest.er1
15809 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015811 (exit $ac_status); } && {
15812 test -z "$ac_c_werror_flag" ||
15813 test ! -s conftest.err
15814 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015815
15816cat >>confdefs.h <<\_ACEOF
15817#define HAVE_SYMLINK 1
15818_ACEOF
15819
Martin v. Löwiseba40652007-08-30 20:10:57 +000015820 { echo "$as_me:$LINENO: result: yes" >&5
15821echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015822else
15823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015824sed 's/^/| /' conftest.$ac_ext >&5
15825
Martin v. Löwiseba40652007-08-30 20:10:57 +000015826 { echo "$as_me:$LINENO: result: no" >&5
15827echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015828
15829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015830
15831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15832{ echo "$as_me:$LINENO: checking for fchdir" >&5
15833echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015834cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015835/* confdefs.h. */
15836_ACEOF
15837cat confdefs.h >>conftest.$ac_ext
15838cat >>conftest.$ac_ext <<_ACEOF
15839/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015840#include <unistd.h>
15841int
15842main ()
15843{
15844void *x=fchdir
15845 ;
15846 return 0;
15847}
15848_ACEOF
15849rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850if { (ac_try="$ac_compile"
15851case "(($ac_try" in
15852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15853 *) ac_try_echo=$ac_try;;
15854esac
15855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015858 grep -v '^ *+' conftest.er1 >conftest.err
15859 rm -f conftest.er1
15860 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015862 (exit $ac_status); } && {
15863 test -z "$ac_c_werror_flag" ||
15864 test ! -s conftest.err
15865 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015866
15867cat >>confdefs.h <<\_ACEOF
15868#define HAVE_FCHDIR 1
15869_ACEOF
15870
Martin v. Löwiseba40652007-08-30 20:10:57 +000015871 { echo "$as_me:$LINENO: result: yes" >&5
15872echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015873else
15874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015875sed 's/^/| /' conftest.$ac_ext >&5
15876
Martin v. Löwiseba40652007-08-30 20:10:57 +000015877 { echo "$as_me:$LINENO: result: no" >&5
15878echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015879
15880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015881
15882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15883{ echo "$as_me:$LINENO: checking for fsync" >&5
15884echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015885cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015886/* confdefs.h. */
15887_ACEOF
15888cat confdefs.h >>conftest.$ac_ext
15889cat >>conftest.$ac_ext <<_ACEOF
15890/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015891#include <unistd.h>
15892int
15893main ()
15894{
15895void *x=fsync
15896 ;
15897 return 0;
15898}
15899_ACEOF
15900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901if { (ac_try="$ac_compile"
15902case "(($ac_try" in
15903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15904 *) ac_try_echo=$ac_try;;
15905esac
15906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015909 grep -v '^ *+' conftest.er1 >conftest.err
15910 rm -f conftest.er1
15911 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015913 (exit $ac_status); } && {
15914 test -z "$ac_c_werror_flag" ||
15915 test ! -s conftest.err
15916 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015917
15918cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015919#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015920_ACEOF
15921
Martin v. Löwiseba40652007-08-30 20:10:57 +000015922 { echo "$as_me:$LINENO: result: yes" >&5
15923echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015924else
15925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015926sed 's/^/| /' conftest.$ac_ext >&5
15927
Martin v. Löwiseba40652007-08-30 20:10:57 +000015928 { echo "$as_me:$LINENO: result: no" >&5
15929echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015930
15931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015932
15933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15934{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15935echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015936cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015937/* confdefs.h. */
15938_ACEOF
15939cat confdefs.h >>conftest.$ac_ext
15940cat >>conftest.$ac_ext <<_ACEOF
15941/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015942#include <unistd.h>
15943int
15944main ()
15945{
15946void *x=fdatasync
15947 ;
15948 return 0;
15949}
15950_ACEOF
15951rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015952if { (ac_try="$ac_compile"
15953case "(($ac_try" in
15954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15955 *) ac_try_echo=$ac_try;;
15956esac
15957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015960 grep -v '^ *+' conftest.er1 >conftest.err
15961 rm -f conftest.er1
15962 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015964 (exit $ac_status); } && {
15965 test -z "$ac_c_werror_flag" ||
15966 test ! -s conftest.err
15967 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015968
15969cat >>confdefs.h <<\_ACEOF
15970#define HAVE_FDATASYNC 1
15971_ACEOF
15972
Martin v. Löwiseba40652007-08-30 20:10:57 +000015973 { echo "$as_me:$LINENO: result: yes" >&5
15974echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015975else
15976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015977sed 's/^/| /' conftest.$ac_ext >&5
15978
Martin v. Löwiseba40652007-08-30 20:10:57 +000015979 { echo "$as_me:$LINENO: result: no" >&5
15980echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015981
15982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015983
15984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015985{ echo "$as_me:$LINENO: checking for epoll" >&5
15986echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
15987cat >conftest.$ac_ext <<_ACEOF
15988/* confdefs.h. */
15989_ACEOF
15990cat confdefs.h >>conftest.$ac_ext
15991cat >>conftest.$ac_ext <<_ACEOF
15992/* end confdefs.h. */
15993#include <sys/epoll.h>
15994int
15995main ()
15996{
15997void *x=epoll_create
15998 ;
15999 return 0;
16000}
16001_ACEOF
16002rm -f conftest.$ac_objext
16003if { (ac_try="$ac_compile"
16004case "(($ac_try" in
16005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16006 *) ac_try_echo=$ac_try;;
16007esac
16008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16009 (eval "$ac_compile") 2>conftest.er1
16010 ac_status=$?
16011 grep -v '^ *+' conftest.er1 >conftest.err
16012 rm -f conftest.er1
16013 cat conftest.err >&5
16014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16015 (exit $ac_status); } && {
16016 test -z "$ac_c_werror_flag" ||
16017 test ! -s conftest.err
16018 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016019
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016020cat >>confdefs.h <<\_ACEOF
16021#define HAVE_EPOLL 1
16022_ACEOF
16023
16024 { echo "$as_me:$LINENO: result: yes" >&5
16025echo "${ECHO_T}yes" >&6; }
16026else
16027 echo "$as_me: failed program was:" >&5
16028sed 's/^/| /' conftest.$ac_ext >&5
16029
16030 { echo "$as_me:$LINENO: result: no" >&5
16031echo "${ECHO_T}no" >&6; }
16032
16033fi
16034
16035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16036{ echo "$as_me:$LINENO: checking for kqueue" >&5
16037echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16038cat >conftest.$ac_ext <<_ACEOF
16039/* confdefs.h. */
16040_ACEOF
16041cat confdefs.h >>conftest.$ac_ext
16042cat >>conftest.$ac_ext <<_ACEOF
16043/* end confdefs.h. */
16044
16045#include <sys/types.h>
16046#include <sys/event.h>
16047
16048int
16049main ()
16050{
16051int x=kqueue()
16052 ;
16053 return 0;
16054}
16055_ACEOF
16056rm -f conftest.$ac_objext
16057if { (ac_try="$ac_compile"
16058case "(($ac_try" in
16059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16060 *) ac_try_echo=$ac_try;;
16061esac
16062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16063 (eval "$ac_compile") 2>conftest.er1
16064 ac_status=$?
16065 grep -v '^ *+' conftest.er1 >conftest.err
16066 rm -f conftest.er1
16067 cat conftest.err >&5
16068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16069 (exit $ac_status); } && {
16070 test -z "$ac_c_werror_flag" ||
16071 test ! -s conftest.err
16072 } && test -s conftest.$ac_objext; then
16073
16074cat >>confdefs.h <<\_ACEOF
16075#define HAVE_KQUEUE 1
16076_ACEOF
16077
16078 { echo "$as_me:$LINENO: result: yes" >&5
16079echo "${ECHO_T}yes" >&6; }
16080else
16081 echo "$as_me: failed program was:" >&5
16082sed 's/^/| /' conftest.$ac_ext >&5
16083
16084 { echo "$as_me:$LINENO: result: no" >&5
16085echo "${ECHO_T}no" >&6; }
16086
16087fi
16088
16089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016090# On some systems (eg. FreeBSD 5), we would find a definition of the
16091# functions ctermid_r, setgroups in the library, but no prototype
16092# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16093# address to avoid compiler warnings and potential miscompilations
16094# because of the missing prototypes.
16095
Martin v. Löwiseba40652007-08-30 20:10:57 +000016096{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16097echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016099/* confdefs.h. */
16100_ACEOF
16101cat confdefs.h >>conftest.$ac_ext
16102cat >>conftest.$ac_ext <<_ACEOF
16103/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016104
16105#include "confdefs.h"
16106#include <stdio.h>
16107
Martin v. Löwisd5843682002-11-21 20:41:28 +000016108int
16109main ()
16110{
16111void* p = ctermid_r
16112 ;
16113 return 0;
16114}
16115_ACEOF
16116rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016117if { (ac_try="$ac_compile"
16118case "(($ac_try" in
16119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16120 *) ac_try_echo=$ac_try;;
16121esac
16122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016125 grep -v '^ *+' conftest.er1 >conftest.err
16126 rm -f conftest.er1
16127 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016129 (exit $ac_status); } && {
16130 test -z "$ac_c_werror_flag" ||
16131 test ! -s conftest.err
16132 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016133
16134cat >>confdefs.h <<\_ACEOF
16135#define HAVE_CTERMID_R 1
16136_ACEOF
16137
Martin v. Löwiseba40652007-08-30 20:10:57 +000016138 { echo "$as_me:$LINENO: result: yes" >&5
16139echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016140else
16141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016142sed 's/^/| /' conftest.$ac_ext >&5
16143
Martin v. Löwiseba40652007-08-30 20:10:57 +000016144 { echo "$as_me:$LINENO: result: no" >&5
16145echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016146
16147fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016148
Martin v. Löwiseba40652007-08-30 20:10:57 +000016149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16150
16151{ echo "$as_me:$LINENO: checking for flock" >&5
16152echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016153cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016154/* confdefs.h. */
16155_ACEOF
16156cat confdefs.h >>conftest.$ac_ext
16157cat >>conftest.$ac_ext <<_ACEOF
16158/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016159
16160#include "confdefs.h"
16161#include <sys/file.h>
16162
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016163int
16164main ()
16165{
16166void* p = flock
16167 ;
16168 return 0;
16169}
16170_ACEOF
16171rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016172if { (ac_try="$ac_compile"
16173case "(($ac_try" in
16174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16175 *) ac_try_echo=$ac_try;;
16176esac
16177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016180 grep -v '^ *+' conftest.er1 >conftest.err
16181 rm -f conftest.er1
16182 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016184 (exit $ac_status); } && {
16185 test -z "$ac_c_werror_flag" ||
16186 test ! -s conftest.err
16187 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016188
16189cat >>confdefs.h <<\_ACEOF
16190#define HAVE_FLOCK 1
16191_ACEOF
16192
Martin v. Löwiseba40652007-08-30 20:10:57 +000016193 { echo "$as_me:$LINENO: result: yes" >&5
16194echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016195else
16196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016197sed 's/^/| /' conftest.$ac_ext >&5
16198
Martin v. Löwiseba40652007-08-30 20:10:57 +000016199 { echo "$as_me:$LINENO: result: no" >&5
16200echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016201
16202fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016203
Martin v. Löwiseba40652007-08-30 20:10:57 +000016204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16205
16206{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16207echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016209/* confdefs.h. */
16210_ACEOF
16211cat confdefs.h >>conftest.$ac_ext
16212cat >>conftest.$ac_ext <<_ACEOF
16213/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016214
16215#include "confdefs.h"
16216#include <unistd.h>
16217
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016218int
16219main ()
16220{
16221void* p = getpagesize
16222 ;
16223 return 0;
16224}
16225_ACEOF
16226rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016227if { (ac_try="$ac_compile"
16228case "(($ac_try" in
16229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16230 *) ac_try_echo=$ac_try;;
16231esac
16232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016235 grep -v '^ *+' conftest.er1 >conftest.err
16236 rm -f conftest.er1
16237 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239 (exit $ac_status); } && {
16240 test -z "$ac_c_werror_flag" ||
16241 test ! -s conftest.err
16242 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016243
16244cat >>confdefs.h <<\_ACEOF
16245#define HAVE_GETPAGESIZE 1
16246_ACEOF
16247
Martin v. Löwiseba40652007-08-30 20:10:57 +000016248 { echo "$as_me:$LINENO: result: yes" >&5
16249echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016250else
16251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016252sed 's/^/| /' conftest.$ac_ext >&5
16253
Martin v. Löwiseba40652007-08-30 20:10:57 +000016254 { echo "$as_me:$LINENO: result: no" >&5
16255echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016256
16257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016258
16259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016260
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016261for ac_prog in true
16262do
16263 # Extract the first word of "$ac_prog", so it can be a program name with args.
16264set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016265{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16266echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016267if test "${ac_cv_prog_TRUE+set}" = set; then
16268 echo $ECHO_N "(cached) $ECHO_C" >&6
16269else
16270 if test -n "$TRUE"; then
16271 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16272else
16273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16274for as_dir in $PATH
16275do
16276 IFS=$as_save_IFS
16277 test -z "$as_dir" && as_dir=.
16278 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016279 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 +000016280 ac_cv_prog_TRUE="$ac_prog"
16281 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16282 break 2
16283 fi
16284done
16285done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016286IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016287
16288fi
16289fi
16290TRUE=$ac_cv_prog_TRUE
16291if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016292 { echo "$as_me:$LINENO: result: $TRUE" >&5
16293echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016294else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016295 { echo "$as_me:$LINENO: result: no" >&5
16296echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016297fi
16298
Martin v. Löwiseba40652007-08-30 20:10:57 +000016299
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016300 test -n "$TRUE" && break
16301done
16302test -n "$TRUE" || TRUE="/bin/true"
16303
16304
Martin v. Löwiseba40652007-08-30 20:10:57 +000016305{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16306echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016307if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16308 echo $ECHO_N "(cached) $ECHO_C" >&6
16309else
16310 ac_check_lib_save_LIBS=$LIBS
16311LIBS="-lc $LIBS"
16312cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016313/* confdefs.h. */
16314_ACEOF
16315cat confdefs.h >>conftest.$ac_ext
16316cat >>conftest.$ac_ext <<_ACEOF
16317/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016318
Martin v. Löwiseba40652007-08-30 20:10:57 +000016319/* Override any GCC internal prototype to avoid an error.
16320 Use char because int might match the return type of a GCC
16321 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016322#ifdef __cplusplus
16323extern "C"
16324#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016325char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016326int
16327main ()
16328{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016329return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016330 ;
16331 return 0;
16332}
16333_ACEOF
16334rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016335if { (ac_try="$ac_link"
16336case "(($ac_try" in
16337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16338 *) ac_try_echo=$ac_try;;
16339esac
16340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16341 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016343 grep -v '^ *+' conftest.er1 >conftest.err
16344 rm -f conftest.er1
16345 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016347 (exit $ac_status); } && {
16348 test -z "$ac_c_werror_flag" ||
16349 test ! -s conftest.err
16350 } && test -s conftest$ac_exeext &&
16351 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016352 ac_cv_lib_c_inet_aton=yes
16353else
16354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016355sed 's/^/| /' conftest.$ac_ext >&5
16356
Martin v. Löwiseba40652007-08-30 20:10:57 +000016357 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016359
16360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016361 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016362LIBS=$ac_check_lib_save_LIBS
16363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16365echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016366if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016367 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016368else
16369
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16371echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016372if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16373 echo $ECHO_N "(cached) $ECHO_C" >&6
16374else
16375 ac_check_lib_save_LIBS=$LIBS
16376LIBS="-lresolv $LIBS"
16377cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016378/* confdefs.h. */
16379_ACEOF
16380cat confdefs.h >>conftest.$ac_ext
16381cat >>conftest.$ac_ext <<_ACEOF
16382/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016383
Martin v. Löwiseba40652007-08-30 20:10:57 +000016384/* Override any GCC internal prototype to avoid an error.
16385 Use char because int might match the return type of a GCC
16386 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016387#ifdef __cplusplus
16388extern "C"
16389#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016390char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016391int
16392main ()
16393{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016394return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016395 ;
16396 return 0;
16397}
16398_ACEOF
16399rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016400if { (ac_try="$ac_link"
16401case "(($ac_try" in
16402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16403 *) ac_try_echo=$ac_try;;
16404esac
16405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16406 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016408 grep -v '^ *+' conftest.er1 >conftest.err
16409 rm -f conftest.er1
16410 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016412 (exit $ac_status); } && {
16413 test -z "$ac_c_werror_flag" ||
16414 test ! -s conftest.err
16415 } && test -s conftest$ac_exeext &&
16416 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016417 ac_cv_lib_resolv_inet_aton=yes
16418else
16419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016420sed 's/^/| /' conftest.$ac_ext >&5
16421
Martin v. Löwiseba40652007-08-30 20:10:57 +000016422 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016424
16425rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016427LIBS=$ac_check_lib_save_LIBS
16428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016429{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16430echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016431if test $ac_cv_lib_resolv_inet_aton = yes; then
16432 cat >>confdefs.h <<_ACEOF
16433#define HAVE_LIBRESOLV 1
16434_ACEOF
16435
16436 LIBS="-lresolv $LIBS"
16437
16438fi
16439
16440
16441fi
16442
16443
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016444# On Tru64, chflags seems to be present, but calling it will
16445# exit Python
16446{ echo "$as_me:$LINENO: checking for chflags" >&5
16447echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16448if test "$cross_compiling" = yes; then
16449 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16450See \`config.log' for more details." >&5
16451echo "$as_me: error: cannot run test program while cross compiling
16452See \`config.log' for more details." >&2;}
16453 { (exit 1); exit 1; }; }
16454else
16455 cat >conftest.$ac_ext <<_ACEOF
16456/* confdefs.h. */
16457_ACEOF
16458cat confdefs.h >>conftest.$ac_ext
16459cat >>conftest.$ac_ext <<_ACEOF
16460/* end confdefs.h. */
16461
16462#include <sys/stat.h>
16463#include <unistd.h>
16464int main(int argc, char*argv[])
16465{
16466 if(chflags(argv[0], 0) != 0)
16467 return 1;
16468 return 0;
16469}
16470
16471_ACEOF
16472rm -f conftest$ac_exeext
16473if { (ac_try="$ac_link"
16474case "(($ac_try" in
16475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16476 *) ac_try_echo=$ac_try;;
16477esac
16478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16479 (eval "$ac_link") 2>&5
16480 ac_status=$?
16481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16482 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16483 { (case "(($ac_try" in
16484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16485 *) ac_try_echo=$ac_try;;
16486esac
16487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16488 (eval "$ac_try") 2>&5
16489 ac_status=$?
16490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16491 (exit $ac_status); }; }; then
16492
16493cat >>confdefs.h <<\_ACEOF
16494#define HAVE_CHFLAGS 1
16495_ACEOF
16496
16497 { echo "$as_me:$LINENO: result: yes" >&5
16498echo "${ECHO_T}yes" >&6; }
16499else
16500 echo "$as_me: program exited with status $ac_status" >&5
16501echo "$as_me: failed program was:" >&5
16502sed 's/^/| /' conftest.$ac_ext >&5
16503
16504( exit $ac_status )
16505{ echo "$as_me:$LINENO: result: no" >&5
16506echo "${ECHO_T}no" >&6; }
16507
16508fi
16509rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16510fi
16511
16512
16513
16514{ echo "$as_me:$LINENO: checking for lchflags" >&5
16515echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16516if test "$cross_compiling" = yes; then
16517 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16518See \`config.log' for more details." >&5
16519echo "$as_me: error: cannot run test program while cross compiling
16520See \`config.log' for more details." >&2;}
16521 { (exit 1); exit 1; }; }
16522else
16523 cat >conftest.$ac_ext <<_ACEOF
16524/* confdefs.h. */
16525_ACEOF
16526cat confdefs.h >>conftest.$ac_ext
16527cat >>conftest.$ac_ext <<_ACEOF
16528/* end confdefs.h. */
16529
16530#include <sys/stat.h>
16531#include <unistd.h>
16532int main(int argc, char*argv[])
16533{
16534 if(lchflags(argv[0], 0) != 0)
16535 return 1;
16536 return 0;
16537}
16538
16539_ACEOF
16540rm -f conftest$ac_exeext
16541if { (ac_try="$ac_link"
16542case "(($ac_try" in
16543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16544 *) ac_try_echo=$ac_try;;
16545esac
16546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16547 (eval "$ac_link") 2>&5
16548 ac_status=$?
16549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16550 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16551 { (case "(($ac_try" in
16552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16553 *) ac_try_echo=$ac_try;;
16554esac
16555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16556 (eval "$ac_try") 2>&5
16557 ac_status=$?
16558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16559 (exit $ac_status); }; }; then
16560
16561cat >>confdefs.h <<\_ACEOF
16562#define HAVE_LCHFLAGS 1
16563_ACEOF
16564
16565 { echo "$as_me:$LINENO: result: yes" >&5
16566echo "${ECHO_T}yes" >&6; }
16567else
16568 echo "$as_me: program exited with status $ac_status" >&5
16569echo "$as_me: failed program was:" >&5
16570sed 's/^/| /' conftest.$ac_ext >&5
16571
16572( exit $ac_status )
16573{ echo "$as_me:$LINENO: result: no" >&5
16574echo "${ECHO_T}no" >&6; }
16575
16576fi
16577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16578fi
16579
16580
16581
Ronald Oussorenf8752642006-07-06 10:13:35 +000016582case $ac_sys_system/$ac_sys_release in
16583Darwin/*)
16584 _CUR_CFLAGS="${CFLAGS}"
16585 _CUR_LDFLAGS="${LDFLAGS}"
16586 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16587 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16588 ;;
16589esac
16590
Martin v. Löwiseba40652007-08-30 20:10:57 +000016591{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16592echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016593if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16594 echo $ECHO_N "(cached) $ECHO_C" >&6
16595else
16596 ac_check_lib_save_LIBS=$LIBS
16597LIBS="-lz $LIBS"
16598cat >conftest.$ac_ext <<_ACEOF
16599/* confdefs.h. */
16600_ACEOF
16601cat confdefs.h >>conftest.$ac_ext
16602cat >>conftest.$ac_ext <<_ACEOF
16603/* end confdefs.h. */
16604
Martin v. Löwiseba40652007-08-30 20:10:57 +000016605/* Override any GCC internal prototype to avoid an error.
16606 Use char because int might match the return type of a GCC
16607 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016608#ifdef __cplusplus
16609extern "C"
16610#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016611char inflateCopy ();
16612int
16613main ()
16614{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016615return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016616 ;
16617 return 0;
16618}
16619_ACEOF
16620rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016621if { (ac_try="$ac_link"
16622case "(($ac_try" in
16623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16624 *) ac_try_echo=$ac_try;;
16625esac
16626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16627 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016628 ac_status=$?
16629 grep -v '^ *+' conftest.er1 >conftest.err
16630 rm -f conftest.er1
16631 cat conftest.err >&5
16632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016633 (exit $ac_status); } && {
16634 test -z "$ac_c_werror_flag" ||
16635 test ! -s conftest.err
16636 } && test -s conftest$ac_exeext &&
16637 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016638 ac_cv_lib_z_inflateCopy=yes
16639else
16640 echo "$as_me: failed program was:" >&5
16641sed 's/^/| /' conftest.$ac_ext >&5
16642
Martin v. Löwiseba40652007-08-30 20:10:57 +000016643 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016645
16646rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016647 conftest$ac_exeext conftest.$ac_ext
16648LIBS=$ac_check_lib_save_LIBS
16649fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016650{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16651echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016652if test $ac_cv_lib_z_inflateCopy = yes; then
16653
16654cat >>confdefs.h <<\_ACEOF
16655#define HAVE_ZLIB_COPY 1
16656_ACEOF
16657
16658fi
16659
16660
Ronald Oussorenf8752642006-07-06 10:13:35 +000016661case $ac_sys_system/$ac_sys_release in
16662Darwin/*)
16663 CFLAGS="${_CUR_CFLAGS}"
16664 LDFLAGS="${_CUR_LDFLAGS}"
16665 ;;
16666esac
16667
Martin v. Löwiseba40652007-08-30 20:10:57 +000016668{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16669echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016670cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016671/* confdefs.h. */
16672_ACEOF
16673cat confdefs.h >>conftest.$ac_ext
16674cat >>conftest.$ac_ext <<_ACEOF
16675/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016676
16677#include "confdefs.h"
16678#include <netdb.h>
16679
Martin v. Löwise9416172003-05-03 10:12:45 +000016680int
16681main ()
16682{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016683void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016684 ;
16685 return 0;
16686}
16687_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016688rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016689if { (ac_try="$ac_link"
16690case "(($ac_try" in
16691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16692 *) ac_try_echo=$ac_try;;
16693esac
16694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16695 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016697 grep -v '^ *+' conftest.er1 >conftest.err
16698 rm -f conftest.er1
16699 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016701 (exit $ac_status); } && {
16702 test -z "$ac_c_werror_flag" ||
16703 test ! -s conftest.err
16704 } && test -s conftest$ac_exeext &&
16705 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016706
16707cat >>confdefs.h <<\_ACEOF
16708#define HAVE_HSTRERROR 1
16709_ACEOF
16710
Martin v. Löwiseba40652007-08-30 20:10:57 +000016711 { echo "$as_me:$LINENO: result: yes" >&5
16712echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016713else
16714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016715sed 's/^/| /' conftest.$ac_ext >&5
16716
Martin v. Löwiseba40652007-08-30 20:10:57 +000016717 { echo "$as_me:$LINENO: result: no" >&5
16718echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016719
16720fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016721
16722rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016723 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016724
Martin v. Löwiseba40652007-08-30 20:10:57 +000016725{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16726echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016727cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016728/* confdefs.h. */
16729_ACEOF
16730cat confdefs.h >>conftest.$ac_ext
16731cat >>conftest.$ac_ext <<_ACEOF
16732/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016733
16734#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016735#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016736#include <sys/socket.h>
16737#include <netinet/in.h>
16738#include <arpa/inet.h>
16739
Martin v. Löwise9416172003-05-03 10:12:45 +000016740int
16741main ()
16742{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016743void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016744 ;
16745 return 0;
16746}
16747_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016748rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016749if { (ac_try="$ac_link"
16750case "(($ac_try" in
16751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16752 *) ac_try_echo=$ac_try;;
16753esac
16754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16755 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016757 grep -v '^ *+' conftest.er1 >conftest.err
16758 rm -f conftest.er1
16759 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016761 (exit $ac_status); } && {
16762 test -z "$ac_c_werror_flag" ||
16763 test ! -s conftest.err
16764 } && test -s conftest$ac_exeext &&
16765 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016766
16767cat >>confdefs.h <<\_ACEOF
16768#define HAVE_INET_ATON 1
16769_ACEOF
16770
Martin v. Löwiseba40652007-08-30 20:10:57 +000016771 { echo "$as_me:$LINENO: result: yes" >&5
16772echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016773else
16774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016775sed 's/^/| /' conftest.$ac_ext >&5
16776
Martin v. Löwiseba40652007-08-30 20:10:57 +000016777 { echo "$as_me:$LINENO: result: no" >&5
16778echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016779
16780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016781
16782rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016784
Martin v. Löwiseba40652007-08-30 20:10:57 +000016785{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16786echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016787cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016788/* confdefs.h. */
16789_ACEOF
16790cat confdefs.h >>conftest.$ac_ext
16791cat >>conftest.$ac_ext <<_ACEOF
16792/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016793
16794#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016795#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016796#include <sys/socket.h>
16797#include <netinet/in.h>
16798#include <arpa/inet.h>
16799
Martin v. Löwise9416172003-05-03 10:12:45 +000016800int
16801main ()
16802{
16803void* p = inet_pton
16804 ;
16805 return 0;
16806}
16807_ACEOF
16808rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016809if { (ac_try="$ac_compile"
16810case "(($ac_try" in
16811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16812 *) ac_try_echo=$ac_try;;
16813esac
16814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16815 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016817 grep -v '^ *+' conftest.er1 >conftest.err
16818 rm -f conftest.er1
16819 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016821 (exit $ac_status); } && {
16822 test -z "$ac_c_werror_flag" ||
16823 test ! -s conftest.err
16824 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016825
16826cat >>confdefs.h <<\_ACEOF
16827#define HAVE_INET_PTON 1
16828_ACEOF
16829
Martin v. Löwiseba40652007-08-30 20:10:57 +000016830 { echo "$as_me:$LINENO: result: yes" >&5
16831echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016832else
16833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016834sed 's/^/| /' conftest.$ac_ext >&5
16835
Martin v. Löwiseba40652007-08-30 20:10:57 +000016836 { echo "$as_me:$LINENO: result: no" >&5
16837echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016838
16839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016840
16841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016842
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016843# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016844{ echo "$as_me:$LINENO: checking for setgroups" >&5
16845echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016846cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016847/* confdefs.h. */
16848_ACEOF
16849cat confdefs.h >>conftest.$ac_ext
16850cat >>conftest.$ac_ext <<_ACEOF
16851/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016852
16853#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016854#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016855#ifdef HAVE_GRP_H
16856#include <grp.h>
16857#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016858
Martin v. Löwisd5843682002-11-21 20:41:28 +000016859int
16860main ()
16861{
16862void* p = setgroups
16863 ;
16864 return 0;
16865}
16866_ACEOF
16867rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016868if { (ac_try="$ac_compile"
16869case "(($ac_try" in
16870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16871 *) ac_try_echo=$ac_try;;
16872esac
16873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016876 grep -v '^ *+' conftest.er1 >conftest.err
16877 rm -f conftest.er1
16878 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016880 (exit $ac_status); } && {
16881 test -z "$ac_c_werror_flag" ||
16882 test ! -s conftest.err
16883 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016884
16885cat >>confdefs.h <<\_ACEOF
16886#define HAVE_SETGROUPS 1
16887_ACEOF
16888
Martin v. Löwiseba40652007-08-30 20:10:57 +000016889 { echo "$as_me:$LINENO: result: yes" >&5
16890echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016891else
16892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016893sed 's/^/| /' conftest.$ac_ext >&5
16894
Martin v. Löwiseba40652007-08-30 20:10:57 +000016895 { echo "$as_me:$LINENO: result: no" >&5
16896echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016897
16898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016899
16900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016901
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016902# check for openpty and forkpty
16903
Martin v. Löwis11437992002-04-12 09:54:03 +000016904
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016905for ac_func in openpty
16906do
Martin v. Löwis11437992002-04-12 09:54:03 +000016907as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016908{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16909echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16910if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016912else
Martin v. Löwis11437992002-04-12 09:54:03 +000016913 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016914/* confdefs.h. */
16915_ACEOF
16916cat confdefs.h >>conftest.$ac_ext
16917cat >>conftest.$ac_ext <<_ACEOF
16918/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016919/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16920 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16921#define $ac_func innocuous_$ac_func
16922
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016923/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016924 which can conflict with char $ac_func (); below.
16925 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016926 <limits.h> exists even on freestanding compilers. */
16927
16928#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016929# include <limits.h>
16930#else
16931# include <assert.h>
16932#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016933
16934#undef $ac_func
16935
Martin v. Löwiseba40652007-08-30 20:10:57 +000016936/* Override any GCC internal prototype to avoid an error.
16937 Use char because int might match the return type of a GCC
16938 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016939#ifdef __cplusplus
16940extern "C"
16941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016942char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016943/* The GNU C library defines this for functions which it implements
16944 to always fail with ENOSYS. Some functions are actually named
16945 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016946#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016947choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016948#endif
16949
Skip Montanaro6dead952003-09-25 14:50:04 +000016950int
16951main ()
16952{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016953return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016954 ;
16955 return 0;
16956}
16957_ACEOF
16958rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016959if { (ac_try="$ac_link"
16960case "(($ac_try" in
16961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16962 *) ac_try_echo=$ac_try;;
16963esac
16964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16965 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016967 grep -v '^ *+' conftest.er1 >conftest.err
16968 rm -f conftest.er1
16969 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016971 (exit $ac_status); } && {
16972 test -z "$ac_c_werror_flag" ||
16973 test ! -s conftest.err
16974 } && test -s conftest$ac_exeext &&
16975 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016976 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016977else
Martin v. Löwis11437992002-04-12 09:54:03 +000016978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016979sed 's/^/| /' conftest.$ac_ext >&5
16980
Martin v. Löwiseba40652007-08-30 20:10:57 +000016981 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016983
16984rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016985 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016987ac_res=`eval echo '${'$as_ac_var'}'`
16988 { echo "$as_me:$LINENO: result: $ac_res" >&5
16989echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016990if test `eval echo '${'$as_ac_var'}'` = yes; then
16991 cat >>confdefs.h <<_ACEOF
16992#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16993_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016994
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016995else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016996 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16997echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016998if test "${ac_cv_lib_util_openpty+set}" = set; then
16999 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017000else
Martin v. Löwis11437992002-04-12 09:54:03 +000017001 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017002LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017003cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017004/* confdefs.h. */
17005_ACEOF
17006cat confdefs.h >>conftest.$ac_ext
17007cat >>conftest.$ac_ext <<_ACEOF
17008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017009
Martin v. Löwiseba40652007-08-30 20:10:57 +000017010/* Override any GCC internal prototype to avoid an error.
17011 Use char because int might match the return type of a GCC
17012 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017013#ifdef __cplusplus
17014extern "C"
17015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017016char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017017int
17018main ()
17019{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017020return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017021 ;
17022 return 0;
17023}
17024_ACEOF
17025rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017026if { (ac_try="$ac_link"
17027case "(($ac_try" in
17028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17029 *) ac_try_echo=$ac_try;;
17030esac
17031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17032 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017034 grep -v '^ *+' conftest.er1 >conftest.err
17035 rm -f conftest.er1
17036 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017038 (exit $ac_status); } && {
17039 test -z "$ac_c_werror_flag" ||
17040 test ! -s conftest.err
17041 } && test -s conftest$ac_exeext &&
17042 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017043 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017044else
Martin v. Löwis11437992002-04-12 09:54:03 +000017045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017046sed 's/^/| /' conftest.$ac_ext >&5
17047
Martin v. Löwiseba40652007-08-30 20:10:57 +000017048 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017050
17051rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017052 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017053LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017055{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17056echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017057if test $ac_cv_lib_util_openpty = yes; then
17058 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017059#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017060_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017061 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017062else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017063 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17064echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017065if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17066 echo $ECHO_N "(cached) $ECHO_C" >&6
17067else
17068 ac_check_lib_save_LIBS=$LIBS
17069LIBS="-lbsd $LIBS"
17070cat >conftest.$ac_ext <<_ACEOF
17071/* confdefs.h. */
17072_ACEOF
17073cat confdefs.h >>conftest.$ac_ext
17074cat >>conftest.$ac_ext <<_ACEOF
17075/* end confdefs.h. */
17076
Martin v. Löwiseba40652007-08-30 20:10:57 +000017077/* Override any GCC internal prototype to avoid an error.
17078 Use char because int might match the return type of a GCC
17079 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017080#ifdef __cplusplus
17081extern "C"
17082#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017083char openpty ();
17084int
17085main ()
17086{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017087return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017088 ;
17089 return 0;
17090}
17091_ACEOF
17092rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017093if { (ac_try="$ac_link"
17094case "(($ac_try" in
17095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17096 *) ac_try_echo=$ac_try;;
17097esac
17098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17099 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017100 ac_status=$?
17101 grep -v '^ *+' conftest.er1 >conftest.err
17102 rm -f conftest.er1
17103 cat conftest.err >&5
17104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017105 (exit $ac_status); } && {
17106 test -z "$ac_c_werror_flag" ||
17107 test ! -s conftest.err
17108 } && test -s conftest$ac_exeext &&
17109 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017110 ac_cv_lib_bsd_openpty=yes
17111else
17112 echo "$as_me: failed program was:" >&5
17113sed 's/^/| /' conftest.$ac_ext >&5
17114
Martin v. Löwiseba40652007-08-30 20:10:57 +000017115 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017117
17118rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017119 conftest$ac_exeext conftest.$ac_ext
17120LIBS=$ac_check_lib_save_LIBS
17121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017122{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17123echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017124if test $ac_cv_lib_bsd_openpty = yes; then
17125 cat >>confdefs.h <<\_ACEOF
17126#define HAVE_OPENPTY 1
17127_ACEOF
17128 LIBS="$LIBS -lbsd"
17129fi
17130
17131
17132fi
17133
Fred Drake8cef4cf2000-06-28 16:40:38 +000017134
17135fi
17136done
17137
Martin v. Löwis11437992002-04-12 09:54:03 +000017138
Fred Drake8cef4cf2000-06-28 16:40:38 +000017139for ac_func in forkpty
17140do
Martin v. Löwis11437992002-04-12 09:54:03 +000017141as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017142{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17143echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17144if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017145 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017146else
Martin v. Löwis11437992002-04-12 09:54:03 +000017147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017148/* confdefs.h. */
17149_ACEOF
17150cat confdefs.h >>conftest.$ac_ext
17151cat >>conftest.$ac_ext <<_ACEOF
17152/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017153/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17154 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17155#define $ac_func innocuous_$ac_func
17156
Fred Drake8cef4cf2000-06-28 16:40:38 +000017157/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017158 which can conflict with char $ac_func (); below.
17159 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017160 <limits.h> exists even on freestanding compilers. */
17161
17162#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017163# include <limits.h>
17164#else
17165# include <assert.h>
17166#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017167
17168#undef $ac_func
17169
Martin v. Löwiseba40652007-08-30 20:10:57 +000017170/* Override any GCC internal prototype to avoid an error.
17171 Use char because int might match the return type of a GCC
17172 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017173#ifdef __cplusplus
17174extern "C"
17175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017176char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017177/* The GNU C library defines this for functions which it implements
17178 to always fail with ENOSYS. Some functions are actually named
17179 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017180#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017181choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017182#endif
17183
Skip Montanaro6dead952003-09-25 14:50:04 +000017184int
17185main ()
17186{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017187return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017188 ;
17189 return 0;
17190}
17191_ACEOF
17192rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017193if { (ac_try="$ac_link"
17194case "(($ac_try" in
17195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17196 *) ac_try_echo=$ac_try;;
17197esac
17198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17199 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017201 grep -v '^ *+' conftest.er1 >conftest.err
17202 rm -f conftest.er1
17203 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017205 (exit $ac_status); } && {
17206 test -z "$ac_c_werror_flag" ||
17207 test ! -s conftest.err
17208 } && test -s conftest$ac_exeext &&
17209 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017210 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017211else
Martin v. Löwis11437992002-04-12 09:54:03 +000017212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017213sed 's/^/| /' conftest.$ac_ext >&5
17214
Martin v. Löwiseba40652007-08-30 20:10:57 +000017215 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017217
17218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017219 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017221ac_res=`eval echo '${'$as_ac_var'}'`
17222 { echo "$as_me:$LINENO: result: $ac_res" >&5
17223echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017224if test `eval echo '${'$as_ac_var'}'` = yes; then
17225 cat >>confdefs.h <<_ACEOF
17226#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17227_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017228
Fred Drake8cef4cf2000-06-28 16:40:38 +000017229else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017230 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17231echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017232if test "${ac_cv_lib_util_forkpty+set}" = set; then
17233 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017234else
Martin v. Löwis11437992002-04-12 09:54:03 +000017235 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017236LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017237cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017238/* confdefs.h. */
17239_ACEOF
17240cat confdefs.h >>conftest.$ac_ext
17241cat >>conftest.$ac_ext <<_ACEOF
17242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017243
Martin v. Löwiseba40652007-08-30 20:10:57 +000017244/* Override any GCC internal prototype to avoid an error.
17245 Use char because int might match the return type of a GCC
17246 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017247#ifdef __cplusplus
17248extern "C"
17249#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017250char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017251int
17252main ()
17253{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017254return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017255 ;
17256 return 0;
17257}
17258_ACEOF
17259rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017260if { (ac_try="$ac_link"
17261case "(($ac_try" in
17262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17263 *) ac_try_echo=$ac_try;;
17264esac
17265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17266 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017268 grep -v '^ *+' conftest.er1 >conftest.err
17269 rm -f conftest.er1
17270 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017272 (exit $ac_status); } && {
17273 test -z "$ac_c_werror_flag" ||
17274 test ! -s conftest.err
17275 } && test -s conftest$ac_exeext &&
17276 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017277 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017278else
Martin v. Löwis11437992002-04-12 09:54:03 +000017279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017280sed 's/^/| /' conftest.$ac_ext >&5
17281
Martin v. Löwiseba40652007-08-30 20:10:57 +000017282 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017283fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017284
17285rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017286 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017287LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017288fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017289{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17290echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017291if test $ac_cv_lib_util_forkpty = yes; then
17292 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017293#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017294_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017295 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017296else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017297 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17298echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017299if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17300 echo $ECHO_N "(cached) $ECHO_C" >&6
17301else
17302 ac_check_lib_save_LIBS=$LIBS
17303LIBS="-lbsd $LIBS"
17304cat >conftest.$ac_ext <<_ACEOF
17305/* confdefs.h. */
17306_ACEOF
17307cat confdefs.h >>conftest.$ac_ext
17308cat >>conftest.$ac_ext <<_ACEOF
17309/* end confdefs.h. */
17310
Martin v. Löwiseba40652007-08-30 20:10:57 +000017311/* Override any GCC internal prototype to avoid an error.
17312 Use char because int might match the return type of a GCC
17313 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017314#ifdef __cplusplus
17315extern "C"
17316#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017317char forkpty ();
17318int
17319main ()
17320{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017321return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017322 ;
17323 return 0;
17324}
17325_ACEOF
17326rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017327if { (ac_try="$ac_link"
17328case "(($ac_try" in
17329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17330 *) ac_try_echo=$ac_try;;
17331esac
17332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17333 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017334 ac_status=$?
17335 grep -v '^ *+' conftest.er1 >conftest.err
17336 rm -f conftest.er1
17337 cat conftest.err >&5
17338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017339 (exit $ac_status); } && {
17340 test -z "$ac_c_werror_flag" ||
17341 test ! -s conftest.err
17342 } && test -s conftest$ac_exeext &&
17343 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017344 ac_cv_lib_bsd_forkpty=yes
17345else
17346 echo "$as_me: failed program was:" >&5
17347sed 's/^/| /' conftest.$ac_ext >&5
17348
Martin v. Löwiseba40652007-08-30 20:10:57 +000017349 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017351
17352rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017353 conftest$ac_exeext conftest.$ac_ext
17354LIBS=$ac_check_lib_save_LIBS
17355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017356{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17357echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017358if test $ac_cv_lib_bsd_forkpty = yes; then
17359 cat >>confdefs.h <<\_ACEOF
17360#define HAVE_FORKPTY 1
17361_ACEOF
17362 LIBS="$LIBS -lbsd"
17363fi
17364
17365
17366fi
17367
Fred Drake8cef4cf2000-06-28 16:40:38 +000017368
17369fi
17370done
17371
Jack Jansendd19cf82001-12-06 22:36:17 +000017372
Brett Cannonaa5778d2008-03-18 04:09:00 +000017373# Stuff for expat.
17374
17375for ac_func in memmove
17376do
17377as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17378{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17379echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17380if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17381 echo $ECHO_N "(cached) $ECHO_C" >&6
17382else
17383 cat >conftest.$ac_ext <<_ACEOF
17384/* confdefs.h. */
17385_ACEOF
17386cat confdefs.h >>conftest.$ac_ext
17387cat >>conftest.$ac_ext <<_ACEOF
17388/* end confdefs.h. */
17389/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17390 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17391#define $ac_func innocuous_$ac_func
17392
17393/* System header to define __stub macros and hopefully few prototypes,
17394 which can conflict with char $ac_func (); below.
17395 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17396 <limits.h> exists even on freestanding compilers. */
17397
17398#ifdef __STDC__
17399# include <limits.h>
17400#else
17401# include <assert.h>
17402#endif
17403
17404#undef $ac_func
17405
17406/* Override any GCC internal prototype to avoid an error.
17407 Use char because int might match the return type of a GCC
17408 builtin and then its argument prototype would still apply. */
17409#ifdef __cplusplus
17410extern "C"
17411#endif
17412char $ac_func ();
17413/* The GNU C library defines this for functions which it implements
17414 to always fail with ENOSYS. Some functions are actually named
17415 something starting with __ and the normal name is an alias. */
17416#if defined __stub_$ac_func || defined __stub___$ac_func
17417choke me
17418#endif
17419
17420int
17421main ()
17422{
17423return $ac_func ();
17424 ;
17425 return 0;
17426}
17427_ACEOF
17428rm -f conftest.$ac_objext conftest$ac_exeext
17429if { (ac_try="$ac_link"
17430case "(($ac_try" in
17431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17432 *) ac_try_echo=$ac_try;;
17433esac
17434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17435 (eval "$ac_link") 2>conftest.er1
17436 ac_status=$?
17437 grep -v '^ *+' conftest.er1 >conftest.err
17438 rm -f conftest.er1
17439 cat conftest.err >&5
17440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17441 (exit $ac_status); } && {
17442 test -z "$ac_c_werror_flag" ||
17443 test ! -s conftest.err
17444 } && test -s conftest$ac_exeext &&
17445 $as_test_x conftest$ac_exeext; then
17446 eval "$as_ac_var=yes"
17447else
17448 echo "$as_me: failed program was:" >&5
17449sed 's/^/| /' conftest.$ac_ext >&5
17450
17451 eval "$as_ac_var=no"
17452fi
17453
17454rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17455 conftest$ac_exeext conftest.$ac_ext
17456fi
17457ac_res=`eval echo '${'$as_ac_var'}'`
17458 { echo "$as_me:$LINENO: result: $ac_res" >&5
17459echo "${ECHO_T}$ac_res" >&6; }
17460if test `eval echo '${'$as_ac_var'}'` = yes; then
17461 cat >>confdefs.h <<_ACEOF
17462#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17463_ACEOF
17464
17465fi
17466done
17467
17468
Michael W. Hudson54241132001-12-07 15:38:26 +000017469# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017470
17471
17472
17473
17474
17475
Fred Drake8cef4cf2000-06-28 16:40:38 +000017476for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17477do
Martin v. Löwis11437992002-04-12 09:54:03 +000017478as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017479{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17480echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17481if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017483else
Martin v. Löwis11437992002-04-12 09:54:03 +000017484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017485/* confdefs.h. */
17486_ACEOF
17487cat confdefs.h >>conftest.$ac_ext
17488cat >>conftest.$ac_ext <<_ACEOF
17489/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017490/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17491 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17492#define $ac_func innocuous_$ac_func
17493
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017494/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017495 which can conflict with char $ac_func (); below.
17496 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017497 <limits.h> exists even on freestanding compilers. */
17498
17499#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017500# include <limits.h>
17501#else
17502# include <assert.h>
17503#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017504
17505#undef $ac_func
17506
Martin v. Löwiseba40652007-08-30 20:10:57 +000017507/* Override any GCC internal prototype to avoid an error.
17508 Use char because int might match the return type of a GCC
17509 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017510#ifdef __cplusplus
17511extern "C"
17512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017513char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017514/* The GNU C library defines this for functions which it implements
17515 to always fail with ENOSYS. Some functions are actually named
17516 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017517#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017518choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017519#endif
17520
Skip Montanaro6dead952003-09-25 14:50:04 +000017521int
17522main ()
17523{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017524return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017525 ;
17526 return 0;
17527}
17528_ACEOF
17529rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017530if { (ac_try="$ac_link"
17531case "(($ac_try" in
17532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17533 *) ac_try_echo=$ac_try;;
17534esac
17535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17536 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017538 grep -v '^ *+' conftest.er1 >conftest.err
17539 rm -f conftest.er1
17540 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017542 (exit $ac_status); } && {
17543 test -z "$ac_c_werror_flag" ||
17544 test ! -s conftest.err
17545 } && test -s conftest$ac_exeext &&
17546 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017547 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017548else
Martin v. Löwis11437992002-04-12 09:54:03 +000017549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017550sed 's/^/| /' conftest.$ac_ext >&5
17551
Martin v. Löwiseba40652007-08-30 20:10:57 +000017552 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017554
17555rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017556 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017558ac_res=`eval echo '${'$as_ac_var'}'`
17559 { echo "$as_me:$LINENO: result: $ac_res" >&5
17560echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017561if test `eval echo '${'$as_ac_var'}'` = yes; then
17562 cat >>confdefs.h <<_ACEOF
17563#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17564_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017565
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017566fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017567done
17568
Michael W. Hudson54241132001-12-07 15:38:26 +000017569
Martin v. Löwis11437992002-04-12 09:54:03 +000017570
17571
17572
Brett Cannonaa5778d2008-03-18 04:09:00 +000017573for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000017574do
Martin v. Löwis11437992002-04-12 09:54:03 +000017575as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017576{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17577echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17578if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017580else
Martin v. Löwis11437992002-04-12 09:54:03 +000017581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017582/* confdefs.h. */
17583_ACEOF
17584cat confdefs.h >>conftest.$ac_ext
17585cat >>conftest.$ac_ext <<_ACEOF
17586/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017587/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17588 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17589#define $ac_func innocuous_$ac_func
17590
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017591/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017592 which can conflict with char $ac_func (); below.
17593 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017594 <limits.h> exists even on freestanding compilers. */
17595
17596#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017597# include <limits.h>
17598#else
17599# include <assert.h>
17600#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017601
17602#undef $ac_func
17603
Martin v. Löwiseba40652007-08-30 20:10:57 +000017604/* Override any GCC internal prototype to avoid an error.
17605 Use char because int might match the return type of a GCC
17606 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017607#ifdef __cplusplus
17608extern "C"
17609#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017610char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017611/* The GNU C library defines this for functions which it implements
17612 to always fail with ENOSYS. Some functions are actually named
17613 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017614#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017615choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017616#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017617
Skip Montanaro6dead952003-09-25 14:50:04 +000017618int
17619main ()
17620{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017621return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017622 ;
17623 return 0;
17624}
17625_ACEOF
17626rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017627if { (ac_try="$ac_link"
17628case "(($ac_try" in
17629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17630 *) ac_try_echo=$ac_try;;
17631esac
17632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17633 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017635 grep -v '^ *+' conftest.er1 >conftest.err
17636 rm -f conftest.er1
17637 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017639 (exit $ac_status); } && {
17640 test -z "$ac_c_werror_flag" ||
17641 test ! -s conftest.err
17642 } && test -s conftest$ac_exeext &&
17643 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017644 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017645else
Martin v. Löwis11437992002-04-12 09:54:03 +000017646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017647sed 's/^/| /' conftest.$ac_ext >&5
17648
Martin v. Löwiseba40652007-08-30 20:10:57 +000017649 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017651
17652rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017653 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017655ac_res=`eval echo '${'$as_ac_var'}'`
17656 { echo "$as_me:$LINENO: result: $ac_res" >&5
17657echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017658if test `eval echo '${'$as_ac_var'}'` = yes; then
17659 cat >>confdefs.h <<_ACEOF
17660#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17661_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017662
Martin v. Löwis1142de32002-03-29 16:28:31 +000017663else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017664 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017665 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017666 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17667 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017668esac
17669
Martin v. Löwis1142de32002-03-29 16:28:31 +000017670fi
17671done
17672
17673
Martin v. Löwis11437992002-04-12 09:54:03 +000017674
Martin v. Löwis1142de32002-03-29 16:28:31 +000017675for ac_func in getpgrp
17676do
Martin v. Löwis11437992002-04-12 09:54:03 +000017677as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017678{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17679echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17680if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017681 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017682else
Martin v. Löwis11437992002-04-12 09:54:03 +000017683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017684/* confdefs.h. */
17685_ACEOF
17686cat confdefs.h >>conftest.$ac_ext
17687cat >>conftest.$ac_ext <<_ACEOF
17688/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017689/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17690 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17691#define $ac_func innocuous_$ac_func
17692
Martin v. Löwis1142de32002-03-29 16:28:31 +000017693/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017694 which can conflict with char $ac_func (); below.
17695 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017696 <limits.h> exists even on freestanding compilers. */
17697
17698#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017699# include <limits.h>
17700#else
17701# include <assert.h>
17702#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017703
17704#undef $ac_func
17705
Martin v. Löwiseba40652007-08-30 20:10:57 +000017706/* Override any GCC internal prototype to avoid an error.
17707 Use char because int might match the return type of a GCC
17708 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017709#ifdef __cplusplus
17710extern "C"
17711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017712char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017713/* The GNU C library defines this for functions which it implements
17714 to always fail with ENOSYS. Some functions are actually named
17715 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017716#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017717choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017718#endif
17719
Skip Montanaro6dead952003-09-25 14:50:04 +000017720int
17721main ()
17722{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017723return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017724 ;
17725 return 0;
17726}
17727_ACEOF
17728rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017729if { (ac_try="$ac_link"
17730case "(($ac_try" in
17731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17732 *) ac_try_echo=$ac_try;;
17733esac
17734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17735 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017737 grep -v '^ *+' conftest.er1 >conftest.err
17738 rm -f conftest.er1
17739 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017741 (exit $ac_status); } && {
17742 test -z "$ac_c_werror_flag" ||
17743 test ! -s conftest.err
17744 } && test -s conftest$ac_exeext &&
17745 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017746 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017747else
Martin v. Löwis11437992002-04-12 09:54:03 +000017748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017749sed 's/^/| /' conftest.$ac_ext >&5
17750
Martin v. Löwiseba40652007-08-30 20:10:57 +000017751 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017753
17754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017755 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017757ac_res=`eval echo '${'$as_ac_var'}'`
17758 { echo "$as_me:$LINENO: result: $ac_res" >&5
17759echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017760if test `eval echo '${'$as_ac_var'}'` = yes; then
17761 cat >>confdefs.h <<_ACEOF
17762#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17763_ACEOF
17764 cat >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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017770#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017771int
17772main ()
17773{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017774getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017775 ;
17776 return 0;
17777}
17778_ACEOF
17779rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017780if { (ac_try="$ac_compile"
17781case "(($ac_try" in
17782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17783 *) ac_try_echo=$ac_try;;
17784esac
17785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17786 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017788 grep -v '^ *+' conftest.er1 >conftest.err
17789 rm -f conftest.er1
17790 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017792 (exit $ac_status); } && {
17793 test -z "$ac_c_werror_flag" ||
17794 test ! -s conftest.err
17795 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017796
17797cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017798#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017799_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017800
Martin v. Löwis11437992002-04-12 09:54:03 +000017801
Guido van Rossumf78abae1997-01-21 22:02:36 +000017802else
Martin v. Löwis11437992002-04-12 09:54:03 +000017803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017804sed 's/^/| /' conftest.$ac_ext >&5
17805
Martin v. Löwiseba40652007-08-30 20:10:57 +000017806
Guido van Rossum627b2d71993-12-24 10:39:16 +000017807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017808
17809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017810
Guido van Rossum627b2d71993-12-24 10:39:16 +000017811fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017812done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017813
Jack Jansen150753c2003-03-29 22:07:47 +000017814
17815for ac_func in setpgrp
17816do
17817as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017818{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17819echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17820if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017822else
Martin v. Löwis11437992002-04-12 09:54:03 +000017823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017824/* confdefs.h. */
17825_ACEOF
17826cat confdefs.h >>conftest.$ac_ext
17827cat >>conftest.$ac_ext <<_ACEOF
17828/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017829/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17830 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17831#define $ac_func innocuous_$ac_func
17832
Jack Jansen150753c2003-03-29 22:07:47 +000017833/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017834 which can conflict with char $ac_func (); below.
17835 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017836 <limits.h> exists even on freestanding compilers. */
17837
17838#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017839# include <limits.h>
17840#else
17841# include <assert.h>
17842#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017843
17844#undef $ac_func
17845
Martin v. Löwiseba40652007-08-30 20:10:57 +000017846/* Override any GCC internal prototype to avoid an error.
17847 Use char because int might match the return type of a GCC
17848 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017849#ifdef __cplusplus
17850extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017851#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017852char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017853/* The GNU C library defines this for functions which it implements
17854 to always fail with ENOSYS. Some functions are actually named
17855 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017856#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017857choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017858#endif
17859
Skip Montanaro6dead952003-09-25 14:50:04 +000017860int
17861main ()
17862{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017863return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017864 ;
17865 return 0;
17866}
17867_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017868rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017869if { (ac_try="$ac_link"
17870case "(($ac_try" in
17871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17872 *) ac_try_echo=$ac_try;;
17873esac
17874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17875 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017877 grep -v '^ *+' conftest.er1 >conftest.err
17878 rm -f conftest.er1
17879 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017881 (exit $ac_status); } && {
17882 test -z "$ac_c_werror_flag" ||
17883 test ! -s conftest.err
17884 } && test -s conftest$ac_exeext &&
17885 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017886 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017887else
Jack Jansen150753c2003-03-29 22:07:47 +000017888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017889sed 's/^/| /' conftest.$ac_ext >&5
17890
Martin v. Löwiseba40652007-08-30 20:10:57 +000017891 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017892fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017893
17894rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017895 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017896fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017897ac_res=`eval echo '${'$as_ac_var'}'`
17898 { echo "$as_me:$LINENO: result: $ac_res" >&5
17899echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017900if test `eval echo '${'$as_ac_var'}'` = yes; then
17901 cat >>confdefs.h <<_ACEOF
17902#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17903_ACEOF
17904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017905/* confdefs.h. */
17906_ACEOF
17907cat confdefs.h >>conftest.$ac_ext
17908cat >>conftest.$ac_ext <<_ACEOF
17909/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017910#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017911int
17912main ()
17913{
17914setpgrp(0,0);
17915 ;
17916 return 0;
17917}
17918_ACEOF
17919rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017920if { (ac_try="$ac_compile"
17921case "(($ac_try" in
17922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17923 *) ac_try_echo=$ac_try;;
17924esac
17925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17926 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017927 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017928 grep -v '^ *+' conftest.er1 >conftest.err
17929 rm -f conftest.er1
17930 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017932 (exit $ac_status); } && {
17933 test -z "$ac_c_werror_flag" ||
17934 test ! -s conftest.err
17935 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017936
17937cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017938#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017939_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017940
Jack Jansen150753c2003-03-29 22:07:47 +000017941
17942else
17943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017944sed 's/^/| /' conftest.$ac_ext >&5
17945
Martin v. Löwiseba40652007-08-30 20:10:57 +000017946
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017948
17949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017950
17951fi
17952done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017953
Martin v. Löwis11437992002-04-12 09:54:03 +000017954
Thomas Wouters3a584202000-08-05 23:28:51 +000017955for ac_func in gettimeofday
17956do
Martin v. Löwis11437992002-04-12 09:54:03 +000017957as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017958{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17959echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17960if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017961 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017962else
Martin v. Löwis11437992002-04-12 09:54:03 +000017963 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017964/* confdefs.h. */
17965_ACEOF
17966cat confdefs.h >>conftest.$ac_ext
17967cat >>conftest.$ac_ext <<_ACEOF
17968/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017969/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17970 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17971#define $ac_func innocuous_$ac_func
17972
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017973/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017974 which can conflict with char $ac_func (); below.
17975 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017976 <limits.h> exists even on freestanding compilers. */
17977
17978#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017979# include <limits.h>
17980#else
17981# include <assert.h>
17982#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017983
17984#undef $ac_func
17985
Martin v. Löwiseba40652007-08-30 20:10:57 +000017986/* Override any GCC internal prototype to avoid an error.
17987 Use char because int might match the return type of a GCC
17988 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017989#ifdef __cplusplus
17990extern "C"
17991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017992char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017993/* The GNU C library defines this for functions which it implements
17994 to always fail with ENOSYS. Some functions are actually named
17995 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017996#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017997choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017998#endif
17999
Skip Montanaro6dead952003-09-25 14:50:04 +000018000int
18001main ()
18002{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018003return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018004 ;
18005 return 0;
18006}
18007_ACEOF
18008rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018009if { (ac_try="$ac_link"
18010case "(($ac_try" in
18011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18012 *) ac_try_echo=$ac_try;;
18013esac
18014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18015 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018017 grep -v '^ *+' conftest.er1 >conftest.err
18018 rm -f conftest.er1
18019 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018021 (exit $ac_status); } && {
18022 test -z "$ac_c_werror_flag" ||
18023 test ! -s conftest.err
18024 } && test -s conftest$ac_exeext &&
18025 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018026 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018027else
Martin v. Löwis11437992002-04-12 09:54:03 +000018028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018029sed 's/^/| /' conftest.$ac_ext >&5
18030
Martin v. Löwiseba40652007-08-30 20:10:57 +000018031 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018033
18034rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018035 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018037ac_res=`eval echo '${'$as_ac_var'}'`
18038 { echo "$as_me:$LINENO: result: $ac_res" >&5
18039echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018040if test `eval echo '${'$as_ac_var'}'` = yes; then
18041 cat >>confdefs.h <<_ACEOF
18042#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18043_ACEOF
18044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018045/* confdefs.h. */
18046_ACEOF
18047cat confdefs.h >>conftest.$ac_ext
18048cat >>conftest.$ac_ext <<_ACEOF
18049/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018050#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018051int
18052main ()
18053{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018054gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018055 ;
18056 return 0;
18057}
18058_ACEOF
18059rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018060if { (ac_try="$ac_compile"
18061case "(($ac_try" in
18062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18063 *) ac_try_echo=$ac_try;;
18064esac
18065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18066 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018068 grep -v '^ *+' conftest.er1 >conftest.err
18069 rm -f conftest.er1
18070 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018072 (exit $ac_status); } && {
18073 test -z "$ac_c_werror_flag" ||
18074 test ! -s conftest.err
18075 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018076 :
18077else
Martin v. Löwis11437992002-04-12 09:54:03 +000018078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018079sed 's/^/| /' conftest.$ac_ext >&5
18080
Martin v. Löwis11437992002-04-12 09:54:03 +000018081
18082cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018083#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018084_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018085
Martin v. Löwis11437992002-04-12 09:54:03 +000018086
Guido van Rossum627b2d71993-12-24 10:39:16 +000018087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018088
18089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018090
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018091fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018092done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018093
Michael W. Hudson54241132001-12-07 15:38:26 +000018094
Martin v. Löwiseba40652007-08-30 20:10:57 +000018095{ echo "$as_me:$LINENO: checking for major" >&5
18096echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018097cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018098/* confdefs.h. */
18099_ACEOF
18100cat confdefs.h >>conftest.$ac_ext
18101cat >>conftest.$ac_ext <<_ACEOF
18102/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018103
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018104#if defined(MAJOR_IN_MKDEV)
18105#include <sys/mkdev.h>
18106#elif defined(MAJOR_IN_SYSMACROS)
18107#include <sys/sysmacros.h>
18108#else
18109#include <sys/types.h>
18110#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018111
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018112int
18113main ()
18114{
18115
18116 makedev(major(0),minor(0));
18117
18118 ;
18119 return 0;
18120}
18121_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018122rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018123if { (ac_try="$ac_link"
18124case "(($ac_try" in
18125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18126 *) ac_try_echo=$ac_try;;
18127esac
18128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18129 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018131 grep -v '^ *+' conftest.er1 >conftest.err
18132 rm -f conftest.er1
18133 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018135 (exit $ac_status); } && {
18136 test -z "$ac_c_werror_flag" ||
18137 test ! -s conftest.err
18138 } && test -s conftest$ac_exeext &&
18139 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018140
18141
18142cat >>confdefs.h <<\_ACEOF
18143#define HAVE_DEVICE_MACROS 1
18144_ACEOF
18145
Martin v. Löwiseba40652007-08-30 20:10:57 +000018146 { echo "$as_me:$LINENO: result: yes" >&5
18147echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018148
18149else
18150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018151sed 's/^/| /' conftest.$ac_ext >&5
18152
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018153
Martin v. Löwiseba40652007-08-30 20:10:57 +000018154 { echo "$as_me:$LINENO: result: no" >&5
18155echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018156
18157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018158
18159rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018160 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018161
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018162# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018163# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018164{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18165echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018166cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018167/* confdefs.h. */
18168_ACEOF
18169cat confdefs.h >>conftest.$ac_ext
18170cat >>conftest.$ac_ext <<_ACEOF
18171/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018172
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018173#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018174#include <sys/socket.h>
18175#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018176#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018177
Martin v. Löwis11437992002-04-12 09:54:03 +000018178int
18179main ()
18180{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018181
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018182getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018183
Martin v. Löwis11437992002-04-12 09:54:03 +000018184 ;
18185 return 0;
18186}
18187_ACEOF
18188rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018189if { (ac_try="$ac_link"
18190case "(($ac_try" in
18191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18192 *) ac_try_echo=$ac_try;;
18193esac
18194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18195 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018197 grep -v '^ *+' conftest.er1 >conftest.err
18198 rm -f conftest.er1
18199 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018201 (exit $ac_status); } && {
18202 test -z "$ac_c_werror_flag" ||
18203 test ! -s conftest.err
18204 } && test -s conftest$ac_exeext &&
18205 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018206
Martin v. Löwiseba40652007-08-30 20:10:57 +000018207{ echo "$as_me:$LINENO: result: yes" >&5
18208echo "${ECHO_T}yes" >&6; }
18209{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18210echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018211if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018212 { echo "$as_me:$LINENO: result: buggy" >&5
18213echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018214buggygetaddrinfo=yes
18215else
Martin v. Löwis11437992002-04-12 09:54:03 +000018216 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018217/* confdefs.h. */
18218_ACEOF
18219cat confdefs.h >>conftest.$ac_ext
18220cat >>conftest.$ac_ext <<_ACEOF
18221/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018222
18223#include <sys/types.h>
18224#include <netdb.h>
18225#include <string.h>
18226#include <sys/socket.h>
18227#include <netinet/in.h>
18228
18229main()
18230{
18231 int passive, gaierr, inet4 = 0, inet6 = 0;
18232 struct addrinfo hints, *ai, *aitop;
18233 char straddr[INET6_ADDRSTRLEN], strport[16];
18234
18235 for (passive = 0; passive <= 1; passive++) {
18236 memset(&hints, 0, sizeof(hints));
18237 hints.ai_family = AF_UNSPEC;
18238 hints.ai_flags = passive ? AI_PASSIVE : 0;
18239 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018240 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018241 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18242 (void)gai_strerror(gaierr);
18243 goto bad;
18244 }
18245 for (ai = aitop; ai; ai = ai->ai_next) {
18246 if (ai->ai_addr == NULL ||
18247 ai->ai_addrlen == 0 ||
18248 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18249 straddr, sizeof(straddr), strport, sizeof(strport),
18250 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18251 goto bad;
18252 }
18253 switch (ai->ai_family) {
18254 case AF_INET:
18255 if (strcmp(strport, "54321") != 0) {
18256 goto bad;
18257 }
18258 if (passive) {
18259 if (strcmp(straddr, "0.0.0.0") != 0) {
18260 goto bad;
18261 }
18262 } else {
18263 if (strcmp(straddr, "127.0.0.1") != 0) {
18264 goto bad;
18265 }
18266 }
18267 inet4++;
18268 break;
18269 case AF_INET6:
18270 if (strcmp(strport, "54321") != 0) {
18271 goto bad;
18272 }
18273 if (passive) {
18274 if (strcmp(straddr, "::") != 0) {
18275 goto bad;
18276 }
18277 } else {
18278 if (strcmp(straddr, "::1") != 0) {
18279 goto bad;
18280 }
18281 }
18282 inet6++;
18283 break;
18284 case AF_UNSPEC:
18285 goto bad;
18286 break;
18287 default:
18288 /* another family support? */
18289 break;
18290 }
18291 }
18292 }
18293
18294 if (!(inet4 == 0 || inet4 == 2))
18295 goto bad;
18296 if (!(inet6 == 0 || inet6 == 2))
18297 goto bad;
18298
18299 if (aitop)
18300 freeaddrinfo(aitop);
18301 exit(0);
18302
18303 bad:
18304 if (aitop)
18305 freeaddrinfo(aitop);
18306 exit(1);
18307}
18308
Martin v. Löwis11437992002-04-12 09:54:03 +000018309_ACEOF
18310rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018311if { (ac_try="$ac_link"
18312case "(($ac_try" in
18313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18314 *) ac_try_echo=$ac_try;;
18315esac
18316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18317 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018318 ac_status=$?
18319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18320 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018321 { (case "(($ac_try" in
18322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18323 *) ac_try_echo=$ac_try;;
18324esac
18325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18326 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018327 ac_status=$?
18328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18329 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018330 { echo "$as_me:$LINENO: result: good" >&5
18331echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018332buggygetaddrinfo=no
18333else
Martin v. Löwis11437992002-04-12 09:54:03 +000018334 echo "$as_me: program exited with status $ac_status" >&5
18335echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018336sed 's/^/| /' conftest.$ac_ext >&5
18337
Martin v. Löwis11437992002-04-12 09:54:03 +000018338( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018339{ echo "$as_me:$LINENO: result: buggy" >&5
18340echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018341buggygetaddrinfo=yes
18342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018343rm -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 +000018344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018345
18346
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018347else
Martin v. Löwis11437992002-04-12 09:54:03 +000018348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018349sed 's/^/| /' conftest.$ac_ext >&5
18350
Martin v. Löwis11437992002-04-12 09:54:03 +000018351
Martin v. Löwiseba40652007-08-30 20:10:57 +000018352{ echo "$as_me:$LINENO: result: no" >&5
18353echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018354buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018355
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018357
18358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018360
18361if test "$buggygetaddrinfo" = "yes"; then
18362 if test "$ipv6" = "yes"; then
18363 echo 'Fatal: You must get working getaddrinfo() function.'
18364 echo ' or you can specify "--disable-ipv6"'.
18365 exit 1
18366 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018367else
Martin v. Löwis11437992002-04-12 09:54:03 +000018368
18369cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018370#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018371_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018372
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018373fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018374
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018375for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018376do
Martin v. Löwis11437992002-04-12 09:54:03 +000018377as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018378{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18379echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18380if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018381 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018382else
Martin v. Löwis11437992002-04-12 09:54:03 +000018383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018384/* confdefs.h. */
18385_ACEOF
18386cat confdefs.h >>conftest.$ac_ext
18387cat >>conftest.$ac_ext <<_ACEOF
18388/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018389/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18390 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18391#define $ac_func innocuous_$ac_func
18392
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018393/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018394 which can conflict with char $ac_func (); below.
18395 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018396 <limits.h> exists even on freestanding compilers. */
18397
18398#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018399# include <limits.h>
18400#else
18401# include <assert.h>
18402#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018403
18404#undef $ac_func
18405
Martin v. Löwiseba40652007-08-30 20:10:57 +000018406/* Override any GCC internal prototype to avoid an error.
18407 Use char because int might match the return type of a GCC
18408 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018409#ifdef __cplusplus
18410extern "C"
18411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018412char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018413/* The GNU C library defines this for functions which it implements
18414 to always fail with ENOSYS. Some functions are actually named
18415 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018416#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018417choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018418#endif
18419
Skip Montanaro6dead952003-09-25 14:50:04 +000018420int
18421main ()
18422{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018423return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018424 ;
18425 return 0;
18426}
18427_ACEOF
18428rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018429if { (ac_try="$ac_link"
18430case "(($ac_try" in
18431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18432 *) ac_try_echo=$ac_try;;
18433esac
18434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18435 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018436 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018437 grep -v '^ *+' conftest.er1 >conftest.err
18438 rm -f conftest.er1
18439 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018441 (exit $ac_status); } && {
18442 test -z "$ac_c_werror_flag" ||
18443 test ! -s conftest.err
18444 } && test -s conftest$ac_exeext &&
18445 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018446 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018447else
Martin v. Löwis11437992002-04-12 09:54:03 +000018448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018449sed 's/^/| /' conftest.$ac_ext >&5
18450
Martin v. Löwiseba40652007-08-30 20:10:57 +000018451 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018453
18454rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018455 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018457ac_res=`eval echo '${'$as_ac_var'}'`
18458 { echo "$as_me:$LINENO: result: $ac_res" >&5
18459echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018460if test `eval echo '${'$as_ac_var'}'` = yes; then
18461 cat >>confdefs.h <<_ACEOF
18462#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18463_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018464
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018465fi
18466done
18467
Michael W. Hudson54241132001-12-07 15:38:26 +000018468
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018469# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018470{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18471echo $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 +000018472if test "${ac_cv_header_time+set}" = set; then
18473 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018474else
Martin v. Löwis11437992002-04-12 09:54:03 +000018475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018476/* confdefs.h. */
18477_ACEOF
18478cat confdefs.h >>conftest.$ac_ext
18479cat >>conftest.$ac_ext <<_ACEOF
18480/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018481#include <sys/types.h>
18482#include <sys/time.h>
18483#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018484
Martin v. Löwis11437992002-04-12 09:54:03 +000018485int
18486main ()
18487{
18488if ((struct tm *) 0)
18489return 0;
18490 ;
18491 return 0;
18492}
18493_ACEOF
18494rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018495if { (ac_try="$ac_compile"
18496case "(($ac_try" in
18497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18498 *) ac_try_echo=$ac_try;;
18499esac
18500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018503 grep -v '^ *+' conftest.er1 >conftest.err
18504 rm -f conftest.er1
18505 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018507 (exit $ac_status); } && {
18508 test -z "$ac_c_werror_flag" ||
18509 test ! -s conftest.err
18510 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018511 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018512else
Martin v. Löwis11437992002-04-12 09:54:03 +000018513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018514sed 's/^/| /' conftest.$ac_ext >&5
18515
Martin v. Löwiseba40652007-08-30 20:10:57 +000018516 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018518
18519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018521{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18522echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018523if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018524
18525cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018526#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018527_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018528
18529fi
18530
Martin v. Löwiseba40652007-08-30 20:10:57 +000018531{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18532echo $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 +000018533if test "${ac_cv_struct_tm+set}" = set; then
18534 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018535else
Martin v. Löwis11437992002-04-12 09:54:03 +000018536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018537/* confdefs.h. */
18538_ACEOF
18539cat confdefs.h >>conftest.$ac_ext
18540cat >>conftest.$ac_ext <<_ACEOF
18541/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018542#include <sys/types.h>
18543#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018544
Martin v. Löwis11437992002-04-12 09:54:03 +000018545int
18546main ()
18547{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018548struct tm tm;
18549 int *p = &tm.tm_sec;
18550 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018551 ;
18552 return 0;
18553}
18554_ACEOF
18555rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018556if { (ac_try="$ac_compile"
18557case "(($ac_try" in
18558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18559 *) ac_try_echo=$ac_try;;
18560esac
18561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018564 grep -v '^ *+' conftest.er1 >conftest.err
18565 rm -f conftest.er1
18566 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018568 (exit $ac_status); } && {
18569 test -z "$ac_c_werror_flag" ||
18570 test ! -s conftest.err
18571 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018572 ac_cv_struct_tm=time.h
18573else
Martin v. Löwis11437992002-04-12 09:54:03 +000018574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018575sed 's/^/| /' conftest.$ac_ext >&5
18576
Martin v. Löwiseba40652007-08-30 20:10:57 +000018577 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018579
18580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018582{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18583echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018584if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018585
18586cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018587#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018588_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018589
18590fi
18591
Martin v. Löwiseba40652007-08-30 20:10:57 +000018592{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18593echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018594if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18595 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018596else
Martin v. Löwis11437992002-04-12 09:54:03 +000018597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018598/* confdefs.h. */
18599_ACEOF
18600cat confdefs.h >>conftest.$ac_ext
18601cat >>conftest.$ac_ext <<_ACEOF
18602/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018603#include <sys/types.h>
18604#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018605
18606
Martin v. Löwis11437992002-04-12 09:54:03 +000018607int
18608main ()
18609{
18610static struct tm ac_aggr;
18611if (ac_aggr.tm_zone)
18612return 0;
18613 ;
18614 return 0;
18615}
18616_ACEOF
18617rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018618if { (ac_try="$ac_compile"
18619case "(($ac_try" in
18620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18621 *) ac_try_echo=$ac_try;;
18622esac
18623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18624 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018626 grep -v '^ *+' conftest.er1 >conftest.err
18627 rm -f conftest.er1
18628 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018630 (exit $ac_status); } && {
18631 test -z "$ac_c_werror_flag" ||
18632 test ! -s conftest.err
18633 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018634 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018635else
Martin v. Löwis11437992002-04-12 09:54:03 +000018636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018637sed 's/^/| /' conftest.$ac_ext >&5
18638
Martin v. Löwiseba40652007-08-30 20:10:57 +000018639 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018640/* confdefs.h. */
18641_ACEOF
18642cat confdefs.h >>conftest.$ac_ext
18643cat >>conftest.$ac_ext <<_ACEOF
18644/* end confdefs.h. */
18645#include <sys/types.h>
18646#include <$ac_cv_struct_tm>
18647
18648
18649int
18650main ()
18651{
18652static struct tm ac_aggr;
18653if (sizeof ac_aggr.tm_zone)
18654return 0;
18655 ;
18656 return 0;
18657}
18658_ACEOF
18659rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018660if { (ac_try="$ac_compile"
18661case "(($ac_try" in
18662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18663 *) ac_try_echo=$ac_try;;
18664esac
18665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18666 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018668 grep -v '^ *+' conftest.er1 >conftest.err
18669 rm -f conftest.er1
18670 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018672 (exit $ac_status); } && {
18673 test -z "$ac_c_werror_flag" ||
18674 test ! -s conftest.err
18675 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018676 ac_cv_member_struct_tm_tm_zone=yes
18677else
18678 echo "$as_me: failed program was:" >&5
18679sed 's/^/| /' conftest.$ac_ext >&5
18680
Martin v. Löwiseba40652007-08-30 20:10:57 +000018681 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018683
18684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018686
18687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018689{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18690echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018691if test $ac_cv_member_struct_tm_tm_zone = yes; then
18692
18693cat >>confdefs.h <<_ACEOF
18694#define HAVE_STRUCT_TM_TM_ZONE 1
18695_ACEOF
18696
18697
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018698fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018699
Martin v. Löwis11437992002-04-12 09:54:03 +000018700if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18701
18702cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018703#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018704_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018705
18706else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018707 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18708echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18709if test "${ac_cv_have_decl_tzname+set}" = set; then
18710 echo $ECHO_N "(cached) $ECHO_C" >&6
18711else
18712 cat >conftest.$ac_ext <<_ACEOF
18713/* confdefs.h. */
18714_ACEOF
18715cat confdefs.h >>conftest.$ac_ext
18716cat >>conftest.$ac_ext <<_ACEOF
18717/* end confdefs.h. */
18718#include <time.h>
18719
18720int
18721main ()
18722{
18723#ifndef tzname
18724 (void) tzname;
18725#endif
18726
18727 ;
18728 return 0;
18729}
18730_ACEOF
18731rm -f conftest.$ac_objext
18732if { (ac_try="$ac_compile"
18733case "(($ac_try" in
18734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18735 *) ac_try_echo=$ac_try;;
18736esac
18737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18738 (eval "$ac_compile") 2>conftest.er1
18739 ac_status=$?
18740 grep -v '^ *+' conftest.er1 >conftest.err
18741 rm -f conftest.er1
18742 cat conftest.err >&5
18743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18744 (exit $ac_status); } && {
18745 test -z "$ac_c_werror_flag" ||
18746 test ! -s conftest.err
18747 } && test -s conftest.$ac_objext; then
18748 ac_cv_have_decl_tzname=yes
18749else
18750 echo "$as_me: failed program was:" >&5
18751sed 's/^/| /' conftest.$ac_ext >&5
18752
18753 ac_cv_have_decl_tzname=no
18754fi
18755
18756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18757fi
18758{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18759echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18760if test $ac_cv_have_decl_tzname = yes; then
18761
18762cat >>confdefs.h <<_ACEOF
18763#define HAVE_DECL_TZNAME 1
18764_ACEOF
18765
18766
18767else
18768 cat >>confdefs.h <<_ACEOF
18769#define HAVE_DECL_TZNAME 0
18770_ACEOF
18771
18772
18773fi
18774
18775
18776 { echo "$as_me:$LINENO: checking for tzname" >&5
18777echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018778if test "${ac_cv_var_tzname+set}" = set; then
18779 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018780else
Martin v. Löwis11437992002-04-12 09:54:03 +000018781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018782/* confdefs.h. */
18783_ACEOF
18784cat confdefs.h >>conftest.$ac_ext
18785cat >>conftest.$ac_ext <<_ACEOF
18786/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018787#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018788#if !HAVE_DECL_TZNAME
18789extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018790#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018791
Martin v. Löwis11437992002-04-12 09:54:03 +000018792int
18793main ()
18794{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018795return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018796 ;
18797 return 0;
18798}
18799_ACEOF
18800rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018801if { (ac_try="$ac_link"
18802case "(($ac_try" in
18803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18804 *) ac_try_echo=$ac_try;;
18805esac
18806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18807 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018809 grep -v '^ *+' conftest.er1 >conftest.err
18810 rm -f conftest.er1
18811 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018813 (exit $ac_status); } && {
18814 test -z "$ac_c_werror_flag" ||
18815 test ! -s conftest.err
18816 } && test -s conftest$ac_exeext &&
18817 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018818 ac_cv_var_tzname=yes
18819else
Martin v. Löwis11437992002-04-12 09:54:03 +000018820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018821sed 's/^/| /' conftest.$ac_ext >&5
18822
Martin v. Löwiseba40652007-08-30 20:10:57 +000018823 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018825
18826rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018827 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018829{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18830echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018831 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018832
18833cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018834#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018835_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018836
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018837 fi
18838fi
18839
Martin v. Löwiseba40652007-08-30 20:10:57 +000018840{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18841echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018842if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18843 echo $ECHO_N "(cached) $ECHO_C" >&6
18844else
18845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018846/* confdefs.h. */
18847_ACEOF
18848cat confdefs.h >>conftest.$ac_ext
18849cat >>conftest.$ac_ext <<_ACEOF
18850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018851$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018852int
18853main ()
18854{
18855static struct stat ac_aggr;
18856if (ac_aggr.st_rdev)
18857return 0;
18858 ;
18859 return 0;
18860}
18861_ACEOF
18862rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018863if { (ac_try="$ac_compile"
18864case "(($ac_try" in
18865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18866 *) ac_try_echo=$ac_try;;
18867esac
18868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18869 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018871 grep -v '^ *+' conftest.er1 >conftest.err
18872 rm -f conftest.er1
18873 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018875 (exit $ac_status); } && {
18876 test -z "$ac_c_werror_flag" ||
18877 test ! -s conftest.err
18878 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018879 ac_cv_member_struct_stat_st_rdev=yes
18880else
18881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018882sed 's/^/| /' conftest.$ac_ext >&5
18883
Martin v. Löwiseba40652007-08-30 20:10:57 +000018884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018885/* confdefs.h. */
18886_ACEOF
18887cat confdefs.h >>conftest.$ac_ext
18888cat >>conftest.$ac_ext <<_ACEOF
18889/* end confdefs.h. */
18890$ac_includes_default
18891int
18892main ()
18893{
18894static struct stat ac_aggr;
18895if (sizeof ac_aggr.st_rdev)
18896return 0;
18897 ;
18898 return 0;
18899}
18900_ACEOF
18901rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018902if { (ac_try="$ac_compile"
18903case "(($ac_try" in
18904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18905 *) ac_try_echo=$ac_try;;
18906esac
18907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18908 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018910 grep -v '^ *+' conftest.er1 >conftest.err
18911 rm -f conftest.er1
18912 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018914 (exit $ac_status); } && {
18915 test -z "$ac_c_werror_flag" ||
18916 test ! -s conftest.err
18917 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018918 ac_cv_member_struct_stat_st_rdev=yes
18919else
18920 echo "$as_me: failed program was:" >&5
18921sed 's/^/| /' conftest.$ac_ext >&5
18922
Martin v. Löwiseba40652007-08-30 20:10:57 +000018923 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018925
18926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018928
18929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018931{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18932echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018933if test $ac_cv_member_struct_stat_st_rdev = yes; then
18934
18935cat >>confdefs.h <<_ACEOF
18936#define HAVE_STRUCT_STAT_ST_RDEV 1
18937_ACEOF
18938
18939
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018940fi
18941
Martin v. Löwiseba40652007-08-30 20:10:57 +000018942{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18943echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018944if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18945 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018946else
Martin v. Löwis11437992002-04-12 09:54:03 +000018947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018948/* confdefs.h. */
18949_ACEOF
18950cat confdefs.h >>conftest.$ac_ext
18951cat >>conftest.$ac_ext <<_ACEOF
18952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018953$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018954int
18955main ()
18956{
18957static struct stat ac_aggr;
18958if (ac_aggr.st_blksize)
18959return 0;
18960 ;
18961 return 0;
18962}
18963_ACEOF
18964rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018965if { (ac_try="$ac_compile"
18966case "(($ac_try" in
18967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18968 *) ac_try_echo=$ac_try;;
18969esac
18970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018973 grep -v '^ *+' conftest.er1 >conftest.err
18974 rm -f conftest.er1
18975 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018977 (exit $ac_status); } && {
18978 test -z "$ac_c_werror_flag" ||
18979 test ! -s conftest.err
18980 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018981 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018982else
Martin v. Löwis11437992002-04-12 09:54:03 +000018983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018984sed 's/^/| /' conftest.$ac_ext >&5
18985
Martin v. Löwiseba40652007-08-30 20:10:57 +000018986 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018987/* confdefs.h. */
18988_ACEOF
18989cat confdefs.h >>conftest.$ac_ext
18990cat >>conftest.$ac_ext <<_ACEOF
18991/* end confdefs.h. */
18992$ac_includes_default
18993int
18994main ()
18995{
18996static struct stat ac_aggr;
18997if (sizeof ac_aggr.st_blksize)
18998return 0;
18999 ;
19000 return 0;
19001}
19002_ACEOF
19003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019004if { (ac_try="$ac_compile"
19005case "(($ac_try" in
19006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19007 *) ac_try_echo=$ac_try;;
19008esac
19009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19010 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019012 grep -v '^ *+' conftest.er1 >conftest.err
19013 rm -f conftest.er1
19014 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019016 (exit $ac_status); } && {
19017 test -z "$ac_c_werror_flag" ||
19018 test ! -s conftest.err
19019 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019020 ac_cv_member_struct_stat_st_blksize=yes
19021else
19022 echo "$as_me: failed program was:" >&5
19023sed 's/^/| /' conftest.$ac_ext >&5
19024
Martin v. Löwiseba40652007-08-30 20:10:57 +000019025 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019027
19028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019030
19031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019033{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19034echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019035if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019036
Martin v. Löwis11437992002-04-12 09:54:03 +000019037cat >>confdefs.h <<_ACEOF
19038#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19039_ACEOF
19040
19041
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019042fi
19043
Martin v. Löwiseba40652007-08-30 20:10:57 +000019044{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19045echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019046if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19047 echo $ECHO_N "(cached) $ECHO_C" >&6
19048else
19049 cat >conftest.$ac_ext <<_ACEOF
19050/* confdefs.h. */
19051_ACEOF
19052cat confdefs.h >>conftest.$ac_ext
19053cat >>conftest.$ac_ext <<_ACEOF
19054/* end confdefs.h. */
19055$ac_includes_default
19056int
19057main ()
19058{
19059static struct stat ac_aggr;
19060if (ac_aggr.st_flags)
19061return 0;
19062 ;
19063 return 0;
19064}
19065_ACEOF
19066rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019067if { (ac_try="$ac_compile"
19068case "(($ac_try" in
19069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19070 *) ac_try_echo=$ac_try;;
19071esac
19072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19073 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019074 ac_status=$?
19075 grep -v '^ *+' conftest.er1 >conftest.err
19076 rm -f conftest.er1
19077 cat conftest.err >&5
19078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019079 (exit $ac_status); } && {
19080 test -z "$ac_c_werror_flag" ||
19081 test ! -s conftest.err
19082 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019083 ac_cv_member_struct_stat_st_flags=yes
19084else
19085 echo "$as_me: failed program was:" >&5
19086sed 's/^/| /' conftest.$ac_ext >&5
19087
Martin v. Löwiseba40652007-08-30 20:10:57 +000019088 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019089/* confdefs.h. */
19090_ACEOF
19091cat confdefs.h >>conftest.$ac_ext
19092cat >>conftest.$ac_ext <<_ACEOF
19093/* end confdefs.h. */
19094$ac_includes_default
19095int
19096main ()
19097{
19098static struct stat ac_aggr;
19099if (sizeof ac_aggr.st_flags)
19100return 0;
19101 ;
19102 return 0;
19103}
19104_ACEOF
19105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019106if { (ac_try="$ac_compile"
19107case "(($ac_try" in
19108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19109 *) ac_try_echo=$ac_try;;
19110esac
19111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19112 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019113 ac_status=$?
19114 grep -v '^ *+' conftest.er1 >conftest.err
19115 rm -f conftest.er1
19116 cat conftest.err >&5
19117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019118 (exit $ac_status); } && {
19119 test -z "$ac_c_werror_flag" ||
19120 test ! -s conftest.err
19121 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019122 ac_cv_member_struct_stat_st_flags=yes
19123else
19124 echo "$as_me: failed program was:" >&5
19125sed 's/^/| /' conftest.$ac_ext >&5
19126
Martin v. Löwiseba40652007-08-30 20:10:57 +000019127 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019129
19130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019132
19133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019135{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19136echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019137if test $ac_cv_member_struct_stat_st_flags = yes; then
19138
19139cat >>confdefs.h <<_ACEOF
19140#define HAVE_STRUCT_STAT_ST_FLAGS 1
19141_ACEOF
19142
19143
19144fi
19145
Martin v. Löwiseba40652007-08-30 20:10:57 +000019146{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19147echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019148if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19149 echo $ECHO_N "(cached) $ECHO_C" >&6
19150else
19151 cat >conftest.$ac_ext <<_ACEOF
19152/* confdefs.h. */
19153_ACEOF
19154cat confdefs.h >>conftest.$ac_ext
19155cat >>conftest.$ac_ext <<_ACEOF
19156/* end confdefs.h. */
19157$ac_includes_default
19158int
19159main ()
19160{
19161static struct stat ac_aggr;
19162if (ac_aggr.st_gen)
19163return 0;
19164 ;
19165 return 0;
19166}
19167_ACEOF
19168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019169if { (ac_try="$ac_compile"
19170case "(($ac_try" in
19171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19172 *) ac_try_echo=$ac_try;;
19173esac
19174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019176 ac_status=$?
19177 grep -v '^ *+' conftest.er1 >conftest.err
19178 rm -f conftest.er1
19179 cat conftest.err >&5
19180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019181 (exit $ac_status); } && {
19182 test -z "$ac_c_werror_flag" ||
19183 test ! -s conftest.err
19184 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019185 ac_cv_member_struct_stat_st_gen=yes
19186else
19187 echo "$as_me: failed program was:" >&5
19188sed 's/^/| /' conftest.$ac_ext >&5
19189
Martin v. Löwiseba40652007-08-30 20:10:57 +000019190 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019191/* confdefs.h. */
19192_ACEOF
19193cat confdefs.h >>conftest.$ac_ext
19194cat >>conftest.$ac_ext <<_ACEOF
19195/* end confdefs.h. */
19196$ac_includes_default
19197int
19198main ()
19199{
19200static struct stat ac_aggr;
19201if (sizeof ac_aggr.st_gen)
19202return 0;
19203 ;
19204 return 0;
19205}
19206_ACEOF
19207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019208if { (ac_try="$ac_compile"
19209case "(($ac_try" in
19210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19211 *) ac_try_echo=$ac_try;;
19212esac
19213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019215 ac_status=$?
19216 grep -v '^ *+' conftest.er1 >conftest.err
19217 rm -f conftest.er1
19218 cat conftest.err >&5
19219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019220 (exit $ac_status); } && {
19221 test -z "$ac_c_werror_flag" ||
19222 test ! -s conftest.err
19223 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019224 ac_cv_member_struct_stat_st_gen=yes
19225else
19226 echo "$as_me: failed program was:" >&5
19227sed 's/^/| /' conftest.$ac_ext >&5
19228
Martin v. Löwiseba40652007-08-30 20:10:57 +000019229 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019231
19232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019234
19235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019237{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19238echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019239if test $ac_cv_member_struct_stat_st_gen = yes; then
19240
19241cat >>confdefs.h <<_ACEOF
19242#define HAVE_STRUCT_STAT_ST_GEN 1
19243_ACEOF
19244
19245
19246fi
19247
Martin v. Löwiseba40652007-08-30 20:10:57 +000019248{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19249echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019250if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19251 echo $ECHO_N "(cached) $ECHO_C" >&6
19252else
19253 cat >conftest.$ac_ext <<_ACEOF
19254/* confdefs.h. */
19255_ACEOF
19256cat confdefs.h >>conftest.$ac_ext
19257cat >>conftest.$ac_ext <<_ACEOF
19258/* end confdefs.h. */
19259$ac_includes_default
19260int
19261main ()
19262{
19263static struct stat ac_aggr;
19264if (ac_aggr.st_birthtime)
19265return 0;
19266 ;
19267 return 0;
19268}
19269_ACEOF
19270rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019271if { (ac_try="$ac_compile"
19272case "(($ac_try" in
19273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19274 *) ac_try_echo=$ac_try;;
19275esac
19276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019278 ac_status=$?
19279 grep -v '^ *+' conftest.er1 >conftest.err
19280 rm -f conftest.er1
19281 cat conftest.err >&5
19282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019283 (exit $ac_status); } && {
19284 test -z "$ac_c_werror_flag" ||
19285 test ! -s conftest.err
19286 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019287 ac_cv_member_struct_stat_st_birthtime=yes
19288else
19289 echo "$as_me: failed program was:" >&5
19290sed 's/^/| /' conftest.$ac_ext >&5
19291
Martin v. Löwiseba40652007-08-30 20:10:57 +000019292 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019293/* confdefs.h. */
19294_ACEOF
19295cat confdefs.h >>conftest.$ac_ext
19296cat >>conftest.$ac_ext <<_ACEOF
19297/* end confdefs.h. */
19298$ac_includes_default
19299int
19300main ()
19301{
19302static struct stat ac_aggr;
19303if (sizeof ac_aggr.st_birthtime)
19304return 0;
19305 ;
19306 return 0;
19307}
19308_ACEOF
19309rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019310if { (ac_try="$ac_compile"
19311case "(($ac_try" in
19312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19313 *) ac_try_echo=$ac_try;;
19314esac
19315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019317 ac_status=$?
19318 grep -v '^ *+' conftest.er1 >conftest.err
19319 rm -f conftest.er1
19320 cat conftest.err >&5
19321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019322 (exit $ac_status); } && {
19323 test -z "$ac_c_werror_flag" ||
19324 test ! -s conftest.err
19325 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019326 ac_cv_member_struct_stat_st_birthtime=yes
19327else
19328 echo "$as_me: failed program was:" >&5
19329sed 's/^/| /' conftest.$ac_ext >&5
19330
Martin v. Löwiseba40652007-08-30 20:10:57 +000019331 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019333
19334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019336
19337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019339{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19340echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019341if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19342
19343cat >>confdefs.h <<_ACEOF
19344#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19345_ACEOF
19346
19347
19348fi
19349
Martin v. Löwiseba40652007-08-30 20:10:57 +000019350{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19351echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019352if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19353 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019354else
Martin v. Löwis11437992002-04-12 09:54:03 +000019355 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019356/* confdefs.h. */
19357_ACEOF
19358cat confdefs.h >>conftest.$ac_ext
19359cat >>conftest.$ac_ext <<_ACEOF
19360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019361$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019362int
19363main ()
19364{
19365static struct stat ac_aggr;
19366if (ac_aggr.st_blocks)
19367return 0;
19368 ;
19369 return 0;
19370}
19371_ACEOF
19372rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019373if { (ac_try="$ac_compile"
19374case "(($ac_try" in
19375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19376 *) ac_try_echo=$ac_try;;
19377esac
19378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19379 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019381 grep -v '^ *+' conftest.er1 >conftest.err
19382 rm -f conftest.er1
19383 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019385 (exit $ac_status); } && {
19386 test -z "$ac_c_werror_flag" ||
19387 test ! -s conftest.err
19388 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019389 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019390else
Martin v. Löwis11437992002-04-12 09:54:03 +000019391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019392sed 's/^/| /' conftest.$ac_ext >&5
19393
Martin v. Löwiseba40652007-08-30 20:10:57 +000019394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019395/* confdefs.h. */
19396_ACEOF
19397cat confdefs.h >>conftest.$ac_ext
19398cat >>conftest.$ac_ext <<_ACEOF
19399/* end confdefs.h. */
19400$ac_includes_default
19401int
19402main ()
19403{
19404static struct stat ac_aggr;
19405if (sizeof ac_aggr.st_blocks)
19406return 0;
19407 ;
19408 return 0;
19409}
19410_ACEOF
19411rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019412if { (ac_try="$ac_compile"
19413case "(($ac_try" in
19414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19415 *) ac_try_echo=$ac_try;;
19416esac
19417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19418 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019420 grep -v '^ *+' conftest.er1 >conftest.err
19421 rm -f conftest.er1
19422 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019424 (exit $ac_status); } && {
19425 test -z "$ac_c_werror_flag" ||
19426 test ! -s conftest.err
19427 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019428 ac_cv_member_struct_stat_st_blocks=yes
19429else
19430 echo "$as_me: failed program was:" >&5
19431sed 's/^/| /' conftest.$ac_ext >&5
19432
Martin v. Löwiseba40652007-08-30 20:10:57 +000019433 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019435
19436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019438
19439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019441{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19442echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019443if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019444
Martin v. Löwis11437992002-04-12 09:54:03 +000019445cat >>confdefs.h <<_ACEOF
19446#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19447_ACEOF
19448
19449
19450cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019451#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019452_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019453
19454else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019455 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019456 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019457 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19458 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019459esac
19460
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019461fi
19462
Michael W. Hudson54241132001-12-07 15:38:26 +000019463
Martin v. Löwis11437992002-04-12 09:54:03 +000019464
Martin v. Löwiseba40652007-08-30 20:10:57 +000019465{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19466echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019467if test "${ac_cv_header_time_altzone+set}" = set; then
19468 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019469else
Martin v. Löwis11437992002-04-12 09:54:03 +000019470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019471/* confdefs.h. */
19472_ACEOF
19473cat confdefs.h >>conftest.$ac_ext
19474cat >>conftest.$ac_ext <<_ACEOF
19475/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019476#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019477int
19478main ()
19479{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019480return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019481 ;
19482 return 0;
19483}
19484_ACEOF
19485rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019486if { (ac_try="$ac_compile"
19487case "(($ac_try" in
19488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19489 *) ac_try_echo=$ac_try;;
19490esac
19491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19492 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019494 grep -v '^ *+' conftest.er1 >conftest.err
19495 rm -f conftest.er1
19496 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019498 (exit $ac_status); } && {
19499 test -z "$ac_c_werror_flag" ||
19500 test ! -s conftest.err
19501 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019502 ac_cv_header_time_altzone=yes
19503else
Martin v. Löwis11437992002-04-12 09:54:03 +000019504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019505sed 's/^/| /' conftest.$ac_ext >&5
19506
Martin v. Löwiseba40652007-08-30 20:10:57 +000019507 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019508fi
19509
Martin v. Löwiseba40652007-08-30 20:10:57 +000019510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19511fi
19512
19513{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19514echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019515if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019516
19517cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019518#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019519_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019520
19521fi
19522
Guido van Rossumda88dad1995-01-26 00:46:29 +000019523was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019524{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19525echo $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 +000019526cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019527/* confdefs.h. */
19528_ACEOF
19529cat confdefs.h >>conftest.$ac_ext
19530cat >>conftest.$ac_ext <<_ACEOF
19531/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019532
19533#include <sys/types.h>
19534#include <sys/select.h>
19535#include <sys/time.h>
19536
Martin v. Löwis11437992002-04-12 09:54:03 +000019537int
19538main ()
19539{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019540;
Martin v. Löwis11437992002-04-12 09:54:03 +000019541 ;
19542 return 0;
19543}
19544_ACEOF
19545rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019546if { (ac_try="$ac_compile"
19547case "(($ac_try" in
19548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19549 *) ac_try_echo=$ac_try;;
19550esac
19551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019554 grep -v '^ *+' conftest.er1 >conftest.err
19555 rm -f conftest.er1
19556 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019558 (exit $ac_status); } && {
19559 test -z "$ac_c_werror_flag" ||
19560 test ! -s conftest.err
19561 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019562
19563
19564cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019565#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019566_ACEOF
19567
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019568 was_it_defined=yes
19569
Guido van Rossumf78abae1997-01-21 22:02:36 +000019570else
Martin v. Löwis11437992002-04-12 09:54:03 +000019571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019572sed 's/^/| /' conftest.$ac_ext >&5
19573
Brett Cannon19fab762007-06-02 03:02:29 +000019574
Martin v. Löwiseba40652007-08-30 20:10:57 +000019575fi
19576
19577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19578{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19579echo "${ECHO_T}$was_it_defined" >&6; }
19580
19581{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19582echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019583if test "${ac_cv_struct_addrinfo+set}" = set; then
19584 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019585else
Martin v. Löwis11437992002-04-12 09:54:03 +000019586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019587/* confdefs.h. */
19588_ACEOF
19589cat confdefs.h >>conftest.$ac_ext
19590cat >>conftest.$ac_ext <<_ACEOF
19591/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019592
19593# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019594int
19595main ()
19596{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019597struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019598 ;
19599 return 0;
19600}
19601_ACEOF
19602rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019603if { (ac_try="$ac_compile"
19604case "(($ac_try" in
19605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19606 *) ac_try_echo=$ac_try;;
19607esac
19608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19609 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019611 grep -v '^ *+' conftest.er1 >conftest.err
19612 rm -f conftest.er1
19613 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019615 (exit $ac_status); } && {
19616 test -z "$ac_c_werror_flag" ||
19617 test ! -s conftest.err
19618 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019619 ac_cv_struct_addrinfo=yes
19620else
Martin v. Löwis11437992002-04-12 09:54:03 +000019621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019622sed 's/^/| /' conftest.$ac_ext >&5
19623
Martin v. Löwiseba40652007-08-30 20:10:57 +000019624 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019625fi
19626
Martin v. Löwiseba40652007-08-30 20:10:57 +000019627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19628fi
19629
19630{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19631echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019632if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019633
19634cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019635#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019636_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019637
19638fi
19639
Martin v. Löwiseba40652007-08-30 20:10:57 +000019640{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19641echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019642if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19643 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019644else
Martin v. Löwis11437992002-04-12 09:54:03 +000019645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019646/* confdefs.h. */
19647_ACEOF
19648cat confdefs.h >>conftest.$ac_ext
19649cat >>conftest.$ac_ext <<_ACEOF
19650/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019651
19652# include <sys/types.h>
19653# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019654int
19655main ()
19656{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019657struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019658 ;
19659 return 0;
19660}
19661_ACEOF
19662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019663if { (ac_try="$ac_compile"
19664case "(($ac_try" in
19665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19666 *) ac_try_echo=$ac_try;;
19667esac
19668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019671 grep -v '^ *+' conftest.er1 >conftest.err
19672 rm -f conftest.er1
19673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019675 (exit $ac_status); } && {
19676 test -z "$ac_c_werror_flag" ||
19677 test ! -s conftest.err
19678 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019679 ac_cv_struct_sockaddr_storage=yes
19680else
Martin v. Löwis11437992002-04-12 09:54:03 +000019681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019682sed 's/^/| /' conftest.$ac_ext >&5
19683
Martin v. Löwiseba40652007-08-30 20:10:57 +000019684 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019685fi
19686
Martin v. Löwiseba40652007-08-30 20:10:57 +000019687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19688fi
19689
19690{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19691echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019692if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019693
19694cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019695#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019696_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019697
19698fi
19699
Guido van Rossum627b2d71993-12-24 10:39:16 +000019700# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019701
Michael W. Hudson54241132001-12-07 15:38:26 +000019702
Martin v. Löwiseba40652007-08-30 20:10:57 +000019703{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19704echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019705if test "${ac_cv_c_char_unsigned+set}" = set; then
19706 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019707else
Martin v. Löwis11437992002-04-12 09:54:03 +000019708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019709/* confdefs.h. */
19710_ACEOF
19711cat confdefs.h >>conftest.$ac_ext
19712cat >>conftest.$ac_ext <<_ACEOF
19713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019714$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019715int
19716main ()
19717{
19718static int test_array [1 - 2 * !(((char) -1) < 0)];
19719test_array [0] = 0
19720
19721 ;
19722 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019723}
Martin v. Löwis11437992002-04-12 09:54:03 +000019724_ACEOF
19725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019726if { (ac_try="$ac_compile"
19727case "(($ac_try" in
19728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19729 *) ac_try_echo=$ac_try;;
19730esac
19731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019734 grep -v '^ *+' conftest.er1 >conftest.err
19735 rm -f conftest.er1
19736 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019738 (exit $ac_status); } && {
19739 test -z "$ac_c_werror_flag" ||
19740 test ! -s conftest.err
19741 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019742 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019743else
19744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019745sed 's/^/| /' conftest.$ac_ext >&5
19746
Martin v. Löwiseba40652007-08-30 20:10:57 +000019747 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019749
19750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019752{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19753echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019754if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019755 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019756#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019757_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019758
19759fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019760
Martin v. Löwiseba40652007-08-30 20:10:57 +000019761{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19762echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019763if test "${ac_cv_c_const+set}" = set; then
19764 echo $ECHO_N "(cached) $ECHO_C" >&6
19765else
19766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019767/* confdefs.h. */
19768_ACEOF
19769cat confdefs.h >>conftest.$ac_ext
19770cat >>conftest.$ac_ext <<_ACEOF
19771/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019772
Martin v. Löwis11437992002-04-12 09:54:03 +000019773int
19774main ()
19775{
19776/* FIXME: Include the comments suggested by Paul. */
19777#ifndef __cplusplus
19778 /* Ultrix mips cc rejects this. */
19779 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019780 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019781 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019782 char const *const *pcpcc;
19783 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019784 /* NEC SVR4.0.2 mips cc rejects this. */
19785 struct point {int x, y;};
19786 static struct point const zero = {0,0};
19787 /* AIX XL C 1.02.0.0 rejects this.
19788 It does not let you subtract one const X* pointer from another in
19789 an arm of an if-expression whose if-part is not a constant
19790 expression */
19791 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019792 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019793 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019794 ++pcpcc;
19795 ppc = (char**) pcpcc;
19796 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019797 { /* SCO 3.2v4 cc rejects this. */
19798 char *t;
19799 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019800
Martin v. Löwis11437992002-04-12 09:54:03 +000019801 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019802 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019803 }
19804 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19805 int x[] = {25, 17};
19806 const int *foo = &x[0];
19807 ++foo;
19808 }
19809 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19810 typedef const int *iptr;
19811 iptr p = 0;
19812 ++p;
19813 }
19814 { /* AIX XL C 1.02.0.0 rejects this saying
19815 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19816 struct s { int j; const int *ap[3]; };
19817 struct s *b; b->j = 5;
19818 }
19819 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19820 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019821 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019822 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019823 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019824#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019825
Martin v. Löwis11437992002-04-12 09:54:03 +000019826 ;
19827 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019828}
Martin v. Löwis11437992002-04-12 09:54:03 +000019829_ACEOF
19830rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019831if { (ac_try="$ac_compile"
19832case "(($ac_try" in
19833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19834 *) ac_try_echo=$ac_try;;
19835esac
19836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019839 grep -v '^ *+' conftest.er1 >conftest.err
19840 rm -f conftest.er1
19841 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019843 (exit $ac_status); } && {
19844 test -z "$ac_c_werror_flag" ||
19845 test ! -s conftest.err
19846 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019847 ac_cv_c_const=yes
19848else
Martin v. Löwis11437992002-04-12 09:54:03 +000019849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019850sed 's/^/| /' conftest.$ac_ext >&5
19851
Martin v. Löwiseba40652007-08-30 20:10:57 +000019852 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019854
19855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019857{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19858echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019859if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019860
19861cat >>confdefs.h <<\_ACEOF
19862#define const
19863_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019864
19865fi
19866
Michael W. Hudson54241132001-12-07 15:38:26 +000019867
Guido van Rossumda88dad1995-01-26 00:46:29 +000019868works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019869{ echo "$as_me:$LINENO: checking for working volatile" >&5
19870echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019871cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019872/* confdefs.h. */
19873_ACEOF
19874cat confdefs.h >>conftest.$ac_ext
19875cat >>conftest.$ac_ext <<_ACEOF
19876/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019877
Martin v. Löwis11437992002-04-12 09:54:03 +000019878int
19879main ()
19880{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019881volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019882 ;
19883 return 0;
19884}
19885_ACEOF
19886rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019887if { (ac_try="$ac_compile"
19888case "(($ac_try" in
19889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19890 *) ac_try_echo=$ac_try;;
19891esac
19892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019895 grep -v '^ *+' conftest.er1 >conftest.err
19896 rm -f conftest.er1
19897 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019899 (exit $ac_status); } && {
19900 test -z "$ac_c_werror_flag" ||
19901 test ! -s conftest.err
19902 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019903 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019904else
Martin v. Löwis11437992002-04-12 09:54:03 +000019905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019906sed 's/^/| /' conftest.$ac_ext >&5
19907
Martin v. Löwis11437992002-04-12 09:54:03 +000019908
19909cat >>confdefs.h <<\_ACEOF
19910#define volatile
19911_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019912
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019913
Guido van Rossum627b2d71993-12-24 10:39:16 +000019914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019915
19916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19917{ echo "$as_me:$LINENO: result: $works" >&5
19918echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019919
Guido van Rossumda88dad1995-01-26 00:46:29 +000019920works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019921{ echo "$as_me:$LINENO: checking for working signed char" >&5
19922echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019923cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019924/* confdefs.h. */
19925_ACEOF
19926cat confdefs.h >>conftest.$ac_ext
19927cat >>conftest.$ac_ext <<_ACEOF
19928/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019929
Martin v. Löwis11437992002-04-12 09:54:03 +000019930int
19931main ()
19932{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019933signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019934 ;
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
Martin v. Löwis11437992002-04-12 09:54:03 +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
Martin v. Löwis11437992002-04-12 09:54:03 +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
Guido van Rossumda88dad1995-01-26 00:46:29 +000019955 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019956else
Martin v. Löwis11437992002-04-12 09:54:03 +000019957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019958sed 's/^/| /' conftest.$ac_ext >&5
19959
Martin v. Löwis11437992002-04-12 09:54:03 +000019960
19961cat >>confdefs.h <<\_ACEOF
19962#define signed
19963_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019964
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019965
Guido van Rossum7f43da71994-08-01 12:15:30 +000019966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019967
19968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19969{ echo "$as_me:$LINENO: result: $works" >&5
19970echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019971
Guido van Rossumda88dad1995-01-26 00:46:29 +000019972have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019973{ echo "$as_me:$LINENO: checking for prototypes" >&5
19974echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019975cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019976/* confdefs.h. */
19977_ACEOF
19978cat confdefs.h >>conftest.$ac_ext
19979cat >>conftest.$ac_ext <<_ACEOF
19980/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019981int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019982int
19983main ()
19984{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019985return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019986 ;
19987 return 0;
19988}
19989_ACEOF
19990rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019991if { (ac_try="$ac_compile"
19992case "(($ac_try" in
19993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19994 *) ac_try_echo=$ac_try;;
19995esac
19996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19997 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019999 grep -v '^ *+' conftest.er1 >conftest.err
20000 rm -f conftest.er1
20001 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020003 (exit $ac_status); } && {
20004 test -z "$ac_c_werror_flag" ||
20005 test ! -s conftest.err
20006 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020007
20008
20009cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020010#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020011_ACEOF
20012
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020013 have_prototypes=yes
20014
Guido van Rossumf78abae1997-01-21 22:02:36 +000020015else
Martin v. Löwis11437992002-04-12 09:54:03 +000020016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020017sed 's/^/| /' conftest.$ac_ext >&5
20018
Martin v. Löwiseba40652007-08-30 20:10:57 +000020019
Guido van Rossum7f43da71994-08-01 12:15:30 +000020020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020021
20022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20023{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20024echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020025
Guido van Rossumda88dad1995-01-26 00:46:29 +000020026works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020027{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20028echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020030/* confdefs.h. */
20031_ACEOF
20032cat confdefs.h >>conftest.$ac_ext
20033cat >>conftest.$ac_ext <<_ACEOF
20034/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020035
20036#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020037int foo(int x, ...) {
20038 va_list va;
20039 va_start(va, x);
20040 va_arg(va, int);
20041 va_arg(va, char *);
20042 va_arg(va, double);
20043 return 0;
20044}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020045
Martin v. Löwis11437992002-04-12 09:54:03 +000020046int
20047main ()
20048{
Guido van Rossum90eea071996-08-30 20:58:57 +000020049return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020050 ;
20051 return 0;
20052}
20053_ACEOF
20054rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020055if { (ac_try="$ac_compile"
20056case "(($ac_try" in
20057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20058 *) ac_try_echo=$ac_try;;
20059esac
20060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20061 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020063 grep -v '^ *+' conftest.er1 >conftest.err
20064 rm -f conftest.er1
20065 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020067 (exit $ac_status); } && {
20068 test -z "$ac_c_werror_flag" ||
20069 test ! -s conftest.err
20070 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020071
20072
20073cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020074#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020075_ACEOF
20076
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020077 works=yes
20078
Guido van Rossumf78abae1997-01-21 22:02:36 +000020079else
Martin v. Löwis11437992002-04-12 09:54:03 +000020080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020081sed 's/^/| /' conftest.$ac_ext >&5
20082
Martin v. Löwiseba40652007-08-30 20:10:57 +000020083
Guido van Rossum627b2d71993-12-24 10:39:16 +000020084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020085
20086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20087{ echo "$as_me:$LINENO: result: $works" >&5
20088echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020089
Martin v. Löwisd6320502004-08-12 13:45:08 +000020090# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020091{ echo "$as_me:$LINENO: checking for socketpair" >&5
20092echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020093cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020094/* confdefs.h. */
20095_ACEOF
20096cat confdefs.h >>conftest.$ac_ext
20097cat >>conftest.$ac_ext <<_ACEOF
20098/* end confdefs.h. */
20099
20100#include <sys/types.h>
20101#include <sys/socket.h>
20102
20103int
20104main ()
20105{
20106void *x=socketpair
20107 ;
20108 return 0;
20109}
20110_ACEOF
20111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020112if { (ac_try="$ac_compile"
20113case "(($ac_try" in
20114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20115 *) ac_try_echo=$ac_try;;
20116esac
20117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020120 grep -v '^ *+' conftest.er1 >conftest.err
20121 rm -f conftest.er1
20122 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020124 (exit $ac_status); } && {
20125 test -z "$ac_c_werror_flag" ||
20126 test ! -s conftest.err
20127 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020128
20129cat >>confdefs.h <<\_ACEOF
20130#define HAVE_SOCKETPAIR 1
20131_ACEOF
20132
Martin v. Löwiseba40652007-08-30 20:10:57 +000020133 { echo "$as_me:$LINENO: result: yes" >&5
20134echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020135else
20136 echo "$as_me: failed program was:" >&5
20137sed 's/^/| /' conftest.$ac_ext >&5
20138
Martin v. Löwiseba40652007-08-30 20:10:57 +000020139 { echo "$as_me:$LINENO: result: no" >&5
20140echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020141
20142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020143
20144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020145
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020146# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020147{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20148echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020150/* confdefs.h. */
20151_ACEOF
20152cat confdefs.h >>conftest.$ac_ext
20153cat >>conftest.$ac_ext <<_ACEOF
20154/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020155#include <sys/types.h>
20156#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020157int
20158main ()
20159{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020160struct sockaddr x;
20161x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020162 ;
20163 return 0;
20164}
20165_ACEOF
20166rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020167if { (ac_try="$ac_compile"
20168case "(($ac_try" in
20169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20170 *) ac_try_echo=$ac_try;;
20171esac
20172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020175 grep -v '^ *+' conftest.er1 >conftest.err
20176 rm -f conftest.er1
20177 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020179 (exit $ac_status); } && {
20180 test -z "$ac_c_werror_flag" ||
20181 test ! -s conftest.err
20182 } && test -s conftest.$ac_objext; then
20183 { echo "$as_me:$LINENO: result: yes" >&5
20184echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020185
20186cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020187#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020188_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020189
20190else
Martin v. Löwis11437992002-04-12 09:54:03 +000020191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020192sed 's/^/| /' conftest.$ac_ext >&5
20193
Martin v. Löwiseba40652007-08-30 20:10:57 +000020194 { echo "$as_me:$LINENO: result: no" >&5
20195echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020197
20198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020199
Guido van Rossumda88dad1995-01-26 00:46:29 +000020200va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020201{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20202echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020203cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020204/* confdefs.h. */
20205_ACEOF
20206cat confdefs.h >>conftest.$ac_ext
20207cat >>conftest.$ac_ext <<_ACEOF
20208/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020209
20210#ifdef HAVE_STDARG_PROTOTYPES
20211#include <stdarg.h>
20212#else
20213#include <varargs.h>
20214#endif
20215
Martin v. Löwis11437992002-04-12 09:54:03 +000020216int
20217main ()
20218{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020219va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020220 ;
20221 return 0;
20222}
20223_ACEOF
20224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020225if { (ac_try="$ac_compile"
20226case "(($ac_try" in
20227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20228 *) ac_try_echo=$ac_try;;
20229esac
20230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020233 grep -v '^ *+' conftest.er1 >conftest.err
20234 rm -f conftest.er1
20235 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020237 (exit $ac_status); } && {
20238 test -z "$ac_c_werror_flag" ||
20239 test ! -s conftest.err
20240 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020241 :
20242else
Martin v. Löwis11437992002-04-12 09:54:03 +000020243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020244sed 's/^/| /' conftest.$ac_ext >&5
20245
Martin v. Löwis11437992002-04-12 09:54:03 +000020246
20247
20248cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020249#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020250_ACEOF
20251
Guido van Rossumda88dad1995-01-26 00:46:29 +000020252 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020253
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020255
20256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20257{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20258echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020259
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020260# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020261
20262
20263
Martin v. Löwiseba40652007-08-30 20:10:57 +000020264{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20265echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020266if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20267 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020268else
Martin v. Löwis11437992002-04-12 09:54:03 +000020269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020270/* confdefs.h. */
20271_ACEOF
20272cat confdefs.h >>conftest.$ac_ext
20273cat >>conftest.$ac_ext <<_ACEOF
20274/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020275/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20276 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20277#define gethostbyname_r innocuous_gethostbyname_r
20278
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020279/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020280 which can conflict with char gethostbyname_r (); below.
20281 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020282 <limits.h> exists even on freestanding compilers. */
20283
20284#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020285# include <limits.h>
20286#else
20287# include <assert.h>
20288#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020289
20290#undef gethostbyname_r
20291
Martin v. Löwiseba40652007-08-30 20:10:57 +000020292/* Override any GCC internal prototype to avoid an error.
20293 Use char because int might match the return type of a GCC
20294 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020295#ifdef __cplusplus
20296extern "C"
20297#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020298char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020299/* The GNU C library defines this for functions which it implements
20300 to always fail with ENOSYS. Some functions are actually named
20301 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020302#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020303choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020304#endif
20305
Skip Montanaro6dead952003-09-25 14:50:04 +000020306int
20307main ()
20308{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020309return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020310 ;
20311 return 0;
20312}
20313_ACEOF
20314rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020315if { (ac_try="$ac_link"
20316case "(($ac_try" in
20317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20318 *) ac_try_echo=$ac_try;;
20319esac
20320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20321 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020323 grep -v '^ *+' conftest.er1 >conftest.err
20324 rm -f conftest.er1
20325 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020327 (exit $ac_status); } && {
20328 test -z "$ac_c_werror_flag" ||
20329 test ! -s conftest.err
20330 } && test -s conftest$ac_exeext &&
20331 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020332 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020333else
Martin v. Löwis11437992002-04-12 09:54:03 +000020334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020335sed 's/^/| /' conftest.$ac_ext >&5
20336
Martin v. Löwiseba40652007-08-30 20:10:57 +000020337 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020339
20340rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020341 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020343{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20344echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020345if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020346
Martin v. Löwis11437992002-04-12 09:54:03 +000020347 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020348#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020349_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020350
Martin v. Löwiseba40652007-08-30 20:10:57 +000020351 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20352echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020353 OLD_CFLAGS=$CFLAGS
20354 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020355 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020356/* confdefs.h. */
20357_ACEOF
20358cat confdefs.h >>conftest.$ac_ext
20359cat >>conftest.$ac_ext <<_ACEOF
20360/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020361
20362# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020363
Martin v. Löwis11437992002-04-12 09:54:03 +000020364int
20365main ()
20366{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020367
20368 char *name;
20369 struct hostent *he, *res;
20370 char buffer[2048];
20371 int buflen = 2048;
20372 int h_errnop;
20373
20374 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020375
20376 ;
20377 return 0;
20378}
20379_ACEOF
20380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020381if { (ac_try="$ac_compile"
20382case "(($ac_try" in
20383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20384 *) ac_try_echo=$ac_try;;
20385esac
20386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020389 grep -v '^ *+' conftest.er1 >conftest.err
20390 rm -f conftest.er1
20391 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020393 (exit $ac_status); } && {
20394 test -z "$ac_c_werror_flag" ||
20395 test ! -s conftest.err
20396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020397
20398 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020399#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020400_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020401
Martin v. Löwis11437992002-04-12 09:54:03 +000020402
20403cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020404#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020405_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020406
Martin v. Löwiseba40652007-08-30 20:10:57 +000020407 { echo "$as_me:$LINENO: result: yes" >&5
20408echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020409
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020410else
Martin v. Löwis11437992002-04-12 09:54:03 +000020411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020412sed 's/^/| /' conftest.$ac_ext >&5
20413
Martin v. Löwis11437992002-04-12 09:54:03 +000020414
Martin v. Löwiseba40652007-08-30 20:10:57 +000020415 { echo "$as_me:$LINENO: result: no" >&5
20416echo "${ECHO_T}no" >&6; }
20417 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20418echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020420/* confdefs.h. */
20421_ACEOF
20422cat confdefs.h >>conftest.$ac_ext
20423cat >>conftest.$ac_ext <<_ACEOF
20424/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020425
20426# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020427
Martin v. Löwis11437992002-04-12 09:54:03 +000020428int
20429main ()
20430{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020431
20432 char *name;
20433 struct hostent *he;
20434 char buffer[2048];
20435 int buflen = 2048;
20436 int h_errnop;
20437
20438 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020439
20440 ;
20441 return 0;
20442}
20443_ACEOF
20444rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020445if { (ac_try="$ac_compile"
20446case "(($ac_try" in
20447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20448 *) ac_try_echo=$ac_try;;
20449esac
20450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020453 grep -v '^ *+' conftest.er1 >conftest.err
20454 rm -f conftest.er1
20455 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020457 (exit $ac_status); } && {
20458 test -z "$ac_c_werror_flag" ||
20459 test ! -s conftest.err
20460 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020461
20462 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020463#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020464_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020465
Martin v. Löwis11437992002-04-12 09:54:03 +000020466
20467cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020468#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020469_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020470
Martin v. Löwiseba40652007-08-30 20:10:57 +000020471 { echo "$as_me:$LINENO: result: yes" >&5
20472echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020473
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020474else
Martin v. Löwis11437992002-04-12 09:54:03 +000020475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020476sed 's/^/| /' conftest.$ac_ext >&5
20477
Martin v. Löwis11437992002-04-12 09:54:03 +000020478
Martin v. Löwiseba40652007-08-30 20:10:57 +000020479 { echo "$as_me:$LINENO: result: no" >&5
20480echo "${ECHO_T}no" >&6; }
20481 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20482echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020484/* confdefs.h. */
20485_ACEOF
20486cat confdefs.h >>conftest.$ac_ext
20487cat >>conftest.$ac_ext <<_ACEOF
20488/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020489
20490# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020491
Martin v. Löwis11437992002-04-12 09:54:03 +000020492int
20493main ()
20494{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020495
20496 char *name;
20497 struct hostent *he;
20498 struct hostent_data data;
20499
20500 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020501
20502 ;
20503 return 0;
20504}
20505_ACEOF
20506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020507if { (ac_try="$ac_compile"
20508case "(($ac_try" in
20509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20510 *) ac_try_echo=$ac_try;;
20511esac
20512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020515 grep -v '^ *+' conftest.er1 >conftest.err
20516 rm -f conftest.er1
20517 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020519 (exit $ac_status); } && {
20520 test -z "$ac_c_werror_flag" ||
20521 test ! -s conftest.err
20522 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020523
20524 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020525#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020526_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020527
Martin v. Löwis11437992002-04-12 09:54:03 +000020528
20529cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020530#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020531_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020532
Martin v. Löwiseba40652007-08-30 20:10:57 +000020533 { echo "$as_me:$LINENO: result: yes" >&5
20534echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020535
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020536else
Martin v. Löwis11437992002-04-12 09:54:03 +000020537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020538sed 's/^/| /' conftest.$ac_ext >&5
20539
Martin v. Löwis11437992002-04-12 09:54:03 +000020540
Martin v. Löwiseba40652007-08-30 20:10:57 +000020541 { echo "$as_me:$LINENO: result: no" >&5
20542echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020543
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020545
20546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020547
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020549
20550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020553
20554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020555 CFLAGS=$OLD_CFLAGS
20556
20557else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020558
Martin v. Löwis11437992002-04-12 09:54:03 +000020559
20560for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020561do
Martin v. Löwis11437992002-04-12 09:54:03 +000020562as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020563{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20564echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20565if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020566 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020567else
Martin v. Löwis11437992002-04-12 09:54:03 +000020568 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020569/* confdefs.h. */
20570_ACEOF
20571cat confdefs.h >>conftest.$ac_ext
20572cat >>conftest.$ac_ext <<_ACEOF
20573/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020574/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20575 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20576#define $ac_func innocuous_$ac_func
20577
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020578/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020579 which can conflict with char $ac_func (); below.
20580 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020581 <limits.h> exists even on freestanding compilers. */
20582
20583#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020584# include <limits.h>
20585#else
20586# include <assert.h>
20587#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020588
20589#undef $ac_func
20590
Martin v. Löwiseba40652007-08-30 20:10:57 +000020591/* Override any GCC internal prototype to avoid an error.
20592 Use char because int might match the return type of a GCC
20593 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020594#ifdef __cplusplus
20595extern "C"
20596#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020597char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020598/* The GNU C library defines this for functions which it implements
20599 to always fail with ENOSYS. Some functions are actually named
20600 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020601#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020602choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020603#endif
20604
Skip Montanaro6dead952003-09-25 14:50:04 +000020605int
20606main ()
20607{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020608return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020609 ;
20610 return 0;
20611}
20612_ACEOF
20613rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020614if { (ac_try="$ac_link"
20615case "(($ac_try" in
20616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20617 *) ac_try_echo=$ac_try;;
20618esac
20619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20620 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020622 grep -v '^ *+' conftest.er1 >conftest.err
20623 rm -f conftest.er1
20624 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020626 (exit $ac_status); } && {
20627 test -z "$ac_c_werror_flag" ||
20628 test ! -s conftest.err
20629 } && test -s conftest$ac_exeext &&
20630 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020631 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020632else
Martin v. Löwis11437992002-04-12 09:54:03 +000020633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020634sed 's/^/| /' conftest.$ac_ext >&5
20635
Martin v. Löwiseba40652007-08-30 20:10:57 +000020636 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020638
20639rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020640 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020642ac_res=`eval echo '${'$as_ac_var'}'`
20643 { echo "$as_me:$LINENO: result: $ac_res" >&5
20644echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020645if test `eval echo '${'$as_ac_var'}'` = yes; then
20646 cat >>confdefs.h <<_ACEOF
20647#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20648_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020649
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020650fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020651done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020652
Michael W. Hudson54241132001-12-07 15:38:26 +000020653
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020654fi
20655
Michael W. Hudson54241132001-12-07 15:38:26 +000020656
20657
20658
20659
20660
20661
Guido van Rossum627b2d71993-12-24 10:39:16 +000020662# checks for system services
20663# (none yet)
20664
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020665# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020666{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20667echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020668if test "${ac_cv_func___fpu_control+set}" = set; then
20669 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020670else
Martin v. Löwis11437992002-04-12 09:54:03 +000020671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020672/* confdefs.h. */
20673_ACEOF
20674cat confdefs.h >>conftest.$ac_ext
20675cat >>conftest.$ac_ext <<_ACEOF
20676/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020677/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20678 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20679#define __fpu_control innocuous___fpu_control
20680
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020681/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020682 which can conflict with char __fpu_control (); below.
20683 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020684 <limits.h> exists even on freestanding compilers. */
20685
20686#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020687# include <limits.h>
20688#else
20689# include <assert.h>
20690#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020691
20692#undef __fpu_control
20693
Martin v. Löwiseba40652007-08-30 20:10:57 +000020694/* Override any GCC internal prototype to avoid an error.
20695 Use char because int might match the return type of a GCC
20696 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020697#ifdef __cplusplus
20698extern "C"
20699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020700char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020701/* The GNU C library defines this for functions which it implements
20702 to always fail with ENOSYS. Some functions are actually named
20703 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020704#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020705choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020706#endif
20707
Skip Montanaro6dead952003-09-25 14:50:04 +000020708int
20709main ()
20710{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020711return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020712 ;
20713 return 0;
20714}
20715_ACEOF
20716rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020717if { (ac_try="$ac_link"
20718case "(($ac_try" in
20719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20720 *) ac_try_echo=$ac_try;;
20721esac
20722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20723 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020725 grep -v '^ *+' conftest.er1 >conftest.err
20726 rm -f conftest.er1
20727 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020729 (exit $ac_status); } && {
20730 test -z "$ac_c_werror_flag" ||
20731 test ! -s conftest.err
20732 } && test -s conftest$ac_exeext &&
20733 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020734 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020735else
Martin v. Löwis11437992002-04-12 09:54:03 +000020736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020737sed 's/^/| /' conftest.$ac_ext >&5
20738
Martin v. Löwiseba40652007-08-30 20:10:57 +000020739 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020741
20742rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020743 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020745{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20746echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020747if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020748 :
20749else
Martin v. Löwis11437992002-04-12 09:54:03 +000020750
Martin v. Löwiseba40652007-08-30 20:10:57 +000020751{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20752echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020753if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20754 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020755else
Martin v. Löwis11437992002-04-12 09:54:03 +000020756 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020757LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020759/* confdefs.h. */
20760_ACEOF
20761cat confdefs.h >>conftest.$ac_ext
20762cat >>conftest.$ac_ext <<_ACEOF
20763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020764
Martin v. Löwiseba40652007-08-30 20:10:57 +000020765/* Override any GCC internal prototype to avoid an error.
20766 Use char because int might match the return type of a GCC
20767 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020768#ifdef __cplusplus
20769extern "C"
20770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020771char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020772int
20773main ()
20774{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020775return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020776 ;
20777 return 0;
20778}
20779_ACEOF
20780rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020781if { (ac_try="$ac_link"
20782case "(($ac_try" in
20783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20784 *) ac_try_echo=$ac_try;;
20785esac
20786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20787 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020789 grep -v '^ *+' conftest.er1 >conftest.err
20790 rm -f conftest.er1
20791 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020793 (exit $ac_status); } && {
20794 test -z "$ac_c_werror_flag" ||
20795 test ! -s conftest.err
20796 } && test -s conftest$ac_exeext &&
20797 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020798 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020799else
Martin v. Löwis11437992002-04-12 09:54:03 +000020800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020801sed 's/^/| /' conftest.$ac_ext >&5
20802
Martin v. Löwiseba40652007-08-30 20:10:57 +000020803 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020805
20806rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020807 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020808LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020810{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20811echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020812if test $ac_cv_lib_ieee___fpu_control = yes; then
20813 cat >>confdefs.h <<_ACEOF
20814#define HAVE_LIBIEEE 1
20815_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020816
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020817 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020818
Guido van Rossum627b2d71993-12-24 10:39:16 +000020819fi
20820
Michael W. Hudson54241132001-12-07 15:38:26 +000020821
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020822fi
20823
Michael W. Hudson54241132001-12-07 15:38:26 +000020824
Guido van Rossum7f253911997-05-09 02:42:48 +000020825# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020826{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20827echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020828
Martin v. Löwiseba40652007-08-30 20:10:57 +000020829# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020830if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020831 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020832if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020833then
20834
20835cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020836#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020837_ACEOF
20838
Martin v. Löwiseba40652007-08-30 20:10:57 +000020839 { echo "$as_me:$LINENO: result: yes" >&5
20840echo "${ECHO_T}yes" >&6; }
20841else { echo "$as_me:$LINENO: result: no" >&5
20842echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020843fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020844else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020845 { echo "$as_me:$LINENO: result: no" >&5
20846echo "${ECHO_T}no" >&6; }
20847fi
20848
Guido van Rossum7f253911997-05-09 02:42:48 +000020849
Guido van Rossum7f43da71994-08-01 12:15:30 +000020850# check for --with-libm=...
20851
Guido van Rossum563e7081996-09-10 18:20:48 +000020852case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020853Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020854BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020855*) LIBM=-lm
20856esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020857{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20858echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020859
Martin v. Löwiseba40652007-08-30 20:10:57 +000020860# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020861if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020862 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020863if test "$withval" = no
20864then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020865 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20866echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020867elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020868then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020869 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20870echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020871else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20872echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20873 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020874fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020875else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020876 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20877echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20878fi
20879
Guido van Rossum7f43da71994-08-01 12:15:30 +000020880
20881# check for --with-libc=...
20882
Martin v. Löwiseba40652007-08-30 20:10:57 +000020883{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20884echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020885
Martin v. Löwiseba40652007-08-30 20:10:57 +000020886# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020887if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020888 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020889if test "$withval" = no
20890then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020891 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20892echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020893elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020894then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020895 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20896echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020897else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20898echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20899 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020900fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020901else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020902 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20903echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20904fi
20905
Guido van Rossum7f43da71994-08-01 12:15:30 +000020906
Christian Heimes0a8143f2007-12-18 23:22:54 +000020907# ************************************
20908# * Check for mathematical functions *
20909# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000020910
Mark Dickinson7a3d8642008-04-22 00:54:27 +000020911LIBS_SAVE=$LIBS
20912LIBS="$LIBS $LIBM"
20913
Mark Dickinson265d7382008-04-21 22:32:24 +000020914# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
20915# -0. on some architectures.
20916{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
20917echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
20918if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
20919 echo $ECHO_N "(cached) $ECHO_C" >&6
20920else
20921
20922if test "$cross_compiling" = yes; then
20923 ac_cv_tanh_preserves_zero_sign=no
20924else
20925 cat >conftest.$ac_ext <<_ACEOF
20926/* confdefs.h. */
20927_ACEOF
20928cat confdefs.h >>conftest.$ac_ext
20929cat >>conftest.$ac_ext <<_ACEOF
20930/* end confdefs.h. */
20931
20932#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000020933#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000020934int main() {
20935 /* return 0 if either negative zeros don't exist
20936 on this platform or if negative zeros exist
20937 and tanh(-0.) == -0. */
20938 if (atan2(0., -1.) == atan2(-0., -1.) ||
20939 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
20940 else exit(1);
20941}
20942
20943_ACEOF
20944rm -f conftest$ac_exeext
20945if { (ac_try="$ac_link"
20946case "(($ac_try" in
20947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20948 *) ac_try_echo=$ac_try;;
20949esac
20950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20951 (eval "$ac_link") 2>&5
20952 ac_status=$?
20953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20954 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20955 { (case "(($ac_try" in
20956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20957 *) ac_try_echo=$ac_try;;
20958esac
20959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20960 (eval "$ac_try") 2>&5
20961 ac_status=$?
20962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20963 (exit $ac_status); }; }; then
20964 ac_cv_tanh_preserves_zero_sign=yes
20965else
20966 echo "$as_me: program exited with status $ac_status" >&5
20967echo "$as_me: failed program was:" >&5
20968sed 's/^/| /' conftest.$ac_ext >&5
20969
20970( exit $ac_status )
20971ac_cv_tanh_preserves_zero_sign=no
20972fi
20973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20974fi
20975
20976
20977fi
20978
20979{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
20980echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
20981if test "$ac_cv_tanh_preserves_zero_sign" = yes
20982then
20983
20984cat >>confdefs.h <<\_ACEOF
20985#define TANH_PRESERVES_ZERO_SIGN 1
20986_ACEOF
20987
20988fi
20989
Martin v. Löwis11437992002-04-12 09:54:03 +000020990
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020991for ac_func in hypot
20992do
Martin v. Löwis11437992002-04-12 09:54:03 +000020993as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020994{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20995echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20996if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020997 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020998else
Martin v. Löwis11437992002-04-12 09:54:03 +000020999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021000/* confdefs.h. */
21001_ACEOF
21002cat confdefs.h >>conftest.$ac_ext
21003cat >>conftest.$ac_ext <<_ACEOF
21004/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021005/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21006 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21007#define $ac_func innocuous_$ac_func
21008
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021009/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021010 which can conflict with char $ac_func (); below.
21011 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021012 <limits.h> exists even on freestanding compilers. */
21013
21014#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021015# include <limits.h>
21016#else
21017# include <assert.h>
21018#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021019
21020#undef $ac_func
21021
Martin v. Löwiseba40652007-08-30 20:10:57 +000021022/* Override any GCC internal prototype to avoid an error.
21023 Use char because int might match the return type of a GCC
21024 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021025#ifdef __cplusplus
21026extern "C"
21027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021028char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021029/* The GNU C library defines this for functions which it implements
21030 to always fail with ENOSYS. Some functions are actually named
21031 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021032#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021033choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021034#endif
21035
Skip Montanaro6dead952003-09-25 14:50:04 +000021036int
21037main ()
21038{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021039return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021040 ;
21041 return 0;
21042}
21043_ACEOF
21044rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021045if { (ac_try="$ac_link"
21046case "(($ac_try" in
21047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21048 *) ac_try_echo=$ac_try;;
21049esac
21050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21051 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021053 grep -v '^ *+' conftest.er1 >conftest.err
21054 rm -f conftest.er1
21055 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021057 (exit $ac_status); } && {
21058 test -z "$ac_c_werror_flag" ||
21059 test ! -s conftest.err
21060 } && test -s conftest$ac_exeext &&
21061 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021062 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021063else
Martin v. Löwis11437992002-04-12 09:54:03 +000021064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021065sed 's/^/| /' conftest.$ac_ext >&5
21066
Martin v. Löwiseba40652007-08-30 20:10:57 +000021067 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021069
21070rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021071 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021073ac_res=`eval echo '${'$as_ac_var'}'`
21074 { echo "$as_me:$LINENO: result: $ac_res" >&5
21075echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021076if test `eval echo '${'$as_ac_var'}'` = yes; then
21077 cat >>confdefs.h <<_ACEOF
21078#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21079_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000021080
Michael W. Hudson54241132001-12-07 15:38:26 +000021081else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021082 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021083 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021084 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21085 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021086esac
21087
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021088fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021089done
21090
Michael W. Hudson54241132001-12-07 15:38:26 +000021091
Christian Heimes0a8143f2007-12-18 23:22:54 +000021092
21093
21094
21095
21096
Christian Heimes48723512008-01-20 14:28:28 +000021097
21098
21099
21100
21101
21102for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021103do
21104as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21105{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21106echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21107if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21108 echo $ECHO_N "(cached) $ECHO_C" >&6
21109else
21110 cat >conftest.$ac_ext <<_ACEOF
21111/* confdefs.h. */
21112_ACEOF
21113cat confdefs.h >>conftest.$ac_ext
21114cat >>conftest.$ac_ext <<_ACEOF
21115/* end confdefs.h. */
21116/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21117 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21118#define $ac_func innocuous_$ac_func
21119
21120/* System header to define __stub macros and hopefully few prototypes,
21121 which can conflict with char $ac_func (); below.
21122 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21123 <limits.h> exists even on freestanding compilers. */
21124
21125#ifdef __STDC__
21126# include <limits.h>
21127#else
21128# include <assert.h>
21129#endif
21130
21131#undef $ac_func
21132
21133/* Override any GCC internal prototype to avoid an error.
21134 Use char because int might match the return type of a GCC
21135 builtin and then its argument prototype would still apply. */
21136#ifdef __cplusplus
21137extern "C"
21138#endif
21139char $ac_func ();
21140/* The GNU C library defines this for functions which it implements
21141 to always fail with ENOSYS. Some functions are actually named
21142 something starting with __ and the normal name is an alias. */
21143#if defined __stub_$ac_func || defined __stub___$ac_func
21144choke me
21145#endif
21146
21147int
21148main ()
21149{
21150return $ac_func ();
21151 ;
21152 return 0;
21153}
21154_ACEOF
21155rm -f conftest.$ac_objext conftest$ac_exeext
21156if { (ac_try="$ac_link"
21157case "(($ac_try" in
21158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21159 *) ac_try_echo=$ac_try;;
21160esac
21161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21162 (eval "$ac_link") 2>conftest.er1
21163 ac_status=$?
21164 grep -v '^ *+' conftest.er1 >conftest.err
21165 rm -f conftest.er1
21166 cat conftest.err >&5
21167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21168 (exit $ac_status); } && {
21169 test -z "$ac_c_werror_flag" ||
21170 test ! -s conftest.err
21171 } && test -s conftest$ac_exeext &&
21172 $as_test_x conftest$ac_exeext; then
21173 eval "$as_ac_var=yes"
21174else
21175 echo "$as_me: failed program was:" >&5
21176sed 's/^/| /' conftest.$ac_ext >&5
21177
21178 eval "$as_ac_var=no"
21179fi
21180
21181rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21182 conftest$ac_exeext conftest.$ac_ext
21183fi
21184ac_res=`eval echo '${'$as_ac_var'}'`
21185 { echo "$as_me:$LINENO: result: $ac_res" >&5
21186echo "${ECHO_T}$ac_res" >&6; }
21187if test `eval echo '${'$as_ac_var'}'` = yes; then
21188 cat >>confdefs.h <<_ACEOF
21189#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21190_ACEOF
21191
21192fi
21193done
21194
21195
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021196LIBS=$LIBS_SAVE
21197
Guido van Rossumef2255b2000-03-10 22:30:29 +000021198# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021199if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021200 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21201echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021202if test "${ac_cv_header_wchar_h+set}" = set; then
21203 echo $ECHO_N "(cached) $ECHO_C" >&6
21204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021205{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21206echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021207else
Martin v. Löwis11437992002-04-12 09:54:03 +000021208 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021209{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21210echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021212/* confdefs.h. */
21213_ACEOF
21214cat confdefs.h >>conftest.$ac_ext
21215cat >>conftest.$ac_ext <<_ACEOF
21216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021217$ac_includes_default
21218#include <wchar.h>
21219_ACEOF
21220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021221if { (ac_try="$ac_compile"
21222case "(($ac_try" in
21223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21224 *) ac_try_echo=$ac_try;;
21225esac
21226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021229 grep -v '^ *+' conftest.er1 >conftest.err
21230 rm -f conftest.er1
21231 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233 (exit $ac_status); } && {
21234 test -z "$ac_c_werror_flag" ||
21235 test ! -s conftest.err
21236 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021237 ac_header_compiler=yes
21238else
21239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021240sed 's/^/| /' conftest.$ac_ext >&5
21241
Martin v. Löwiseba40652007-08-30 20:10:57 +000021242 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021244
21245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21246{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21247echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021248
21249# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021250{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21251echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021253/* confdefs.h. */
21254_ACEOF
21255cat confdefs.h >>conftest.$ac_ext
21256cat >>conftest.$ac_ext <<_ACEOF
21257/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021258#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021259_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021260if { (ac_try="$ac_cpp conftest.$ac_ext"
21261case "(($ac_try" in
21262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21263 *) ac_try_echo=$ac_try;;
21264esac
21265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21266 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021267 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021268 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021269 rm -f conftest.er1
21270 cat conftest.err >&5
21271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021272 (exit $ac_status); } >/dev/null && {
21273 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21274 test ! -s conftest.err
21275 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021276 ac_header_preproc=yes
21277else
21278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021279sed 's/^/| /' conftest.$ac_ext >&5
21280
Martin v. Löwis11437992002-04-12 09:54:03 +000021281 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021283
Martin v. Löwis11437992002-04-12 09:54:03 +000021284rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021285{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21286echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021287
21288# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021289case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21290 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021291 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21292echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021293 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21294echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21295 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021296 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021297 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021298 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21299echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021300 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21301echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21302 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21303echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21304 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21305echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021306 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21307echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021308 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21309echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021310 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021311## ------------------------------------------------ ##
21312## Report this to http://www.python.org/python-bugs ##
21313## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021314_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021315 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021316 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021317esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021318{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21319echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021320if test "${ac_cv_header_wchar_h+set}" = set; then
21321 echo $ECHO_N "(cached) $ECHO_C" >&6
21322else
21323 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021325{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21326echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021327
21328fi
21329if test $ac_cv_header_wchar_h = yes; then
21330
21331
21332cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021333#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021334_ACEOF
21335
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021336 wchar_h="yes"
21337
Guido van Rossumef2255b2000-03-10 22:30:29 +000021338else
Martin v. Löwis11437992002-04-12 09:54:03 +000021339 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021340
21341fi
21342
Michael W. Hudson54241132001-12-07 15:38:26 +000021343
Martin v. Löwis11437992002-04-12 09:54:03 +000021344
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021345# determine wchar_t size
21346if test "$wchar_h" = yes
21347then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021348 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21349echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021350if test "${ac_cv_type_wchar_t+set}" = set; then
21351 echo $ECHO_N "(cached) $ECHO_C" >&6
21352else
21353 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021354/* confdefs.h. */
21355_ACEOF
21356cat confdefs.h >>conftest.$ac_ext
21357cat >>conftest.$ac_ext <<_ACEOF
21358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021359#include <wchar.h>
21360
Martin v. Löwiseba40652007-08-30 20:10:57 +000021361typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021362int
21363main ()
21364{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021365if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021366 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021367if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021368 return 0;
21369 ;
21370 return 0;
21371}
21372_ACEOF
21373rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021374if { (ac_try="$ac_compile"
21375case "(($ac_try" in
21376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21377 *) ac_try_echo=$ac_try;;
21378esac
21379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21380 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021382 grep -v '^ *+' conftest.er1 >conftest.err
21383 rm -f conftest.er1
21384 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021386 (exit $ac_status); } && {
21387 test -z "$ac_c_werror_flag" ||
21388 test ! -s conftest.err
21389 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021390 ac_cv_type_wchar_t=yes
21391else
21392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021393sed 's/^/| /' conftest.$ac_ext >&5
21394
Martin v. Löwiseba40652007-08-30 20:10:57 +000021395 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021396fi
Brett Cannon19fab762007-06-02 03:02:29 +000021397
Martin v. Löwiseba40652007-08-30 20:10:57 +000021398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21399fi
21400{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21401echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21402
21403# The cast to long int works around a bug in the HP C Compiler
21404# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21405# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21406# This bug is HP SR number 8606223364.
21407{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21408echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021409if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21410 echo $ECHO_N "(cached) $ECHO_C" >&6
21411else
Martin v. Löwis11437992002-04-12 09:54:03 +000021412 if test "$cross_compiling" = yes; then
21413 # Depending upon the size, compute the lo and hi bounds.
21414cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021415/* confdefs.h. */
21416_ACEOF
21417cat confdefs.h >>conftest.$ac_ext
21418cat >>conftest.$ac_ext <<_ACEOF
21419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021420#include <wchar.h>
21421
Martin v. Löwiseba40652007-08-30 20:10:57 +000021422 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021423int
21424main ()
21425{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021426static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021427test_array [0] = 0
21428
21429 ;
21430 return 0;
21431}
21432_ACEOF
21433rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021434if { (ac_try="$ac_compile"
21435case "(($ac_try" in
21436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21437 *) ac_try_echo=$ac_try;;
21438esac
21439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021442 grep -v '^ *+' conftest.er1 >conftest.err
21443 rm -f conftest.er1
21444 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021446 (exit $ac_status); } && {
21447 test -z "$ac_c_werror_flag" ||
21448 test ! -s conftest.err
21449 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021450 ac_lo=0 ac_mid=0
21451 while :; do
21452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021453/* confdefs.h. */
21454_ACEOF
21455cat confdefs.h >>conftest.$ac_ext
21456cat >>conftest.$ac_ext <<_ACEOF
21457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021458#include <wchar.h>
21459
Martin v. Löwiseba40652007-08-30 20:10:57 +000021460 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021461int
21462main ()
21463{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021464static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021465test_array [0] = 0
21466
21467 ;
21468 return 0;
21469}
21470_ACEOF
21471rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021472if { (ac_try="$ac_compile"
21473case "(($ac_try" in
21474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21475 *) ac_try_echo=$ac_try;;
21476esac
21477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21478 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021480 grep -v '^ *+' conftest.er1 >conftest.err
21481 rm -f conftest.er1
21482 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021484 (exit $ac_status); } && {
21485 test -z "$ac_c_werror_flag" ||
21486 test ! -s conftest.err
21487 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021488 ac_hi=$ac_mid; break
21489else
21490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021491sed 's/^/| /' conftest.$ac_ext >&5
21492
Martin v. Löwiseba40652007-08-30 20:10:57 +000021493 ac_lo=`expr $ac_mid + 1`
21494 if test $ac_lo -le $ac_mid; then
21495 ac_lo= ac_hi=
21496 break
21497 fi
21498 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021500
21501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021502 done
21503else
21504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021505sed 's/^/| /' conftest.$ac_ext >&5
21506
Martin v. Löwiseba40652007-08-30 20:10:57 +000021507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021508/* confdefs.h. */
21509_ACEOF
21510cat confdefs.h >>conftest.$ac_ext
21511cat >>conftest.$ac_ext <<_ACEOF
21512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021513#include <wchar.h>
21514
Martin v. Löwiseba40652007-08-30 20:10:57 +000021515 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021516int
21517main ()
21518{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021519static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021520test_array [0] = 0
21521
21522 ;
21523 return 0;
21524}
21525_ACEOF
21526rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021527if { (ac_try="$ac_compile"
21528case "(($ac_try" in
21529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21530 *) ac_try_echo=$ac_try;;
21531esac
21532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021535 grep -v '^ *+' conftest.er1 >conftest.err
21536 rm -f conftest.er1
21537 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021539 (exit $ac_status); } && {
21540 test -z "$ac_c_werror_flag" ||
21541 test ! -s conftest.err
21542 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021543 ac_hi=-1 ac_mid=-1
21544 while :; do
21545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021546/* confdefs.h. */
21547_ACEOF
21548cat confdefs.h >>conftest.$ac_ext
21549cat >>conftest.$ac_ext <<_ACEOF
21550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021551#include <wchar.h>
21552
Martin v. Löwiseba40652007-08-30 20:10:57 +000021553 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021554int
21555main ()
21556{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021557static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021558test_array [0] = 0
21559
21560 ;
21561 return 0;
21562}
21563_ACEOF
21564rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021565if { (ac_try="$ac_compile"
21566case "(($ac_try" in
21567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21568 *) ac_try_echo=$ac_try;;
21569esac
21570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021573 grep -v '^ *+' conftest.er1 >conftest.err
21574 rm -f conftest.er1
21575 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021577 (exit $ac_status); } && {
21578 test -z "$ac_c_werror_flag" ||
21579 test ! -s conftest.err
21580 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021581 ac_lo=$ac_mid; break
21582else
21583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021584sed 's/^/| /' conftest.$ac_ext >&5
21585
Martin v. Löwiseba40652007-08-30 20:10:57 +000021586 ac_hi=`expr '(' $ac_mid ')' - 1`
21587 if test $ac_mid -le $ac_hi; then
21588 ac_lo= ac_hi=
21589 break
21590 fi
21591 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000021592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021593
21594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021595 done
21596else
21597 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021598sed 's/^/| /' conftest.$ac_ext >&5
21599
Martin v. Löwiseba40652007-08-30 20:10:57 +000021600 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021602
21603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021605
21606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021607# Binary search between lo and hi bounds.
21608while test "x$ac_lo" != "x$ac_hi"; do
21609 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021611/* confdefs.h. */
21612_ACEOF
21613cat confdefs.h >>conftest.$ac_ext
21614cat >>conftest.$ac_ext <<_ACEOF
21615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021616#include <wchar.h>
21617
Martin v. Löwiseba40652007-08-30 20:10:57 +000021618 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021619int
21620main ()
21621{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021622static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021623test_array [0] = 0
21624
21625 ;
21626 return 0;
21627}
21628_ACEOF
21629rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021630if { (ac_try="$ac_compile"
21631case "(($ac_try" in
21632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21633 *) ac_try_echo=$ac_try;;
21634esac
21635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021638 grep -v '^ *+' conftest.er1 >conftest.err
21639 rm -f conftest.er1
21640 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021642 (exit $ac_status); } && {
21643 test -z "$ac_c_werror_flag" ||
21644 test ! -s conftest.err
21645 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021646 ac_hi=$ac_mid
21647else
21648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021649sed 's/^/| /' conftest.$ac_ext >&5
21650
Martin v. Löwiseba40652007-08-30 20:10:57 +000021651 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021653
21654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021655done
21656case $ac_lo in
21657?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021658'') if test "$ac_cv_type_wchar_t" = yes; then
21659 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021660See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021661echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021662See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021663 { (exit 77); exit 77; }; }
21664 else
21665 ac_cv_sizeof_wchar_t=0
21666 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021667esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021668else
Martin v. Löwis11437992002-04-12 09:54:03 +000021669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021670/* confdefs.h. */
21671_ACEOF
21672cat confdefs.h >>conftest.$ac_ext
21673cat >>conftest.$ac_ext <<_ACEOF
21674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021675#include <wchar.h>
21676
Martin v. Löwiseba40652007-08-30 20:10:57 +000021677 typedef wchar_t ac__type_sizeof_;
21678static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21679static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021680#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021681#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021682int
21683main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021684{
Martin v. Löwis11437992002-04-12 09:54:03 +000021685
21686 FILE *f = fopen ("conftest.val", "w");
21687 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021688 return 1;
21689 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021690 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021691 long int i = longval ();
21692 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21693 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021694 fprintf (f, "%ld\n", i);
21695 }
21696 else
21697 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021698 unsigned long int i = ulongval ();
21699 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21700 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021701 fprintf (f, "%lu\n", i);
21702 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021703 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021704
21705 ;
21706 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021707}
Martin v. Löwis11437992002-04-12 09:54:03 +000021708_ACEOF
21709rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021710if { (ac_try="$ac_link"
21711case "(($ac_try" in
21712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21713 *) ac_try_echo=$ac_try;;
21714esac
21715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21716 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021717 ac_status=$?
21718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21719 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021720 { (case "(($ac_try" in
21721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21722 *) ac_try_echo=$ac_try;;
21723esac
21724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21725 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021726 ac_status=$?
21727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21728 (exit $ac_status); }; }; then
21729 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021730else
Martin v. Löwis11437992002-04-12 09:54:03 +000021731 echo "$as_me: program exited with status $ac_status" >&5
21732echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021733sed 's/^/| /' conftest.$ac_ext >&5
21734
Martin v. Löwis11437992002-04-12 09:54:03 +000021735( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021736if test "$ac_cv_type_wchar_t" = yes; then
21737 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021738See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021739echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021740See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021741 { (exit 77); exit 77; }; }
21742 else
21743 ac_cv_sizeof_wchar_t=0
21744 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021746rm -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 +000021747fi
21748rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021750{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21751echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21752
21753
21754
Martin v. Löwis11437992002-04-12 09:54:03 +000021755cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021756#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021757_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021758
Michael W. Hudson54241132001-12-07 15:38:26 +000021759
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021760fi
21761
Martin v. Löwiseba40652007-08-30 20:10:57 +000021762{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21763echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021764have_ucs4_tcl=no
21765cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021766/* confdefs.h. */
21767_ACEOF
21768cat confdefs.h >>conftest.$ac_ext
21769cat >>conftest.$ac_ext <<_ACEOF
21770/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021771
21772#include <tcl.h>
21773#if TCL_UTF_MAX != 6
21774# error "NOT UCS4_TCL"
21775#endif
21776int
21777main ()
21778{
21779
21780 ;
21781 return 0;
21782}
21783_ACEOF
21784rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021785if { (ac_try="$ac_compile"
21786case "(($ac_try" in
21787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21788 *) ac_try_echo=$ac_try;;
21789esac
21790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21791 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021793 grep -v '^ *+' conftest.er1 >conftest.err
21794 rm -f conftest.er1
21795 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021797 (exit $ac_status); } && {
21798 test -z "$ac_c_werror_flag" ||
21799 test ! -s conftest.err
21800 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021801
21802
21803cat >>confdefs.h <<\_ACEOF
21804#define HAVE_UCS4_TCL 1
21805_ACEOF
21806
21807 have_ucs4_tcl=yes
21808
21809else
21810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021811sed 's/^/| /' conftest.$ac_ext >&5
21812
Martin v. Löwiseba40652007-08-30 20:10:57 +000021813
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021815
21816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21817{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21818echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021819
Skip Montanaro6dead952003-09-25 14:50:04 +000021820# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021821if test "$wchar_h" = yes
21822then
21823 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021824 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21825echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021826 if test "${ac_cv_wchar_t_signed+set}" = set; then
21827 echo $ECHO_N "(cached) $ECHO_C" >&6
21828else
21829
21830 if test "$cross_compiling" = yes; then
21831 ac_cv_wchar_t_signed=yes
21832else
21833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021834/* confdefs.h. */
21835_ACEOF
21836cat confdefs.h >>conftest.$ac_ext
21837cat >>conftest.$ac_ext <<_ACEOF
21838/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021839
21840 #include <wchar.h>
21841 int main()
21842 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021843 /* Success: exit code 0 */
21844 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021845 }
21846
21847_ACEOF
21848rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021849if { (ac_try="$ac_link"
21850case "(($ac_try" in
21851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21852 *) ac_try_echo=$ac_try;;
21853esac
21854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21855 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021856 ac_status=$?
21857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21858 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021859 { (case "(($ac_try" in
21860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21861 *) ac_try_echo=$ac_try;;
21862esac
21863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21864 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021865 ac_status=$?
21866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21867 (exit $ac_status); }; }; then
21868 ac_cv_wchar_t_signed=yes
21869else
21870 echo "$as_me: program exited with status $ac_status" >&5
21871echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021872sed 's/^/| /' conftest.$ac_ext >&5
21873
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021874( exit $ac_status )
21875ac_cv_wchar_t_signed=no
21876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021877rm -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 +000021878fi
21879
Martin v. Löwiseba40652007-08-30 20:10:57 +000021880
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021881fi
21882
Martin v. Löwiseba40652007-08-30 20:10:57 +000021883 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21884echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21885fi
21886
21887{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21888echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21889# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021890if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021891 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021892else
21893 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021894fi
21895
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021896
21897if test $enable_unicode = yes
21898then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021899 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021900 case "$have_ucs4_tcl" in
21901 yes) enable_unicode="ucs4"
21902 ;;
21903 *) enable_unicode="ucs2"
21904 ;;
21905 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021906fi
21907
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021908
21909
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021910case "$enable_unicode" in
21911ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021912 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021913#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021914_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021915
21916 ;;
21917ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021918 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021919#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021920_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021921
21922 ;;
21923esac
21924
Michael W. Hudson54241132001-12-07 15:38:26 +000021925
Martin v. Löwis11437992002-04-12 09:54:03 +000021926
21927
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021928
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021929if test "$enable_unicode" = "no"
21930then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021931 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021932 { echo "$as_me:$LINENO: result: not used" >&5
21933echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021934else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021935 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021936
21937cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021938#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021939_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021940
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021941
21942 # wchar_t is only usable if it maps to an unsigned type
21943 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021944 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021945 then
21946 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021947
Martin v. Löwis11437992002-04-12 09:54:03 +000021948cat >>confdefs.h <<\_ACEOF
21949#define HAVE_USABLE_WCHAR_T 1
21950_ACEOF
21951
21952 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021953#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021954_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021955
21956 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21957 then
21958 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021959 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021960#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021961_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021962
21963 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21964 then
21965 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021966 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021967#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021968_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021969
21970 else
21971 PY_UNICODE_TYPE="no type found"
21972 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021973 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21974echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021975fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021976
21977# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021978{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21979echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021980if test "${ac_cv_c_bigendian+set}" = set; then
21981 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021982else
Martin v. Löwis11437992002-04-12 09:54:03 +000021983 # See if sys/param.h defines the BYTE_ORDER macro.
21984cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021985/* confdefs.h. */
21986_ACEOF
21987cat confdefs.h >>conftest.$ac_ext
21988cat >>conftest.$ac_ext <<_ACEOF
21989/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021990#include <sys/types.h>
21991#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021992
Martin v. Löwis11437992002-04-12 09:54:03 +000021993int
21994main ()
21995{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021996#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21997 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021998 bogus endian macros
21999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022000
22001 ;
22002 return 0;
22003}
22004_ACEOF
22005rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022006if { (ac_try="$ac_compile"
22007case "(($ac_try" in
22008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22009 *) ac_try_echo=$ac_try;;
22010esac
22011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022014 grep -v '^ *+' conftest.er1 >conftest.err
22015 rm -f conftest.er1
22016 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022018 (exit $ac_status); } && {
22019 test -z "$ac_c_werror_flag" ||
22020 test ! -s conftest.err
22021 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022022 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022024/* confdefs.h. */
22025_ACEOF
22026cat confdefs.h >>conftest.$ac_ext
22027cat >>conftest.$ac_ext <<_ACEOF
22028/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022029#include <sys/types.h>
22030#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022031
Martin v. Löwis11437992002-04-12 09:54:03 +000022032int
22033main ()
22034{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022035#if BYTE_ORDER != BIG_ENDIAN
22036 not big endian
22037#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022038
22039 ;
22040 return 0;
22041}
22042_ACEOF
22043rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022044if { (ac_try="$ac_compile"
22045case "(($ac_try" in
22046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22047 *) ac_try_echo=$ac_try;;
22048esac
22049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022052 grep -v '^ *+' conftest.er1 >conftest.err
22053 rm -f conftest.er1
22054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022056 (exit $ac_status); } && {
22057 test -z "$ac_c_werror_flag" ||
22058 test ! -s conftest.err
22059 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022060 ac_cv_c_bigendian=yes
22061else
Martin v. Löwis11437992002-04-12 09:54:03 +000022062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022063sed 's/^/| /' conftest.$ac_ext >&5
22064
Martin v. Löwiseba40652007-08-30 20:10:57 +000022065 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022067
22068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022069else
Martin v. Löwis11437992002-04-12 09:54:03 +000022070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022071sed 's/^/| /' conftest.$ac_ext >&5
22072
Martin v. Löwiseba40652007-08-30 20:10:57 +000022073 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022074if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022075 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022076 ac_cv_c_bigendian=unknown
22077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022078/* confdefs.h. */
22079_ACEOF
22080cat confdefs.h >>conftest.$ac_ext
22081cat >>conftest.$ac_ext <<_ACEOF
22082/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022083short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22084short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022085void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022086short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22087short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022088void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022089int
22090main ()
22091{
22092 _ascii (); _ebcdic ();
22093 ;
22094 return 0;
22095}
22096_ACEOF
22097rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022098if { (ac_try="$ac_compile"
22099case "(($ac_try" in
22100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22101 *) ac_try_echo=$ac_try;;
22102esac
22103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022106 grep -v '^ *+' conftest.er1 >conftest.err
22107 rm -f conftest.er1
22108 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022110 (exit $ac_status); } && {
22111 test -z "$ac_c_werror_flag" ||
22112 test ! -s conftest.err
22113 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022114 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022115 ac_cv_c_bigendian=yes
22116fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022117if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022118 if test "$ac_cv_c_bigendian" = unknown; then
22119 ac_cv_c_bigendian=no
22120 else
22121 # finding both strings is unlikely to happen, but who knows?
22122 ac_cv_c_bigendian=unknown
22123 fi
22124fi
22125else
22126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022127sed 's/^/| /' conftest.$ac_ext >&5
22128
Martin v. Löwiseba40652007-08-30 20:10:57 +000022129
Martin v. Löwis11437992002-04-12 09:54:03 +000022130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022131
22132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022133else
22134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022135/* confdefs.h. */
22136_ACEOF
22137cat confdefs.h >>conftest.$ac_ext
22138cat >>conftest.$ac_ext <<_ACEOF
22139/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022140$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022141int
22142main ()
22143{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022144
Guido van Rossumef2255b2000-03-10 22:30:29 +000022145 /* Are we little or big endian? From Harbison&Steele. */
22146 union
22147 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022148 long int l;
22149 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022150 } u;
22151 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022152 return u.c[sizeof (long int) - 1] == 1;
22153
22154 ;
22155 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022156}
Martin v. Löwis11437992002-04-12 09:54:03 +000022157_ACEOF
22158rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022159if { (ac_try="$ac_link"
22160case "(($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_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022166 ac_status=$?
22167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22168 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022169 { (case "(($ac_try" in
22170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22171 *) ac_try_echo=$ac_try;;
22172esac
22173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22174 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022175 ac_status=$?
22176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22177 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022178 ac_cv_c_bigendian=no
22179else
Martin v. Löwis11437992002-04-12 09:54:03 +000022180 echo "$as_me: program exited with status $ac_status" >&5
22181echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022182sed 's/^/| /' conftest.$ac_ext >&5
22183
Martin v. Löwis11437992002-04-12 09:54:03 +000022184( exit $ac_status )
22185ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022186fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022187rm -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 +000022188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022189
22190
Martin v. Löwis11437992002-04-12 09:54:03 +000022191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022192
22193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022195{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22196echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022197case $ac_cv_c_bigendian in
22198 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022199
Martin v. Löwis11437992002-04-12 09:54:03 +000022200cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022201#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022202_ACEOF
22203 ;;
22204 no)
22205 ;;
22206 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022207 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022208presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022209echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022210presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22211 { (exit 1); exit 1; }; } ;;
22212esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022213
Michael W. Hudson54241132001-12-07 15:38:26 +000022214
Ronald Oussoren988117f2006-04-29 11:31:35 +000022215
22216
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022217# Check whether right shifting a negative integer extends the sign bit
22218# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022219{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22220echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022221if test "${ac_cv_rshift_extends_sign+set}" = set; then
22222 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022223else
Martin v. Löwis11437992002-04-12 09:54:03 +000022224
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022225if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022226 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022227else
Martin v. Löwis11437992002-04-12 09:54:03 +000022228 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022229/* confdefs.h. */
22230_ACEOF
22231cat confdefs.h >>conftest.$ac_ext
22232cat >>conftest.$ac_ext <<_ACEOF
22233/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022234
22235int main()
22236{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022237 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022238}
22239
Martin v. Löwis11437992002-04-12 09:54:03 +000022240_ACEOF
22241rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022242if { (ac_try="$ac_link"
22243case "(($ac_try" in
22244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22245 *) ac_try_echo=$ac_try;;
22246esac
22247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22248 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022249 ac_status=$?
22250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22251 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022252 { (case "(($ac_try" in
22253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22254 *) ac_try_echo=$ac_try;;
22255esac
22256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22257 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022258 ac_status=$?
22259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22260 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022261 ac_cv_rshift_extends_sign=yes
22262else
Martin v. Löwis11437992002-04-12 09:54:03 +000022263 echo "$as_me: program exited with status $ac_status" >&5
22264echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022265sed 's/^/| /' conftest.$ac_ext >&5
22266
Martin v. Löwis11437992002-04-12 09:54:03 +000022267( exit $ac_status )
22268ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022270rm -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 +000022271fi
22272
Martin v. Löwiseba40652007-08-30 20:10:57 +000022273
22274fi
22275
22276{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22277echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022278if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022279then
Martin v. Löwis11437992002-04-12 09:54:03 +000022280
22281cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022282#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022283_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022284
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022285fi
22286
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022287# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022288{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22289echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022290if test "${ac_cv_have_getc_unlocked+set}" = set; then
22291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022292else
Martin v. Löwis11437992002-04-12 09:54:03 +000022293
22294cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022295/* confdefs.h. */
22296_ACEOF
22297cat confdefs.h >>conftest.$ac_ext
22298cat >>conftest.$ac_ext <<_ACEOF
22299/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022300#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022301int
22302main ()
22303{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022304
22305 FILE *f = fopen("/dev/null", "r");
22306 flockfile(f);
22307 getc_unlocked(f);
22308 funlockfile(f);
22309
Martin v. Löwis11437992002-04-12 09:54:03 +000022310 ;
22311 return 0;
22312}
22313_ACEOF
22314rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022315if { (ac_try="$ac_link"
22316case "(($ac_try" in
22317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22318 *) ac_try_echo=$ac_try;;
22319esac
22320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22321 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022323 grep -v '^ *+' conftest.er1 >conftest.err
22324 rm -f conftest.er1
22325 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022327 (exit $ac_status); } && {
22328 test -z "$ac_c_werror_flag" ||
22329 test ! -s conftest.err
22330 } && test -s conftest$ac_exeext &&
22331 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022332 ac_cv_have_getc_unlocked=yes
22333else
Martin v. Löwis11437992002-04-12 09:54:03 +000022334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022335sed 's/^/| /' conftest.$ac_ext >&5
22336
Martin v. Löwiseba40652007-08-30 20:10:57 +000022337 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022339
22340rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022341 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022342fi
22343
Martin v. Löwiseba40652007-08-30 20:10:57 +000022344{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22345echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022346if test "$ac_cv_have_getc_unlocked" = yes
22347then
Martin v. Löwis11437992002-04-12 09:54:03 +000022348
22349cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022350#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022351_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022352
22353fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022354
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022355# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022356# save the value of LIBS so we don't actually link Python with readline
22357LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022358
Martin v. Löwiseba40652007-08-30 20:10:57 +000022359{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22360echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022361if test "${ac_cv_lib_readline_readline+set}" = set; then
22362 echo $ECHO_N "(cached) $ECHO_C" >&6
22363else
22364 ac_check_lib_save_LIBS=$LIBS
22365LIBS="-lreadline $LIBS"
22366cat >conftest.$ac_ext <<_ACEOF
22367/* confdefs.h. */
22368_ACEOF
22369cat confdefs.h >>conftest.$ac_ext
22370cat >>conftest.$ac_ext <<_ACEOF
22371/* end confdefs.h. */
22372
Martin v. Löwiseba40652007-08-30 20:10:57 +000022373/* Override any GCC internal prototype to avoid an error.
22374 Use char because int might match the return type of a GCC
22375 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022376#ifdef __cplusplus
22377extern "C"
22378#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022379char readline ();
22380int
22381main ()
22382{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022383return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022384 ;
22385 return 0;
22386}
22387_ACEOF
22388rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022389if { (ac_try="$ac_link"
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_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022396 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
Martin v. Löwiseba40652007-08-30 20:10:57 +000022401 (exit $ac_status); } && {
22402 test -z "$ac_c_werror_flag" ||
22403 test ! -s conftest.err
22404 } && test -s conftest$ac_exeext &&
22405 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022406 ac_cv_lib_readline_readline=yes
22407else
22408 echo "$as_me: failed program was:" >&5
22409sed 's/^/| /' conftest.$ac_ext >&5
22410
Martin v. Löwiseba40652007-08-30 20:10:57 +000022411 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022413
22414rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022415 conftest$ac_exeext conftest.$ac_ext
22416LIBS=$ac_check_lib_save_LIBS
22417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022418{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22419echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022420if test $ac_cv_lib_readline_readline = yes; then
22421 cat >>confdefs.h <<_ACEOF
22422#define HAVE_LIBREADLINE 1
22423_ACEOF
22424
22425 LIBS="-lreadline $LIBS"
22426
22427fi
22428
22429if test "$ac_cv_have_readline_readline" = no
22430then
22431
Martin v. Löwiseba40652007-08-30 20:10:57 +000022432{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22433echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022434if test "${ac_cv_lib_termcap_readline+set}" = set; then
22435 echo $ECHO_N "(cached) $ECHO_C" >&6
22436else
22437 ac_check_lib_save_LIBS=$LIBS
22438LIBS="-ltermcap $LIBS"
22439cat >conftest.$ac_ext <<_ACEOF
22440/* confdefs.h. */
22441_ACEOF
22442cat confdefs.h >>conftest.$ac_ext
22443cat >>conftest.$ac_ext <<_ACEOF
22444/* end confdefs.h. */
22445
Martin v. Löwiseba40652007-08-30 20:10:57 +000022446/* Override any GCC internal prototype to avoid an error.
22447 Use char because int might match the return type of a GCC
22448 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022449#ifdef __cplusplus
22450extern "C"
22451#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022452char readline ();
22453int
22454main ()
22455{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022456return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022457 ;
22458 return 0;
22459}
22460_ACEOF
22461rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022462if { (ac_try="$ac_link"
22463case "(($ac_try" in
22464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22465 *) ac_try_echo=$ac_try;;
22466esac
22467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22468 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022469 ac_status=$?
22470 grep -v '^ *+' conftest.er1 >conftest.err
22471 rm -f conftest.er1
22472 cat conftest.err >&5
22473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022474 (exit $ac_status); } && {
22475 test -z "$ac_c_werror_flag" ||
22476 test ! -s conftest.err
22477 } && test -s conftest$ac_exeext &&
22478 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022479 ac_cv_lib_termcap_readline=yes
22480else
22481 echo "$as_me: failed program was:" >&5
22482sed 's/^/| /' conftest.$ac_ext >&5
22483
Martin v. Löwiseba40652007-08-30 20:10:57 +000022484 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022486
22487rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022488 conftest$ac_exeext conftest.$ac_ext
22489LIBS=$ac_check_lib_save_LIBS
22490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022491{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22492echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022493if test $ac_cv_lib_termcap_readline = yes; then
22494 cat >>confdefs.h <<_ACEOF
22495#define HAVE_LIBTERMCAP 1
22496_ACEOF
22497
22498 LIBS="-ltermcap $LIBS"
22499
22500fi
22501
22502fi
22503
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022504# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022505{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22506echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022507if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22508 echo $ECHO_N "(cached) $ECHO_C" >&6
22509else
22510 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022511LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022512cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022513/* confdefs.h. */
22514_ACEOF
22515cat confdefs.h >>conftest.$ac_ext
22516cat >>conftest.$ac_ext <<_ACEOF
22517/* end confdefs.h. */
22518
Martin v. Löwiseba40652007-08-30 20:10:57 +000022519/* Override any GCC internal prototype to avoid an error.
22520 Use char because int might match the return type of a GCC
22521 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022522#ifdef __cplusplus
22523extern "C"
22524#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022525char rl_callback_handler_install ();
22526int
22527main ()
22528{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022529return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022530 ;
22531 return 0;
22532}
22533_ACEOF
22534rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022535if { (ac_try="$ac_link"
22536case "(($ac_try" in
22537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22538 *) ac_try_echo=$ac_try;;
22539esac
22540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22541 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022543 grep -v '^ *+' conftest.er1 >conftest.err
22544 rm -f conftest.er1
22545 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022547 (exit $ac_status); } && {
22548 test -z "$ac_c_werror_flag" ||
22549 test ! -s conftest.err
22550 } && test -s conftest$ac_exeext &&
22551 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022552 ac_cv_lib_readline_rl_callback_handler_install=yes
22553else
22554 echo "$as_me: failed program was:" >&5
22555sed 's/^/| /' conftest.$ac_ext >&5
22556
Martin v. Löwiseba40652007-08-30 20:10:57 +000022557 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022559
22560rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022561 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022562LIBS=$ac_check_lib_save_LIBS
22563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022564{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22565echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022566if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22567
22568cat >>confdefs.h <<\_ACEOF
22569#define HAVE_RL_CALLBACK 1
22570_ACEOF
22571
22572fi
22573
22574
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022575# check for readline 2.2
22576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022577/* confdefs.h. */
22578_ACEOF
22579cat confdefs.h >>conftest.$ac_ext
22580cat >>conftest.$ac_ext <<_ACEOF
22581/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022582#include <readline/readline.h>
22583_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022584if { (ac_try="$ac_cpp conftest.$ac_ext"
22585case "(($ac_try" in
22586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22587 *) ac_try_echo=$ac_try;;
22588esac
22589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22590 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022591 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022592 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022593 rm -f conftest.er1
22594 cat conftest.err >&5
22595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022596 (exit $ac_status); } >/dev/null && {
22597 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22598 test ! -s conftest.err
22599 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022600 have_readline=yes
22601else
22602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022603sed 's/^/| /' conftest.$ac_ext >&5
22604
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022605 have_readline=no
22606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022607
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022608rm -f conftest.err conftest.$ac_ext
22609if test $have_readline = yes
22610then
22611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022612/* confdefs.h. */
22613_ACEOF
22614cat confdefs.h >>conftest.$ac_ext
22615cat >>conftest.$ac_ext <<_ACEOF
22616/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022617#include <readline/readline.h>
22618
22619_ACEOF
22620if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022621 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022622
22623cat >>confdefs.h <<\_ACEOF
22624#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22625_ACEOF
22626
22627fi
22628rm -f conftest*
22629
22630fi
22631
Martin v. Löwis0daad592001-09-30 21:09:59 +000022632# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022633{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22634echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022635if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22636 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022637else
Martin v. Löwis11437992002-04-12 09:54:03 +000022638 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022639LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022640cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022641/* confdefs.h. */
22642_ACEOF
22643cat confdefs.h >>conftest.$ac_ext
22644cat >>conftest.$ac_ext <<_ACEOF
22645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022646
Martin v. Löwiseba40652007-08-30 20:10:57 +000022647/* Override any GCC internal prototype to avoid an error.
22648 Use char because int might match the return type of a GCC
22649 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022650#ifdef __cplusplus
22651extern "C"
22652#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022653char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022654int
22655main ()
22656{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022657return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022658 ;
22659 return 0;
22660}
22661_ACEOF
22662rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022663if { (ac_try="$ac_link"
22664case "(($ac_try" in
22665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22666 *) ac_try_echo=$ac_try;;
22667esac
22668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22669 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022671 grep -v '^ *+' conftest.er1 >conftest.err
22672 rm -f conftest.er1
22673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022675 (exit $ac_status); } && {
22676 test -z "$ac_c_werror_flag" ||
22677 test ! -s conftest.err
22678 } && test -s conftest$ac_exeext &&
22679 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022680 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022681else
Martin v. Löwis11437992002-04-12 09:54:03 +000022682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022683sed 's/^/| /' conftest.$ac_ext >&5
22684
Martin v. Löwiseba40652007-08-30 20:10:57 +000022685 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022687
22688rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022689 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022690LIBS=$ac_check_lib_save_LIBS
22691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022692{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22693echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022694if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022695
Martin v. Löwis11437992002-04-12 09:54:03 +000022696cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022697#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022698_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022699
Martin v. Löwis0daad592001-09-30 21:09:59 +000022700fi
22701
Michael W. Hudson54241132001-12-07 15:38:26 +000022702
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022703# also in 4.0
22704{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22705echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22706if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22707 echo $ECHO_N "(cached) $ECHO_C" >&6
22708else
22709 ac_check_lib_save_LIBS=$LIBS
22710LIBS="-lreadline $LIBS"
22711cat >conftest.$ac_ext <<_ACEOF
22712/* confdefs.h. */
22713_ACEOF
22714cat confdefs.h >>conftest.$ac_ext
22715cat >>conftest.$ac_ext <<_ACEOF
22716/* end confdefs.h. */
22717
22718/* Override any GCC internal prototype to avoid an error.
22719 Use char because int might match the return type of a GCC
22720 builtin and then its argument prototype would still apply. */
22721#ifdef __cplusplus
22722extern "C"
22723#endif
22724char rl_completion_display_matches_hook ();
22725int
22726main ()
22727{
22728return rl_completion_display_matches_hook ();
22729 ;
22730 return 0;
22731}
22732_ACEOF
22733rm -f conftest.$ac_objext conftest$ac_exeext
22734if { (ac_try="$ac_link"
22735case "(($ac_try" in
22736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22737 *) ac_try_echo=$ac_try;;
22738esac
22739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22740 (eval "$ac_link") 2>conftest.er1
22741 ac_status=$?
22742 grep -v '^ *+' conftest.er1 >conftest.err
22743 rm -f conftest.er1
22744 cat conftest.err >&5
22745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22746 (exit $ac_status); } && {
22747 test -z "$ac_c_werror_flag" ||
22748 test ! -s conftest.err
22749 } && test -s conftest$ac_exeext &&
22750 $as_test_x conftest$ac_exeext; then
22751 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22752else
22753 echo "$as_me: failed program was:" >&5
22754sed 's/^/| /' conftest.$ac_ext >&5
22755
22756 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22757fi
22758
22759rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22760 conftest$ac_exeext conftest.$ac_ext
22761LIBS=$ac_check_lib_save_LIBS
22762fi
22763{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22764echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22765if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22766
22767cat >>confdefs.h <<\_ACEOF
22768#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22769_ACEOF
22770
22771fi
22772
22773
Martin v. Löwis0daad592001-09-30 21:09:59 +000022774# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022775{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22776echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022777if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22778 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022779else
Martin v. Löwis11437992002-04-12 09:54:03 +000022780 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022781LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022783/* confdefs.h. */
22784_ACEOF
22785cat confdefs.h >>conftest.$ac_ext
22786cat >>conftest.$ac_ext <<_ACEOF
22787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022788
Martin v. Löwiseba40652007-08-30 20:10:57 +000022789/* Override any GCC internal prototype to avoid an error.
22790 Use char because int might match the return type of a GCC
22791 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022792#ifdef __cplusplus
22793extern "C"
22794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022795char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022796int
22797main ()
22798{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022799return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022800 ;
22801 return 0;
22802}
22803_ACEOF
22804rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022805if { (ac_try="$ac_link"
22806case "(($ac_try" in
22807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22808 *) ac_try_echo=$ac_try;;
22809esac
22810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22811 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022813 grep -v '^ *+' conftest.er1 >conftest.err
22814 rm -f conftest.er1
22815 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022817 (exit $ac_status); } && {
22818 test -z "$ac_c_werror_flag" ||
22819 test ! -s conftest.err
22820 } && test -s conftest$ac_exeext &&
22821 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022822 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022823else
Martin v. Löwis11437992002-04-12 09:54:03 +000022824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022825sed 's/^/| /' conftest.$ac_ext >&5
22826
Martin v. Löwiseba40652007-08-30 20:10:57 +000022827 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022829
22830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022832LIBS=$ac_check_lib_save_LIBS
22833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022834{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22835echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022836if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022837
Martin v. Löwis11437992002-04-12 09:54:03 +000022838cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022839#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022840_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022841
Guido van Rossum353ae582001-07-10 16:45:32 +000022842fi
22843
Jack Jansendd19cf82001-12-06 22:36:17 +000022844
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022845# also in readline 4.2
22846cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022847/* confdefs.h. */
22848_ACEOF
22849cat confdefs.h >>conftest.$ac_ext
22850cat >>conftest.$ac_ext <<_ACEOF
22851/* end confdefs.h. */
22852#include <readline/readline.h>
22853_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022854if { (ac_try="$ac_cpp conftest.$ac_ext"
22855case "(($ac_try" in
22856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22857 *) ac_try_echo=$ac_try;;
22858esac
22859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22860 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022861 ac_status=$?
22862 grep -v '^ *+' conftest.er1 >conftest.err
22863 rm -f conftest.er1
22864 cat conftest.err >&5
22865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022866 (exit $ac_status); } >/dev/null && {
22867 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22868 test ! -s conftest.err
22869 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022870 have_readline=yes
22871else
22872 echo "$as_me: failed program was:" >&5
22873sed 's/^/| /' conftest.$ac_ext >&5
22874
22875 have_readline=no
22876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022877
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022878rm -f conftest.err conftest.$ac_ext
22879if test $have_readline = yes
22880then
22881 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022882/* confdefs.h. */
22883_ACEOF
22884cat confdefs.h >>conftest.$ac_ext
22885cat >>conftest.$ac_ext <<_ACEOF
22886/* end confdefs.h. */
22887#include <readline/readline.h>
22888
22889_ACEOF
22890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22891 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22892
22893cat >>confdefs.h <<\_ACEOF
22894#define HAVE_RL_CATCH_SIGNAL 1
22895_ACEOF
22896
22897fi
22898rm -f conftest*
22899
22900fi
22901
Martin v. Löwis82bca632006-02-10 20:49:30 +000022902# End of readline checks: restore LIBS
22903LIBS=$LIBS_no_readline
22904
Martin v. Löwiseba40652007-08-30 20:10:57 +000022905{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22906echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022907if test "${ac_cv_broken_nice+set}" = set; then
22908 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022909else
Martin v. Löwis11437992002-04-12 09:54:03 +000022910
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022911if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022912 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022913else
Martin v. Löwis11437992002-04-12 09:54:03 +000022914 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022915/* confdefs.h. */
22916_ACEOF
22917cat confdefs.h >>conftest.$ac_ext
22918cat >>conftest.$ac_ext <<_ACEOF
22919/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022920
22921int main()
22922{
22923 int val1 = nice(1);
22924 if (val1 != -1 && val1 == nice(2))
22925 exit(0);
22926 exit(1);
22927}
22928
Martin v. Löwis11437992002-04-12 09:54:03 +000022929_ACEOF
22930rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022931if { (ac_try="$ac_link"
22932case "(($ac_try" in
22933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22934 *) ac_try_echo=$ac_try;;
22935esac
22936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22937 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022938 ac_status=$?
22939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22940 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022941 { (case "(($ac_try" in
22942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22943 *) ac_try_echo=$ac_try;;
22944esac
22945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22946 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022947 ac_status=$?
22948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22949 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022950 ac_cv_broken_nice=yes
22951else
Martin v. Löwis11437992002-04-12 09:54:03 +000022952 echo "$as_me: program exited with status $ac_status" >&5
22953echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022954sed 's/^/| /' conftest.$ac_ext >&5
22955
Martin v. Löwis11437992002-04-12 09:54:03 +000022956( exit $ac_status )
22957ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022959rm -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 +000022960fi
22961
Martin v. Löwiseba40652007-08-30 20:10:57 +000022962
22963fi
22964
22965{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22966echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022967if test "$ac_cv_broken_nice" = yes
22968then
Martin v. Löwis11437992002-04-12 09:54:03 +000022969
22970cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022971#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022972_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022973
22974fi
22975
Martin v. Löwiseba40652007-08-30 20:10:57 +000022976{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22977echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022978if test "$cross_compiling" = yes; then
22979 ac_cv_broken_poll=no
22980else
22981 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022982/* confdefs.h. */
22983_ACEOF
22984cat confdefs.h >>conftest.$ac_ext
22985cat >>conftest.$ac_ext <<_ACEOF
22986/* end confdefs.h. */
22987
22988#include <poll.h>
22989
22990int main (void)
22991 {
22992 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22993
22994 close (42);
22995
22996 int poll_test = poll (&poll_struct, 1, 0);
22997
22998 if (poll_test < 0)
22999 {
23000 exit(0);
23001 }
23002 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23003 {
23004 exit(0);
23005 }
23006 else
23007 {
23008 exit(1);
23009 }
23010 }
23011
23012_ACEOF
23013rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023014if { (ac_try="$ac_link"
23015case "(($ac_try" in
23016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23017 *) ac_try_echo=$ac_try;;
23018esac
23019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23020 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023021 ac_status=$?
23022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23023 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023024 { (case "(($ac_try" in
23025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23026 *) ac_try_echo=$ac_try;;
23027esac
23028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23029 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023030 ac_status=$?
23031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23032 (exit $ac_status); }; }; then
23033 ac_cv_broken_poll=yes
23034else
23035 echo "$as_me: program exited with status $ac_status" >&5
23036echo "$as_me: failed program was:" >&5
23037sed 's/^/| /' conftest.$ac_ext >&5
23038
23039( exit $ac_status )
23040ac_cv_broken_poll=no
23041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023042rm -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 +000023043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023044
23045
23046{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23047echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023048if test "$ac_cv_broken_poll" = yes
23049then
23050
23051cat >>confdefs.h <<\_ACEOF
23052#define HAVE_BROKEN_POLL 1
23053_ACEOF
23054
23055fi
23056
Brett Cannon43802422005-02-10 20:48:03 +000023057# 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 +000023058# (which is not required by ISO C or UNIX spec) and/or if we support
23059# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023060{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23061echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023062if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23063 echo $ECHO_N "(cached) $ECHO_C" >&6
23064else
23065 cat >conftest.$ac_ext <<_ACEOF
23066/* confdefs.h. */
23067_ACEOF
23068cat confdefs.h >>conftest.$ac_ext
23069cat >>conftest.$ac_ext <<_ACEOF
23070/* end confdefs.h. */
23071#include <sys/types.h>
23072#include <$ac_cv_struct_tm>
23073
23074
23075int
23076main ()
23077{
23078static struct tm ac_aggr;
23079if (ac_aggr.tm_zone)
23080return 0;
23081 ;
23082 return 0;
23083}
23084_ACEOF
23085rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023086if { (ac_try="$ac_compile"
23087case "(($ac_try" in
23088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23089 *) ac_try_echo=$ac_try;;
23090esac
23091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23092 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023093 ac_status=$?
23094 grep -v '^ *+' conftest.er1 >conftest.err
23095 rm -f conftest.er1
23096 cat conftest.err >&5
23097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023098 (exit $ac_status); } && {
23099 test -z "$ac_c_werror_flag" ||
23100 test ! -s conftest.err
23101 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023102 ac_cv_member_struct_tm_tm_zone=yes
23103else
23104 echo "$as_me: failed program was:" >&5
23105sed 's/^/| /' conftest.$ac_ext >&5
23106
Martin v. Löwiseba40652007-08-30 20:10:57 +000023107 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023108/* confdefs.h. */
23109_ACEOF
23110cat confdefs.h >>conftest.$ac_ext
23111cat >>conftest.$ac_ext <<_ACEOF
23112/* end confdefs.h. */
23113#include <sys/types.h>
23114#include <$ac_cv_struct_tm>
23115
23116
23117int
23118main ()
23119{
23120static struct tm ac_aggr;
23121if (sizeof ac_aggr.tm_zone)
23122return 0;
23123 ;
23124 return 0;
23125}
23126_ACEOF
23127rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023128if { (ac_try="$ac_compile"
23129case "(($ac_try" in
23130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23131 *) ac_try_echo=$ac_try;;
23132esac
23133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23134 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023135 ac_status=$?
23136 grep -v '^ *+' conftest.er1 >conftest.err
23137 rm -f conftest.er1
23138 cat conftest.err >&5
23139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023140 (exit $ac_status); } && {
23141 test -z "$ac_c_werror_flag" ||
23142 test ! -s conftest.err
23143 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023144 ac_cv_member_struct_tm_tm_zone=yes
23145else
23146 echo "$as_me: failed program was:" >&5
23147sed 's/^/| /' conftest.$ac_ext >&5
23148
Martin v. Löwiseba40652007-08-30 20:10:57 +000023149 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023151
23152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023154
23155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023157{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23158echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023159if test $ac_cv_member_struct_tm_tm_zone = yes; then
23160
23161cat >>confdefs.h <<_ACEOF
23162#define HAVE_STRUCT_TM_TM_ZONE 1
23163_ACEOF
23164
23165
23166fi
23167
23168if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23169
23170cat >>confdefs.h <<\_ACEOF
23171#define HAVE_TM_ZONE 1
23172_ACEOF
23173
23174else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023175 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23176echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23177if test "${ac_cv_have_decl_tzname+set}" = set; then
23178 echo $ECHO_N "(cached) $ECHO_C" >&6
23179else
23180 cat >conftest.$ac_ext <<_ACEOF
23181/* confdefs.h. */
23182_ACEOF
23183cat confdefs.h >>conftest.$ac_ext
23184cat >>conftest.$ac_ext <<_ACEOF
23185/* end confdefs.h. */
23186#include <time.h>
23187
23188int
23189main ()
23190{
23191#ifndef tzname
23192 (void) tzname;
23193#endif
23194
23195 ;
23196 return 0;
23197}
23198_ACEOF
23199rm -f conftest.$ac_objext
23200if { (ac_try="$ac_compile"
23201case "(($ac_try" in
23202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23203 *) ac_try_echo=$ac_try;;
23204esac
23205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23206 (eval "$ac_compile") 2>conftest.er1
23207 ac_status=$?
23208 grep -v '^ *+' conftest.er1 >conftest.err
23209 rm -f conftest.er1
23210 cat conftest.err >&5
23211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23212 (exit $ac_status); } && {
23213 test -z "$ac_c_werror_flag" ||
23214 test ! -s conftest.err
23215 } && test -s conftest.$ac_objext; then
23216 ac_cv_have_decl_tzname=yes
23217else
23218 echo "$as_me: failed program was:" >&5
23219sed 's/^/| /' conftest.$ac_ext >&5
23220
23221 ac_cv_have_decl_tzname=no
23222fi
23223
23224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23225fi
23226{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23227echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23228if test $ac_cv_have_decl_tzname = yes; then
23229
23230cat >>confdefs.h <<_ACEOF
23231#define HAVE_DECL_TZNAME 1
23232_ACEOF
23233
23234
23235else
23236 cat >>confdefs.h <<_ACEOF
23237#define HAVE_DECL_TZNAME 0
23238_ACEOF
23239
23240
23241fi
23242
23243
23244 { echo "$as_me:$LINENO: checking for tzname" >&5
23245echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023246if test "${ac_cv_var_tzname+set}" = set; then
23247 echo $ECHO_N "(cached) $ECHO_C" >&6
23248else
23249 cat >conftest.$ac_ext <<_ACEOF
23250/* confdefs.h. */
23251_ACEOF
23252cat confdefs.h >>conftest.$ac_ext
23253cat >>conftest.$ac_ext <<_ACEOF
23254/* end confdefs.h. */
23255#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023256#if !HAVE_DECL_TZNAME
23257extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023258#endif
23259
23260int
23261main ()
23262{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023263return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023264 ;
23265 return 0;
23266}
23267_ACEOF
23268rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023269if { (ac_try="$ac_link"
23270case "(($ac_try" in
23271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23272 *) ac_try_echo=$ac_try;;
23273esac
23274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23275 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023276 ac_status=$?
23277 grep -v '^ *+' conftest.er1 >conftest.err
23278 rm -f conftest.er1
23279 cat conftest.err >&5
23280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023281 (exit $ac_status); } && {
23282 test -z "$ac_c_werror_flag" ||
23283 test ! -s conftest.err
23284 } && test -s conftest$ac_exeext &&
23285 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023286 ac_cv_var_tzname=yes
23287else
23288 echo "$as_me: failed program was:" >&5
23289sed 's/^/| /' conftest.$ac_ext >&5
23290
Martin v. Löwiseba40652007-08-30 20:10:57 +000023291 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023293
23294rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023295 conftest$ac_exeext conftest.$ac_ext
23296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023297{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23298echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023299 if test $ac_cv_var_tzname = yes; then
23300
23301cat >>confdefs.h <<\_ACEOF
23302#define HAVE_TZNAME 1
23303_ACEOF
23304
23305 fi
23306fi
23307
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023308
Martin v. Löwis1d459062005-03-14 21:23:33 +000023309# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023310{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23311echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023312if test "${ac_cv_working_tzset+set}" = set; then
23313 echo $ECHO_N "(cached) $ECHO_C" >&6
23314else
23315
23316if test "$cross_compiling" = yes; then
23317 ac_cv_working_tzset=no
23318else
23319 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023320/* confdefs.h. */
23321_ACEOF
23322cat confdefs.h >>conftest.$ac_ext
23323cat >>conftest.$ac_ext <<_ACEOF
23324/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023325
23326#include <stdlib.h>
23327#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023328#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023329
23330#if HAVE_TZNAME
23331extern char *tzname[];
23332#endif
23333
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023334int main()
23335{
Brett Cannon18367812003-09-19 00:59:16 +000023336 /* Note that we need to ensure that not only does tzset(3)
23337 do 'something' with localtime, but it works as documented
23338 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023339 This includes making sure that tzname is set properly if
23340 tm->tm_zone does not exist since it is the alternative way
23341 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023342
23343 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023344 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023345 */
23346
Martin v. Löwis1d459062005-03-14 21:23:33 +000023347 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023348 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23349
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023350 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023351 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023352 if (localtime(&groundhogday)->tm_hour != 0)
23353 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023354#if HAVE_TZNAME
23355 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23356 if (strcmp(tzname[0], "UTC") ||
23357 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23358 exit(1);
23359#endif
Brett Cannon18367812003-09-19 00:59:16 +000023360
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023361 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023362 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023363 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023364 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023365#if HAVE_TZNAME
23366 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23367 exit(1);
23368#endif
Brett Cannon18367812003-09-19 00:59:16 +000023369
23370 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23371 tzset();
23372 if (localtime(&groundhogday)->tm_hour != 11)
23373 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023374#if HAVE_TZNAME
23375 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23376 exit(1);
23377#endif
23378
23379#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023380 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23381 exit(1);
23382 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23383 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023384#endif
Brett Cannon18367812003-09-19 00:59:16 +000023385
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023386 exit(0);
23387}
23388
23389_ACEOF
23390rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023391if { (ac_try="$ac_link"
23392case "(($ac_try" in
23393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23394 *) ac_try_echo=$ac_try;;
23395esac
23396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23397 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023398 ac_status=$?
23399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23400 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023401 { (case "(($ac_try" in
23402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23403 *) ac_try_echo=$ac_try;;
23404esac
23405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23406 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023407 ac_status=$?
23408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23409 (exit $ac_status); }; }; then
23410 ac_cv_working_tzset=yes
23411else
23412 echo "$as_me: program exited with status $ac_status" >&5
23413echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023414sed 's/^/| /' conftest.$ac_ext >&5
23415
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023416( exit $ac_status )
23417ac_cv_working_tzset=no
23418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023419rm -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 +000023420fi
23421
Martin v. Löwiseba40652007-08-30 20:10:57 +000023422
23423fi
23424
23425{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23426echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023427if test "$ac_cv_working_tzset" = yes
23428then
23429
23430cat >>confdefs.h <<\_ACEOF
23431#define HAVE_WORKING_TZSET 1
23432_ACEOF
23433
23434fi
23435
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023436# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023437{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23438echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023439if test "${ac_cv_stat_tv_nsec+set}" = set; then
23440 echo $ECHO_N "(cached) $ECHO_C" >&6
23441else
23442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023443/* confdefs.h. */
23444_ACEOF
23445cat confdefs.h >>conftest.$ac_ext
23446cat >>conftest.$ac_ext <<_ACEOF
23447/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023448#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023449int
23450main ()
23451{
23452
23453struct stat st;
23454st.st_mtim.tv_nsec = 1;
23455
23456 ;
23457 return 0;
23458}
23459_ACEOF
23460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023461if { (ac_try="$ac_compile"
23462case "(($ac_try" in
23463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23464 *) ac_try_echo=$ac_try;;
23465esac
23466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023469 grep -v '^ *+' conftest.er1 >conftest.err
23470 rm -f conftest.er1
23471 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023473 (exit $ac_status); } && {
23474 test -z "$ac_c_werror_flag" ||
23475 test ! -s conftest.err
23476 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023477 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023478else
23479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023480sed 's/^/| /' conftest.$ac_ext >&5
23481
Martin v. Löwiseba40652007-08-30 20:10:57 +000023482 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023483fi
23484
Martin v. Löwiseba40652007-08-30 20:10:57 +000023485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23486fi
23487
23488{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23489echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023490if test "$ac_cv_stat_tv_nsec" = yes
23491then
23492
23493cat >>confdefs.h <<\_ACEOF
23494#define HAVE_STAT_TV_NSEC 1
23495_ACEOF
23496
23497fi
23498
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023499# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023500{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23501echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023502if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23503 echo $ECHO_N "(cached) $ECHO_C" >&6
23504else
23505 cat >conftest.$ac_ext <<_ACEOF
23506/* confdefs.h. */
23507_ACEOF
23508cat confdefs.h >>conftest.$ac_ext
23509cat >>conftest.$ac_ext <<_ACEOF
23510/* end confdefs.h. */
23511#include <sys/stat.h>
23512int
23513main ()
23514{
23515
23516struct stat st;
23517st.st_mtimespec.tv_nsec = 1;
23518
23519 ;
23520 return 0;
23521}
23522_ACEOF
23523rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023524if { (ac_try="$ac_compile"
23525case "(($ac_try" in
23526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23527 *) ac_try_echo=$ac_try;;
23528esac
23529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23530 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023531 ac_status=$?
23532 grep -v '^ *+' conftest.er1 >conftest.err
23533 rm -f conftest.er1
23534 cat conftest.err >&5
23535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023536 (exit $ac_status); } && {
23537 test -z "$ac_c_werror_flag" ||
23538 test ! -s conftest.err
23539 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023540 ac_cv_stat_tv_nsec2=yes
23541else
23542 echo "$as_me: failed program was:" >&5
23543sed 's/^/| /' conftest.$ac_ext >&5
23544
Martin v. Löwiseba40652007-08-30 20:10:57 +000023545 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023546fi
23547
Martin v. Löwiseba40652007-08-30 20:10:57 +000023548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23549fi
23550
23551{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23552echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023553if test "$ac_cv_stat_tv_nsec2" = yes
23554then
23555
23556cat >>confdefs.h <<\_ACEOF
23557#define HAVE_STAT_TV_NSEC2 1
23558_ACEOF
23559
23560fi
23561
Jack Jansen666b1e72001-10-31 12:11:48 +000023562# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023563{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23564echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023565if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23566 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023567else
Martin v. Löwis11437992002-04-12 09:54:03 +000023568 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023569/* confdefs.h. */
23570_ACEOF
23571cat confdefs.h >>conftest.$ac_ext
23572cat >>conftest.$ac_ext <<_ACEOF
23573/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023574#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023575int
23576main ()
23577{
Jack Jansen666b1e72001-10-31 12:11:48 +000023578
23579 int rtn;
23580 rtn = mvwdelch(0,0,0);
23581
Martin v. Löwis11437992002-04-12 09:54:03 +000023582 ;
23583 return 0;
23584}
23585_ACEOF
23586rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023587if { (ac_try="$ac_compile"
23588case "(($ac_try" in
23589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23590 *) ac_try_echo=$ac_try;;
23591esac
23592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23593 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023595 grep -v '^ *+' conftest.er1 >conftest.err
23596 rm -f conftest.er1
23597 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023599 (exit $ac_status); } && {
23600 test -z "$ac_c_werror_flag" ||
23601 test ! -s conftest.err
23602 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023603 ac_cv_mvwdelch_is_expression=yes
23604else
Martin v. Löwis11437992002-04-12 09:54:03 +000023605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023606sed 's/^/| /' conftest.$ac_ext >&5
23607
Martin v. Löwiseba40652007-08-30 20:10:57 +000023608 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023609fi
23610
Martin v. Löwiseba40652007-08-30 20:10:57 +000023611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23612fi
23613
23614{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23615echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023616
23617if test "$ac_cv_mvwdelch_is_expression" = yes
23618then
Martin v. Löwis11437992002-04-12 09:54:03 +000023619
23620cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023621#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023622_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023623
23624fi
23625
Martin v. Löwiseba40652007-08-30 20:10:57 +000023626{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23627echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023628if test "${ac_cv_window_has_flags+set}" = set; then
23629 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023630else
Martin v. Löwis11437992002-04-12 09:54:03 +000023631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023632/* confdefs.h. */
23633_ACEOF
23634cat confdefs.h >>conftest.$ac_ext
23635cat >>conftest.$ac_ext <<_ACEOF
23636/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023637#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023638int
23639main ()
23640{
Jack Jansen666b1e72001-10-31 12:11:48 +000023641
23642 WINDOW *w;
23643 w->_flags = 0;
23644
Martin v. Löwis11437992002-04-12 09:54:03 +000023645 ;
23646 return 0;
23647}
23648_ACEOF
23649rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023650if { (ac_try="$ac_compile"
23651case "(($ac_try" in
23652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23653 *) ac_try_echo=$ac_try;;
23654esac
23655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023658 grep -v '^ *+' conftest.er1 >conftest.err
23659 rm -f conftest.er1
23660 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023662 (exit $ac_status); } && {
23663 test -z "$ac_c_werror_flag" ||
23664 test ! -s conftest.err
23665 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023666 ac_cv_window_has_flags=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_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023672fi
23673
Martin v. Löwiseba40652007-08-30 20:10:57 +000023674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23675fi
23676
23677{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23678echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023679
Jack Jansen666b1e72001-10-31 12:11:48 +000023680
23681if test "$ac_cv_window_has_flags" = yes
23682then
Martin v. Löwis11437992002-04-12 09:54:03 +000023683
23684cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023685#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023686_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023687
23688fi
23689
Martin v. Löwiseba40652007-08-30 20:10:57 +000023690{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23691echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023692cat >conftest.$ac_ext <<_ACEOF
23693/* confdefs.h. */
23694_ACEOF
23695cat confdefs.h >>conftest.$ac_ext
23696cat >>conftest.$ac_ext <<_ACEOF
23697/* end confdefs.h. */
23698#include <curses.h>
23699int
23700main ()
23701{
23702void *x=is_term_resized
23703 ;
23704 return 0;
23705}
23706_ACEOF
23707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023708if { (ac_try="$ac_compile"
23709case "(($ac_try" in
23710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23711 *) ac_try_echo=$ac_try;;
23712esac
23713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23714 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023715 ac_status=$?
23716 grep -v '^ *+' conftest.er1 >conftest.err
23717 rm -f conftest.er1
23718 cat conftest.err >&5
23719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023720 (exit $ac_status); } && {
23721 test -z "$ac_c_werror_flag" ||
23722 test ! -s conftest.err
23723 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023724
23725cat >>confdefs.h <<\_ACEOF
23726#define HAVE_CURSES_IS_TERM_RESIZED 1
23727_ACEOF
23728
Martin v. Löwiseba40652007-08-30 20:10:57 +000023729 { echo "$as_me:$LINENO: result: yes" >&5
23730echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023731else
23732 echo "$as_me: failed program was:" >&5
23733sed 's/^/| /' conftest.$ac_ext >&5
23734
Martin v. Löwiseba40652007-08-30 20:10:57 +000023735 { echo "$as_me:$LINENO: result: no" >&5
23736echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023737
23738fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023739
Martin v. Löwiseba40652007-08-30 20:10:57 +000023740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23741
23742{ echo "$as_me:$LINENO: checking for resize_term" >&5
23743echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023744cat >conftest.$ac_ext <<_ACEOF
23745/* confdefs.h. */
23746_ACEOF
23747cat confdefs.h >>conftest.$ac_ext
23748cat >>conftest.$ac_ext <<_ACEOF
23749/* end confdefs.h. */
23750#include <curses.h>
23751int
23752main ()
23753{
23754void *x=resize_term
23755 ;
23756 return 0;
23757}
23758_ACEOF
23759rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023760if { (ac_try="$ac_compile"
23761case "(($ac_try" in
23762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23763 *) ac_try_echo=$ac_try;;
23764esac
23765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23766 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023767 ac_status=$?
23768 grep -v '^ *+' conftest.er1 >conftest.err
23769 rm -f conftest.er1
23770 cat conftest.err >&5
23771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023772 (exit $ac_status); } && {
23773 test -z "$ac_c_werror_flag" ||
23774 test ! -s conftest.err
23775 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023776
23777cat >>confdefs.h <<\_ACEOF
23778#define HAVE_CURSES_RESIZE_TERM 1
23779_ACEOF
23780
Martin v. Löwiseba40652007-08-30 20:10:57 +000023781 { echo "$as_me:$LINENO: result: yes" >&5
23782echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023783else
23784 echo "$as_me: failed program was:" >&5
23785sed 's/^/| /' conftest.$ac_ext >&5
23786
Martin v. Löwiseba40652007-08-30 20:10:57 +000023787 { echo "$as_me:$LINENO: result: no" >&5
23788echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023789
23790fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023791
Martin v. Löwiseba40652007-08-30 20:10:57 +000023792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23793
23794{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23795echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023796cat >conftest.$ac_ext <<_ACEOF
23797/* confdefs.h. */
23798_ACEOF
23799cat confdefs.h >>conftest.$ac_ext
23800cat >>conftest.$ac_ext <<_ACEOF
23801/* end confdefs.h. */
23802#include <curses.h>
23803int
23804main ()
23805{
23806void *x=resizeterm
23807 ;
23808 return 0;
23809}
23810_ACEOF
23811rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023812if { (ac_try="$ac_compile"
23813case "(($ac_try" in
23814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23815 *) ac_try_echo=$ac_try;;
23816esac
23817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23818 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023819 ac_status=$?
23820 grep -v '^ *+' conftest.er1 >conftest.err
23821 rm -f conftest.er1
23822 cat conftest.err >&5
23823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023824 (exit $ac_status); } && {
23825 test -z "$ac_c_werror_flag" ||
23826 test ! -s conftest.err
23827 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023828
23829cat >>confdefs.h <<\_ACEOF
23830#define HAVE_CURSES_RESIZETERM 1
23831_ACEOF
23832
Martin v. Löwiseba40652007-08-30 20:10:57 +000023833 { echo "$as_me:$LINENO: result: yes" >&5
23834echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023835else
23836 echo "$as_me: failed program was:" >&5
23837sed 's/^/| /' conftest.$ac_ext >&5
23838
Martin v. Löwiseba40652007-08-30 20:10:57 +000023839 { echo "$as_me:$LINENO: result: no" >&5
23840echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023841
23842fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023843
Martin v. Löwiseba40652007-08-30 20:10:57 +000023844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23845
23846{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23847echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023848
23849if test -r /dev/ptmx
23850then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023851 { echo "$as_me:$LINENO: result: yes" >&5
23852echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023853
23854cat >>confdefs.h <<\_ACEOF
23855#define HAVE_DEV_PTMX 1
23856_ACEOF
23857
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023858else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023859 { echo "$as_me:$LINENO: result: no" >&5
23860echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023861fi
23862
Martin v. Löwiseba40652007-08-30 20:10:57 +000023863{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23864echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023865
23866if test -r /dev/ptc
23867then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023868 { echo "$as_me:$LINENO: result: yes" >&5
23869echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023870
23871cat >>confdefs.h <<\_ACEOF
23872#define HAVE_DEV_PTC 1
23873_ACEOF
23874
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023875else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023876 { echo "$as_me:$LINENO: result: no" >&5
23877echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023878fi
23879
Martin v. Löwiseba40652007-08-30 20:10:57 +000023880{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23881echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023882if test "$cross_compiling" = yes; then
23883 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23884See \`config.log' for more details." >&5
23885echo "$as_me: error: cannot run test program while cross compiling
23886See \`config.log' for more details." >&2;}
23887 { (exit 1); exit 1; }; }
23888else
23889 cat >conftest.$ac_ext <<_ACEOF
23890/* confdefs.h. */
23891_ACEOF
23892cat confdefs.h >>conftest.$ac_ext
23893cat >>conftest.$ac_ext <<_ACEOF
23894/* end confdefs.h. */
23895#include <stdio.h>
23896#include <stddef.h>
23897#include <string.h>
23898
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023899#ifdef HAVE_SYS_TYPES_H
23900#include <sys/types.h>
23901#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023902
23903#ifdef HAVE_SSIZE_T
23904typedef ssize_t Py_ssize_t;
23905#elif SIZEOF_VOID_P == SIZEOF_LONG
23906typedef long Py_ssize_t;
23907#else
23908typedef int Py_ssize_t;
23909#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023910
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023911int main()
23912{
23913 char buffer[256];
23914
Brett Cannon09d12362006-05-11 05:11:33 +000023915 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23916 return 1;
23917
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023918 if (strcmp(buffer, "123"))
23919 return 1;
23920
23921 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23922 return 1;
23923
23924 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023925 return 1;
23926
23927 return 0;
23928}
23929_ACEOF
23930rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023931if { (ac_try="$ac_link"
23932case "(($ac_try" in
23933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23934 *) ac_try_echo=$ac_try;;
23935esac
23936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23937 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023938 ac_status=$?
23939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23940 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023941 { (case "(($ac_try" in
23942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23943 *) ac_try_echo=$ac_try;;
23944esac
23945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23946 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023947 ac_status=$?
23948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23949 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023950 { echo "$as_me:$LINENO: result: yes" >&5
23951echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023952
23953cat >>confdefs.h <<\_ACEOF
23954#define PY_FORMAT_SIZE_T "z"
23955_ACEOF
23956
23957else
23958 echo "$as_me: program exited with status $ac_status" >&5
23959echo "$as_me: failed program was:" >&5
23960sed 's/^/| /' conftest.$ac_ext >&5
23961
23962( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023963{ echo "$as_me:$LINENO: result: no" >&5
23964echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023966rm -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 +000023967fi
23968
Martin v. Löwiseba40652007-08-30 20:10:57 +000023969
23970
23971{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23972echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023973if test "${ac_cv_type_socklen_t+set}" = set; then
23974 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023975else
Martin v. Löwis11437992002-04-12 09:54:03 +000023976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023977/* confdefs.h. */
23978_ACEOF
23979cat confdefs.h >>conftest.$ac_ext
23980cat >>conftest.$ac_ext <<_ACEOF
23981/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023982
23983#ifdef HAVE_SYS_TYPES_H
23984#include <sys/types.h>
23985#endif
23986#ifdef HAVE_SYS_SOCKET_H
23987#include <sys/socket.h>
23988#endif
23989
23990
Martin v. Löwiseba40652007-08-30 20:10:57 +000023991typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023992int
23993main ()
23994{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023995if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023996 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023997if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023998 return 0;
23999 ;
24000 return 0;
24001}
24002_ACEOF
24003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024004if { (ac_try="$ac_compile"
24005case "(($ac_try" in
24006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24007 *) ac_try_echo=$ac_try;;
24008esac
24009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024012 grep -v '^ *+' conftest.er1 >conftest.err
24013 rm -f conftest.er1
24014 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024016 (exit $ac_status); } && {
24017 test -z "$ac_c_werror_flag" ||
24018 test ! -s conftest.err
24019 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024020 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024021else
Martin v. Löwis11437992002-04-12 09:54:03 +000024022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024023sed 's/^/| /' conftest.$ac_ext >&5
24024
Martin v. Löwiseba40652007-08-30 20:10:57 +000024025 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024027
24028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024030{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24031echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024032if test $ac_cv_type_socklen_t = yes; then
24033 :
24034else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024035
Martin v. Löwis01c04012002-11-11 14:58:44 +000024036cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024037#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024038_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024039
24040fi
24041
Michael W. Hudson54241132001-12-07 15:38:26 +000024042
Michael W. Hudson54241132001-12-07 15:38:26 +000024043
24044
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024045for h in `(cd $srcdir;echo Python/thread_*.h)`
24046do
24047 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24048done
24049
Michael W. Hudson54241132001-12-07 15:38:26 +000024050
Neal Norwitzd24499d2005-12-18 21:36:39 +000024051SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024052{ echo "$as_me:$LINENO: checking for build directories" >&5
24053echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024054for dir in $SRCDIRS; do
24055 if test ! -d $dir; then
24056 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024057 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024058done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024059{ echo "$as_me:$LINENO: result: done" >&5
24060echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024061
Guido van Rossum627b2d71993-12-24 10:39:16 +000024062# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024063ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024064
Martin v. Löwis11437992002-04-12 09:54:03 +000024065cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024066# This file is a shell script that caches the results of configure
24067# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024068# scripts and configure runs, see configure's option --config-cache.
24069# It is not useful on other systems. If it contains results you don't
24070# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024071#
Martin v. Löwis11437992002-04-12 09:54:03 +000024072# config.status only pays attention to the cache file if you give it
24073# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024074#
Skip Montanaro6dead952003-09-25 14:50:04 +000024075# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024076# loading this file, other *unset* `ac_cv_foo' will be assigned the
24077# following values.
24078
24079_ACEOF
24080
Guido van Rossumf78abae1997-01-21 22:02:36 +000024081# The following way of writing the cache mishandles newlines in values,
24082# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024083# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024084# Ultrix sh set writes to stderr and can't be redirected directly,
24085# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024086(
24087 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24088 eval ac_val=\$$ac_var
24089 case $ac_val in #(
24090 *${as_nl}*)
24091 case $ac_var in #(
24092 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24093echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24094 esac
24095 case $ac_var in #(
24096 _ | IFS | as_nl) ;; #(
24097 *) $as_unset $ac_var ;;
24098 esac ;;
24099 esac
24100 done
24101
Martin v. Löwis11437992002-04-12 09:54:03 +000024102 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024103 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24104 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024105 # `set' does not quote correctly, so add quotes (double-quote
24106 # substitution turns \\\\ into \\, and sed turns \\ into \).
24107 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024108 "s/'/'\\\\''/g;
24109 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024110 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024111 *)
24112 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024113 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024114 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024115 esac |
24116 sort
24117) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024118 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024119 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024120 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024121 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024122 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24123 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024124 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24125 :end' >>confcache
24126if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24127 if test -w "$cache_file"; then
24128 test "x$cache_file" != "x/dev/null" &&
24129 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24130echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024131 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024132 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024133 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24134echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024135 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024136fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024137rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024138
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024139test "x$prefix" = xNONE && prefix=$ac_default_prefix
24140# Let make expand exec_prefix.
24141test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024142
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024143DEFS=-DHAVE_CONFIG_H
24144
Skip Montanaro6dead952003-09-25 14:50:04 +000024145ac_libobjs=
24146ac_ltlibobjs=
24147for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24148 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024149 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24150 ac_i=`echo "$ac_i" | sed "$ac_script"`
24151 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24152 # will be set to the directory where LIBOBJS objects are built.
24153 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24154 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024155done
24156LIBOBJS=$ac_libobjs
24157
24158LTLIBOBJS=$ac_ltlibobjs
24159
24160
Martin v. Löwis11437992002-04-12 09:54:03 +000024161
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024162: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024163ac_clean_files_save=$ac_clean_files
24164ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24165{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24166echo "$as_me: creating $CONFIG_STATUS" >&6;}
24167cat >$CONFIG_STATUS <<_ACEOF
24168#! $SHELL
24169# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024170# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024171# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024172# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024173
Martin v. Löwis11437992002-04-12 09:54:03 +000024174debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024175ac_cs_recheck=false
24176ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024177SHELL=\${CONFIG_SHELL-$SHELL}
24178_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024179
Martin v. Löwis11437992002-04-12 09:54:03 +000024180cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024181## --------------------- ##
24182## M4sh Initialization. ##
24183## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024184
Martin v. Löwiseba40652007-08-30 20:10:57 +000024185# Be more Bourne compatible
24186DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024187if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24188 emulate sh
24189 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024190 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24191 # is contrary to our usage. Disable this feature.
24192 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024193 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024194else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024195 case `(set -o) 2>/dev/null` in
24196 *posix*) set -o posix ;;
24197esac
24198
Martin v. Löwis11437992002-04-12 09:54:03 +000024199fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024200
Skip Montanaro6dead952003-09-25 14:50:04 +000024201
Martin v. Löwis11437992002-04-12 09:54:03 +000024202
24203
Martin v. Löwiseba40652007-08-30 20:10:57 +000024204# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024205# Avoid depending upon Character Ranges.
24206as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24207as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24208as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24209as_cr_digits='0123456789'
24210as_cr_alnum=$as_cr_Letters$as_cr_digits
24211
24212# The user is always right.
24213if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024214 echo "#! /bin/sh" >conf$$.sh
24215 echo "exit 0" >>conf$$.sh
24216 chmod +x conf$$.sh
24217 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024218 PATH_SEPARATOR=';'
24219 else
24220 PATH_SEPARATOR=:
24221 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024222 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024223fi
24224
Martin v. Löwiseba40652007-08-30 20:10:57 +000024225# Support unset when possible.
24226if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24227 as_unset=unset
24228else
24229 as_unset=false
24230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024231
Martin v. Löwiseba40652007-08-30 20:10:57 +000024232
24233# IFS
24234# We need space, tab and new line, in precisely that order. Quoting is
24235# there to prevent editors from complaining about space-tab.
24236# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24237# splitting by setting IFS to empty value.)
24238as_nl='
24239'
24240IFS=" "" $as_nl"
24241
24242# Find who we are. Look in the path if we contain no directory separator.
24243case $0 in
24244 *[\\/]* ) as_myself=$0 ;;
24245 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024246for as_dir in $PATH
24247do
24248 IFS=$as_save_IFS
24249 test -z "$as_dir" && as_dir=.
24250 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24251done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024252IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024253
Martin v. Löwiseba40652007-08-30 20:10:57 +000024254 ;;
24255esac
24256# We did not find ourselves, most probably we were run as `sh COMMAND'
24257# in which case we are not to be found in the path.
24258if test "x$as_myself" = x; then
24259 as_myself=$0
24260fi
24261if test ! -f "$as_myself"; then
24262 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24263 { (exit 1); exit 1; }
24264fi
24265
24266# Work around bugs in pre-3.0 UWIN ksh.
24267for as_var in ENV MAIL MAILPATH
24268do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24269done
24270PS1='$ '
24271PS2='> '
24272PS4='+ '
24273
24274# NLS nuisances.
24275for as_var in \
24276 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24277 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24278 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024279do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024280 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24281 eval $as_var=C; export $as_var
24282 else
24283 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24284 fi
24285done
24286
24287# Required to use basename.
24288if expr a : '\(a\)' >/dev/null 2>&1 &&
24289 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24290 as_expr=expr
24291else
24292 as_expr=false
24293fi
24294
24295if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24296 as_basename=basename
24297else
24298 as_basename=false
24299fi
24300
24301
24302# Name of the executable.
24303as_me=`$as_basename -- "$0" ||
24304$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24305 X"$0" : 'X\(//\)$' \| \
24306 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24307echo X/"$0" |
24308 sed '/^.*\/\([^/][^/]*\)\/*$/{
24309 s//\1/
24310 q
24311 }
24312 /^X\/\(\/\/\)$/{
24313 s//\1/
24314 q
24315 }
24316 /^X\/\(\/\).*/{
24317 s//\1/
24318 q
24319 }
24320 s/.*/./; q'`
24321
24322# CDPATH.
24323$as_unset CDPATH
24324
24325
24326
Martin v. Löwis11437992002-04-12 09:54:03 +000024327 as_lineno_1=$LINENO
24328 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024329 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024330 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024331
Martin v. Löwis11437992002-04-12 09:54:03 +000024332 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24333 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024334 # line-number line after each line using $LINENO; the second 'sed'
24335 # does the real work. The second script uses 'N' to pair each
24336 # line-number line with the line containing $LINENO, and appends
24337 # trailing '-' during substitution so that $LINENO is not a special
24338 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024339 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024340 # scripts with optimization help from Paolo Bonzini. Blame Lee
24341 # E. McMahon (1931-1989) for sed's syntax. :-)
24342 sed -n '
24343 p
24344 /[$]LINENO/=
24345 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024346 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024347 s/[$]LINENO.*/&-/
24348 t lineno
24349 b
24350 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024351 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024352 :loop
24353 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024354 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024355 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024356 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024357 chmod +x "$as_me.lineno" ||
24358 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024359 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024360
Martin v. Löwis11437992002-04-12 09:54:03 +000024361 # Don't try to exec as it changes $[0], causing all sort of problems
24362 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024363 # original and so on. Autoconf is especially sensitive to this).
24364 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024365 # Exit status is that of the last command.
24366 exit
24367}
24368
24369
Martin v. Löwiseba40652007-08-30 20:10:57 +000024370if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24371 as_dirname=dirname
24372else
24373 as_dirname=false
24374fi
24375
24376ECHO_C= ECHO_N= ECHO_T=
24377case `echo -n x` in
24378-n*)
24379 case `echo 'x\c'` in
24380 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24381 *) ECHO_C='\c';;
24382 esac;;
24383*)
24384 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024385esac
24386
Martin v. Löwiseba40652007-08-30 20:10:57 +000024387if expr a : '\(a\)' >/dev/null 2>&1 &&
24388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024389 as_expr=expr
24390else
24391 as_expr=false
24392fi
24393
24394rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024395if test -d conf$$.dir; then
24396 rm -f conf$$.dir/conf$$.file
24397else
24398 rm -f conf$$.dir
24399 mkdir conf$$.dir
24400fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024401echo >conf$$.file
24402if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024403 as_ln_s='ln -s'
24404 # ... but there are two gotchas:
24405 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24406 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24407 # In both cases, we have to default to `cp -p'.
24408 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024409 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024410elif ln conf$$.file conf$$ 2>/dev/null; then
24411 as_ln_s=ln
24412else
24413 as_ln_s='cp -p'
24414fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024415rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24416rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024417
Skip Montanaro6dead952003-09-25 14:50:04 +000024418if mkdir -p . 2>/dev/null; then
24419 as_mkdir_p=:
24420else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024421 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024422 as_mkdir_p=false
24423fi
24424
Martin v. Löwiseba40652007-08-30 20:10:57 +000024425if test -x / >/dev/null 2>&1; then
24426 as_test_x='test -x'
24427else
24428 if ls -dL / >/dev/null 2>&1; then
24429 as_ls_L_option=L
24430 else
24431 as_ls_L_option=
24432 fi
24433 as_test_x='
24434 eval sh -c '\''
24435 if test -d "$1"; then
24436 test -d "$1/.";
24437 else
24438 case $1 in
24439 -*)set "./$1";;
24440 esac;
24441 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24442 ???[sx]*):;;*)false;;esac;fi
24443 '\'' sh
24444 '
24445fi
24446as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024447
24448# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024449as_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 +000024450
24451# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024452as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024453
24454
Martin v. Löwis11437992002-04-12 09:54:03 +000024455exec 6>&1
24456
Martin v. Löwiseba40652007-08-30 20:10:57 +000024457# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024458# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024459# values after options handling.
24460ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024461This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024462generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024463
24464 CONFIG_FILES = $CONFIG_FILES
24465 CONFIG_HEADERS = $CONFIG_HEADERS
24466 CONFIG_LINKS = $CONFIG_LINKS
24467 CONFIG_COMMANDS = $CONFIG_COMMANDS
24468 $ $0 $@
24469
Martin v. Löwiseba40652007-08-30 20:10:57 +000024470on `(hostname || uname -n) 2>/dev/null | sed 1q`
24471"
24472
Martin v. Löwis11437992002-04-12 09:54:03 +000024473_ACEOF
24474
Martin v. Löwiseba40652007-08-30 20:10:57 +000024475cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024476# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024477config_files="$ac_config_files"
24478config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024479
Martin v. Löwiseba40652007-08-30 20:10:57 +000024480_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024481
24482cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024483ac_cs_usage="\
24484\`$as_me' instantiates files from templates according to the
24485current configuration.
24486
24487Usage: $0 [OPTIONS] [FILE]...
24488
24489 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024490 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024491 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024492 -d, --debug don't remove temporary files
24493 --recheck update $as_me by reconfiguring in the same conditions
24494 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024495 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024496 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024497 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024498
24499Configuration files:
24500$config_files
24501
24502Configuration headers:
24503$config_headers
24504
24505Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024506
Martin v. Löwiseba40652007-08-30 20:10:57 +000024507_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024508cat >>$CONFIG_STATUS <<_ACEOF
24509ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024510python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024511configured by $0, generated by GNU Autoconf 2.61,
24512 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024513
Martin v. Löwiseba40652007-08-30 20:10:57 +000024514Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024515This config.status script is free software; the Free Software Foundation
24516gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024517
24518ac_pwd='$ac_pwd'
24519srcdir='$srcdir'
24520INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024521_ACEOF
24522
24523cat >>$CONFIG_STATUS <<\_ACEOF
24524# If no file are specified by the user, then we need to provide default
24525# value. By we need to know if files were specified by the user.
24526ac_need_defaults=:
24527while test $# != 0
24528do
24529 case $1 in
24530 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024531 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24532 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024533 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024534 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024535 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024536 ac_option=$1
24537 ac_optarg=$2
24538 ac_shift=shift
24539 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024540 esac
24541
Skip Montanaro6dead952003-09-25 14:50:04 +000024542 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024543 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024544 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24545 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024546 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24547 echo "$ac_cs_version"; exit ;;
24548 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024549 debug=: ;;
24550 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024551 $ac_shift
24552 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024553 ac_need_defaults=false;;
24554 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024555 $ac_shift
24556 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024557 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024558 --he | --h)
24559 # Conflict between --help and --header
24560 { echo "$as_me: error: ambiguous option: $1
24561Try \`$0 --help' for more information." >&2
24562 { (exit 1); exit 1; }; };;
24563 --help | --hel | -h )
24564 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024565 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24566 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24567 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024568
24569 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024570 -*) { echo "$as_me: error: unrecognized option: $1
24571Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024572 { (exit 1); exit 1; }; } ;;
24573
Martin v. Löwiseba40652007-08-30 20:10:57 +000024574 *) ac_config_targets="$ac_config_targets $1"
24575 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024576
24577 esac
24578 shift
24579done
24580
Skip Montanaro6dead952003-09-25 14:50:04 +000024581ac_configure_extra_args=
24582
24583if $ac_cs_silent; then
24584 exec 6>/dev/null
24585 ac_configure_extra_args="$ac_configure_extra_args --silent"
24586fi
24587
24588_ACEOF
24589cat >>$CONFIG_STATUS <<_ACEOF
24590if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024591 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24592 CONFIG_SHELL=$SHELL
24593 export CONFIG_SHELL
24594 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024595fi
24596
Martin v. Löwis11437992002-04-12 09:54:03 +000024597_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024598cat >>$CONFIG_STATUS <<\_ACEOF
24599exec 5>>config.log
24600{
24601 echo
24602 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24603## Running $as_me. ##
24604_ASBOX
24605 echo "$ac_log"
24606} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024607
Martin v. Löwiseba40652007-08-30 20:10:57 +000024608_ACEOF
24609cat >>$CONFIG_STATUS <<_ACEOF
24610_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024611
24612cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024613
24614# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024615for ac_config_target in $ac_config_targets
24616do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024617 case $ac_config_target in
24618 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24619 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24620 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24621 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024622 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
24623 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024624 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24625 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24626
Martin v. Löwis11437992002-04-12 09:54:03 +000024627 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24628echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24629 { (exit 1); exit 1; }; };;
24630 esac
24631done
24632
Martin v. Löwiseba40652007-08-30 20:10:57 +000024633
Martin v. Löwis11437992002-04-12 09:54:03 +000024634# If the user did not use the arguments to specify the items to instantiate,
24635# then the envvar interface is used. Set only those that are not.
24636# We use the long form for the default assignment because of an extremely
24637# bizarre bug on SunOS 4.1.3.
24638if $ac_need_defaults; then
24639 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24640 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24641fi
24642
Skip Montanaro6dead952003-09-25 14:50:04 +000024643# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024644# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024645# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024646# Hook for its removal unless debugging.
24647# Note that there is a small window in which the directory will not be cleaned:
24648# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024649$debug ||
24650{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024651 tmp=
24652 trap 'exit_status=$?
24653 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24654' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024655 trap '{ (exit 1); exit 1; }' 1 2 13 15
24656}
Martin v. Löwis11437992002-04-12 09:54:03 +000024657# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024658
Martin v. Löwis11437992002-04-12 09:54:03 +000024659{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024660 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024661 test -n "$tmp" && test -d "$tmp"
24662} ||
24663{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024664 tmp=./conf$$-$RANDOM
24665 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024666} ||
24667{
Skip Montanaro6dead952003-09-25 14:50:04 +000024668 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024669 { (exit 1); exit 1; }
24670}
24671
Martin v. Löwis11437992002-04-12 09:54:03 +000024672#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024673# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024674#
24675
24676# No need to generate the scripts if there are no CONFIG_FILES.
24677# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024678if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024679
24680_ACEOF
24681
Martin v. Löwiseba40652007-08-30 20:10:57 +000024682
24683
24684ac_delim='%!_!# '
24685for ac_last_try in false false false false false :; do
24686 cat >conf$$subs.sed <<_ACEOF
24687SHELL!$SHELL$ac_delim
24688PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24689PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24690PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24691PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24692PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24693PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24694exec_prefix!$exec_prefix$ac_delim
24695prefix!$prefix$ac_delim
24696program_transform_name!$program_transform_name$ac_delim
24697bindir!$bindir$ac_delim
24698sbindir!$sbindir$ac_delim
24699libexecdir!$libexecdir$ac_delim
24700datarootdir!$datarootdir$ac_delim
24701datadir!$datadir$ac_delim
24702sysconfdir!$sysconfdir$ac_delim
24703sharedstatedir!$sharedstatedir$ac_delim
24704localstatedir!$localstatedir$ac_delim
24705includedir!$includedir$ac_delim
24706oldincludedir!$oldincludedir$ac_delim
24707docdir!$docdir$ac_delim
24708infodir!$infodir$ac_delim
24709htmldir!$htmldir$ac_delim
24710dvidir!$dvidir$ac_delim
24711pdfdir!$pdfdir$ac_delim
24712psdir!$psdir$ac_delim
24713libdir!$libdir$ac_delim
24714localedir!$localedir$ac_delim
24715mandir!$mandir$ac_delim
24716DEFS!$DEFS$ac_delim
24717ECHO_C!$ECHO_C$ac_delim
24718ECHO_N!$ECHO_N$ac_delim
24719ECHO_T!$ECHO_T$ac_delim
24720LIBS!$LIBS$ac_delim
24721build_alias!$build_alias$ac_delim
24722host_alias!$host_alias$ac_delim
24723target_alias!$target_alias$ac_delim
24724VERSION!$VERSION$ac_delim
24725SOVERSION!$SOVERSION$ac_delim
24726CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24727UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24728PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024729PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024730PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24731PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24732PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24733FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24734FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24735FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24736FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24737FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24738MACHDEP!$MACHDEP$ac_delim
24739SGI_ABI!$SGI_ABI$ac_delim
24740EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24741EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24742CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24743EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24744CC!$CC$ac_delim
24745CFLAGS!$CFLAGS$ac_delim
24746LDFLAGS!$LDFLAGS$ac_delim
24747CPPFLAGS!$CPPFLAGS$ac_delim
24748ac_ct_CC!$ac_ct_CC$ac_delim
24749EXEEXT!$EXEEXT$ac_delim
24750OBJEXT!$OBJEXT$ac_delim
24751CXX!$CXX$ac_delim
24752MAINCC!$MAINCC$ac_delim
24753CPP!$CPP$ac_delim
24754GREP!$GREP$ac_delim
24755EGREP!$EGREP$ac_delim
24756BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24757LIBRARY!$LIBRARY$ac_delim
24758LDLIBRARY!$LDLIBRARY$ac_delim
24759DLLLIBRARY!$DLLLIBRARY$ac_delim
24760BLDLIBRARY!$BLDLIBRARY$ac_delim
24761LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24762INSTSONAME!$INSTSONAME$ac_delim
24763RUNSHARED!$RUNSHARED$ac_delim
24764LINKCC!$LINKCC$ac_delim
24765RANLIB!$RANLIB$ac_delim
24766AR!$AR$ac_delim
24767SVNVERSION!$SVNVERSION$ac_delim
24768INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24769INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24770INSTALL_DATA!$INSTALL_DATA$ac_delim
24771LN!$LN$ac_delim
24772OPT!$OPT$ac_delim
24773BASECFLAGS!$BASECFLAGS$ac_delim
24774OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24775LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24776SO!$SO$ac_delim
24777LDSHARED!$LDSHARED$ac_delim
24778BLDSHARED!$BLDSHARED$ac_delim
24779CCSHARED!$CCSHARED$ac_delim
24780LINKFORSHARED!$LINKFORSHARED$ac_delim
24781CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24782SHLIBS!$SHLIBS$ac_delim
24783USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024784_ACEOF
24785
24786 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24787 break
24788 elif $ac_last_try; then
24789 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24790echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24791 { (exit 1); exit 1; }; }
24792 else
24793 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024794 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024795done
24796
24797ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24798if test -n "$ac_eof"; then
24799 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24800 ac_eof=`expr $ac_eof + 1`
24801fi
24802
24803cat >>$CONFIG_STATUS <<_ACEOF
24804cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24805/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24806_ACEOF
24807sed '
24808s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24809s/^/s,@/; s/!/@,|#_!!_#|/
24810:n
24811t n
24812s/'"$ac_delim"'$/,g/; t
24813s/$/\\/; p
24814N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24815' >>$CONFIG_STATUS <conf$$subs.sed
24816rm -f conf$$subs.sed
24817cat >>$CONFIG_STATUS <<_ACEOF
24818CEOF$ac_eof
24819_ACEOF
24820
24821
24822ac_delim='%!_!# '
24823for ac_last_try in false false false false false :; do
24824 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024825SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024826USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24827LDLAST!$LDLAST$ac_delim
24828THREADOBJ!$THREADOBJ$ac_delim
24829DLINCLDIR!$DLINCLDIR$ac_delim
24830DYNLOADFILE!$DYNLOADFILE$ac_delim
24831MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24832TRUE!$TRUE$ac_delim
24833LIBOBJS!$LIBOBJS$ac_delim
24834HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24835HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24836HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24837HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24838HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24839LIBM!$LIBM$ac_delim
24840LIBC!$LIBC$ac_delim
24841UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24842THREADHEADERS!$THREADHEADERS$ac_delim
24843SRCDIRS!$SRCDIRS$ac_delim
24844LTLIBOBJS!$LTLIBOBJS$ac_delim
24845_ACEOF
24846
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024847 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024848 break
24849 elif $ac_last_try; then
24850 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24851echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24852 { (exit 1); exit 1; }; }
24853 else
24854 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24855 fi
24856done
24857
24858ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24859if test -n "$ac_eof"; then
24860 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24861 ac_eof=`expr $ac_eof + 1`
24862fi
24863
24864cat >>$CONFIG_STATUS <<_ACEOF
24865cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24866/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24867_ACEOF
24868sed '
24869s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24870s/^/s,@/; s/!/@,|#_!!_#|/
24871:n
24872t n
24873s/'"$ac_delim"'$/,g/; t
24874s/$/\\/; p
24875N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24876' >>$CONFIG_STATUS <conf$$subs.sed
24877rm -f conf$$subs.sed
24878cat >>$CONFIG_STATUS <<_ACEOF
24879:end
24880s/|#_!!_#|//g
24881CEOF$ac_eof
24882_ACEOF
24883
24884
24885# VPATH may cause trouble with some makes, so we remove $(srcdir),
24886# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24887# trailing colons and then remove the whole line if VPATH becomes empty
24888# (actually we leave an empty line to preserve line numbers).
24889if test "x$srcdir" = x.; then
24890 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24891s/:*\$(srcdir):*/:/
24892s/:*\${srcdir}:*/:/
24893s/:*@srcdir@:*/:/
24894s/^\([^=]*=[ ]*\):*/\1/
24895s/:*$//
24896s/^[^=]*=[ ]*$//
24897}'
24898fi
24899
24900cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024901fi # test -n "$CONFIG_FILES"
24902
Martin v. Löwiseba40652007-08-30 20:10:57 +000024903
24904for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24905do
24906 case $ac_tag in
24907 :[FHLC]) ac_mode=$ac_tag; continue;;
24908 esac
24909 case $ac_mode$ac_tag in
24910 :[FHL]*:*);;
24911 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24912echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24913 { (exit 1); exit 1; }; };;
24914 :[FH]-) ac_tag=-:-;;
24915 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24916 esac
24917 ac_save_IFS=$IFS
24918 IFS=:
24919 set x $ac_tag
24920 IFS=$ac_save_IFS
24921 shift
24922 ac_file=$1
24923 shift
24924
24925 case $ac_mode in
24926 :L) ac_source=$1;;
24927 :[FH])
24928 ac_file_inputs=
24929 for ac_f
24930 do
24931 case $ac_f in
24932 -) ac_f="$tmp/stdin";;
24933 *) # Look for the file first in the build tree, then in the source tree
24934 # (if the path is not absolute). The absolute path cannot be DOS-style,
24935 # because $ac_f cannot contain `:'.
24936 test -f "$ac_f" ||
24937 case $ac_f in
24938 [\\/$]*) false;;
24939 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24940 esac ||
24941 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24942echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24943 { (exit 1); exit 1; }; };;
24944 esac
24945 ac_file_inputs="$ac_file_inputs $ac_f"
24946 done
24947
24948 # Let's still pretend it is `configure' which instantiates (i.e., don't
24949 # use $as_me), people would be surprised to read:
24950 # /* config.h. Generated by config.status. */
24951 configure_input="Generated from "`IFS=:
24952 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24953 if test x"$ac_file" != x-; then
24954 configure_input="$ac_file. $configure_input"
24955 { echo "$as_me:$LINENO: creating $ac_file" >&5
24956echo "$as_me: creating $ac_file" >&6;}
24957 fi
24958
24959 case $ac_tag in
24960 *:-:* | *:-) cat >"$tmp/stdin";;
24961 esac
24962 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024963 esac
24964
Martin v. Löwiseba40652007-08-30 20:10:57 +000024965 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024966$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024967 X"$ac_file" : 'X\(//\)[^/]' \| \
24968 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024969 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024970echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024971 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24972 s//\1/
24973 q
24974 }
24975 /^X\(\/\/\)[^/].*/{
24976 s//\1/
24977 q
24978 }
24979 /^X\(\/\/\)$/{
24980 s//\1/
24981 q
24982 }
24983 /^X\(\/\).*/{
24984 s//\1/
24985 q
24986 }
24987 s/.*/./; q'`
24988 { as_dir="$ac_dir"
24989 case $as_dir in #(
24990 -*) as_dir=./$as_dir;;
24991 esac
24992 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024993 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024994 while :; do
24995 case $as_dir in #(
24996 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24997 *) as_qdir=$as_dir;;
24998 esac
24999 as_dirs="'$as_qdir' $as_dirs"
25000 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025001$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025002 X"$as_dir" : 'X\(//\)[^/]' \| \
25003 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025004 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025005echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025006 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25007 s//\1/
25008 q
25009 }
25010 /^X\(\/\/\)[^/].*/{
25011 s//\1/
25012 q
25013 }
25014 /^X\(\/\/\)$/{
25015 s//\1/
25016 q
25017 }
25018 /^X\(\/\).*/{
25019 s//\1/
25020 q
25021 }
25022 s/.*/./; q'`
25023 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025024 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025025 test -z "$as_dirs" || eval "mkdir $as_dirs"
25026 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25027echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025028 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025029 ac_builddir=.
25030
Martin v. Löwiseba40652007-08-30 20:10:57 +000025031case "$ac_dir" in
25032.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25033*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025034 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025035 # A ".." for each directory in $ac_dir_suffix.
25036 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25037 case $ac_top_builddir_sub in
25038 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25039 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25040 esac ;;
25041esac
25042ac_abs_top_builddir=$ac_pwd
25043ac_abs_builddir=$ac_pwd$ac_dir_suffix
25044# for backward compatibility:
25045ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025046
25047case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025048 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025049 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025050 ac_top_srcdir=$ac_top_builddir_sub
25051 ac_abs_top_srcdir=$ac_pwd ;;
25052 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025053 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025054 ac_top_srcdir=$srcdir
25055 ac_abs_top_srcdir=$srcdir ;;
25056 *) # Relative name.
25057 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25058 ac_top_srcdir=$ac_top_build_prefix$srcdir
25059 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025060esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025061ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025062
Martin v. Löwis11437992002-04-12 09:54:03 +000025063
Martin v. Löwiseba40652007-08-30 20:10:57 +000025064 case $ac_mode in
25065 :F)
25066 #
25067 # CONFIG_FILE
25068 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025069
25070 case $INSTALL in
25071 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025072 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025073 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025074_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025075
25076cat >>$CONFIG_STATUS <<\_ACEOF
25077# If the template does not know about datarootdir, expand it.
25078# FIXME: This hack should be removed a few years after 2.60.
25079ac_datarootdir_hack=; ac_datarootdir_seen=
25080
25081case `sed -n '/datarootdir/ {
25082 p
25083 q
25084}
25085/@datadir@/p
25086/@docdir@/p
25087/@infodir@/p
25088/@localedir@/p
25089/@mandir@/p
25090' $ac_file_inputs` in
25091*datarootdir*) ac_datarootdir_seen=yes;;
25092*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25093 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25094echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25095_ACEOF
25096cat >>$CONFIG_STATUS <<_ACEOF
25097 ac_datarootdir_hack='
25098 s&@datadir@&$datadir&g
25099 s&@docdir@&$docdir&g
25100 s&@infodir@&$infodir&g
25101 s&@localedir@&$localedir&g
25102 s&@mandir@&$mandir&g
25103 s&\\\${datarootdir}&$datarootdir&g' ;;
25104esac
25105_ACEOF
25106
25107# Neutralize VPATH when `$srcdir' = `.'.
25108# Shell code in configure.ac might set extrasub.
25109# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025110cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025111 sed "$ac_vpsub
25112$extrasub
25113_ACEOF
25114cat >>$CONFIG_STATUS <<\_ACEOF
25115:t
25116/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025117s&@configure_input@&$configure_input&;t t
25118s&@top_builddir@&$ac_top_builddir_sub&;t t
25119s&@srcdir@&$ac_srcdir&;t t
25120s&@abs_srcdir@&$ac_abs_srcdir&;t t
25121s&@top_srcdir@&$ac_top_srcdir&;t t
25122s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25123s&@builddir@&$ac_builddir&;t t
25124s&@abs_builddir@&$ac_abs_builddir&;t t
25125s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25126s&@INSTALL@&$ac_INSTALL&;t t
25127$ac_datarootdir_hack
25128" $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 +000025129
Martin v. Löwiseba40652007-08-30 20:10:57 +000025130test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25131 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25132 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25133 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25134which seems to be undefined. Please make sure it is defined." >&5
25135echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25136which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025137
Martin v. Löwiseba40652007-08-30 20:10:57 +000025138 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025139 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025140 -) cat "$tmp/out"; rm -f "$tmp/out";;
25141 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025142 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025143 ;;
25144 :H)
25145 #
25146 # CONFIG_HEADER
25147 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025148_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025149
Martin v. Löwiseba40652007-08-30 20:10:57 +000025150# Transform confdefs.h into a sed script `conftest.defines', that
25151# substitutes the proper values into config.h.in to produce config.h.
25152rm -f conftest.defines conftest.tail
25153# First, append a space to every undef/define line, to ease matching.
25154echo 's/$/ /' >conftest.defines
25155# Then, protect against being on the right side of a sed subst, or in
25156# an unquoted here document, in config.status. If some macros were
25157# called several times there might be several #defines for the same
25158# symbol, which is useless. But do not sort them, since the last
25159# AC_DEFINE must be honored.
25160ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25161# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25162# NAME is the cpp macro being defined, VALUE is the value it is being given.
25163# PARAMS is the parameter list in the macro definition--in most cases, it's
25164# just an empty string.
25165ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25166ac_dB='\\)[ (].*,\\1define\\2'
25167ac_dC=' '
25168ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025169
Martin v. Löwiseba40652007-08-30 20:10:57 +000025170uniq confdefs.h |
25171 sed -n '
25172 t rset
25173 :rset
25174 s/^[ ]*#[ ]*define[ ][ ]*//
25175 t ok
25176 d
25177 :ok
25178 s/[\\&,]/\\&/g
25179 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25180 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25181 ' >>conftest.defines
25182
25183# Remove the space that was appended to ease matching.
25184# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025185# example, in the case of _POSIX_SOURCE, which is predefined and required
25186# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025187# (The regexp can be short, since the line contains either #define or #undef.)
25188echo 's/ $//
25189s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025190
Martin v. Löwiseba40652007-08-30 20:10:57 +000025191# Break up conftest.defines:
25192ac_max_sed_lines=50
25193
25194# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25195# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25196# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25197# et cetera.
25198ac_in='$ac_file_inputs'
25199ac_out='"$tmp/out1"'
25200ac_nxt='"$tmp/out2"'
25201
25202while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025203do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025204 # Write a here document:
25205 cat >>$CONFIG_STATUS <<_ACEOF
25206 # First, check the format of the line:
25207 cat >"\$tmp/defines.sed" <<\\CEOF
25208/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25209/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25210b
25211:def
25212_ACEOF
25213 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025214 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025215 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25216 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25217 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25218 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025219 rm -f conftest.defines
25220 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025221done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025222rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025223
Martin v. Löwiseba40652007-08-30 20:10:57 +000025224echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025225cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025226 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025227 echo "/* $configure_input */" >"$tmp/config.h"
25228 cat "$ac_result" >>"$tmp/config.h"
25229 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025230 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25231echo "$as_me: $ac_file is unchanged" >&6;}
25232 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025233 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025234 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025235 fi
25236 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025237 echo "/* $configure_input */"
25238 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025239 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025240 rm -f "$tmp/out12"
25241 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025242
Martin v. Löwiseba40652007-08-30 20:10:57 +000025243
25244 esac
25245
25246done # for ac_tag
25247
Guido van Rossum627b2d71993-12-24 10:39:16 +000025248
Martin v. Löwis11437992002-04-12 09:54:03 +000025249{ (exit 0); exit 0; }
25250_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025251chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025252ac_clean_files=$ac_clean_files_save
25253
25254
25255# configure is writing to config.log, and then calls config.status.
25256# config.status does its own redirection, appending to config.log.
25257# Unfortunately, on DOS this fails, as config.log is still kept open
25258# by configure, so config.status won't be able to write to it; its
25259# output is simply discarded. So we exec the FD to /dev/null,
25260# effectively closing config.log, so it can be properly (re)opened and
25261# appended to by config.status. When coming back to configure, we
25262# need to make the FD available again.
25263if test "$no_create" != yes; then
25264 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025265 ac_config_status_args=
25266 test "$silent" = yes &&
25267 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025268 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025269 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025270 exec 5>>config.log
25271 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25272 # would make configure fail if this is the last instruction.
25273 $ac_cs_success || { (exit 1); exit 1; }
25274fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025275
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025276
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025277echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025278if test ! -f Modules/Setup
25279then
25280 cp $srcdir/Modules/Setup.dist Modules/Setup
25281fi
25282
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025283echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025284if test ! -f Modules/Setup.local
25285then
25286 echo "# Edit this file for local setup changes" >Modules/Setup.local
25287fi
25288
25289echo "creating Makefile"
25290$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25291 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025292 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025293
25294case $ac_sys_system in
25295BeOS)
25296 { echo "$as_me:$LINENO: WARNING:
25297
25298 Support for BeOS is deprecated as of Python 2.6.
25299 See PEP 11 for the gory details.
25300 " >&5
25301echo "$as_me: WARNING:
25302
25303 Support for BeOS is deprecated as of Python 2.6.
25304 See PEP 11 for the gory details.
25305 " >&2;}
25306 ;;
25307*) ;;
25308esac
25309
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025310mv config.c Modules