blob: dfd1ef74dd6e863fa4c59ebb231d56fc61a47b71 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Brett Cannon91a1dec2008-02-13 19:15:44 +00002# From configure.in Revision: 60536 .
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
661PYTHONFRAMEWORKDIR
662PYTHONFRAMEWORKPREFIX
663PYTHONFRAMEWORKINSTALLDIR
664FRAMEWORKINSTALLFIRST
665FRAMEWORKINSTALLLAST
666FRAMEWORKALTINSTALLFIRST
667FRAMEWORKALTINSTALLLAST
668FRAMEWORKUNIXTOOLSPREFIX
669MACHDEP
670SGI_ABI
671EXTRAPLATDIR
672EXTRAMACHDEPPATH
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696RANLIB
697AR
698SVNVERSION
699INSTALL_PROGRAM
700INSTALL_SCRIPT
701INSTALL_DATA
702LN
703OPT
704BASECFLAGS
705OTHER_LIBTOOL_OPT
706LIBTOOL_CRUFT
707SO
708LDSHARED
709BLDSHARED
710CCSHARED
711LINKFORSHARED
712CFLAGSFORSHARED
713SHLIBS
714USE_SIGNAL_MODULE
715SIGNAL_OBJS
716USE_THREAD_MODULE
717LDLAST
718THREADOBJ
719DLINCLDIR
720DYNLOADFILE
721MACHDEP_OBJS
722TRUE
723LIBOBJS
724HAVE_GETHOSTBYNAME_R_6_ARG
725HAVE_GETHOSTBYNAME_R_5_ARG
726HAVE_GETHOSTBYNAME_R_3_ARG
727HAVE_GETHOSTBYNAME_R
728HAVE_GETHOSTBYNAME
729LIBM
730LIBC
731UNICODE_OBJS
732THREADHEADERS
733SRCDIRS
734LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000735ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000736 ac_precious_vars='build_alias
737host_alias
738target_alias
739CC
740CFLAGS
741LDFLAGS
742LIBS
743CPPFLAGS
744CPP'
745
Guido van Rossum627b2d71993-12-24 10:39:16 +0000746
Guido van Rossum7f43da71994-08-01 12:15:30 +0000747# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000748ac_init_help=
749ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# The variables have the same names as the options, with
751# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000752cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000753exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000754no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755no_recursion=
756prefix=NONE
757program_prefix=NONE
758program_suffix=NONE
759program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764x_includes=NONE
765x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000766
767# Installation directory options.
768# These are left unexpanded so users can "make install exec_prefix=/foo"
769# and all the variables that are supposed to be based on exec_prefix
770# by default will actually change.
771# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000772# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000773bindir='${exec_prefix}/bin'
774sbindir='${exec_prefix}/sbin'
775libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000776datarootdir='${prefix}/share'
777datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778sysconfdir='${prefix}/etc'
779sharedstatedir='${prefix}/com'
780localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781includedir='${prefix}/include'
782oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000783docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
784infodir='${datarootdir}/info'
785htmldir='${docdir}'
786dvidir='${docdir}'
787pdfdir='${docdir}'
788psdir='${docdir}'
789libdir='${exec_prefix}/lib'
790localedir='${datarootdir}/locale'
791mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000794ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000796do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797 # If the previous option needs an argument, assign it.
798 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 ac_prev=
801 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 case $ac_option in
805 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
806 *) ac_optarg=yes ;;
807 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809 # Accept the important Cygnus configure options, so we can diagnose typos.
810
Martin v. Löwiseba40652007-08-30 20:10:57 +0000811 case $ac_dashdash$ac_option in
812 --)
813 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815 -bindir | --bindir | --bindi | --bind | --bin | --bi)
816 ac_prev=bindir ;;
817 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000818 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819
820 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825 -cache-file | --cache-file | --cache-fil | --cache-fi \
826 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
827 ac_prev=cache_file ;;
828 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
829 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000830 cache_file=$ac_optarg ;;
831
832 --config-cache | -C)
833 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834
Martin v. Löwiseba40652007-08-30 20:10:57 +0000835 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000838 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
841 | --dataroo | --dataro | --datar)
842 ac_prev=datarootdir ;;
843 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
844 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
845 datarootdir=$ac_optarg ;;
846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000850 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
852 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
854 eval enable_$ac_feature=no ;;
855
856 -docdir | --docdir | --docdi | --doc | --do)
857 ac_prev=docdir ;;
858 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
859 docdir=$ac_optarg ;;
860
861 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
862 ac_prev=dvidir ;;
863 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
864 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865
866 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000867 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000869 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
871 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
873 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
876 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
877 | --exec | --exe | --ex)
878 ac_prev=exec_prefix ;;
879 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
880 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
881 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000882 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
884 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Obsolete; use --with-gas.
886 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 -help | --help | --hel | --he | -h)
889 ac_init_help=long ;;
890 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
891 ac_init_help=recursive ;;
892 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
893 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
895 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Martin v. Löwiseba40652007-08-30 20:10:57 +0000900 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
901 ac_prev=htmldir ;;
902 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
903 | --ht=*)
904 htmldir=$ac_optarg ;;
905
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 -includedir | --includedir | --includedi | --included | --include \
907 | --includ | --inclu | --incl | --inc)
908 ac_prev=includedir ;;
909 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
910 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912
913 -infodir | --infodir | --infodi | --infod | --info | --inf)
914 ac_prev=infodir ;;
915 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -libdir | --libdir | --libdi | --libd)
919 ac_prev=libdir ;;
920 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
924 | --libexe | --libex | --libe)
925 ac_prev=libexecdir ;;
926 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
927 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
Martin v. Löwiseba40652007-08-30 20:10:57 +0000930 -localedir | --localedir | --localedi | --localed | --locale)
931 ac_prev=localedir ;;
932 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
933 localedir=$ac_optarg ;;
934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000936 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 ac_prev=localstatedir ;;
938 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941
942 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
943 ac_prev=mandir ;;
944 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Obsolete; use --without-fp.
949 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 no_create=yes ;;
954
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
956 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
957 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
960 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
961 | --oldin | --oldi | --old | --ol | --o)
962 ac_prev=oldincludedir ;;
963 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
964 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
965 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
969 ac_prev=prefix ;;
970 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972
973 -program-prefix | --program-prefix | --program-prefi | --program-pref \
974 | --program-pre | --program-pr | --program-p)
975 ac_prev=program_prefix ;;
976 -program-prefix=* | --program-prefix=* | --program-prefi=* \
977 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
980 -program-suffix | --program-suffix | --program-suffi | --program-suff \
981 | --program-suf | --program-su | --program-s)
982 ac_prev=program_suffix ;;
983 -program-suffix=* | --program-suffix=* | --program-suffi=* \
984 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -program-transform-name | --program-transform-name \
988 | --program-transform-nam | --program-transform-na \
989 | --program-transform-n | --program-transform- \
990 | --program-transform | --program-transfor \
991 | --program-transfo | --program-transf \
992 | --program-trans | --program-tran \
993 | --progr-tra | --program-tr | --program-t)
994 ac_prev=program_transform_name ;;
995 -program-transform-name=* | --program-transform-name=* \
996 | --program-transform-nam=* | --program-transform-na=* \
997 | --program-transform-n=* | --program-transform-=* \
998 | --program-transform=* | --program-transfor=* \
999 | --program-transfo=* | --program-transf=* \
1000 | --program-trans=* | --program-tran=* \
1001 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Martin v. Löwiseba40652007-08-30 20:10:57 +00001004 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1005 ac_prev=pdfdir ;;
1006 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1007 pdfdir=$ac_optarg ;;
1008
1009 -psdir | --psdir | --psdi | --psd | --ps)
1010 ac_prev=psdir ;;
1011 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1012 psdir=$ac_optarg ;;
1013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1015 | -silent | --silent | --silen | --sile | --sil)
1016 silent=yes ;;
1017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1019 ac_prev=sbindir ;;
1020 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1021 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1025 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1026 | --sharedst | --shareds | --shared | --share | --shar \
1027 | --sha | --sh)
1028 ac_prev=sharedstatedir ;;
1029 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1030 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1031 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1032 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035 -site | --site | --sit)
1036 ac_prev=site ;;
1037 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1041 ac_prev=srcdir ;;
1042 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1046 | --syscon | --sysco | --sysc | --sys | --sy)
1047 ac_prev=sysconfdir ;;
1048 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1049 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1058 verbose=yes ;;
1059
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 -version | --version | --versio | --versi | --vers | -V)
1061 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001066 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 { echo "$as_me: error: invalid package name: $ac_package" >&2
1068 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1070 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001075 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 { echo "$as_me: error: invalid package name: $ac_package" >&2
1077 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1079 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 --x)
1082 # Obsolete; use --with-x.
1083 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1086 | --x-incl | --x-inc | --x-in | --x-i)
1087 ac_prev=x_includes ;;
1088 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1089 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1093 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1094 ac_prev=x_libraries ;;
1095 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1096 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 -*) { echo "$as_me: error: unrecognized option: $ac_option
1100Try \`$0 --help' for more information." >&2
1101 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 ;;
1103
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 *=*)
1105 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1106 # Reject names that are not valid shell variable names.
1107 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1108 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1109 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001110 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 export $ac_envvar ;;
1112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 # FIXME: should be removed in autoconf 3.0.
1115 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1116 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1117 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1118 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 ;;
1120
1121 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001122done
1123
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1126 { echo "$as_me: error: missing argument to $ac_option" >&2
1127 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128fi
1129
Martin v. Löwiseba40652007-08-30 20:10:57 +00001130# Be sure to have absolute directory names.
1131for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1132 datadir sysconfdir sharedstatedir localstatedir includedir \
1133 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1134 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001138 [\\/$]* | ?:[\\/]* ) continue;;
1139 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1142 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001143done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001144
Martin v. Löwis11437992002-04-12 09:54:03 +00001145# There might be people who depend on the old broken behavior: `$host'
1146# used to hold the argument of --host etc.
1147# FIXME: To remove some day.
1148build=$build_alias
1149host=$host_alias
1150target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152# FIXME: To remove some day.
1153if test "x$host_alias" != x; then
1154 if test "x$build_alias" = x; then
1155 cross_compiling=maybe
1156 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1157 If a cross compiler is detected then cross compile mode will be used." >&2
1158 elif test "x$build_alias" != "x$host_alias"; then
1159 cross_compiling=yes
1160 fi
1161fi
1162
1163ac_tool_prefix=
1164test -n "$host_alias" && ac_tool_prefix=$host_alias-
1165
1166test "$silent" = yes && exec 6>/dev/null
1167
Guido van Rossum627b2d71993-12-24 10:39:16 +00001168
Martin v. Löwiseba40652007-08-30 20:10:57 +00001169ac_pwd=`pwd` && test -n "$ac_pwd" &&
1170ac_ls_di=`ls -di .` &&
1171ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1172 { echo "$as_me: error: Working directory cannot be determined" >&2
1173 { (exit 1); exit 1; }; }
1174test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1175 { echo "$as_me: error: pwd does not report name of working directory" >&2
1176 { (exit 1); exit 1; }; }
1177
1178
Guido van Rossum627b2d71993-12-24 10:39:16 +00001179# Find the source files, if location was not specified.
1180if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001182 # Try the directory containing this script, then the parent directory.
1183 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001184$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001185 X"$0" : 'X\(//\)[^/]' \| \
1186 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001188echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001189 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1190 s//\1/
1191 q
1192 }
1193 /^X\(\/\/\)[^/].*/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)$/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\).*/{
1202 s//\1/
1203 q
1204 }
1205 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001207 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208 srcdir=..
1209 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210else
1211 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001213if test ! -r "$srcdir/$ac_unique_file"; then
1214 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1215 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1219ac_abs_confdir=`(
1220 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001221 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001222 pwd)`
1223# When building in place, set srcdir=.
1224if test "$ac_abs_confdir" = "$ac_pwd"; then
1225 srcdir=.
1226fi
1227# Remove unnecessary trailing slashes from srcdir.
1228# Double slashes in file names in object file debugging info
1229# mess up M-x gdb in Emacs.
1230case $srcdir in
1231*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1232esac
1233for ac_var in $ac_precious_vars; do
1234 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1235 eval ac_env_${ac_var}_value=\$${ac_var}
1236 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1238done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239
Martin v. Löwis11437992002-04-12 09:54:03 +00001240#
1241# Report the --help message.
1242#
1243if test "$ac_init_help" = "long"; then
1244 # Omit some internal or obsolete options to make the list less imposing.
1245 # This message is too long to be a string in the A/UX 3.1 sh.
1246 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001247\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001248
1249Usage: $0 [OPTION]... [VAR=VALUE]...
1250
1251To assign environment variables (e.g., CC, CFLAGS...), specify them as
1252VAR=VALUE. See below for descriptions of some of the useful variables.
1253
1254Defaults for the options are specified in brackets.
1255
1256Configuration:
1257 -h, --help display this help and exit
1258 --help=short display options specific to this package
1259 --help=recursive display the short help of all the included packages
1260 -V, --version display version information and exit
1261 -q, --quiet, --silent do not print \`checking...' messages
1262 --cache-file=FILE cache test results in FILE [disabled]
1263 -C, --config-cache alias for \`--cache-file=config.cache'
1264 -n, --no-create do not create output files
1265 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1266
Martin v. Löwis11437992002-04-12 09:54:03 +00001267Installation directories:
1268 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001269 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001271 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272
1273By default, \`make install' will install all the files in
1274\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1275an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1276for instance \`--prefix=\$HOME'.
1277
1278For better control, use the options below.
1279
1280Fine tuning of the installation directories:
1281 --bindir=DIR user executables [EPREFIX/bin]
1282 --sbindir=DIR system admin executables [EPREFIX/sbin]
1283 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1285 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1286 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1287 --libdir=DIR object code libraries [EPREFIX/lib]
1288 --includedir=DIR C header files [PREFIX/include]
1289 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001290 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1291 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1292 --infodir=DIR info documentation [DATAROOTDIR/info]
1293 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1294 --mandir=DIR man documentation [DATAROOTDIR/man]
1295 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1296 --htmldir=DIR html documentation [DOCDIR]
1297 --dvidir=DIR dvi documentation [DOCDIR]
1298 --pdfdir=DIR pdf documentation [DOCDIR]
1299 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001300_ACEOF
1301
1302 cat <<\_ACEOF
1303_ACEOF
1304fi
1305
1306if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001307 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001308 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001310 cat <<\_ACEOF
1311
1312Optional Features:
1313 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1314 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001315 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001316 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001317 --enable-framework[=INSTALLDIR]
1318 Build (MacOSX|Darwin) framework
1319 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001320 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001321 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1322 --enable-ipv6 Enable ipv6 (with ipv4) support
1323 --disable-ipv6 Disable ipv6 support
1324 --enable-unicode[=ucs[24]]
1325 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
1327Optional Packages:
1328 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1329 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001330 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001331 --with-cxx-main=<compiler>
1332 compile main() and link python executable with C++
1333 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --with-suffix=.exe set executable suffix
1335 --with-pydebug build with Py_DEBUG defined
1336 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001337 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --with-signal-module disable/enable signal module
1339 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1340 --with(out)-threads[=DIRECTORY]
1341 disable/enable thread support
1342 --with(out)-thread[=DIRECTORY]
1343 deprecated; use --with(out)-threads
1344 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001346 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with(out)-pymalloc disable/enable specialized mallocs
1348 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-fpectl enable SIGFPE catching
1350 --with-libm=STRING math library
1351 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001352
1353Some influential environment variables:
1354 CC C compiler command
1355 CFLAGS C compiler flags
1356 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1357 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001358 LIBS libraries to pass to the linker, e.g. -l<library>
1359 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1360 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001361 CPP C preprocessor
1362
1363Use these variables to override the choices made by `configure' or to help
1364it to find libraries and programs with nonstandard names/locations.
1365
Martin v. Löwis1d459062005-03-14 21:23:33 +00001366Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001367_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001368ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001369fi
1370
1371if test "$ac_init_help" = "recursive"; then
1372 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001374 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 ac_builddir=.
1376
Martin v. Löwiseba40652007-08-30 20:10:57 +00001377case "$ac_dir" in
1378.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1379*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001381 # A ".." for each directory in $ac_dir_suffix.
1382 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1383 case $ac_top_builddir_sub in
1384 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1385 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1386 esac ;;
1387esac
1388ac_abs_top_builddir=$ac_pwd
1389ac_abs_builddir=$ac_pwd$ac_dir_suffix
1390# for backward compatibility:
1391ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001396 ac_top_srcdir=$ac_top_builddir_sub
1397 ac_abs_top_srcdir=$ac_pwd ;;
1398 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 ac_top_srcdir=$srcdir
1401 ac_abs_top_srcdir=$srcdir ;;
1402 *) # Relative name.
1403 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1404 ac_top_srcdir=$ac_top_build_prefix$srcdir
1405 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001406esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001407ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001408
Martin v. Löwiseba40652007-08-30 20:10:57 +00001409 cd "$ac_dir" || { ac_status=$?; continue; }
1410 # Check for guested configure.
1411 if test -f "$ac_srcdir/configure.gnu"; then
1412 echo &&
1413 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1414 elif test -f "$ac_srcdir/configure"; then
1415 echo &&
1416 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 else
1418 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001419 fi || ac_status=$?
1420 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 done
1422fi
1423
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001425if $ac_init_version; then
1426 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001427python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14312002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001432This configure script is free software; the Free Software Foundation
1433gives unlimited permission to copy, distribute and modify it.
1434_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001435 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001438This file contains any messages produced by compilers while
1439running configure, to aid debugging if configure makes a mistake.
1440
Neal Norwitz9be57322006-08-18 05:39:20 +00001441It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001442generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444 $ $0 $@
1445
1446_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001448{
1449cat <<_ASUNAME
1450## --------- ##
1451## Platform. ##
1452## --------- ##
1453
1454hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1455uname -m = `(uname -m) 2>/dev/null || echo unknown`
1456uname -r = `(uname -r) 2>/dev/null || echo unknown`
1457uname -s = `(uname -s) 2>/dev/null || echo unknown`
1458uname -v = `(uname -v) 2>/dev/null || echo unknown`
1459
1460/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1461/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1462
1463/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1464/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1465/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001466/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001467/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1468/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1469/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1470
1471_ASUNAME
1472
1473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1474for as_dir in $PATH
1475do
1476 IFS=$as_save_IFS
1477 test -z "$as_dir" && as_dir=.
1478 echo "PATH: $as_dir"
1479done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001480IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001481
1482} >&5
1483
1484cat >&5 <<_ACEOF
1485
1486
1487## ----------- ##
1488## Core tests. ##
1489## ----------- ##
1490
1491_ACEOF
1492
1493
1494# Keep a trace of the command line.
1495# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001496# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001497# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001498# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001499ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001500ac_configure_args0=
1501ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001502ac_must_keep_next=false
1503for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001504do
Skip Montanaro6dead952003-09-25 14:50:04 +00001505 for ac_arg
1506 do
1507 case $ac_arg in
1508 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1509 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510 | -silent | --silent | --silen | --sile | --sil)
1511 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001512 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001513 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1514 esac
1515 case $ac_pass in
1516 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1517 2)
1518 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1519 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001520 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001522 case $ac_arg in
1523 *=* | --config-cache | -C | -disable-* | --disable-* \
1524 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1525 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1526 | -with-* | --with-* | -without-* | --without-* | --x)
1527 case "$ac_configure_args0 " in
1528 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1529 esac
1530 ;;
1531 -* ) ac_must_keep_next=true ;;
1532 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001534 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 ;;
1536 esac
1537 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001538done
Skip Montanaro6dead952003-09-25 14:50:04 +00001539$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1540$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 +00001541
1542# When interrupted or exit'd, cleanup temporary files, and complete
1543# config.log. We remove comments because anyway the quotes in there
1544# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545# WARNING: Use '\'' to represent an apostrophe within the trap.
1546# 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 +00001547trap 'exit_status=$?
1548 # Save into config.log some information that might help in debugging.
1549 {
1550 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001551
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 cat <<\_ASBOX
1553## ---------------- ##
1554## Cache variables. ##
1555## ---------------- ##
1556_ASBOX
1557 echo
1558 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001559(
1560 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1561 eval ac_val=\$$ac_var
1562 case $ac_val in #(
1563 *${as_nl}*)
1564 case $ac_var in #(
1565 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1566echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1567 esac
1568 case $ac_var in #(
1569 _ | IFS | as_nl) ;; #(
1570 *) $as_unset $ac_var ;;
1571 esac ;;
1572 esac
1573 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1576 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 "s/'\''/'\''\\\\'\'''\''/g;
1579 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1580 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001581 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001583 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac |
1585 sort
1586)
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001588
1589 cat <<\_ASBOX
1590## ----------------- ##
1591## Output variables. ##
1592## ----------------- ##
1593_ASBOX
1594 echo
1595 for ac_var in $ac_subst_vars
1596 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001597 eval ac_val=\$$ac_var
1598 case $ac_val in
1599 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1600 esac
1601 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001602 done | sort
1603 echo
1604
1605 if test -n "$ac_subst_files"; then
1606 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001607## ------------------- ##
1608## File substitutions. ##
1609## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_files
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
1616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1617 esac
1618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621 fi
1622
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 if test -s confdefs.h; then
1624 cat <<\_ASBOX
1625## ----------- ##
1626## confdefs.h. ##
1627## ----------- ##
1628_ASBOX
1629 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001630 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 echo
1632 fi
1633 test "$ac_signal" != 0 &&
1634 echo "$as_me: caught signal $ac_signal"
1635 echo "$as_me: exit $exit_status"
1636 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001637 rm -f core *.core core.conftest.* &&
1638 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001640' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001641for ac_signal in 1 2 13 15; do
1642 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1643done
1644ac_signal=0
1645
1646# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648
1649# Predefined preprocessor variables.
1650
1651cat >>confdefs.h <<_ACEOF
1652#define PACKAGE_NAME "$PACKAGE_NAME"
1653_ACEOF
1654
1655
1656cat >>confdefs.h <<_ACEOF
1657#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1658_ACEOF
1659
1660
1661cat >>confdefs.h <<_ACEOF
1662#define PACKAGE_VERSION "$PACKAGE_VERSION"
1663_ACEOF
1664
1665
1666cat >>confdefs.h <<_ACEOF
1667#define PACKAGE_STRING "$PACKAGE_STRING"
1668_ACEOF
1669
1670
1671cat >>confdefs.h <<_ACEOF
1672#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1673_ACEOF
1674
1675
1676# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001677# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001678if test -n "$CONFIG_SITE"; then
1679 set x "$CONFIG_SITE"
1680elif test "x$prefix" != xNONE; then
1681 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1682else
1683 set x "$ac_default_prefix/share/config.site" \
1684 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001686shift
1687for ac_site_file
1688do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001690 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1691echo "$as_me: loading site script $ac_site_file" >&6;}
1692 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693 . "$ac_site_file"
1694 fi
1695done
1696
1697if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001698 # Some versions of bash will fail to source /dev/null (special
1699 # files actually), so we avoid doing that.
1700 if test -f "$cache_file"; then
1701 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1702echo "$as_me: loading cache $cache_file" >&6;}
1703 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001704 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1705 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 esac
1707 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708else
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1710echo "$as_me: creating cache $cache_file" >&6;}
1711 >$cache_file
1712fi
1713
1714# Check that the precious variables saved in the cache have kept the same
1715# value.
1716ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001717for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1719 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001720 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1721 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $ac_old_set,$ac_new_set in
1723 set,)
1724 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1725echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1726 ac_cache_corrupted=: ;;
1727 ,set)
1728 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1729echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1730 ac_cache_corrupted=: ;;
1731 ,);;
1732 *)
1733 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001734 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001735echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001736 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001737echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001738 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001739echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001740 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 fi;;
1742 esac
1743 # Pass precious variables to config.status.
1744 if test "$ac_new_set" = set; then
1745 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001746 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 *) ac_arg=$ac_var=$ac_new_val ;;
1748 esac
1749 case " $ac_configure_args " in
1750 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1751 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1752 esac
1753 fi
1754done
1755if $ac_cache_corrupted; then
1756 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1757echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1758 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1759echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1760 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001761fi
1762
Martin v. Löwiseba40652007-08-30 20:10:57 +00001763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
Guido van Rossum7f43da71994-08-01 12:15:30 +00001787ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1791ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792
Guido van Rossum627b2d71993-12-24 10:39:16 +00001793
Michael W. Hudson54241132001-12-07 15:38:26 +00001794
Martin v. Löwiseba40652007-08-30 20:10:57 +00001795ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001796
1797
Martin v. Löwis11437992002-04-12 09:54:03 +00001798
1799
1800
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001801
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001802
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001803# We don't use PACKAGE_ variables, and they cause conflicts
1804# with other autoconf-based packages that include Python.h
1805grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1806rm confdefs.h
1807mv confdefs.h.new confdefs.h
1808
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001809
Neal Norwitz9be57322006-08-18 05:39:20 +00001810VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001811
Martin v. Löwis1142de32002-03-29 16:28:31 +00001812
1813SOVERSION=1.0
1814
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001815# The later defininition of _XOPEN_SOURCE disables certain features
1816# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1817
1818cat >>confdefs.h <<\_ACEOF
1819#define _GNU_SOURCE 1
1820_ACEOF
1821
1822
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001823# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1824# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1825# them.
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _NETBSD_SOURCE 1
1829_ACEOF
1830
1831
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001832# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1833# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1834# them.
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define __BSD_VISIBLE 1
1838_ACEOF
1839
1840
Martin v. Löwisd6320502004-08-12 13:45:08 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1843
1844cat >>confdefs.h <<\_ACEOF
1845#define _BSD_TYPES 1
1846_ACEOF
1847
1848
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001849define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001850
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001851# Arguments passed to configure.
1852
1853CONFIG_ARGS="$ac_configure_args"
1854
Martin v. Löwiseba40652007-08-30 20:10:57 +00001855# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001856if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001857 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001858 case $enableval in
1859 yes)
1860 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1861 ;;
1862 esac
1863 case $enableval in
1864 no)
1865 UNIVERSALSDK=
1866 enable_universalsdk=
1867 ;;
1868 *)
1869 UNIVERSALSDK=$enableval
1870 ;;
1871 esac
1872
1873else
1874
1875 UNIVERSALSDK=
1876 enable_universalsdk=
1877
Martin v. Löwiseba40652007-08-30 20:10:57 +00001878fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001879
1880
Martin v. Löwiseba40652007-08-30 20:10:57 +00001881
1882# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001883if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001884 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001885 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001886 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001887 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001888 esac
1889 case $enableval in
1890 no)
1891 PYTHONFRAMEWORK=
1892 PYTHONFRAMEWORKDIR=no-framework
1893 PYTHONFRAMEWORKPREFIX=
1894 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001895 FRAMEWORKINSTALLFIRST=
1896 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001897 FRAMEWORKALTINSTALLFIRST=
1898 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001899 if test "x${prefix}" = "xNONE"; then
1900 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1901 else
1902 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1903 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001904 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001905 ;;
1906 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001907 PYTHONFRAMEWORK=Python
1908 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001909 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001910 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001911 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1912 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5b787322006-06-06 19:50:24 +00001913 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1914 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001915 if test "x${prefix}" = "xNONE" ; then
1916 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1917 else
1918 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1919 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001920 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001921
1922 # Add makefiles for Mac specific code to the list of output
1923 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001924 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001925
Martin v. Löwiseba40652007-08-30 20:10:57 +00001926 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001927
Martin v. Löwiseba40652007-08-30 20:10:57 +00001928 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001929
Jack Jansene578a632001-08-15 01:27:14 +00001930 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001931
Guido van Rossum563e7081996-09-10 18:20:48 +00001932else
Martin v. Löwis11437992002-04-12 09:54:03 +00001933
Jack Jansene578a632001-08-15 01:27:14 +00001934 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001935 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001936 PYTHONFRAMEWORKPREFIX=
1937 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001938 FRAMEWORKINSTALLFIRST=
1939 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001940 FRAMEWORKALTINSTALLFIRST=
1941 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001942 if test "x${prefix}" = "xNONE" ; then
1943 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1944 else
1945 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1946 fi
Jack Jansene578a632001-08-15 01:27:14 +00001947 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001948
Martin v. Löwiseba40652007-08-30 20:10:57 +00001949fi
1950
Michael W. Hudson54241132001-12-07 15:38:26 +00001951
1952
1953
1954
Jack Jansene578a632001-08-15 01:27:14 +00001955
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001956
1957
Ronald Oussoren5b787322006-06-06 19:50:24 +00001958
1959
1960
Jack Jansene578a632001-08-15 01:27:14 +00001961##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001962## AC_HELP_STRING(--with-dyld,
1963## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001964##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001965# Set name for machine-dependent library files
1966
Martin v. Löwiseba40652007-08-30 20:10:57 +00001967{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1968echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001969if test -z "$MACHDEP"
1970then
Guido van Rossum563e7081996-09-10 18:20:48 +00001971 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001972 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1973 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001974 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001975 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001976 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001977 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001978 ac_md_system=`echo $ac_sys_system |
1979 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1980 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001981 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001982 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001983
Guido van Rossum07397971997-04-29 21:49:50 +00001984 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001985 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001986 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001987 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001988 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001989 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001990 esac
1991fi
Guido van Rossum91922671997-10-09 20:24:13 +00001992
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001993# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1994# disable features if it is defined, without any means to access these
1995# features as extensions. For these systems, we skip the definition of
1996# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1997# some feature, make sure there is no alternative way to access this
1998# feature. Also, when using wildcards, make sure you have verified the
1999# need for not defining _XOPEN_SOURCE on all systems matching the
2000# wildcard, and that the wildcard does not include future systems
2001# (which may remove their limitations).
2002case $ac_sys_system/$ac_sys_release in
2003 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2004 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002005 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz4bc2c092006-09-05 02:57:01 +00002006 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002007 define_xopen_source=no
2008 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2009 # also defined. This can be overridden by defining _BSD_SOURCE
2010 # As this has a different meaning on Linux, only define it on OpenBSD
2011
2012cat >>confdefs.h <<\_ACEOF
2013#define _BSD_SOURCE 1
2014_ACEOF
2015
2016 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002017 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2018 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2019 # Marc Recht
2020 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2021 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002022 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2023 # of union __?sigval. Reported by Stuart Bishop.
2024 SunOS/5.6)
2025 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002026 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2027 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002028 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002029 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002030 define_xopen_source=no;;
2031 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002032 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002033 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002034 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002035 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2036 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2037 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2038 # This should hopefully be fixed in FreeBSD 4.9
2039 FreeBSD/4.8* | Darwin/6* )
2040 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002041 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2042 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2043 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002044 AIX/4)
2045 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002046 AIX/5)
2047 if test `uname -r` -eq 1; then
2048 define_xopen_source=no
2049 fi
2050 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002051 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2052 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002053 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002054 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002055 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002056 define_xopen_source=no
2057 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002058
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002059esac
2060
2061if test $define_xopen_source = yes
2062then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002063 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2064 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002065 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2066 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002067 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002068 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002069
2070cat >>confdefs.h <<\_ACEOF
2071#define _XOPEN_SOURCE 500
2072_ACEOF
2073
2074 ;;
2075 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002076
2077cat >>confdefs.h <<\_ACEOF
2078#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002079_ACEOF
2080
Skip Montanarof0d5f792004-08-15 14:08:23 +00002081 ;;
2082 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002083
2084 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2085 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2086 # several APIs are not declared. Since this is also needed in some
2087 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002088 # except for Solaris 10, where it must not be defined,
2089 # as it implies XPG4.2
2090 case $ac_sys_system/$ac_sys_release in
2091 SunOS/5.10)
2092 ;;
2093 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002094
2095cat >>confdefs.h <<\_ACEOF
2096#define _XOPEN_SOURCE_EXTENDED 1
2097_ACEOF
2098
Martin v. Löwis7dece662005-11-26 11:38:24 +00002099 ;;
2100 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002101
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002102
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002103cat >>confdefs.h <<\_ACEOF
2104#define _POSIX_C_SOURCE 200112L
2105_ACEOF
2106
2107
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002108fi
2109
Guido van Rossum91922671997-10-09 20:24:13 +00002110#
2111# SGI compilers allow the specification of the both the ABI and the
2112# ISA on the command line. Depending on the values of these switches,
2113# different and often incompatable code will be generated.
2114#
2115# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2116# thus supply support for various ABI/ISA combinations. The MACHDEP
2117# variable is also adjusted.
2118#
2119
2120if test ! -z "$SGI_ABI"
2121then
2122 CC="cc $SGI_ABI"
2123 LDFLAGS="$SGI_ABI $LDFLAGS"
2124 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002126{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2127echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002128
Jack Jansen83f898c2002-12-30 22:23:40 +00002129# And add extra plat-mac for darwin
2130
Jack Jansen7b59b422003-03-17 15:44:10 +00002131
Martin v. Löwiseba40652007-08-30 20:10:57 +00002132{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2133echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002134if test -z "$EXTRAPLATDIR"
2135then
2136 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002137 darwin)
2138 EXTRAPLATDIR="\$(PLATMACDIRS)"
2139 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2140 ;;
2141 *)
2142 EXTRAPLATDIR=""
2143 EXTRAMACHDEPPATH=""
2144 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002145 esac
2146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002147{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2148echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002149
Jack Jansen6b08a402004-06-03 12:41:45 +00002150# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2151# it may influence the way we can build extensions, so distutils
2152# needs to check it
2153
Ronald Oussoren988117f2006-04-29 11:31:35 +00002154
Jack Jansen6b08a402004-06-03 12:41:45 +00002155CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002156EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002157
Guido van Rossum627b2d71993-12-24 10:39:16 +00002158# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002159
2160# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2161# for debug/optimization stuff. BASECFLAGS is for flags that are required
2162# just to get things to compile and link. Users are free to override OPT
2163# when running configure or make. The build should not break if they do.
2164# BASECFLAGS should generally not be messed with, however.
2165
2166# XXX shouldn't some/most/all of this code be merged with the stuff later
2167# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002168{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2169echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002170
Martin v. Löwiseba40652007-08-30 20:10:57 +00002171# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002172if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002173 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002174 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002175 no) CC=cc
2176 without_gcc=yes;;
2177 yes) CC=gcc
2178 without_gcc=no;;
2179 *) CC=$withval
2180 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002181 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002182else
Martin v. Löwis11437992002-04-12 09:54:03 +00002183
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002184 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002185 AIX*) CC=cc_r
2186 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002187 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002188 case $BE_HOST_CPU in
2189 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002190 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002191 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002192 BASECFLAGS="$BASECFLAGS -export pragma"
2193 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002194 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002195 ;;
2196 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002197 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002198 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002199 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002200 ;;
2201 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002202 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2203echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2204 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002205 ;;
2206 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002207 AR="\$(srcdir)/Modules/ar_beos"
2208 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002209 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002210 Monterey*)
2211 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002212 without_gcc=;;
2213 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002214 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002215fi
2216
2217{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2218echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002219
Guido van Rossum8b131c51995-03-09 14:10:13 +00002220# If the user switches compilers, we can't believe the cache
2221if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2222then
Martin v. Löwis11437992002-04-12 09:54:03 +00002223 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2224(it is also a good idea to do 'make clean' before compiling)" >&5
2225echo "$as_me: error: cached CC is different -- throw away $cache_file
2226(it is also a good idea to do 'make clean' before compiling)" >&2;}
2227 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002228fi
2229
Martin v. Löwis11437992002-04-12 09:54:03 +00002230ac_ext=c
2231ac_cpp='$CPP $CPPFLAGS'
2232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2234ac_compiler_gnu=$ac_cv_c_compiler_gnu
2235if test -n "$ac_tool_prefix"; then
2236 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2237set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002238{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002240if test "${ac_cv_prog_CC+set}" = set; then
2241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242else
2243 if test -n "$CC"; then
2244 ac_cv_prog_CC="$CC" # Let the user override the test.
2245else
Martin v. Löwis11437992002-04-12 09:54:03 +00002246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2247for as_dir in $PATH
2248do
2249 IFS=$as_save_IFS
2250 test -z "$as_dir" && as_dir=.
2251 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002252 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 +00002253 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2255 break 2
2256 fi
2257done
2258done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002259IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002260
Jack Jansendd19cf82001-12-06 22:36:17 +00002261fi
2262fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002263CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002264if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002265 { echo "$as_me:$LINENO: result: $CC" >&5
2266echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002267else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002268 { echo "$as_me:$LINENO: result: no" >&5
2269echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002270fi
2271
Martin v. Löwiseba40652007-08-30 20:10:57 +00002272
Martin v. Löwis11437992002-04-12 09:54:03 +00002273fi
2274if test -z "$ac_cv_prog_CC"; then
2275 ac_ct_CC=$CC
2276 # Extract the first word of "gcc", so it can be a program name with args.
2277set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002280if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2281 echo $ECHO_N "(cached) $ECHO_C" >&6
2282else
2283 if test -n "$ac_ct_CC"; then
2284 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2285else
2286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2287for as_dir in $PATH
2288do
2289 IFS=$as_save_IFS
2290 test -z "$as_dir" && as_dir=.
2291 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002292 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 +00002293 ac_cv_prog_ac_ct_CC="gcc"
2294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2295 break 2
2296 fi
2297done
2298done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002299IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002300
2301fi
2302fi
2303ac_ct_CC=$ac_cv_prog_ac_ct_CC
2304if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002305 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2306echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002307else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002308 { echo "$as_me:$LINENO: result: no" >&5
2309echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002310fi
2311
Martin v. Löwiseba40652007-08-30 20:10:57 +00002312 if test "x$ac_ct_CC" = x; then
2313 CC=""
2314 else
2315 case $cross_compiling:$ac_tool_warned in
2316yes:)
2317{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2318whose name does not start with the host triplet. If you think this
2319configuration is useful to you, please write to autoconf@gnu.org." >&5
2320echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2321whose name does not start with the host triplet. If you think this
2322configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2323ac_tool_warned=yes ;;
2324esac
2325 CC=$ac_ct_CC
2326 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002327else
2328 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002329fi
2330
Jack Jansendd19cf82001-12-06 22:36:17 +00002331if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002332 if test -n "$ac_tool_prefix"; then
2333 # 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 +00002334set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002335{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002337if test "${ac_cv_prog_CC+set}" = set; then
2338 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002339else
2340 if test -n "$CC"; then
2341 ac_cv_prog_CC="$CC" # Let the user override the test.
2342else
Martin v. Löwis11437992002-04-12 09:54:03 +00002343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2344for as_dir in $PATH
2345do
2346 IFS=$as_save_IFS
2347 test -z "$as_dir" && as_dir=.
2348 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002350 ac_cv_prog_CC="${ac_tool_prefix}cc"
2351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2352 break 2
2353 fi
2354done
2355done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002357
2358fi
2359fi
2360CC=$ac_cv_prog_CC
2361if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362 { echo "$as_me:$LINENO: result: $CC" >&5
2363echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002364else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002365 { echo "$as_me:$LINENO: result: no" >&5
2366echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002367fi
2368
Martin v. Löwiseba40652007-08-30 20:10:57 +00002369
Martin v. Löwis11437992002-04-12 09:54:03 +00002370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002371fi
2372if test -z "$CC"; then
2373 # Extract the first word of "cc", so it can be a program name with args.
2374set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002375{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002377if test "${ac_cv_prog_CC+set}" = set; then
2378 echo $ECHO_N "(cached) $ECHO_C" >&6
2379else
2380 if test -n "$CC"; then
2381 ac_cv_prog_CC="$CC" # Let the user override the test.
2382else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002383 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
2389 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002390 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 +00002391 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2392 ac_prog_rejected=yes
2393 continue
2394 fi
2395 ac_cv_prog_CC="cc"
2396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2397 break 2
2398 fi
2399done
2400done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002403if test $ac_prog_rejected = yes; then
2404 # We found a bogon in the path, so make sure we never use it.
2405 set dummy $ac_cv_prog_CC
2406 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002407 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002408 # We chose a different compiler from the bogus one.
2409 # However, it has the same basename, so the bogon will be chosen
2410 # first if we set CC to just the basename; use the full file name.
2411 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002413 fi
2414fi
2415fi
2416fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002417CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002418if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419 { echo "$as_me:$LINENO: result: $CC" >&5
2420echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002421else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002422 { echo "$as_me:$LINENO: result: no" >&5
2423echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002424fi
2425
Martin v. Löwiseba40652007-08-30 20:10:57 +00002426
Martin v. Löwis11437992002-04-12 09:54:03 +00002427fi
2428if test -z "$CC"; then
2429 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 do
2432 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2433set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002434{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2435echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002436if test "${ac_cv_prog_CC+set}" = set; then
2437 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002438else
2439 if test -n "$CC"; then
2440 ac_cv_prog_CC="$CC" # Let the user override the test.
2441else
Martin v. Löwis11437992002-04-12 09:54:03 +00002442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443for as_dir in $PATH
2444do
2445 IFS=$as_save_IFS
2446 test -z "$as_dir" && as_dir=.
2447 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448 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 +00002449 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2450 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2451 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002453done
2454done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002456
2457fi
2458fi
2459CC=$ac_cv_prog_CC
2460if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461 { echo "$as_me:$LINENO: result: $CC" >&5
2462echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002463else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464 { echo "$as_me:$LINENO: result: no" >&5
2465echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002466fi
2467
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 test -n "$CC" && break
2470 done
2471fi
2472if test -z "$CC"; then
2473 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002475do
2476 # Extract the first word of "$ac_prog", so it can be a program name with args.
2477set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002480if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2481 echo $ECHO_N "(cached) $ECHO_C" >&6
2482else
2483 if test -n "$ac_ct_CC"; then
2484 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2485else
2486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2487for as_dir in $PATH
2488do
2489 IFS=$as_save_IFS
2490 test -z "$as_dir" && as_dir=.
2491 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002492 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 +00002493 ac_cv_prog_ac_ct_CC="$ac_prog"
2494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2495 break 2
2496 fi
2497done
2498done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002500
Martin v. Löwis11437992002-04-12 09:54:03 +00002501fi
2502fi
2503ac_ct_CC=$ac_cv_prog_ac_ct_CC
2504if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2506echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002507else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508 { echo "$as_me:$LINENO: result: no" >&5
2509echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002510fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002511
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 test -n "$ac_ct_CC" && break
2514done
Michael W. Hudson54241132001-12-07 15:38:26 +00002515
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516 if test "x$ac_ct_CC" = x; then
2517 CC=""
2518 else
2519 case $cross_compiling:$ac_tool_warned in
2520yes:)
2521{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2522whose name does not start with the host triplet. If you think this
2523configuration is useful to you, please write to autoconf@gnu.org." >&5
2524echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2525whose name does not start with the host triplet. If you think this
2526configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2527ac_tool_warned=yes ;;
2528esac
2529 CC=$ac_ct_CC
2530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002531fi
2532
2533fi
2534
2535
Skip Montanaro6dead952003-09-25 14:50:04 +00002536test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2537See \`config.log' for more details." >&5
2538echo "$as_me: error: no acceptable C compiler found in \$PATH
2539See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 { (exit 1); exit 1; }; }
2541
2542# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002544ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545{ (ac_try="$ac_compiler --version >&5"
2546case "(($ac_try" in
2547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2548 *) ac_try_echo=$ac_try;;
2549esac
2550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2551 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 ac_status=$?
2553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002555{ (ac_try="$ac_compiler -v >&5"
2556case "(($ac_try" in
2557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2558 *) ac_try_echo=$ac_try;;
2559esac
2560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2561 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 ac_status=$?
2563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2564 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565{ (ac_try="$ac_compiler -V >&5"
2566case "(($ac_try" in
2567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2568 *) ac_try_echo=$ac_try;;
2569esac
2570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2571 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 ac_status=$?
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); }
2575
2576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002577/* confdefs.h. */
2578_ACEOF
2579cat confdefs.h >>conftest.$ac_ext
2580cat >>conftest.$ac_ext <<_ACEOF
2581/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583int
2584main ()
2585{
2586
2587 ;
2588 return 0;
2589}
2590_ACEOF
2591ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002592ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593# Try to create an executable without -o first, disregard a.out.
2594# It will help us diagnose broken compilers, and finding out an intuition
2595# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2597echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002598ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002599#
2600# List of possible output files, starting from the most likely.
2601# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2602# only as a last resort. b.out is created by i960 compilers.
2603ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2604#
2605# The IRIX 6 linker writes into existing files which may not be
2606# executable, retaining their permissions. Remove them first so a
2607# subsequent execution test works.
2608ac_rmfiles=
2609for ac_file in $ac_files
2610do
2611 case $ac_file in
2612 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2613 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2614 esac
2615done
2616rm -f $ac_rmfiles
2617
2618if { (ac_try="$ac_link_default"
2619case "(($ac_try" in
2620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2621 *) ac_try_echo=$ac_try;;
2622esac
2623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2624 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_status=$?
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002628 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2629# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2630# in a Makefile. We should not override ac_cv_exeext if it was cached,
2631# so that the user can short-circuit this test for compilers unknown to
2632# Autoconf.
2633for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002634do
2635 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002638 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002639 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002640 # We found the default executable, but exeext='' is most
2641 # certainly right.
2642 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002643 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002644 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2645 then :; else
2646 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2647 fi
2648 # We set ac_cv_exeext here because the later test for it is not
2649 # safe: cross compilers may not add the suffix if given an `-o'
2650 # argument, so we may need to know it at that point already.
2651 # Even if this section looks crufty: it has the advantage of
2652 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002653 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002654 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002655 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 esac
2657done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658test "$ac_cv_exeext" = no && ac_cv_exeext=
2659
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002660else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002661 ac_file=''
2662fi
2663
2664{ echo "$as_me:$LINENO: result: $ac_file" >&5
2665echo "${ECHO_T}$ac_file" >&6; }
2666if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002668sed 's/^/| /' conftest.$ac_ext >&5
2669
2670{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2671See \`config.log' for more details." >&5
2672echo "$as_me: error: C compiler cannot create executables
2673See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002675fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002678
Martin v. Löwiseba40652007-08-30 20:10:57 +00002679# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002680# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002681{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2682echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002683# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2684# If not cross compiling, check that we can run a simple program.
2685if test "$cross_compiling" != yes; then
2686 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687 { (case "(($ac_try" in
2688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2689 *) ac_try_echo=$ac_try;;
2690esac
2691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2692 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 ac_status=$?
2694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2695 (exit $ac_status); }; }; then
2696 cross_compiling=no
2697 else
2698 if test "$cross_compiling" = maybe; then
2699 cross_compiling=yes
2700 else
2701 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002702If you meant to cross compile, use \`--host'.
2703See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002705If you meant to cross compile, use \`--host'.
2706See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 { (exit 1); exit 1; }; }
2708 fi
2709 fi
2710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002711{ echo "$as_me:$LINENO: result: yes" >&5
2712echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002713
Skip Montanaro6dead952003-09-25 14:50:04 +00002714rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002715ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002716# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002717# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002718{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2719echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2720{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2721echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002722
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2724echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2725if { (ac_try="$ac_link"
2726case "(($ac_try" in
2727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2728 *) ac_try_echo=$ac_try;;
2729esac
2730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2731 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 ac_status=$?
2733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734 (exit $ac_status); }; then
2735 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2736# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2737# work properly (i.e., refer to `conftest.exe'), while it won't with
2738# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002739for ac_file in conftest.exe conftest conftest.*; do
2740 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002742 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002744 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 * ) break;;
2746 esac
2747done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748else
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2750See \`config.log' for more details." >&5
2751echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2752See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002754fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002755
Martin v. Löwis11437992002-04-12 09:54:03 +00002756rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002757{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2758echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759
2760rm -f conftest.$ac_ext
2761EXEEXT=$ac_cv_exeext
2762ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002763{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2764echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002765if test "${ac_cv_objext+set}" = set; then
2766 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002767else
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002769/* confdefs.h. */
2770_ACEOF
2771cat confdefs.h >>conftest.$ac_ext
2772cat >>conftest.$ac_ext <<_ACEOF
2773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002774
Martin v. Löwis11437992002-04-12 09:54:03 +00002775int
2776main ()
2777{
2778
2779 ;
2780 return 0;
2781}
2782_ACEOF
2783rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002784if { (ac_try="$ac_compile"
2785case "(($ac_try" in
2786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2787 *) ac_try_echo=$ac_try;;
2788esac
2789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2790 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 ac_status=$?
2792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002794 for ac_file in conftest.o conftest.obj conftest.*; do
2795 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2799 break;;
2800 esac
2801done
2802else
2803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002804sed 's/^/| /' conftest.$ac_ext >&5
2805
2806{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2807See \`config.log' for more details." >&5
2808echo "$as_me: error: cannot compute suffix of object files: cannot compile
2809See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 { (exit 1); exit 1; }; }
2811fi
2812
2813rm -f conftest.$ac_cv_objext conftest.$ac_ext
2814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002815{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2816echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817OBJEXT=$ac_cv_objext
2818ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002819{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2820echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002821if test "${ac_cv_c_compiler_gnu+set}" = set; then
2822 echo $ECHO_N "(cached) $ECHO_C" >&6
2823else
2824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002825/* confdefs.h. */
2826_ACEOF
2827cat confdefs.h >>conftest.$ac_ext
2828cat >>conftest.$ac_ext <<_ACEOF
2829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002830
Martin v. Löwis11437992002-04-12 09:54:03 +00002831int
2832main ()
2833{
2834#ifndef __GNUC__
2835 choke me
2836#endif
2837
2838 ;
2839 return 0;
2840}
2841_ACEOF
2842rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002843if { (ac_try="$ac_compile"
2844case "(($ac_try" in
2845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2846 *) ac_try_echo=$ac_try;;
2847esac
2848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002851 grep -v '^ *+' conftest.er1 >conftest.err
2852 rm -f conftest.er1
2853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002855 (exit $ac_status); } && {
2856 test -z "$ac_c_werror_flag" ||
2857 test ! -s conftest.err
2858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002859 ac_compiler_gnu=yes
2860else
2861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002862sed 's/^/| /' conftest.$ac_ext >&5
2863
Martin v. Löwiseba40652007-08-30 20:10:57 +00002864 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002866
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002868ac_cv_c_compiler_gnu=$ac_compiler_gnu
2869
2870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002871{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2872echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002873GCC=`test $ac_compiler_gnu = yes && echo yes`
2874ac_test_CFLAGS=${CFLAGS+set}
2875ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002876{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2877echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002878if test "${ac_cv_prog_cc_g+set}" = set; then
2879 echo $ECHO_N "(cached) $ECHO_C" >&6
2880else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002881 ac_save_c_werror_flag=$ac_c_werror_flag
2882 ac_c_werror_flag=yes
2883 ac_cv_prog_cc_g=no
2884 CFLAGS="-g"
2885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002886/* confdefs.h. */
2887_ACEOF
2888cat confdefs.h >>conftest.$ac_ext
2889cat >>conftest.$ac_ext <<_ACEOF
2890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002891
Martin v. Löwis11437992002-04-12 09:54:03 +00002892int
2893main ()
2894{
2895
2896 ;
2897 return 0;
2898}
2899_ACEOF
2900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002901if { (ac_try="$ac_compile"
2902case "(($ac_try" in
2903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2904 *) ac_try_echo=$ac_try;;
2905esac
2906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002909 grep -v '^ *+' conftest.er1 >conftest.err
2910 rm -f conftest.er1
2911 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002913 (exit $ac_status); } && {
2914 test -z "$ac_c_werror_flag" ||
2915 test ! -s conftest.err
2916 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002917 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002918else
Martin v. Löwis11437992002-04-12 09:54:03 +00002919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002920sed 's/^/| /' conftest.$ac_ext >&5
2921
Martin v. Löwiseba40652007-08-30 20:10:57 +00002922 CFLAGS=""
2923 cat >conftest.$ac_ext <<_ACEOF
2924/* confdefs.h. */
2925_ACEOF
2926cat confdefs.h >>conftest.$ac_ext
2927cat >>conftest.$ac_ext <<_ACEOF
2928/* end confdefs.h. */
2929
2930int
2931main ()
2932{
2933
2934 ;
2935 return 0;
2936}
2937_ACEOF
2938rm -f conftest.$ac_objext
2939if { (ac_try="$ac_compile"
2940case "(($ac_try" in
2941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2942 *) ac_try_echo=$ac_try;;
2943esac
2944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2945 (eval "$ac_compile") 2>conftest.er1
2946 ac_status=$?
2947 grep -v '^ *+' conftest.er1 >conftest.err
2948 rm -f conftest.er1
2949 cat conftest.err >&5
2950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951 (exit $ac_status); } && {
2952 test -z "$ac_c_werror_flag" ||
2953 test ! -s conftest.err
2954 } && test -s conftest.$ac_objext; then
2955 :
2956else
2957 echo "$as_me: failed program was:" >&5
2958sed 's/^/| /' conftest.$ac_ext >&5
2959
2960 ac_c_werror_flag=$ac_save_c_werror_flag
2961 CFLAGS="-g"
2962 cat >conftest.$ac_ext <<_ACEOF
2963/* confdefs.h. */
2964_ACEOF
2965cat confdefs.h >>conftest.$ac_ext
2966cat >>conftest.$ac_ext <<_ACEOF
2967/* end confdefs.h. */
2968
2969int
2970main ()
2971{
2972
2973 ;
2974 return 0;
2975}
2976_ACEOF
2977rm -f conftest.$ac_objext
2978if { (ac_try="$ac_compile"
2979case "(($ac_try" in
2980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2981 *) ac_try_echo=$ac_try;;
2982esac
2983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2984 (eval "$ac_compile") 2>conftest.er1
2985 ac_status=$?
2986 grep -v '^ *+' conftest.er1 >conftest.err
2987 rm -f conftest.er1
2988 cat conftest.err >&5
2989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2990 (exit $ac_status); } && {
2991 test -z "$ac_c_werror_flag" ||
2992 test ! -s conftest.err
2993 } && test -s conftest.$ac_objext; then
2994 ac_cv_prog_cc_g=yes
2995else
2996 echo "$as_me: failed program was:" >&5
2997sed 's/^/| /' conftest.$ac_ext >&5
2998
2999
Guido van Rossum627b2d71993-12-24 10:39:16 +00003000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003001
3002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003004
3005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3006fi
3007
3008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3009 ac_c_werror_flag=$ac_save_c_werror_flag
3010fi
3011{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3012echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003013if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003014 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003015elif test $ac_cv_prog_cc_g = yes; then
3016 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003017 CFLAGS="-g -O2"
3018 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003019 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003020 fi
3021else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003022 if test "$GCC" = yes; then
3023 CFLAGS="-O2"
3024 else
3025 CFLAGS=
3026 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003028{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3029echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3030if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003031 echo $ECHO_N "(cached) $ECHO_C" >&6
3032else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003033 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003034ac_save_CC=$CC
3035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003036/* confdefs.h. */
3037_ACEOF
3038cat confdefs.h >>conftest.$ac_ext
3039cat >>conftest.$ac_ext <<_ACEOF
3040/* end confdefs.h. */
3041#include <stdarg.h>
3042#include <stdio.h>
3043#include <sys/types.h>
3044#include <sys/stat.h>
3045/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3046struct buf { int x; };
3047FILE * (*rcsopen) (struct buf *, struct stat *, int);
3048static char *e (p, i)
3049 char **p;
3050 int i;
3051{
3052 return p[i];
3053}
3054static char *f (char * (*g) (char **, int), char **p, ...)
3055{
3056 char *s;
3057 va_list v;
3058 va_start (v,p);
3059 s = g (p, va_arg (v,int));
3060 va_end (v);
3061 return s;
3062}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003063
3064/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3065 function prototypes and stuff, but not '\xHH' hex character constants.
3066 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003067 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003068 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3069 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003070 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003071int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3072
Martin v. Löwiseba40652007-08-30 20:10:57 +00003073/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3074 inside strings and character constants. */
3075#define FOO(x) 'x'
3076int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3077
Skip Montanaro6dead952003-09-25 14:50:04 +00003078int test (int i, double x);
3079struct s1 {int (*f) (int a);};
3080struct s2 {int (*f) (double a);};
3081int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3082int argc;
3083char **argv;
3084int
3085main ()
3086{
3087return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3088 ;
3089 return 0;
3090}
3091_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003092for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3093 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003094do
3095 CC="$ac_save_CC $ac_arg"
3096 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003097if { (ac_try="$ac_compile"
3098case "(($ac_try" in
3099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3100 *) ac_try_echo=$ac_try;;
3101esac
3102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3103 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003105 grep -v '^ *+' conftest.er1 >conftest.err
3106 rm -f conftest.er1
3107 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003109 (exit $ac_status); } && {
3110 test -z "$ac_c_werror_flag" ||
3111 test ! -s conftest.err
3112 } && test -s conftest.$ac_objext; then
3113 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003114else
3115 echo "$as_me: failed program was:" >&5
3116sed 's/^/| /' conftest.$ac_ext >&5
3117
Martin v. Löwiseba40652007-08-30 20:10:57 +00003118
Skip Montanaro6dead952003-09-25 14:50:04 +00003119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003120
3121rm -f core conftest.err conftest.$ac_objext
3122 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003123done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003124rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003125CC=$ac_save_CC
3126
3127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003128# AC_CACHE_VAL
3129case "x$ac_cv_prog_cc_c89" in
3130 x)
3131 { echo "$as_me:$LINENO: result: none needed" >&5
3132echo "${ECHO_T}none needed" >&6; } ;;
3133 xno)
3134 { echo "$as_me:$LINENO: result: unsupported" >&5
3135echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003136 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003137 CC="$CC $ac_cv_prog_cc_c89"
3138 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3139echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003140esac
3141
Skip Montanaro6dead952003-09-25 14:50:04 +00003142
Martin v. Löwis11437992002-04-12 09:54:03 +00003143ac_ext=c
3144ac_cpp='$CPP $CPPFLAGS'
3145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3147ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003149
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003150
3151
Martin v. Löwiseba40652007-08-30 20:10:57 +00003152{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3153echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003154
Martin v. Löwiseba40652007-08-30 20:10:57 +00003155# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003156if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003157 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003158
3159 case $withval in
3160 no) with_cxx_main=no
3161 MAINCC='$(CC)';;
3162 yes) with_cxx_main=yes
3163 MAINCC='$(CXX)';;
3164 *) with_cxx_main=yes
3165 MAINCC=$withval
3166 if test -z "$CXX"
3167 then
3168 CXX=$withval
3169 fi;;
3170 esac
3171else
3172
3173 with_cxx_main=no
3174 MAINCC='$(CC)'
3175
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176fi
3177
3178{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3179echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003180
3181preset_cxx="$CXX"
3182if test -z "$CXX"
3183then
3184 case "$CC" in
3185 gcc) # Extract the first word of "g++", so it can be a program name with args.
3186set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3188echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003189if test "${ac_cv_path_CXX+set}" = set; then
3190 echo $ECHO_N "(cached) $ECHO_C" >&6
3191else
3192 case $CXX in
3193 [\\/]* | ?:[\\/]*)
3194 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3195 ;;
3196 *)
3197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3198for as_dir in notfound
3199do
3200 IFS=$as_save_IFS
3201 test -z "$as_dir" && as_dir=.
3202 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003203 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 +00003204 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3205 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3206 break 2
3207 fi
3208done
3209done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003211
3212 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3213 ;;
3214esac
3215fi
3216CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003217if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218 { echo "$as_me:$LINENO: result: $CXX" >&5
3219echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003220else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221 { echo "$as_me:$LINENO: result: no" >&5
3222echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003224
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003225 ;;
3226 cc) # Extract the first word of "c++", so it can be a program name with args.
3227set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003228{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3229echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003230if test "${ac_cv_path_CXX+set}" = set; then
3231 echo $ECHO_N "(cached) $ECHO_C" >&6
3232else
3233 case $CXX in
3234 [\\/]* | ?:[\\/]*)
3235 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3236 ;;
3237 *)
3238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239for as_dir in notfound
3240do
3241 IFS=$as_save_IFS
3242 test -z "$as_dir" && as_dir=.
3243 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003244 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 +00003245 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3246 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3247 break 2
3248 fi
3249done
3250done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003251IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003252
3253 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3254 ;;
3255esac
3256fi
3257CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003258if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003259 { echo "$as_me:$LINENO: result: $CXX" >&5
3260echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003261else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262 { echo "$as_me:$LINENO: result: no" >&5
3263echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003265
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003266 ;;
3267 esac
3268 if test "$CXX" = "notfound"
3269 then
3270 CXX=""
3271 fi
3272fi
3273if test -z "$CXX"
3274then
3275 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3276do
3277 # Extract the first word of "$ac_prog", so it can be a program name with args.
3278set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003281if test "${ac_cv_prog_CXX+set}" = set; then
3282 echo $ECHO_N "(cached) $ECHO_C" >&6
3283else
3284 if test -n "$CXX"; then
3285 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3286else
3287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3288for as_dir in $PATH
3289do
3290 IFS=$as_save_IFS
3291 test -z "$as_dir" && as_dir=.
3292 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003293 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 +00003294 ac_cv_prog_CXX="$ac_prog"
3295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3296 break 2
3297 fi
3298done
3299done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003300IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301
3302fi
3303fi
3304CXX=$ac_cv_prog_CXX
3305if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 { echo "$as_me:$LINENO: result: $CXX" >&5
3307echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003308else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003309 { echo "$as_me:$LINENO: result: no" >&5
3310echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003311fi
3312
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003314 test -n "$CXX" && break
3315done
3316test -n "$CXX" || CXX="notfound"
3317
3318 if test "$CXX" = "notfound"
3319 then
3320 CXX=""
3321 fi
3322fi
3323if test "$preset_cxx" != "$CXX"
3324then
3325 { echo "$as_me:$LINENO: WARNING:
3326
3327 By default, distutils will build C++ extension modules with \"$CXX\".
3328 If this is not intended, then set CXX on the configure command line.
3329 " >&5
3330echo "$as_me: WARNING:
3331
3332 By default, distutils will build C++ extension modules with \"$CXX\".
3333 If this is not intended, then set CXX on the configure command line.
3334 " >&2;}
3335fi
3336
3337
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003338# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003339
3340ac_ext=c
3341ac_cpp='$CPP $CPPFLAGS'
3342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3344ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3346echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003347# On Suns, sometimes $CPP names a directory.
3348if test -n "$CPP" && test -d "$CPP"; then
3349 CPP=
3350fi
3351if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003352 if test "${ac_cv_prog_CPP+set}" = set; then
3353 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003354else
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 # Double quotes because CPP needs to be expanded
3356 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3357 do
3358 ac_preproc_ok=false
3359for ac_c_preproc_warn_flag in '' yes
3360do
3361 # Use a header file that comes with gcc, so configuring glibc
3362 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003363 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3364 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003365 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 # not just through cpp. "Syntax error" is here to catch this case.
3367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003368/* confdefs.h. */
3369_ACEOF
3370cat confdefs.h >>conftest.$ac_ext
3371cat >>conftest.$ac_ext <<_ACEOF
3372/* end confdefs.h. */
3373#ifdef __STDC__
3374# include <limits.h>
3375#else
3376# include <assert.h>
3377#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003378 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003379_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003380if { (ac_try="$ac_cpp conftest.$ac_ext"
3381case "(($ac_try" in
3382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3383 *) ac_try_echo=$ac_try;;
3384esac
3385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3386 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003388 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003389 rm -f conftest.er1
3390 cat conftest.err >&5
3391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392 (exit $ac_status); } >/dev/null && {
3393 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3394 test ! -s conftest.err
3395 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003396 :
3397else
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003399sed 's/^/| /' conftest.$ac_ext >&5
3400
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 # Broken: fails on valid input.
3402continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003404
Martin v. Löwis11437992002-04-12 09:54:03 +00003405rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003406
Martin v. Löwiseba40652007-08-30 20:10:57 +00003407 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003408 # can be detected and how.
3409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003410/* confdefs.h. */
3411_ACEOF
3412cat confdefs.h >>conftest.$ac_ext
3413cat >>conftest.$ac_ext <<_ACEOF
3414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003415#include <ac_nonexistent.h>
3416_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003417if { (ac_try="$ac_cpp conftest.$ac_ext"
3418case "(($ac_try" in
3419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3420 *) ac_try_echo=$ac_try;;
3421esac
3422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3423 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003425 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003426 rm -f conftest.er1
3427 cat conftest.err >&5
3428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429 (exit $ac_status); } >/dev/null && {
3430 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3431 test ! -s conftest.err
3432 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 # Broken: success on invalid input.
3434continue
3435else
3436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003437sed 's/^/| /' conftest.$ac_ext >&5
3438
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 # Passes both tests.
3440ac_preproc_ok=:
3441break
3442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003443
Martin v. Löwis11437992002-04-12 09:54:03 +00003444rm -f conftest.err conftest.$ac_ext
3445
3446done
3447# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3448rm -f conftest.err conftest.$ac_ext
3449if $ac_preproc_ok; then
3450 break
3451fi
3452
3453 done
3454 ac_cv_prog_CPP=$CPP
3455
3456fi
3457 CPP=$ac_cv_prog_CPP
3458else
3459 ac_cv_prog_CPP=$CPP
3460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003461{ echo "$as_me:$LINENO: result: $CPP" >&5
3462echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003463ac_preproc_ok=false
3464for ac_c_preproc_warn_flag in '' yes
3465do
3466 # Use a header file that comes with gcc, so configuring glibc
3467 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003468 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3469 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 # On the NeXT, cc -E runs the code through the compiler's parser,
3471 # not just through cpp. "Syntax error" is here to catch this case.
3472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003473/* confdefs.h. */
3474_ACEOF
3475cat confdefs.h >>conftest.$ac_ext
3476cat >>conftest.$ac_ext <<_ACEOF
3477/* end confdefs.h. */
3478#ifdef __STDC__
3479# include <limits.h>
3480#else
3481# include <assert.h>
3482#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003483 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003484_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003485if { (ac_try="$ac_cpp conftest.$ac_ext"
3486case "(($ac_try" in
3487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3488 *) ac_try_echo=$ac_try;;
3489esac
3490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3491 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003493 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 rm -f conftest.er1
3495 cat conftest.err >&5
3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003497 (exit $ac_status); } >/dev/null && {
3498 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3499 test ! -s conftest.err
3500 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 :
3502else
3503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003504sed 's/^/| /' conftest.$ac_ext >&5
3505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 # Broken: fails on valid input.
3507continue
3508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510rm -f conftest.err conftest.$ac_ext
3511
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 # can be detected and how.
3514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003515/* confdefs.h. */
3516_ACEOF
3517cat confdefs.h >>conftest.$ac_ext
3518cat >>conftest.$ac_ext <<_ACEOF
3519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003520#include <ac_nonexistent.h>
3521_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522if { (ac_try="$ac_cpp conftest.$ac_ext"
3523case "(($ac_try" in
3524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3525 *) ac_try_echo=$ac_try;;
3526esac
3527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3528 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003530 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 rm -f conftest.er1
3532 cat conftest.err >&5
3533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003534 (exit $ac_status); } >/dev/null && {
3535 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3536 test ! -s conftest.err
3537 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 # Broken: success on invalid input.
3539continue
3540else
3541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003542sed 's/^/| /' conftest.$ac_ext >&5
3543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Passes both tests.
3545ac_preproc_ok=:
3546break
3547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003548
Martin v. Löwis11437992002-04-12 09:54:03 +00003549rm -f conftest.err conftest.$ac_ext
3550
3551done
3552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3553rm -f conftest.err conftest.$ac_ext
3554if $ac_preproc_ok; then
3555 :
3556else
Skip Montanaro6dead952003-09-25 14:50:04 +00003557 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3558See \`config.log' for more details." >&5
3559echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3560See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003561 { (exit 1); exit 1; }; }
3562fi
3563
3564ac_ext=c
3565ac_cpp='$CPP $CPPFLAGS'
3566ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3567ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3568ac_compiler_gnu=$ac_cv_c_compiler_gnu
3569
3570
Martin v. Löwiseba40652007-08-30 20:10:57 +00003571{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3572echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3573if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003574 echo $ECHO_N "(cached) $ECHO_C" >&6
3575else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003576 # Extract the first word of "grep ggrep" to use in msg output
3577if test -z "$GREP"; then
3578set dummy grep ggrep; ac_prog_name=$2
3579if test "${ac_cv_path_GREP+set}" = set; then
3580 echo $ECHO_N "(cached) $ECHO_C" >&6
3581else
3582 ac_path_GREP_found=false
3583# Loop through the user's path and test for each of PROGNAME-LIST
3584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
3589 for ac_prog in grep ggrep; do
3590 for ac_exec_ext in '' $ac_executable_extensions; do
3591 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3592 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3593 # Check for GNU ac_path_GREP and select it if it is found.
3594 # Check for GNU $ac_path_GREP
3595case `"$ac_path_GREP" --version 2>&1` in
3596*GNU*)
3597 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3598*)
3599 ac_count=0
3600 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3601 while :
3602 do
3603 cat "conftest.in" "conftest.in" >"conftest.tmp"
3604 mv "conftest.tmp" "conftest.in"
3605 cp "conftest.in" "conftest.nl"
3606 echo 'GREP' >> "conftest.nl"
3607 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3608 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3609 ac_count=`expr $ac_count + 1`
3610 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3611 # Best one so far, save it but keep looking for a better one
3612 ac_cv_path_GREP="$ac_path_GREP"
3613 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003614 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615 # 10*(2^10) chars as input seems more than enough
3616 test $ac_count -gt 10 && break
3617 done
3618 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3619esac
3620
3621
3622 $ac_path_GREP_found && break 3
3623 done
3624done
3625
3626done
3627IFS=$as_save_IFS
3628
3629
Skip Montanaro6dead952003-09-25 14:50:04 +00003630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631
3632GREP="$ac_cv_path_GREP"
3633if test -z "$GREP"; then
3634 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3635echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3636 { (exit 1); exit 1; }; }
3637fi
3638
3639else
3640 ac_cv_path_GREP=$GREP
3641fi
3642
3643
3644fi
3645{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3646echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3647 GREP="$ac_cv_path_GREP"
3648
3649
3650{ echo "$as_me:$LINENO: checking for egrep" >&5
3651echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3652if test "${ac_cv_path_EGREP+set}" = set; then
3653 echo $ECHO_N "(cached) $ECHO_C" >&6
3654else
3655 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3656 then ac_cv_path_EGREP="$GREP -E"
3657 else
3658 # Extract the first word of "egrep" to use in msg output
3659if test -z "$EGREP"; then
3660set dummy egrep; ac_prog_name=$2
3661if test "${ac_cv_path_EGREP+set}" = set; then
3662 echo $ECHO_N "(cached) $ECHO_C" >&6
3663else
3664 ac_path_EGREP_found=false
3665# Loop through the user's path and test for each of PROGNAME-LIST
3666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
3671 for ac_prog in egrep; do
3672 for ac_exec_ext in '' $ac_executable_extensions; do
3673 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3674 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3675 # Check for GNU ac_path_EGREP and select it if it is found.
3676 # Check for GNU $ac_path_EGREP
3677case `"$ac_path_EGREP" --version 2>&1` in
3678*GNU*)
3679 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3680*)
3681 ac_count=0
3682 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3683 while :
3684 do
3685 cat "conftest.in" "conftest.in" >"conftest.tmp"
3686 mv "conftest.tmp" "conftest.in"
3687 cp "conftest.in" "conftest.nl"
3688 echo 'EGREP' >> "conftest.nl"
3689 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3690 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3691 ac_count=`expr $ac_count + 1`
3692 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3693 # Best one so far, save it but keep looking for a better one
3694 ac_cv_path_EGREP="$ac_path_EGREP"
3695 ac_path_EGREP_max=$ac_count
3696 fi
3697 # 10*(2^10) chars as input seems more than enough
3698 test $ac_count -gt 10 && break
3699 done
3700 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3701esac
3702
3703
3704 $ac_path_EGREP_found && break 3
3705 done
3706done
3707
3708done
3709IFS=$as_save_IFS
3710
3711
3712fi
3713
3714EGREP="$ac_cv_path_EGREP"
3715if test -z "$EGREP"; then
3716 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3717echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3718 { (exit 1); exit 1; }; }
3719fi
3720
3721else
3722 ac_cv_path_EGREP=$EGREP
3723fi
3724
3725
3726 fi
3727fi
3728{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3729echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3730 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003731
3732
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734{ echo "$as_me:$LINENO: checking for AIX" >&5
3735echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003737/* confdefs.h. */
3738_ACEOF
3739cat confdefs.h >>conftest.$ac_ext
3740cat >>conftest.$ac_ext <<_ACEOF
3741/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003742#ifdef _AIX
3743 yes
3744#endif
3745
Martin v. Löwis11437992002-04-12 09:54:03 +00003746_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003748 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749 { echo "$as_me:$LINENO: result: yes" >&5
3750echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003752#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003753_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003754
3755else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003756 { echo "$as_me:$LINENO: result: no" >&5
3757echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003758fi
3759rm -f conftest*
3760
Michael W. Hudson54241132001-12-07 15:38:26 +00003761
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003762
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003763# Check for unsupported systems
3764case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003765atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003766 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3767 echo See README for details.
3768 exit 1;;
3769esac
3770
Michael W. Hudson54241132001-12-07 15:38:26 +00003771
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3773echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003774
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003776if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003778 case $withval in
3779 no) EXEEXT=;;
3780 yes) EXEEXT=.exe;;
3781 *) EXEEXT=$withval;;
3782 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003783fi
3784
3785{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3786echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003787
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003788# Test whether we're running on a non-case-sensitive system, in which
3789# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003790
Martin v. Löwiseba40652007-08-30 20:10:57 +00003791{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3792echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003793if test ! -d CaseSensitiveTestDir; then
3794mkdir CaseSensitiveTestDir
3795fi
3796
3797if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003798then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003799 { echo "$as_me:$LINENO: result: yes" >&5
3800echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003801 BUILDEXEEXT=.exe
3802else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803 { echo "$as_me:$LINENO: result: no" >&5
3804echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003805 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003806fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003807rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003808
Guido van Rossumdd997f71998-10-07 19:58:26 +00003809case $MACHDEP in
3810bsdos*)
3811 case $CC in
3812 gcc) CC="$CC -D_HAVE_BSDI";;
3813 esac;;
3814esac
3815
Guido van Rossum24b1e751997-08-21 02:29:16 +00003816case $ac_sys_system in
3817hp*|HP*)
3818 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003819 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003820 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003821Monterey*)
3822 case $CC in
3823 cc) CC="$CC -Wl,-Bexport";;
3824 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003825SunOS*)
3826 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003827
3828cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003829#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003830_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003831
3832 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003833esac
3834
Michael W. Hudson54241132001-12-07 15:38:26 +00003835
3836
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3838echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003839if test -z "$LIBRARY"
3840then
3841 LIBRARY='libpython$(VERSION).a'
3842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003843{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3844echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003845
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003846# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003847# name of the library into which to insert object files). BLDLIBRARY is also
3848# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3849# is blank as the main program is not linked directly against LDLIBRARY.
3850# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3851# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3852# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3853# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003854#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003855# RUNSHARED is used to run shared python without installed libraries
3856#
3857# INSTSONAME is the name of the shared library that will be use to install
3858# on the system - some systems like version suffix, others don't
3859
3860
Michael W. Hudson54241132001-12-07 15:38:26 +00003861
3862
3863
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003864
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003865LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003866BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003867INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003868DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003869LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003870RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003871
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003872# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003873# If CXX is set, and if it is needed to link a main function that was
3874# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3875# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003876# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003877# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003878
Martin v. Löwiseba40652007-08-30 20:10:57 +00003879{ echo "$as_me:$LINENO: checking LINKCC" >&5
3880echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003881if test -z "$LINKCC"
3882then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003883 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003884 case $ac_sys_system in
3885 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003886 exp_extra="\"\""
3887 if test $ac_sys_release -ge 5 -o \
3888 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3889 exp_extra="."
3890 fi
3891 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003892 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003893 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003894 esac
3895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3897echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003898
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3900echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3901# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003902if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003903 enableval=$enable_shared;
3904fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003905
Martin v. Löwis1142de32002-03-29 16:28:31 +00003906
3907if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003908then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003909 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003910 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003911 enable_shared="yes";;
3912 *)
3913 enable_shared="no";;
3914 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003916{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3917echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003918
Martin v. Löwiseba40652007-08-30 20:10:57 +00003919{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3920echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3921# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003922if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003924 CC="$CC -pg"
3925 if test "$cross_compiling" = yes; then
3926 ac_enable_profiling="no"
3927else
3928 cat >conftest.$ac_ext <<_ACEOF
3929/* confdefs.h. */
3930_ACEOF
3931cat confdefs.h >>conftest.$ac_ext
3932cat >>conftest.$ac_ext <<_ACEOF
3933/* end confdefs.h. */
3934int main() { return 0; }
3935_ACEOF
3936rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003937if { (ac_try="$ac_link"
3938case "(($ac_try" in
3939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3940 *) ac_try_echo=$ac_try;;
3941esac
3942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3943 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00003947 { (case "(($ac_try" in
3948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3949 *) ac_try_echo=$ac_try;;
3950esac
3951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3952 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003953 ac_status=$?
3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955 (exit $ac_status); }; }; then
3956 ac_enable_profiling="yes"
3957else
3958 echo "$as_me: program exited with status $ac_status" >&5
3959echo "$as_me: failed program was:" >&5
3960sed 's/^/| /' conftest.$ac_ext >&5
3961
3962( exit $ac_status )
3963ac_enable_profiling="no"
3964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965rm -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 +00003966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003967
3968
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003969 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003970fi
3971
3972{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3973echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003974
3975case "$ac_enable_profiling" in
3976 "yes")
3977 BASECFLAGS="-pg $BASECFLAGS"
3978 LDFLAGS="-pg $LDFLAGS"
3979 ;;
3980esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003981
Martin v. Löwiseba40652007-08-30 20:10:57 +00003982{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3983echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00003984
Guido van Rossumb8552162001-09-05 14:58:11 +00003985# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3986# library that we build, but we do not want to link against it (we
3987# will find it with a -framework option). For this reason there is an
3988# extra variable BLDLIBRARY against which Python and the extension
3989# modules are linked, BLDLIBRARY. This is normally the same as
3990# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003991if test "$enable_framework"
3992then
3993 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003994 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003995 BLDLIBRARY=''
3996else
3997 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003998fi
Jack Jansene578a632001-08-15 01:27:14 +00003999
Martin v. Löwis1142de32002-03-29 16:28:31 +00004000# Other platforms follow
4001if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004002
4003cat >>confdefs.h <<\_ACEOF
4004#define Py_ENABLE_SHARED 1
4005_ACEOF
4006
Martin v. Löwis1142de32002-03-29 16:28:31 +00004007 case $ac_sys_system in
4008 BeOS*)
4009 LDLIBRARY='libpython$(VERSION).so'
4010 ;;
4011 CYGWIN*)
4012 LDLIBRARY='libpython$(VERSION).dll.a'
4013 DLLLIBRARY='libpython$(VERSION).dll'
4014 ;;
4015 SunOS*)
4016 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004017 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004018 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004019 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004020 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004021 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004022 LDLIBRARY='libpython$(VERSION).so'
4023 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004024 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004025 case $ac_sys_system in
4026 FreeBSD*)
4027 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4028 ;;
4029 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004030 INSTSONAME="$LDLIBRARY".$SOVERSION
4031 ;;
4032 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004033 case `uname -m` in
4034 ia64)
4035 LDLIBRARY='libpython$(VERSION).so'
4036 ;;
4037 *)
4038 LDLIBRARY='libpython$(VERSION).sl'
4039 ;;
4040 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004041 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004042 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004043 ;;
4044 OSF*)
4045 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004046 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004047 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004048 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004049 atheos*)
4050 LDLIBRARY='libpython$(VERSION).so'
4051 BLDLIBRARY='-L. -lpython$(VERSION)'
4052 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4053 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004054 esac
Jason Tishler30765592003-09-04 11:04:06 +00004055else # shared is disabled
4056 case $ac_sys_system in
4057 CYGWIN*)
4058 BLDLIBRARY='$(LIBRARY)'
4059 LDLIBRARY='libpython$(VERSION).dll.a'
4060 ;;
4061 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004062fi
4063
Martin v. Löwiseba40652007-08-30 20:10:57 +00004064{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4065echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004066
Martin v. Löwis11437992002-04-12 09:54:03 +00004067if test -n "$ac_tool_prefix"; then
4068 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4069set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004070{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4071echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004072if test "${ac_cv_prog_RANLIB+set}" = set; then
4073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074else
4075 if test -n "$RANLIB"; then
4076 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4077else
Martin v. Löwis11437992002-04-12 09:54:03 +00004078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4079for as_dir in $PATH
4080do
4081 IFS=$as_save_IFS
4082 test -z "$as_dir" && as_dir=.
4083 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004084 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 +00004085 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4086 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4087 break 2
4088 fi
4089done
4090done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004091IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004092
Guido van Rossum627b2d71993-12-24 10:39:16 +00004093fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004095RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004096if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004097 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4098echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004100 { echo "$as_me:$LINENO: result: no" >&5
4101echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004102fi
4103
Martin v. Löwiseba40652007-08-30 20:10:57 +00004104
Martin v. Löwis11437992002-04-12 09:54:03 +00004105fi
4106if test -z "$ac_cv_prog_RANLIB"; then
4107 ac_ct_RANLIB=$RANLIB
4108 # Extract the first word of "ranlib", so it can be a program name with args.
4109set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004110{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4111echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004112if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4113 echo $ECHO_N "(cached) $ECHO_C" >&6
4114else
4115 if test -n "$ac_ct_RANLIB"; then
4116 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4117else
4118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4119for as_dir in $PATH
4120do
4121 IFS=$as_save_IFS
4122 test -z "$as_dir" && as_dir=.
4123 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004124 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 +00004125 ac_cv_prog_ac_ct_RANLIB="ranlib"
4126 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4127 break 2
4128 fi
4129done
4130done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004131IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004132
Martin v. Löwis11437992002-04-12 09:54:03 +00004133fi
4134fi
4135ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4136if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4138echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004139else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004140 { echo "$as_me:$LINENO: result: no" >&5
4141echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004142fi
4143
Martin v. Löwiseba40652007-08-30 20:10:57 +00004144 if test "x$ac_ct_RANLIB" = x; then
4145 RANLIB=":"
4146 else
4147 case $cross_compiling:$ac_tool_warned in
4148yes:)
4149{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4150whose name does not start with the host triplet. If you think this
4151configuration is useful to you, please write to autoconf@gnu.org." >&5
4152echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4153whose name does not start with the host triplet. If you think this
4154configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4155ac_tool_warned=yes ;;
4156esac
4157 RANLIB=$ac_ct_RANLIB
4158 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004159else
4160 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004162
4163
Guido van Rossum7f43da71994-08-01 12:15:30 +00004164for ac_prog in ar aal
4165do
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004168{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4169echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004170if test "${ac_cv_prog_AR+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172else
4173 if test -n "$AR"; then
4174 ac_cv_prog_AR="$AR" # Let the user override the test.
4175else
Martin v. Löwis11437992002-04-12 09:54:03 +00004176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177for as_dir in $PATH
4178do
4179 IFS=$as_save_IFS
4180 test -z "$as_dir" && as_dir=.
4181 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004182 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 +00004183 ac_cv_prog_AR="$ac_prog"
4184 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4185 break 2
4186 fi
4187done
4188done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004190
Guido van Rossum7f43da71994-08-01 12:15:30 +00004191fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004193AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195 { echo "$as_me:$LINENO: result: $AR" >&5
4196echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004198 { echo "$as_me:$LINENO: result: no" >&5
4199echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004201
Martin v. Löwiseba40652007-08-30 20:10:57 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004204done
4205test -n "$AR" || AR="ar"
4206
Michael W. Hudson54241132001-12-07 15:38:26 +00004207
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004208
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004209# Extract the first word of "svnversion", so it can be a program name with args.
4210set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004211{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4212echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004213if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4214 echo $ECHO_N "(cached) $ECHO_C" >&6
4215else
4216 if test -n "$SVNVERSION"; then
4217 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4218else
4219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220for as_dir in $PATH
4221do
4222 IFS=$as_save_IFS
4223 test -z "$as_dir" && as_dir=.
4224 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004225 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 +00004226 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004227 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4228 break 2
4229 fi
4230done
4231done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004232IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004233
Martin v. Löwisff600232006-04-03 19:12:32 +00004234 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004235fi
4236fi
4237SVNVERSION=$ac_cv_prog_SVNVERSION
4238if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4240echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004241else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242 { echo "$as_me:$LINENO: result: no" >&5
4243echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004244fi
4245
Martin v. Löwiseba40652007-08-30 20:10:57 +00004246
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004247if test $SVNVERSION = found
4248then
4249 SVNVERSION="svnversion \$(srcdir)"
4250else
4251 SVNVERSION="echo exported"
4252fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004253
Neil Schemenauera42c8272001-03-31 00:01:55 +00004254case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004255bsdos*|hp*|HP*)
4256 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004257 if test -z "$INSTALL"
4258 then
4259 INSTALL="${srcdir}/install-sh -c"
4260 fi
4261esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004262ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004263for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4264 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004265 ac_aux_dir=$ac_dir
4266 ac_install_sh="$ac_aux_dir/install-sh -c"
4267 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004268 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004269 ac_aux_dir=$ac_dir
4270 ac_install_sh="$ac_aux_dir/install.sh -c"
4271 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004272 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 ac_aux_dir=$ac_dir
4274 ac_install_sh="$ac_aux_dir/shtool install -c"
4275 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004276 fi
4277done
4278if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4280echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283
4284# These three variables are undocumented and unsupported,
4285# and are intended to be withdrawn in a future Autoconf release.
4286# They can cause serious problems if a builder's source tree is in a directory
4287# whose full name contains unusual characters.
4288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4291
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004292
4293# Find a good install program. We prefer a C program (faster),
4294# so one script is as good as another. But avoid the broken or
4295# incompatible versions:
4296# SysV /etc/install, /usr/sbin/install
4297# SunOS /usr/etc/install
4298# IRIX /sbin/install
4299# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004300# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004301# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4302# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4303# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004305# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004306{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4307echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004308if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004309if test "${ac_cv_path_install+set}" = set; then
4310 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004311else
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4313for as_dir in $PATH
4314do
4315 IFS=$as_save_IFS
4316 test -z "$as_dir" && as_dir=.
4317 # Account for people who put trailing slashes in PATH elements.
4318case $as_dir/ in
4319 ./ | .// | /cC/* | \
4320 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004322 /usr/ucb/* ) ;;
4323 *)
4324 # OSF1 and SCO ODT 3.0 have their own names for install.
4325 # Don't use installbsd from OSF since it installs stuff as root
4326 # by default.
4327 for ac_prog in ginstall scoinst install; do
4328 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004329 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 +00004330 if test $ac_prog = install &&
4331 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4332 # AIX install. It has an incompatible calling convention.
4333 :
4334 elif test $ac_prog = install &&
4335 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4336 # program-specific install script used by HP pwplus--don't use.
4337 :
4338 else
4339 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4340 break 3
4341 fi
4342 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004343 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 done
4345 ;;
4346esac
4347done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004348IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004349
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004350
4351fi
4352 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004353 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004354 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004355 # As a last resort, use the slow shell script. Don't cache a
4356 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004357 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004358 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004360 fi
4361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004362{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4363echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004364
4365# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4366# It thinks the first close brace ends the variable substitution.
4367test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4368
Martin v. Löwis11437992002-04-12 09:54:03 +00004369test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004370
4371test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4372
Michael W. Hudson54241132001-12-07 15:38:26 +00004373
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004374# Not every filesystem supports hard links
4375
4376if test -z "$LN" ; then
4377 case $ac_sys_system in
4378 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004379 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004380 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004381 *) LN=ln;;
4382 esac
4383fi
4384
Fred Drake109d9862001-07-11 06:27:56 +00004385# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004386{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4387echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004388
Martin v. Löwiseba40652007-08-30 20:10:57 +00004389# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004390if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004392if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004393then
4394
4395cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004396#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004397_ACEOF
4398
Martin v. Löwiseba40652007-08-30 20:10:57 +00004399 { echo "$as_me:$LINENO: result: yes" >&5
4400echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004401 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402else { echo "$as_me:$LINENO: result: no" >&5
4403echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004404fi
4405else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004406 { echo "$as_me:$LINENO: result: no" >&5
4407echo "${ECHO_T}no" >&6; }
4408fi
4409
Fred Drake109d9862001-07-11 06:27:56 +00004410
Skip Montanarodecc6a42003-01-01 20:07:49 +00004411# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4412# merged with this chunk of code?
4413
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004414# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004415# ------------------------
4416# (The following bit of code is complicated enough - please keep things
4417# indented properly. Just pretend you're editing Python code. ;-)
4418
4419# There are two parallel sets of case statements below, one that checks to
4420# see if OPT was set and one that does BASECFLAGS setting based upon
4421# compiler and platform. BASECFLAGS tweaks need to be made even if the
4422# user set OPT.
4423
4424# tweak OPT based on compiler and platform, only if the user didn't set
4425# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004426
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004427if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004428then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004429 case $GCC in
4430 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004431 if test "$CC" != 'g++' ; then
4432 STRICT_PROTO="-Wstrict-prototypes"
4433 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004434 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4435 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4436 WRAP="-fwrapv"
4437 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004438 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004439 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004440 if test "$Py_DEBUG" = 'true' ; then
4441 # Optimization messes up debuggers, so turn it off for
4442 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004443 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004444 else
Thomas Hellere5529592007-12-13 21:20:29 +00004445 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004446 fi
4447 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004448 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004449 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004450 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004451 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004452 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004453 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4454 ;;
4455 esac
Fred Drake109d9862001-07-11 06:27:56 +00004456 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004457
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004458 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004459 OPT="-O"
4460 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004461 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004462
4463 # The current (beta) Monterey compiler dies with optimizations
4464 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004465 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004466 Monterey*)
4467 OPT=""
4468 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004469 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004470
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004471fi
4472
Skip Montanarodecc6a42003-01-01 20:07:49 +00004473
4474# tweak BASECFLAGS based on compiler and platform
4475case $GCC in
4476yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004477 # Python violates C99 rules, by casting between incompatible
4478 # pointer types. GCC may generate bad code as a result of that,
4479 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4481echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004482 ac_save_cc="$CC"
4483 CC="$CC -fno-strict-aliasing"
4484 if test "$cross_compiling" = yes; then
4485 ac_cv_no_strict_aliasing_ok=no
4486else
4487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004488/* confdefs.h. */
4489_ACEOF
4490cat confdefs.h >>conftest.$ac_ext
4491cat >>conftest.$ac_ext <<_ACEOF
4492/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004493int main() { return 0; }
4494_ACEOF
4495rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004496if { (ac_try="$ac_link"
4497case "(($ac_try" in
4498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4499 *) ac_try_echo=$ac_try;;
4500esac
4501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4502 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004503 ac_status=$?
4504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004506 { (case "(($ac_try" in
4507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4508 *) ac_try_echo=$ac_try;;
4509esac
4510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4511 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004512 ac_status=$?
4513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514 (exit $ac_status); }; }; then
4515 ac_cv_no_strict_aliasing_ok=yes
4516else
4517 echo "$as_me: program exited with status $ac_status" >&5
4518echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004519sed 's/^/| /' conftest.$ac_ext >&5
4520
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004521( exit $ac_status )
4522ac_cv_no_strict_aliasing_ok=no
4523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004524rm -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 +00004525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004526
4527
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004528 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004529 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4530echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004531 if test $ac_cv_no_strict_aliasing_ok = yes
4532 then
4533 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4534 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004535 case $ac_sys_system in
4536 SCO_SV*)
4537 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4538 ;;
4539 # is there any other compiler on Darwin besides gcc?
4540 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004541 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Ronald Oussoren988117f2006-04-29 11:31:35 +00004542 if test "${enable_universalsdk}"; then
4543 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4544 fi
4545
Skip Montanarodecc6a42003-01-01 20:07:49 +00004546 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004547 OSF*)
4548 BASECFLAGS="$BASECFLAGS -mieee"
4549 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004550 esac
4551 ;;
4552
4553*)
4554 case $ac_sys_system in
4555 OpenUNIX*|UnixWare*)
4556 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4557 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004558 OSF*)
4559 BASECFLAGS="$BASECFLAGS -ieee -std"
4560 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004561 SCO_SV*)
4562 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4563 ;;
4564 esac
4565 ;;
4566esac
4567
Fred Drakee1ceaa02001-12-04 20:55:47 +00004568if test "$Py_DEBUG" = 'true'; then
4569 :
4570else
4571 OPT="-DNDEBUG $OPT"
4572fi
4573
Guido van Rossum563e7081996-09-10 18:20:48 +00004574if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004575then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004576 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004577fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004578
Neal Norwitz020c46a2006-01-07 21:39:28 +00004579# disable check for icc since it seems to pass, but generates a warning
4580if test "$CC" = icc
4581then
4582 ac_cv_opt_olimit_ok=no
4583fi
4584
Martin v. Löwiseba40652007-08-30 20:10:57 +00004585{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4586echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004587if test "${ac_cv_opt_olimit_ok+set}" = set; then
4588 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004589else
4590 ac_save_cc="$CC"
4591CC="$CC -OPT:Olimit=0"
4592if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004593 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004594else
Martin v. Löwis11437992002-04-12 09:54:03 +00004595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004596/* confdefs.h. */
4597_ACEOF
4598cat confdefs.h >>conftest.$ac_ext
4599cat >>conftest.$ac_ext <<_ACEOF
4600/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004601int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004602_ACEOF
4603rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004604if { (ac_try="$ac_link"
4605case "(($ac_try" in
4606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4607 *) ac_try_echo=$ac_try;;
4608esac
4609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4610 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004611 ac_status=$?
4612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4613 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004614 { (case "(($ac_try" in
4615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4616 *) ac_try_echo=$ac_try;;
4617esac
4618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4619 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004620 ac_status=$?
4621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4622 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004623 ac_cv_opt_olimit_ok=yes
4624else
Martin v. Löwis11437992002-04-12 09:54:03 +00004625 echo "$as_me: program exited with status $ac_status" >&5
4626echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004627sed 's/^/| /' conftest.$ac_ext >&5
4628
Martin v. Löwis11437992002-04-12 09:54:03 +00004629( exit $ac_status )
4630ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004632rm -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 +00004633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004634
4635
Guido van Rossum91922671997-10-09 20:24:13 +00004636CC="$ac_save_cc"
4637fi
4638
Martin v. Löwiseba40652007-08-30 20:10:57 +00004639{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4640echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004641if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004642 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004643 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4644 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4645 # environment?
4646 Darwin*)
4647 ;;
4648 *)
4649 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4650 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004651 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004652else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004653 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4654echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004655 if test "${ac_cv_olimit_ok+set}" = set; then
4656 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004657else
4658 ac_save_cc="$CC"
4659 CC="$CC -Olimit 1500"
4660 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004661 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004662else
Martin v. Löwis11437992002-04-12 09:54:03 +00004663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004664/* confdefs.h. */
4665_ACEOF
4666cat confdefs.h >>conftest.$ac_ext
4667cat >>conftest.$ac_ext <<_ACEOF
4668/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004669int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004670_ACEOF
4671rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004672if { (ac_try="$ac_link"
4673case "(($ac_try" in
4674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4675 *) ac_try_echo=$ac_try;;
4676esac
4677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4678 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004679 ac_status=$?
4680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4681 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004682 { (case "(($ac_try" in
4683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4684 *) ac_try_echo=$ac_try;;
4685esac
4686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4687 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004688 ac_status=$?
4689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4690 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004691 ac_cv_olimit_ok=yes
4692else
Martin v. Löwis11437992002-04-12 09:54:03 +00004693 echo "$as_me: program exited with status $ac_status" >&5
4694echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004695sed 's/^/| /' conftest.$ac_ext >&5
4696
Martin v. Löwis11437992002-04-12 09:54:03 +00004697( exit $ac_status )
4698ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004700rm -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 +00004701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004702
4703
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004704 CC="$ac_save_cc"
4705fi
4706
Martin v. Löwiseba40652007-08-30 20:10:57 +00004707 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4708echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004709 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004710 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004711 fi
4712fi
4713
Martin v. Löwisaac13162006-10-19 10:58:46 +00004714# Check whether GCC supports PyArg_ParseTuple format
4715if test "$GCC" = "yes"
4716then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004717 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4718echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004719 save_CFLAGS=$CFLAGS
4720 CFLAGS="$CFLAGS -Werror"
4721 cat >conftest.$ac_ext <<_ACEOF
4722/* confdefs.h. */
4723_ACEOF
4724cat confdefs.h >>conftest.$ac_ext
4725cat >>conftest.$ac_ext <<_ACEOF
4726/* end confdefs.h. */
4727
4728 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4729
4730int
4731main ()
4732{
4733
4734 ;
4735 return 0;
4736}
4737_ACEOF
4738rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004739if { (ac_try="$ac_compile"
4740case "(($ac_try" in
4741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4742 *) ac_try_echo=$ac_try;;
4743esac
4744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004746 ac_status=$?
4747 grep -v '^ *+' conftest.er1 >conftest.err
4748 rm -f conftest.er1
4749 cat conftest.err >&5
4750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004751 (exit $ac_status); } && {
4752 test -z "$ac_c_werror_flag" ||
4753 test ! -s conftest.err
4754 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004755
4756cat >>confdefs.h <<\_ACEOF
4757#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4758_ACEOF
4759
Martin v. Löwiseba40652007-08-30 20:10:57 +00004760 { echo "$as_me:$LINENO: result: yes" >&5
4761echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004762else
4763 echo "$as_me: failed program was:" >&5
4764sed 's/^/| /' conftest.$ac_ext >&5
4765
Martin v. Löwiseba40652007-08-30 20:10:57 +00004766 { echo "$as_me:$LINENO: result: no" >&5
4767echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004768
4769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004770
4771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004772 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004773fi
4774
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004775# On some compilers, pthreads are available without further options
4776# (e.g. MacOS X). On some of these systems, the compiler will not
4777# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4778# So we have to see first whether pthreads are available without
4779# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004780{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4781echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004782if test "${ac_cv_pthread_is_default+set}" = set; then
4783 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004784else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004785 if test "$cross_compiling" = yes; then
4786 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004787else
Martin v. Löwis11437992002-04-12 09:54:03 +00004788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004789/* confdefs.h. */
4790_ACEOF
4791cat confdefs.h >>conftest.$ac_ext
4792cat >>conftest.$ac_ext <<_ACEOF
4793/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004794
Martin v. Löwis130fb172001-07-19 11:00:41 +00004795#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004796
4797void* routine(void* p){return NULL;}
4798
4799int main(){
4800 pthread_t p;
4801 if(pthread_create(&p,NULL,routine,NULL)!=0)
4802 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004803 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004804 return 0;
4805}
4806
Martin v. Löwis11437992002-04-12 09:54:03 +00004807_ACEOF
4808rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004809if { (ac_try="$ac_link"
4810case "(($ac_try" in
4811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4812 *) ac_try_echo=$ac_try;;
4813esac
4814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4815 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004816 ac_status=$?
4817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004819 { (case "(($ac_try" in
4820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4821 *) ac_try_echo=$ac_try;;
4822esac
4823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4824 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004825 ac_status=$?
4826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4827 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004828
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004829 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004830 ac_cv_kthread=no
4831 ac_cv_pthread=no
4832
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004833else
Martin v. Löwis11437992002-04-12 09:54:03 +00004834 echo "$as_me: program exited with status $ac_status" >&5
4835echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004836sed 's/^/| /' conftest.$ac_ext >&5
4837
Martin v. Löwis11437992002-04-12 09:54:03 +00004838( exit $ac_status )
4839ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004841rm -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 +00004842fi
4843
Martin v. Löwiseba40652007-08-30 20:10:57 +00004844
4845
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004846fi
4847
Martin v. Löwiseba40652007-08-30 20:10:57 +00004848{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4849echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004850
Michael W. Hudson54241132001-12-07 15:38:26 +00004851
Martin v. Löwis11437992002-04-12 09:54:03 +00004852if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004853then
4854 ac_cv_kpthread=no
4855else
4856# -Kpthread, if available, provides the right #defines
4857# and linker options to make pthread_create available
4858# Some compilers won't report that they do not support -Kpthread,
4859# so we need to run a program to see whether it really made the
4860# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004861{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4862echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004863if test "${ac_cv_kpthread+set}" = set; then
4864 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004865else
4866 ac_save_cc="$CC"
4867CC="$CC -Kpthread"
4868if test "$cross_compiling" = yes; then
4869 ac_cv_kpthread=no
4870else
Martin v. Löwis11437992002-04-12 09:54:03 +00004871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004872/* confdefs.h. */
4873_ACEOF
4874cat confdefs.h >>conftest.$ac_ext
4875cat >>conftest.$ac_ext <<_ACEOF
4876/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004877
4878#include <pthread.h>
4879
4880void* routine(void* p){return NULL;}
4881
4882int main(){
4883 pthread_t p;
4884 if(pthread_create(&p,NULL,routine,NULL)!=0)
4885 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004886 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004887 return 0;
4888}
4889
Martin v. Löwis11437992002-04-12 09:54:03 +00004890_ACEOF
4891rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004892if { (ac_try="$ac_link"
4893case "(($ac_try" in
4894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4895 *) ac_try_echo=$ac_try;;
4896esac
4897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4898 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004899 ac_status=$?
4900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004902 { (case "(($ac_try" in
4903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4904 *) ac_try_echo=$ac_try;;
4905esac
4906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4907 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004908 ac_status=$?
4909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4910 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004911 ac_cv_kpthread=yes
4912else
Martin v. Löwis11437992002-04-12 09:54:03 +00004913 echo "$as_me: program exited with status $ac_status" >&5
4914echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004915sed 's/^/| /' conftest.$ac_ext >&5
4916
Martin v. Löwis11437992002-04-12 09:54:03 +00004917( exit $ac_status )
4918ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004920rm -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 +00004921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922
4923
Martin v. Löwis130fb172001-07-19 11:00:41 +00004924CC="$ac_save_cc"
4925fi
4926
Martin v. Löwiseba40652007-08-30 20:10:57 +00004927{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4928echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004929fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004930
Skip Montanarod8d39a02003-07-10 20:44:10 +00004931if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004932then
4933# -Kthread, if available, provides the right #defines
4934# and linker options to make pthread_create available
4935# Some compilers won't report that they do not support -Kthread,
4936# so we need to run a program to see whether it really made the
4937# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004938{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4939echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004940if test "${ac_cv_kthread+set}" = set; then
4941 echo $ECHO_N "(cached) $ECHO_C" >&6
4942else
4943 ac_save_cc="$CC"
4944CC="$CC -Kthread"
4945if test "$cross_compiling" = yes; then
4946 ac_cv_kthread=no
4947else
4948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004949/* confdefs.h. */
4950_ACEOF
4951cat confdefs.h >>conftest.$ac_ext
4952cat >>conftest.$ac_ext <<_ACEOF
4953/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004954
4955#include <pthread.h>
4956
4957void* routine(void* p){return NULL;}
4958
4959int main(){
4960 pthread_t p;
4961 if(pthread_create(&p,NULL,routine,NULL)!=0)
4962 return 1;
4963 (void)pthread_detach(p);
4964 return 0;
4965}
4966
4967_ACEOF
4968rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004969if { (ac_try="$ac_link"
4970case "(($ac_try" in
4971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4972 *) ac_try_echo=$ac_try;;
4973esac
4974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4975 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004976 ac_status=$?
4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004979 { (case "(($ac_try" in
4980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4981 *) ac_try_echo=$ac_try;;
4982esac
4983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4984 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004985 ac_status=$?
4986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4987 (exit $ac_status); }; }; then
4988 ac_cv_kthread=yes
4989else
4990 echo "$as_me: program exited with status $ac_status" >&5
4991echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004992sed 's/^/| /' conftest.$ac_ext >&5
4993
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004994( exit $ac_status )
4995ac_cv_kthread=no
4996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004997rm -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 +00004998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004999
5000
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005001CC="$ac_save_cc"
5002fi
5003
Martin v. Löwiseba40652007-08-30 20:10:57 +00005004{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5005echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005006fi
5007
Skip Montanarod8d39a02003-07-10 20:44:10 +00005008if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005009then
5010# -pthread, if available, provides the right #defines
5011# and linker options to make pthread_create available
5012# Some compilers won't report that they do not support -pthread,
5013# so we need to run a program to see whether it really made the
5014# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005015{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5016echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005017if test "${ac_cv_thread+set}" = set; then
5018 echo $ECHO_N "(cached) $ECHO_C" >&6
5019else
5020 ac_save_cc="$CC"
5021CC="$CC -pthread"
5022if test "$cross_compiling" = yes; then
5023 ac_cv_pthread=no
5024else
5025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005026/* confdefs.h. */
5027_ACEOF
5028cat confdefs.h >>conftest.$ac_ext
5029cat >>conftest.$ac_ext <<_ACEOF
5030/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005031
5032#include <pthread.h>
5033
5034void* routine(void* p){return NULL;}
5035
5036int main(){
5037 pthread_t p;
5038 if(pthread_create(&p,NULL,routine,NULL)!=0)
5039 return 1;
5040 (void)pthread_detach(p);
5041 return 0;
5042}
5043
5044_ACEOF
5045rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005046if { (ac_try="$ac_link"
5047case "(($ac_try" in
5048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5049 *) ac_try_echo=$ac_try;;
5050esac
5051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5052 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005053 ac_status=$?
5054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005056 { (case "(($ac_try" in
5057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5058 *) ac_try_echo=$ac_try;;
5059esac
5060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5061 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005062 ac_status=$?
5063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064 (exit $ac_status); }; }; then
5065 ac_cv_pthread=yes
5066else
5067 echo "$as_me: program exited with status $ac_status" >&5
5068echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005069sed 's/^/| /' conftest.$ac_ext >&5
5070
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005071( exit $ac_status )
5072ac_cv_pthread=no
5073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005074rm -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 +00005075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005076
5077
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005078CC="$ac_save_cc"
5079fi
5080
Martin v. Löwiseba40652007-08-30 20:10:57 +00005081{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5082echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005083fi
5084
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005085# If we have set a CC compiler flag for thread support then
5086# check if it works for CXX, too.
5087ac_cv_cxx_thread=no
5088if test ! -z "$CXX"
5089then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005090{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5091echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005092ac_save_cxx="$CXX"
5093
5094if test "$ac_cv_kpthread" = "yes"
5095then
5096 CXX="$CXX -Kpthread"
5097 ac_cv_cxx_thread=yes
5098elif test "$ac_cv_kthread" = "yes"
5099then
5100 CXX="$CXX -Kthread"
5101 ac_cv_cxx_thread=yes
5102elif test "$ac_cv_pthread" = "yes"
5103then
5104 CXX="$CXX -pthread"
5105 ac_cv_cxx_thread=yes
5106fi
5107
5108if test $ac_cv_cxx_thread = yes
5109then
5110 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5111 $CXX -c conftest.$ac_ext 2>&5
5112 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5113 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5114 then
5115 ac_cv_cxx_thread=yes
5116 else
5117 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005118 fi
5119 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005121{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5122echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005123fi
5124CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005125
Michael W. Hudson54241132001-12-07 15:38:26 +00005126
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005127# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005128{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5129echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005130if test "${ac_cv_header_stdc+set}" = set; then
5131 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005132else
Martin v. Löwis11437992002-04-12 09:54:03 +00005133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005134/* confdefs.h. */
5135_ACEOF
5136cat confdefs.h >>conftest.$ac_ext
5137cat >>conftest.$ac_ext <<_ACEOF
5138/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005139#include <stdlib.h>
5140#include <stdarg.h>
5141#include <string.h>
5142#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005143
Skip Montanaro6dead952003-09-25 14:50:04 +00005144int
5145main ()
5146{
5147
5148 ;
5149 return 0;
5150}
Martin v. Löwis11437992002-04-12 09:54:03 +00005151_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005152rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005153if { (ac_try="$ac_compile"
5154case "(($ac_try" in
5155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5156 *) ac_try_echo=$ac_try;;
5157esac
5158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005161 grep -v '^ *+' conftest.er1 >conftest.err
5162 rm -f conftest.er1
5163 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005165 (exit $ac_status); } && {
5166 test -z "$ac_c_werror_flag" ||
5167 test ! -s conftest.err
5168 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005169 ac_cv_header_stdc=yes
5170else
Martin v. Löwis11437992002-04-12 09:54:03 +00005171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005172sed 's/^/| /' conftest.$ac_ext >&5
5173
Martin v. Löwiseba40652007-08-30 20:10:57 +00005174 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005176
5177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005178
5179if test $ac_cv_header_stdc = yes; then
5180 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005182/* confdefs.h. */
5183_ACEOF
5184cat confdefs.h >>conftest.$ac_ext
5185cat >>conftest.$ac_ext <<_ACEOF
5186/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005187#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005188
5189_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005191 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005192 :
5193else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005194 ac_cv_header_stdc=no
5195fi
5196rm -f conftest*
5197
5198fi
5199
5200if test $ac_cv_header_stdc = yes; then
5201 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005203/* confdefs.h. */
5204_ACEOF
5205cat confdefs.h >>conftest.$ac_ext
5206cat >>conftest.$ac_ext <<_ACEOF
5207/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005208#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005209
5210_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005212 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005213 :
5214else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005215 ac_cv_header_stdc=no
5216fi
5217rm -f conftest*
5218
5219fi
5220
5221if test $ac_cv_header_stdc = yes; then
5222 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005223 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005224 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005225else
Martin v. Löwis11437992002-04-12 09:54:03 +00005226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005227/* confdefs.h. */
5228_ACEOF
5229cat confdefs.h >>conftest.$ac_ext
5230cat >>conftest.$ac_ext <<_ACEOF
5231/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005232#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005233#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005234#if ((' ' & 0x0FF) == 0x020)
5235# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5236# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5237#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005238# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005239 (('a' <= (c) && (c) <= 'i') \
5240 || ('j' <= (c) && (c) <= 'r') \
5241 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005242# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5243#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005244
Martin v. Löwis11437992002-04-12 09:54:03 +00005245#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5246int
5247main ()
5248{
5249 int i;
5250 for (i = 0; i < 256; i++)
5251 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005252 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005253 return 2;
5254 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005255}
5256_ACEOF
5257rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005258if { (ac_try="$ac_link"
5259case "(($ac_try" in
5260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5261 *) ac_try_echo=$ac_try;;
5262esac
5263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5264 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005265 ac_status=$?
5266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5267 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005268 { (case "(($ac_try" in
5269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5270 *) ac_try_echo=$ac_try;;
5271esac
5272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5273 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005274 ac_status=$?
5275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005277 :
5278else
Martin v. Löwis11437992002-04-12 09:54:03 +00005279 echo "$as_me: program exited with status $ac_status" >&5
5280echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005281sed 's/^/| /' conftest.$ac_ext >&5
5282
Martin v. Löwis11437992002-04-12 09:54:03 +00005283( exit $ac_status )
5284ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5287fi
5288
5289
Michael W. Hudson54241132001-12-07 15:38:26 +00005290fi
5291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005292{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5293echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005294if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005295
5296cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005297#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005298_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005299
5300fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005301
Skip Montanarob9820a32004-01-17 00:16:12 +00005302# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005313 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005314do
5315as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005316{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5317echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5318if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005319 echo $ECHO_N "(cached) $ECHO_C" >&6
5320else
5321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005322/* confdefs.h. */
5323_ACEOF
5324cat confdefs.h >>conftest.$ac_ext
5325cat >>conftest.$ac_ext <<_ACEOF
5326/* end confdefs.h. */
5327$ac_includes_default
5328
5329#include <$ac_header>
5330_ACEOF
5331rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005332if { (ac_try="$ac_compile"
5333case "(($ac_try" in
5334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5335 *) ac_try_echo=$ac_try;;
5336esac
5337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5338 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005340 grep -v '^ *+' conftest.er1 >conftest.err
5341 rm -f conftest.er1
5342 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005344 (exit $ac_status); } && {
5345 test -z "$ac_c_werror_flag" ||
5346 test ! -s conftest.err
5347 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005348 eval "$as_ac_Header=yes"
5349else
5350 echo "$as_me: failed program was:" >&5
5351sed 's/^/| /' conftest.$ac_ext >&5
5352
Martin v. Löwiseba40652007-08-30 20:10:57 +00005353 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005355
5356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005358ac_res=`eval echo '${'$as_ac_Header'}'`
5359 { echo "$as_me:$LINENO: result: $ac_res" >&5
5360echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005361if test `eval echo '${'$as_ac_Header'}'` = yes; then
5362 cat >>confdefs.h <<_ACEOF
5363#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5364_ACEOF
5365
5366fi
5367
5368done
5369
5370
Martin v. Löwis11437992002-04-12 09:54:03 +00005371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
Anthony Baxter8a560de2004-10-13 15:30:56 +00005407
Martin v. Löwisc3001752005-01-23 09:27:24 +00005408
Martin v. Löwis11017b12006-01-14 18:12:57 +00005409
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005410
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005411
5412
5413
5414
5415
5416
5417
5418
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005419
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005420
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005421for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5422fcntl.h grp.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005423io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
5424shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005425unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00005426sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
5427sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005428sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5429sys/time.h \
5430sys/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 +00005431sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005432bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005433do
Martin v. Löwis11437992002-04-12 09:54:03 +00005434as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005435if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5436 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5437echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5438if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005439 echo $ECHO_N "(cached) $ECHO_C" >&6
5440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005441ac_res=`eval echo '${'$as_ac_Header'}'`
5442 { echo "$as_me:$LINENO: result: $ac_res" >&5
5443echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005444else
Martin v. Löwis11437992002-04-12 09:54:03 +00005445 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005446{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5447echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005448cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005449/* confdefs.h. */
5450_ACEOF
5451cat confdefs.h >>conftest.$ac_ext
5452cat >>conftest.$ac_ext <<_ACEOF
5453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005454$ac_includes_default
5455#include <$ac_header>
5456_ACEOF
5457rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005458if { (ac_try="$ac_compile"
5459case "(($ac_try" in
5460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5461 *) ac_try_echo=$ac_try;;
5462esac
5463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5464 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005466 grep -v '^ *+' conftest.er1 >conftest.err
5467 rm -f conftest.er1
5468 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005470 (exit $ac_status); } && {
5471 test -z "$ac_c_werror_flag" ||
5472 test ! -s conftest.err
5473 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005474 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005475else
Martin v. Löwis11437992002-04-12 09:54:03 +00005476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005477sed 's/^/| /' conftest.$ac_ext >&5
5478
Martin v. Löwiseba40652007-08-30 20:10:57 +00005479 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005481
5482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5483{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5484echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005485
5486# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005487{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5488echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005490/* confdefs.h. */
5491_ACEOF
5492cat confdefs.h >>conftest.$ac_ext
5493cat >>conftest.$ac_ext <<_ACEOF
5494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005495#include <$ac_header>
5496_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005497if { (ac_try="$ac_cpp conftest.$ac_ext"
5498case "(($ac_try" in
5499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5500 *) ac_try_echo=$ac_try;;
5501esac
5502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5503 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005504 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005505 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005506 rm -f conftest.er1
5507 cat conftest.err >&5
5508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005509 (exit $ac_status); } >/dev/null && {
5510 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5511 test ! -s conftest.err
5512 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005513 ac_header_preproc=yes
5514else
5515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005516sed 's/^/| /' conftest.$ac_ext >&5
5517
Martin v. Löwis11437992002-04-12 09:54:03 +00005518 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005520
Martin v. Löwis11437992002-04-12 09:54:03 +00005521rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005522{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5523echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005524
5525# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005526case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5527 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005528 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5529echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005530 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5531echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5532 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005533 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005534 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005535 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5536echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005537 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5538echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5539 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5540echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5541 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5542echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005543 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5544echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005545 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5546echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005547 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005548## ------------------------------------------------ ##
5549## Report this to http://www.python.org/python-bugs ##
5550## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005551_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005552 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005553 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005554esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005555{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5556echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5557if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005558 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005559else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005560 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005562ac_res=`eval echo '${'$as_ac_Header'}'`
5563 { echo "$as_me:$LINENO: result: $ac_res" >&5
5564echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005565
5566fi
5567if test `eval echo '${'$as_ac_Header'}'` = yes; then
5568 cat >>confdefs.h <<_ACEOF
5569#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5570_ACEOF
5571
5572fi
5573
Guido van Rossum627b2d71993-12-24 10:39:16 +00005574done
5575
Martin v. Löwis11437992002-04-12 09:54:03 +00005576
5577
5578
5579
5580
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005581ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005582for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5583 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005584{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5585echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5586if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005587 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005588else
Martin v. Löwis11437992002-04-12 09:54:03 +00005589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005590/* confdefs.h. */
5591_ACEOF
5592cat confdefs.h >>conftest.$ac_ext
5593cat >>conftest.$ac_ext <<_ACEOF
5594/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005595#include <sys/types.h>
5596#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005597
Martin v. Löwis11437992002-04-12 09:54:03 +00005598int
5599main ()
5600{
5601if ((DIR *) 0)
5602return 0;
5603 ;
5604 return 0;
5605}
5606_ACEOF
5607rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005608if { (ac_try="$ac_compile"
5609case "(($ac_try" in
5610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5611 *) ac_try_echo=$ac_try;;
5612esac
5613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005616 grep -v '^ *+' conftest.er1 >conftest.err
5617 rm -f conftest.er1
5618 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005620 (exit $ac_status); } && {
5621 test -z "$ac_c_werror_flag" ||
5622 test ! -s conftest.err
5623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005624 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005625else
Martin v. Löwis11437992002-04-12 09:54:03 +00005626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005627sed 's/^/| /' conftest.$ac_ext >&5
5628
Martin v. Löwiseba40652007-08-30 20:10:57 +00005629 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005631
5632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005634ac_res=`eval echo '${'$as_ac_Header'}'`
5635 { echo "$as_me:$LINENO: result: $ac_res" >&5
5636echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005637if test `eval echo '${'$as_ac_Header'}'` = yes; then
5638 cat >>confdefs.h <<_ACEOF
5639#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5640_ACEOF
5641
5642ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005643fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005644
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005645done
5646# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5647if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005648 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5649echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005650if test "${ac_cv_search_opendir+set}" = set; then
5651 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005652else
Martin v. Löwis11437992002-04-12 09:54:03 +00005653 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005654cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005655/* confdefs.h. */
5656_ACEOF
5657cat confdefs.h >>conftest.$ac_ext
5658cat >>conftest.$ac_ext <<_ACEOF
5659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005660
Martin v. Löwiseba40652007-08-30 20:10:57 +00005661/* Override any GCC internal prototype to avoid an error.
5662 Use char because int might match the return type of a GCC
5663 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005664#ifdef __cplusplus
5665extern "C"
5666#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005667char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005668int
5669main ()
5670{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005671return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005672 ;
5673 return 0;
5674}
5675_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005676for ac_lib in '' dir; do
5677 if test -z "$ac_lib"; then
5678 ac_res="none required"
5679 else
5680 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005681 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005682 fi
5683 rm -f conftest.$ac_objext conftest$ac_exeext
5684if { (ac_try="$ac_link"
5685case "(($ac_try" in
5686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5687 *) ac_try_echo=$ac_try;;
5688esac
5689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5690 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005691 ac_status=$?
5692 grep -v '^ *+' conftest.er1 >conftest.err
5693 rm -f conftest.er1
5694 cat conftest.err >&5
5695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005696 (exit $ac_status); } && {
5697 test -z "$ac_c_werror_flag" ||
5698 test ! -s conftest.err
5699 } && test -s conftest$ac_exeext &&
5700 $as_test_x conftest$ac_exeext; then
5701 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005702else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005703 echo "$as_me: failed program was:" >&5
5704sed 's/^/| /' conftest.$ac_ext >&5
5705
Martin v. Löwiseba40652007-08-30 20:10:57 +00005706
Brett Cannon19fab762007-06-02 03:02:29 +00005707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005708
5709rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5710 conftest$ac_exeext
5711 if test "${ac_cv_search_opendir+set}" = set; then
5712 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005714done
5715if test "${ac_cv_search_opendir+set}" = set; then
5716 :
5717else
5718 ac_cv_search_opendir=no
5719fi
5720rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005721LIBS=$ac_func_search_save_LIBS
5722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005723{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5724echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5725ac_res=$ac_cv_search_opendir
5726if test "$ac_res" != no; then
5727 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005728
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005729fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005730
Michael W. Hudson54241132001-12-07 15:38:26 +00005731else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005732 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5733echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005734if test "${ac_cv_search_opendir+set}" = set; then
5735 echo $ECHO_N "(cached) $ECHO_C" >&6
5736else
5737 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005738cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005739/* confdefs.h. */
5740_ACEOF
5741cat confdefs.h >>conftest.$ac_ext
5742cat >>conftest.$ac_ext <<_ACEOF
5743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005744
Martin v. Löwiseba40652007-08-30 20:10:57 +00005745/* Override any GCC internal prototype to avoid an error.
5746 Use char because int might match the return type of a GCC
5747 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005748#ifdef __cplusplus
5749extern "C"
5750#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005751char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005752int
5753main ()
5754{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005755return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005756 ;
5757 return 0;
5758}
5759_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005760for ac_lib in '' x; do
5761 if test -z "$ac_lib"; then
5762 ac_res="none required"
5763 else
5764 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005765 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005766 fi
5767 rm -f conftest.$ac_objext conftest$ac_exeext
5768if { (ac_try="$ac_link"
5769case "(($ac_try" in
5770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5771 *) ac_try_echo=$ac_try;;
5772esac
5773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5774 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005775 ac_status=$?
5776 grep -v '^ *+' conftest.er1 >conftest.err
5777 rm -f conftest.er1
5778 cat conftest.err >&5
5779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005780 (exit $ac_status); } && {
5781 test -z "$ac_c_werror_flag" ||
5782 test ! -s conftest.err
5783 } && test -s conftest$ac_exeext &&
5784 $as_test_x conftest$ac_exeext; then
5785 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005786else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005787 echo "$as_me: failed program was:" >&5
5788sed 's/^/| /' conftest.$ac_ext >&5
5789
Martin v. Löwiseba40652007-08-30 20:10:57 +00005790
Brett Cannon19fab762007-06-02 03:02:29 +00005791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005792
5793rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5794 conftest$ac_exeext
5795 if test "${ac_cv_search_opendir+set}" = set; then
5796 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005798done
5799if test "${ac_cv_search_opendir+set}" = set; then
5800 :
5801else
5802 ac_cv_search_opendir=no
5803fi
5804rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005805LIBS=$ac_func_search_save_LIBS
5806fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005807{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5808echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5809ac_res=$ac_cv_search_opendir
5810if test "$ac_res" != no; then
5811 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005812
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005813fi
5814
5815fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005816
Martin v. Löwiseba40652007-08-30 20:10:57 +00005817{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5818echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005819if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5820 echo $ECHO_N "(cached) $ECHO_C" >&6
5821else
5822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005823/* confdefs.h. */
5824_ACEOF
5825cat confdefs.h >>conftest.$ac_ext
5826cat >>conftest.$ac_ext <<_ACEOF
5827/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005828#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005829int
5830main ()
5831{
5832return makedev(0, 0);
5833 ;
5834 return 0;
5835}
5836_ACEOF
5837rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005838if { (ac_try="$ac_link"
5839case "(($ac_try" in
5840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5841 *) ac_try_echo=$ac_try;;
5842esac
5843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5844 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005846 grep -v '^ *+' conftest.er1 >conftest.err
5847 rm -f conftest.er1
5848 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005850 (exit $ac_status); } && {
5851 test -z "$ac_c_werror_flag" ||
5852 test ! -s conftest.err
5853 } && test -s conftest$ac_exeext &&
5854 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005855 ac_cv_header_sys_types_h_makedev=yes
5856else
5857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005858sed 's/^/| /' conftest.$ac_ext >&5
5859
Martin v. Löwiseba40652007-08-30 20:10:57 +00005860 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005862
5863rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005865
5866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005867{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5868echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005869
5870if test $ac_cv_header_sys_types_h_makedev = no; then
5871if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005872 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5873echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005874if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5875 echo $ECHO_N "(cached) $ECHO_C" >&6
5876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005877{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5878echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005879else
5880 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005881{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5882echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005883cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005884/* confdefs.h. */
5885_ACEOF
5886cat confdefs.h >>conftest.$ac_ext
5887cat >>conftest.$ac_ext <<_ACEOF
5888/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005889$ac_includes_default
5890#include <sys/mkdev.h>
5891_ACEOF
5892rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005893if { (ac_try="$ac_compile"
5894case "(($ac_try" in
5895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5896 *) ac_try_echo=$ac_try;;
5897esac
5898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5899 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005901 grep -v '^ *+' conftest.er1 >conftest.err
5902 rm -f conftest.er1
5903 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005905 (exit $ac_status); } && {
5906 test -z "$ac_c_werror_flag" ||
5907 test ! -s conftest.err
5908 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005909 ac_header_compiler=yes
5910else
5911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005912sed 's/^/| /' conftest.$ac_ext >&5
5913
Martin v. Löwiseba40652007-08-30 20:10:57 +00005914 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005916
5917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5918{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5919echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005920
5921# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005922{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5923echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005924cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005925/* confdefs.h. */
5926_ACEOF
5927cat confdefs.h >>conftest.$ac_ext
5928cat >>conftest.$ac_ext <<_ACEOF
5929/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005930#include <sys/mkdev.h>
5931_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005932if { (ac_try="$ac_cpp conftest.$ac_ext"
5933case "(($ac_try" in
5934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5935 *) ac_try_echo=$ac_try;;
5936esac
5937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5938 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005939 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005940 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005941 rm -f conftest.er1
5942 cat conftest.err >&5
5943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005944 (exit $ac_status); } >/dev/null && {
5945 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5946 test ! -s conftest.err
5947 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005948 ac_header_preproc=yes
5949else
5950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005951sed 's/^/| /' conftest.$ac_ext >&5
5952
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005953 ac_header_preproc=no
5954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005955
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005956rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005957{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5958echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005959
5960# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005961case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5962 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005963 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5964echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005965 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5966echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5967 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005968 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005969 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005970 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5971echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005972 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5973echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5974 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5975echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5976 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5977echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005978 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5979echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005980 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5981echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005982 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005983## ------------------------------------------------ ##
5984## Report this to http://www.python.org/python-bugs ##
5985## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005986_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005987 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005988 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005989esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5991echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005992if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5993 echo $ECHO_N "(cached) $ECHO_C" >&6
5994else
5995 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005997{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5998echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005999
6000fi
6001if test $ac_cv_header_sys_mkdev_h = yes; then
6002
6003cat >>confdefs.h <<\_ACEOF
6004#define MAJOR_IN_MKDEV 1
6005_ACEOF
6006
6007fi
6008
6009
6010
6011 if test $ac_cv_header_sys_mkdev_h = no; then
6012 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006013 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6014echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006015if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6016 echo $ECHO_N "(cached) $ECHO_C" >&6
6017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006018{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6019echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006020else
6021 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006022{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6023echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006025/* confdefs.h. */
6026_ACEOF
6027cat confdefs.h >>conftest.$ac_ext
6028cat >>conftest.$ac_ext <<_ACEOF
6029/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006030$ac_includes_default
6031#include <sys/sysmacros.h>
6032_ACEOF
6033rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006034if { (ac_try="$ac_compile"
6035case "(($ac_try" in
6036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6037 *) ac_try_echo=$ac_try;;
6038esac
6039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6040 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006042 grep -v '^ *+' conftest.er1 >conftest.err
6043 rm -f conftest.er1
6044 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006046 (exit $ac_status); } && {
6047 test -z "$ac_c_werror_flag" ||
6048 test ! -s conftest.err
6049 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050 ac_header_compiler=yes
6051else
6052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006053sed 's/^/| /' conftest.$ac_ext >&5
6054
Martin v. Löwiseba40652007-08-30 20:10:57 +00006055 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006057
6058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6059{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6060echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061
6062# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006063{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6064echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006066/* confdefs.h. */
6067_ACEOF
6068cat confdefs.h >>conftest.$ac_ext
6069cat >>conftest.$ac_ext <<_ACEOF
6070/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071#include <sys/sysmacros.h>
6072_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006073if { (ac_try="$ac_cpp conftest.$ac_ext"
6074case "(($ac_try" in
6075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6076 *) ac_try_echo=$ac_try;;
6077esac
6078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6079 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006081 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082 rm -f conftest.er1
6083 cat conftest.err >&5
6084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006085 (exit $ac_status); } >/dev/null && {
6086 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6087 test ! -s conftest.err
6088 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089 ac_header_preproc=yes
6090else
6091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006092sed 's/^/| /' conftest.$ac_ext >&5
6093
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094 ac_header_preproc=no
6095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006096
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006098{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6099echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100
6101# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006102case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6103 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6105echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006106 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6107echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6108 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006109 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006110 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006111 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6112echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006113 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6114echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6115 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6116echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6117 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6118echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006119 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6120echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006121 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6122echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006123 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006124## ------------------------------------------------ ##
6125## Report this to http://www.python.org/python-bugs ##
6126## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006127_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006128 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006129 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006131{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6132echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006133if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6134 echo $ECHO_N "(cached) $ECHO_C" >&6
6135else
6136 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006138{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6139echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140
6141fi
6142if test $ac_cv_header_sys_sysmacros_h = yes; then
6143
6144cat >>confdefs.h <<\_ACEOF
6145#define MAJOR_IN_SYSMACROS 1
6146_ACEOF
6147
6148fi
6149
6150
6151 fi
6152fi
6153
Michael W. Hudson54241132001-12-07 15:38:26 +00006154
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006155# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006156
6157for ac_header in term.h
6158do
6159as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006160{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6161echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6162if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006163 echo $ECHO_N "(cached) $ECHO_C" >&6
6164else
6165 cat >conftest.$ac_ext <<_ACEOF
6166/* confdefs.h. */
6167_ACEOF
6168cat confdefs.h >>conftest.$ac_ext
6169cat >>conftest.$ac_ext <<_ACEOF
6170/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006171
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006172#ifdef HAVE_CURSES_H
6173#include <curses.h>
6174#endif
6175
6176
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006177#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006178_ACEOF
6179rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006180if { (ac_try="$ac_compile"
6181case "(($ac_try" in
6182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6183 *) ac_try_echo=$ac_try;;
6184esac
6185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006187 ac_status=$?
6188 grep -v '^ *+' conftest.er1 >conftest.err
6189 rm -f conftest.er1
6190 cat conftest.err >&5
6191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006192 (exit $ac_status); } && {
6193 test -z "$ac_c_werror_flag" ||
6194 test ! -s conftest.err
6195 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006196 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006197else
6198 echo "$as_me: failed program was:" >&5
6199sed 's/^/| /' conftest.$ac_ext >&5
6200
Martin v. Löwiseba40652007-08-30 20:10:57 +00006201 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006203
6204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206ac_res=`eval echo '${'$as_ac_Header'}'`
6207 { echo "$as_me:$LINENO: result: $ac_res" >&5
6208echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006209if test `eval echo '${'$as_ac_Header'}'` = yes; then
6210 cat >>confdefs.h <<_ACEOF
6211#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6212_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006213
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006214fi
6215
6216done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006217
6218
Martin v. Löwis11017b12006-01-14 18:12:57 +00006219# On Linux, netlink.h requires asm/types.h
6220
6221for ac_header in linux/netlink.h
6222do
6223as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006224{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6225echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6226if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006227 echo $ECHO_N "(cached) $ECHO_C" >&6
6228else
6229 cat >conftest.$ac_ext <<_ACEOF
6230/* confdefs.h. */
6231_ACEOF
6232cat confdefs.h >>conftest.$ac_ext
6233cat >>conftest.$ac_ext <<_ACEOF
6234/* end confdefs.h. */
6235
6236#ifdef HAVE_ASM_TYPES_H
6237#include <asm/types.h>
6238#endif
6239#ifdef HAVE_SYS_SOCKET_H
6240#include <sys/socket.h>
6241#endif
6242
6243
6244#include <$ac_header>
6245_ACEOF
6246rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006247if { (ac_try="$ac_compile"
6248case "(($ac_try" in
6249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6250 *) ac_try_echo=$ac_try;;
6251esac
6252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6253 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006254 ac_status=$?
6255 grep -v '^ *+' conftest.er1 >conftest.err
6256 rm -f conftest.er1
6257 cat conftest.err >&5
6258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006259 (exit $ac_status); } && {
6260 test -z "$ac_c_werror_flag" ||
6261 test ! -s conftest.err
6262 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006263 eval "$as_ac_Header=yes"
6264else
6265 echo "$as_me: failed program was:" >&5
6266sed 's/^/| /' conftest.$ac_ext >&5
6267
Martin v. Löwiseba40652007-08-30 20:10:57 +00006268 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006270
6271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006273ac_res=`eval echo '${'$as_ac_Header'}'`
6274 { echo "$as_me:$LINENO: result: $ac_res" >&5
6275echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006276if test `eval echo '${'$as_ac_Header'}'` = yes; then
6277 cat >>confdefs.h <<_ACEOF
6278#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6279_ACEOF
6280
6281fi
6282
6283done
6284
6285
Guido van Rossum627b2d71993-12-24 10:39:16 +00006286# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006287was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006288{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6289echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006291/* confdefs.h. */
6292_ACEOF
6293cat confdefs.h >>conftest.$ac_ext
6294cat >>conftest.$ac_ext <<_ACEOF
6295/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006296#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006297
6298_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006300 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006301 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006302else
Martin v. Löwis11437992002-04-12 09:54:03 +00006303
6304
6305cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006306#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006307_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006308
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006309
Guido van Rossum627b2d71993-12-24 10:39:16 +00006310fi
6311rm -f conftest*
6312
Martin v. Löwiseba40652007-08-30 20:10:57 +00006313{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6314echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006315
Neal Norwitz11690112002-07-30 01:08:28 +00006316# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006317{ echo "$as_me:$LINENO: checking for makedev" >&5
6318echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006319cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006320/* confdefs.h. */
6321_ACEOF
6322cat confdefs.h >>conftest.$ac_ext
6323cat >>conftest.$ac_ext <<_ACEOF
6324/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006325#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006326int
6327main ()
6328{
6329 makedev(0, 0)
6330 ;
6331 return 0;
6332}
6333_ACEOF
6334rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006335if { (ac_try="$ac_link"
6336case "(($ac_try" in
6337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6338 *) ac_try_echo=$ac_try;;
6339esac
6340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6341 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006343 grep -v '^ *+' conftest.er1 >conftest.err
6344 rm -f conftest.er1
6345 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006347 (exit $ac_status); } && {
6348 test -z "$ac_c_werror_flag" ||
6349 test ! -s conftest.err
6350 } && test -s conftest$ac_exeext &&
6351 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006352 ac_cv_has_makedev=yes
6353else
6354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006355sed 's/^/| /' conftest.$ac_ext >&5
6356
Martin v. Löwiseba40652007-08-30 20:10:57 +00006357 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006359
6360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006361 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006362if test "$ac_cv_has_makedev" = "no"; then
6363 # we didn't link, try if _OSF_SOURCE will allow us to link
6364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006365/* confdefs.h. */
6366_ACEOF
6367cat confdefs.h >>conftest.$ac_ext
6368cat >>conftest.$ac_ext <<_ACEOF
6369/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006370
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006371#define _OSF_SOURCE 1
6372#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006373
Neal Norwitz11690112002-07-30 01:08:28 +00006374int
6375main ()
6376{
6377 makedev(0, 0)
6378 ;
6379 return 0;
6380}
6381_ACEOF
6382rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006383if { (ac_try="$ac_link"
6384case "(($ac_try" in
6385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6386 *) ac_try_echo=$ac_try;;
6387esac
6388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6389 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006391 grep -v '^ *+' conftest.er1 >conftest.err
6392 rm -f conftest.er1
6393 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006395 (exit $ac_status); } && {
6396 test -z "$ac_c_werror_flag" ||
6397 test ! -s conftest.err
6398 } && test -s conftest$ac_exeext &&
6399 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006400 ac_cv_has_makedev=yes
6401else
6402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006403sed 's/^/| /' conftest.$ac_ext >&5
6404
Martin v. Löwiseba40652007-08-30 20:10:57 +00006405 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006407
6408rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006409 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006410 if test "$ac_cv_has_makedev" = "yes"; then
6411
6412cat >>confdefs.h <<\_ACEOF
6413#define _OSF_SOURCE 1
6414_ACEOF
6415
6416 fi
6417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006418{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6419echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006420if test "$ac_cv_has_makedev" = "yes"; then
6421
6422cat >>confdefs.h <<\_ACEOF
6423#define HAVE_MAKEDEV 1
6424_ACEOF
6425
6426fi
6427
Martin v. Löwis399a6892002-10-04 10:22:02 +00006428# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6429# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6430# defined, but the compiler does not support pragma redefine_extname,
6431# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6432# structures (such as rlimit64) without declaring them. As a
6433# work-around, disable LFS on such configurations
6434
6435use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006436{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6437echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006439/* confdefs.h. */
6440_ACEOF
6441cat confdefs.h >>conftest.$ac_ext
6442cat >>conftest.$ac_ext <<_ACEOF
6443/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006444
6445#define _LARGEFILE_SOURCE 1
6446#define _FILE_OFFSET_BITS 64
6447#include <sys/resource.h>
6448
Martin v. Löwis399a6892002-10-04 10:22:02 +00006449int
6450main ()
6451{
6452struct rlimit foo;
6453 ;
6454 return 0;
6455}
6456_ACEOF
6457rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006458if { (ac_try="$ac_compile"
6459case "(($ac_try" in
6460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6461 *) ac_try_echo=$ac_try;;
6462esac
6463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6464 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006466 grep -v '^ *+' conftest.er1 >conftest.err
6467 rm -f conftest.er1
6468 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006470 (exit $ac_status); } && {
6471 test -z "$ac_c_werror_flag" ||
6472 test ! -s conftest.err
6473 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006474 sol_lfs_bug=no
6475else
6476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006477sed 's/^/| /' conftest.$ac_ext >&5
6478
Martin v. Löwiseba40652007-08-30 20:10:57 +00006479 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006481
6482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6483{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6484echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006485if test "$sol_lfs_bug" = "yes"; then
6486 use_lfs=no
6487fi
6488
6489if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006490# Two defines needed to enable largefile support on various platforms
6491# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006492
Martin v. Löwis11437992002-04-12 09:54:03 +00006493cat >>confdefs.h <<\_ACEOF
6494#define _LARGEFILE_SOURCE 1
6495_ACEOF
6496
6497
6498cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006499#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006500_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006501
Martin v. Löwis399a6892002-10-04 10:22:02 +00006502fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006503
Guido van Rossum84e7b241996-08-19 21:59:00 +00006504# Add some code to confdefs.h so that the test for off_t works on SCO
6505cat >> confdefs.h <<\EOF
6506#if defined(SCO_DS)
6507#undef _OFF_T
6508#endif
6509EOF
6510
Guido van Rossumef2255b2000-03-10 22:30:29 +00006511# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006512{ echo "$as_me:$LINENO: checking for mode_t" >&5
6513echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006514if test "${ac_cv_type_mode_t+set}" = set; then
6515 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006516else
Martin v. Löwis11437992002-04-12 09:54:03 +00006517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006518/* confdefs.h. */
6519_ACEOF
6520cat confdefs.h >>conftest.$ac_ext
6521cat >>conftest.$ac_ext <<_ACEOF
6522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006523$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006524typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006525int
6526main ()
6527{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006528if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006529 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006530if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006531 return 0;
6532 ;
6533 return 0;
6534}
6535_ACEOF
6536rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006537if { (ac_try="$ac_compile"
6538case "(($ac_try" in
6539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6540 *) ac_try_echo=$ac_try;;
6541esac
6542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006545 grep -v '^ *+' conftest.er1 >conftest.err
6546 rm -f conftest.er1
6547 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006549 (exit $ac_status); } && {
6550 test -z "$ac_c_werror_flag" ||
6551 test ! -s conftest.err
6552 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006553 ac_cv_type_mode_t=yes
6554else
Martin v. Löwis11437992002-04-12 09:54:03 +00006555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006556sed 's/^/| /' conftest.$ac_ext >&5
6557
Martin v. Löwiseba40652007-08-30 20:10:57 +00006558 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006560
6561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006563{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6564echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006565if test $ac_cv_type_mode_t = yes; then
6566 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567else
Martin v. Löwis11437992002-04-12 09:54:03 +00006568
6569cat >>confdefs.h <<_ACEOF
6570#define mode_t int
6571_ACEOF
6572
6573fi
6574
Martin v. Löwiseba40652007-08-30 20:10:57 +00006575{ echo "$as_me:$LINENO: checking for off_t" >&5
6576echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006577if test "${ac_cv_type_off_t+set}" = set; then
6578 echo $ECHO_N "(cached) $ECHO_C" >&6
6579else
6580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006581/* confdefs.h. */
6582_ACEOF
6583cat confdefs.h >>conftest.$ac_ext
6584cat >>conftest.$ac_ext <<_ACEOF
6585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006586$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006587typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006588int
6589main ()
6590{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006591if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006592 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006593if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006594 return 0;
6595 ;
6596 return 0;
6597}
6598_ACEOF
6599rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006600if { (ac_try="$ac_compile"
6601case "(($ac_try" in
6602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6603 *) ac_try_echo=$ac_try;;
6604esac
6605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6606 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006608 grep -v '^ *+' conftest.er1 >conftest.err
6609 rm -f conftest.er1
6610 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006612 (exit $ac_status); } && {
6613 test -z "$ac_c_werror_flag" ||
6614 test ! -s conftest.err
6615 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006616 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006617else
Martin v. Löwis11437992002-04-12 09:54:03 +00006618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006619sed 's/^/| /' conftest.$ac_ext >&5
6620
Martin v. Löwiseba40652007-08-30 20:10:57 +00006621 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006623
6624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006626{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6627echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006628if test $ac_cv_type_off_t = yes; then
6629 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006630else
Martin v. Löwis11437992002-04-12 09:54:03 +00006631
6632cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006633#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006634_ACEOF
6635
6636fi
6637
Martin v. Löwiseba40652007-08-30 20:10:57 +00006638{ echo "$as_me:$LINENO: checking for pid_t" >&5
6639echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006640if test "${ac_cv_type_pid_t+set}" = set; then
6641 echo $ECHO_N "(cached) $ECHO_C" >&6
6642else
6643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006644/* confdefs.h. */
6645_ACEOF
6646cat confdefs.h >>conftest.$ac_ext
6647cat >>conftest.$ac_ext <<_ACEOF
6648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006649$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006650typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006651int
6652main ()
6653{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006654if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006655 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006656if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006657 return 0;
6658 ;
6659 return 0;
6660}
6661_ACEOF
6662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006663if { (ac_try="$ac_compile"
6664case "(($ac_try" in
6665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6666 *) ac_try_echo=$ac_try;;
6667esac
6668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006671 grep -v '^ *+' conftest.er1 >conftest.err
6672 rm -f conftest.er1
6673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006675 (exit $ac_status); } && {
6676 test -z "$ac_c_werror_flag" ||
6677 test ! -s conftest.err
6678 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006679 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006680else
Martin v. Löwis11437992002-04-12 09:54:03 +00006681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006682sed 's/^/| /' conftest.$ac_ext >&5
6683
Martin v. Löwiseba40652007-08-30 20:10:57 +00006684 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006686
6687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006689{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6690echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006691if test $ac_cv_type_pid_t = yes; then
6692 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006693else
Martin v. Löwis11437992002-04-12 09:54:03 +00006694
6695cat >>confdefs.h <<_ACEOF
6696#define pid_t int
6697_ACEOF
6698
6699fi
6700
Martin v. Löwiseba40652007-08-30 20:10:57 +00006701{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6702echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006703if test "${ac_cv_type_signal+set}" = set; then
6704 echo $ECHO_N "(cached) $ECHO_C" >&6
6705else
6706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006707/* confdefs.h. */
6708_ACEOF
6709cat confdefs.h >>conftest.$ac_ext
6710cat >>conftest.$ac_ext <<_ACEOF
6711/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006712#include <sys/types.h>
6713#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006714
Martin v. Löwis11437992002-04-12 09:54:03 +00006715int
6716main ()
6717{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006718return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006719 ;
6720 return 0;
6721}
6722_ACEOF
6723rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006724if { (ac_try="$ac_compile"
6725case "(($ac_try" in
6726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6727 *) ac_try_echo=$ac_try;;
6728esac
6729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006732 grep -v '^ *+' conftest.er1 >conftest.err
6733 rm -f conftest.er1
6734 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006736 (exit $ac_status); } && {
6737 test -z "$ac_c_werror_flag" ||
6738 test ! -s conftest.err
6739 } && test -s conftest.$ac_objext; then
6740 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006741else
Martin v. Löwis11437992002-04-12 09:54:03 +00006742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006743sed 's/^/| /' conftest.$ac_ext >&5
6744
Martin v. Löwiseba40652007-08-30 20:10:57 +00006745 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006747
6748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6751echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006754#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006755_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006756
Michael W. Hudson54241132001-12-07 15:38:26 +00006757
Martin v. Löwiseba40652007-08-30 20:10:57 +00006758{ echo "$as_me:$LINENO: checking for size_t" >&5
6759echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006760if test "${ac_cv_type_size_t+set}" = set; then
6761 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006762else
Martin v. Löwis11437992002-04-12 09:54:03 +00006763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006764/* confdefs.h. */
6765_ACEOF
6766cat confdefs.h >>conftest.$ac_ext
6767cat >>conftest.$ac_ext <<_ACEOF
6768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006769$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006770typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006771int
6772main ()
6773{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006774if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006775 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006776if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006777 return 0;
6778 ;
6779 return 0;
6780}
6781_ACEOF
6782rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006783if { (ac_try="$ac_compile"
6784case "(($ac_try" in
6785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6786 *) ac_try_echo=$ac_try;;
6787esac
6788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006791 grep -v '^ *+' conftest.er1 >conftest.err
6792 rm -f conftest.er1
6793 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006795 (exit $ac_status); } && {
6796 test -z "$ac_c_werror_flag" ||
6797 test ! -s conftest.err
6798 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006799 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006800else
Martin v. Löwis11437992002-04-12 09:54:03 +00006801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006802sed 's/^/| /' conftest.$ac_ext >&5
6803
Martin v. Löwiseba40652007-08-30 20:10:57 +00006804 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006806
6807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6810echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006811if test $ac_cv_type_size_t = yes; then
6812 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006813else
Martin v. Löwis11437992002-04-12 09:54:03 +00006814
6815cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006816#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006817_ACEOF
6818
6819fi
6820
Martin v. Löwiseba40652007-08-30 20:10:57 +00006821{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6822echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006823if test "${ac_cv_type_uid_t+set}" = set; then
6824 echo $ECHO_N "(cached) $ECHO_C" >&6
6825else
6826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006827/* confdefs.h. */
6828_ACEOF
6829cat confdefs.h >>conftest.$ac_ext
6830cat >>conftest.$ac_ext <<_ACEOF
6831/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006832#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006833
6834_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006836 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006837 ac_cv_type_uid_t=yes
6838else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006839 ac_cv_type_uid_t=no
6840fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841rm -f conftest*
6842
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6845echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006846if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006847
Martin v. Löwis11437992002-04-12 09:54:03 +00006848cat >>confdefs.h <<\_ACEOF
6849#define uid_t int
6850_ACEOF
6851
6852
6853cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006854#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006855_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006856
6857fi
6858
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6860echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006861if test "${ac_cv_type_ssize_t+set}" = set; then
6862 echo $ECHO_N "(cached) $ECHO_C" >&6
6863else
6864 cat >conftest.$ac_ext <<_ACEOF
6865/* confdefs.h. */
6866_ACEOF
6867cat confdefs.h >>conftest.$ac_ext
6868cat >>conftest.$ac_ext <<_ACEOF
6869/* end confdefs.h. */
6870$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006871typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006872int
6873main ()
6874{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006875if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006876 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006877if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006878 return 0;
6879 ;
6880 return 0;
6881}
6882_ACEOF
6883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006884if { (ac_try="$ac_compile"
6885case "(($ac_try" in
6886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6887 *) ac_try_echo=$ac_try;;
6888esac
6889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006891 ac_status=$?
6892 grep -v '^ *+' conftest.er1 >conftest.err
6893 rm -f conftest.er1
6894 cat conftest.err >&5
6895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006896 (exit $ac_status); } && {
6897 test -z "$ac_c_werror_flag" ||
6898 test ! -s conftest.err
6899 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006900 ac_cv_type_ssize_t=yes
6901else
6902 echo "$as_me: failed program was:" >&5
6903sed 's/^/| /' conftest.$ac_ext >&5
6904
Martin v. Löwiseba40652007-08-30 20:10:57 +00006905 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006907
6908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006910{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6911echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006912if test $ac_cv_type_ssize_t = yes; then
6913
6914cat >>confdefs.h <<\_ACEOF
6915#define HAVE_SSIZE_T 1
6916_ACEOF
6917
6918fi
6919
Jack Jansendd19cf82001-12-06 22:36:17 +00006920
Michael W. Hudson54241132001-12-07 15:38:26 +00006921# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006922# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006923{ echo "$as_me:$LINENO: checking for int" >&5
6924echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006925if test "${ac_cv_type_int+set}" = set; then
6926 echo $ECHO_N "(cached) $ECHO_C" >&6
6927else
6928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006929/* confdefs.h. */
6930_ACEOF
6931cat confdefs.h >>conftest.$ac_ext
6932cat >>conftest.$ac_ext <<_ACEOF
6933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006934$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006935typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006936int
6937main ()
6938{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006940 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006941if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006942 return 0;
6943 ;
6944 return 0;
6945}
6946_ACEOF
6947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006948if { (ac_try="$ac_compile"
6949case "(($ac_try" in
6950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6951 *) ac_try_echo=$ac_try;;
6952esac
6953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006956 grep -v '^ *+' conftest.er1 >conftest.err
6957 rm -f conftest.er1
6958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006960 (exit $ac_status); } && {
6961 test -z "$ac_c_werror_flag" ||
6962 test ! -s conftest.err
6963 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006964 ac_cv_type_int=yes
6965else
6966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006967sed 's/^/| /' conftest.$ac_ext >&5
6968
Martin v. Löwiseba40652007-08-30 20:10:57 +00006969 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006970fi
Brett Cannon19fab762007-06-02 03:02:29 +00006971
Martin v. Löwiseba40652007-08-30 20:10:57 +00006972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6973fi
6974{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6975echo "${ECHO_T}$ac_cv_type_int" >&6; }
6976
6977# The cast to long int works around a bug in the HP C Compiler
6978# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6979# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6980# This bug is HP SR number 8606223364.
6981{ echo "$as_me:$LINENO: checking size of int" >&5
6982echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006983if test "${ac_cv_sizeof_int+set}" = set; then
6984 echo $ECHO_N "(cached) $ECHO_C" >&6
6985else
Martin v. Löwis11437992002-04-12 09:54:03 +00006986 if test "$cross_compiling" = yes; then
6987 # Depending upon the size, compute the lo and hi bounds.
6988cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006989/* confdefs.h. */
6990_ACEOF
6991cat confdefs.h >>conftest.$ac_ext
6992cat >>conftest.$ac_ext <<_ACEOF
6993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006994$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006995 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006996int
6997main ()
6998{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006999static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007000test_array [0] = 0
7001
7002 ;
7003 return 0;
7004}
7005_ACEOF
7006rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007007if { (ac_try="$ac_compile"
7008case "(($ac_try" in
7009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7010 *) ac_try_echo=$ac_try;;
7011esac
7012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7013 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007015 grep -v '^ *+' conftest.er1 >conftest.err
7016 rm -f conftest.er1
7017 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007019 (exit $ac_status); } && {
7020 test -z "$ac_c_werror_flag" ||
7021 test ! -s conftest.err
7022 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007023 ac_lo=0 ac_mid=0
7024 while :; do
7025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007026/* confdefs.h. */
7027_ACEOF
7028cat confdefs.h >>conftest.$ac_ext
7029cat >>conftest.$ac_ext <<_ACEOF
7030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007031$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007032 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007033int
7034main ()
7035{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007036static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007037test_array [0] = 0
7038
7039 ;
7040 return 0;
7041}
7042_ACEOF
7043rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007044if { (ac_try="$ac_compile"
7045case "(($ac_try" in
7046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7047 *) ac_try_echo=$ac_try;;
7048esac
7049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007052 grep -v '^ *+' conftest.er1 >conftest.err
7053 rm -f conftest.er1
7054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007056 (exit $ac_status); } && {
7057 test -z "$ac_c_werror_flag" ||
7058 test ! -s conftest.err
7059 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007060 ac_hi=$ac_mid; break
7061else
7062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007063sed 's/^/| /' conftest.$ac_ext >&5
7064
Martin v. Löwiseba40652007-08-30 20:10:57 +00007065 ac_lo=`expr $ac_mid + 1`
7066 if test $ac_lo -le $ac_mid; then
7067 ac_lo= ac_hi=
7068 break
7069 fi
7070 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007072
7073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007074 done
7075else
7076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007077sed 's/^/| /' conftest.$ac_ext >&5
7078
Martin v. Löwiseba40652007-08-30 20:10:57 +00007079 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007080/* confdefs.h. */
7081_ACEOF
7082cat confdefs.h >>conftest.$ac_ext
7083cat >>conftest.$ac_ext <<_ACEOF
7084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007085$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007086 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007087int
7088main ()
7089{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007090static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007091test_array [0] = 0
7092
7093 ;
7094 return 0;
7095}
7096_ACEOF
7097rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007098if { (ac_try="$ac_compile"
7099case "(($ac_try" in
7100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7101 *) ac_try_echo=$ac_try;;
7102esac
7103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007106 grep -v '^ *+' conftest.er1 >conftest.err
7107 rm -f conftest.er1
7108 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007110 (exit $ac_status); } && {
7111 test -z "$ac_c_werror_flag" ||
7112 test ! -s conftest.err
7113 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007114 ac_hi=-1 ac_mid=-1
7115 while :; do
7116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007117/* confdefs.h. */
7118_ACEOF
7119cat confdefs.h >>conftest.$ac_ext
7120cat >>conftest.$ac_ext <<_ACEOF
7121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007122$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007123 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007124int
7125main ()
7126{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007127static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007128test_array [0] = 0
7129
7130 ;
7131 return 0;
7132}
7133_ACEOF
7134rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007135if { (ac_try="$ac_compile"
7136case "(($ac_try" in
7137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7138 *) ac_try_echo=$ac_try;;
7139esac
7140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007143 grep -v '^ *+' conftest.er1 >conftest.err
7144 rm -f conftest.er1
7145 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007147 (exit $ac_status); } && {
7148 test -z "$ac_c_werror_flag" ||
7149 test ! -s conftest.err
7150 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007151 ac_lo=$ac_mid; break
7152else
7153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007154sed 's/^/| /' conftest.$ac_ext >&5
7155
Martin v. Löwiseba40652007-08-30 20:10:57 +00007156 ac_hi=`expr '(' $ac_mid ')' - 1`
7157 if test $ac_mid -le $ac_hi; then
7158 ac_lo= ac_hi=
7159 break
7160 fi
7161 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007163
7164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007165 done
7166else
7167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007168sed 's/^/| /' conftest.$ac_ext >&5
7169
Martin v. Löwiseba40652007-08-30 20:10:57 +00007170 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007172
7173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007175
7176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007177# Binary search between lo and hi bounds.
7178while test "x$ac_lo" != "x$ac_hi"; do
7179 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007181/* confdefs.h. */
7182_ACEOF
7183cat confdefs.h >>conftest.$ac_ext
7184cat >>conftest.$ac_ext <<_ACEOF
7185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007186$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007187 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007188int
7189main ()
7190{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007192test_array [0] = 0
7193
7194 ;
7195 return 0;
7196}
7197_ACEOF
7198rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007199if { (ac_try="$ac_compile"
7200case "(($ac_try" in
7201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7202 *) ac_try_echo=$ac_try;;
7203esac
7204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007207 grep -v '^ *+' conftest.er1 >conftest.err
7208 rm -f conftest.er1
7209 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007211 (exit $ac_status); } && {
7212 test -z "$ac_c_werror_flag" ||
7213 test ! -s conftest.err
7214 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007215 ac_hi=$ac_mid
7216else
7217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007218sed 's/^/| /' conftest.$ac_ext >&5
7219
Martin v. Löwiseba40652007-08-30 20:10:57 +00007220 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007222
7223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007224done
7225case $ac_lo in
7226?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007227'') if test "$ac_cv_type_int" = yes; then
7228 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007229See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007230echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007231See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007232 { (exit 77); exit 77; }; }
7233 else
7234 ac_cv_sizeof_int=0
7235 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007236esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007237else
Martin v. Löwis11437992002-04-12 09:54:03 +00007238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007239/* confdefs.h. */
7240_ACEOF
7241cat confdefs.h >>conftest.$ac_ext
7242cat >>conftest.$ac_ext <<_ACEOF
7243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007244$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007245 typedef int ac__type_sizeof_;
7246static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7247static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007248#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007249#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007250int
7251main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007252{
Martin v. Löwis11437992002-04-12 09:54:03 +00007253
7254 FILE *f = fopen ("conftest.val", "w");
7255 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007256 return 1;
7257 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007258 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007259 long int i = longval ();
7260 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7261 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007262 fprintf (f, "%ld\n", i);
7263 }
7264 else
7265 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007266 unsigned long int i = ulongval ();
7267 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7268 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007269 fprintf (f, "%lu\n", i);
7270 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007271 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007272
7273 ;
7274 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007275}
Martin v. Löwis11437992002-04-12 09:54:03 +00007276_ACEOF
7277rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007278if { (ac_try="$ac_link"
7279case "(($ac_try" in
7280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7281 *) ac_try_echo=$ac_try;;
7282esac
7283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7284 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007285 ac_status=$?
7286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7287 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007288 { (case "(($ac_try" in
7289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7290 *) ac_try_echo=$ac_try;;
7291esac
7292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7293 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007294 ac_status=$?
7295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7296 (exit $ac_status); }; }; then
7297 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007298else
Martin v. Löwis11437992002-04-12 09:54:03 +00007299 echo "$as_me: program exited with status $ac_status" >&5
7300echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007301sed 's/^/| /' conftest.$ac_ext >&5
7302
Martin v. Löwis11437992002-04-12 09:54:03 +00007303( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007304if test "$ac_cv_type_int" = yes; then
7305 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007306See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007307echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007308See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007309 { (exit 77); exit 77; }; }
7310 else
7311 ac_cv_sizeof_int=0
7312 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007313fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007314rm -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 +00007315fi
7316rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007318{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7319echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7320
7321
7322
Martin v. Löwis11437992002-04-12 09:54:03 +00007323cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007324#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007325_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007326
7327
Martin v. Löwiseba40652007-08-30 20:10:57 +00007328{ echo "$as_me:$LINENO: checking for long" >&5
7329echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007330if test "${ac_cv_type_long+set}" = set; then
7331 echo $ECHO_N "(cached) $ECHO_C" >&6
7332else
7333 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007334/* confdefs.h. */
7335_ACEOF
7336cat confdefs.h >>conftest.$ac_ext
7337cat >>conftest.$ac_ext <<_ACEOF
7338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007339$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007340typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007341int
7342main ()
7343{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007344if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007345 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007346if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007347 return 0;
7348 ;
7349 return 0;
7350}
7351_ACEOF
7352rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007353if { (ac_try="$ac_compile"
7354case "(($ac_try" in
7355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7356 *) ac_try_echo=$ac_try;;
7357esac
7358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007361 grep -v '^ *+' conftest.er1 >conftest.err
7362 rm -f conftest.er1
7363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007365 (exit $ac_status); } && {
7366 test -z "$ac_c_werror_flag" ||
7367 test ! -s conftest.err
7368 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007369 ac_cv_type_long=yes
7370else
7371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007372sed 's/^/| /' conftest.$ac_ext >&5
7373
Martin v. Löwiseba40652007-08-30 20:10:57 +00007374 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007375fi
Brett Cannon19fab762007-06-02 03:02:29 +00007376
Martin v. Löwiseba40652007-08-30 20:10:57 +00007377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7378fi
7379{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7380echo "${ECHO_T}$ac_cv_type_long" >&6; }
7381
7382# The cast to long int works around a bug in the HP C Compiler
7383# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7384# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7385# This bug is HP SR number 8606223364.
7386{ echo "$as_me:$LINENO: checking size of long" >&5
7387echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007388if test "${ac_cv_sizeof_long+set}" = set; then
7389 echo $ECHO_N "(cached) $ECHO_C" >&6
7390else
Martin v. Löwis11437992002-04-12 09:54:03 +00007391 if test "$cross_compiling" = yes; then
7392 # Depending upon the size, compute the lo and hi bounds.
7393cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007394/* confdefs.h. */
7395_ACEOF
7396cat confdefs.h >>conftest.$ac_ext
7397cat >>conftest.$ac_ext <<_ACEOF
7398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007399$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007400 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007401int
7402main ()
7403{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007404static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007405test_array [0] = 0
7406
7407 ;
7408 return 0;
7409}
7410_ACEOF
7411rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007412if { (ac_try="$ac_compile"
7413case "(($ac_try" in
7414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7415 *) ac_try_echo=$ac_try;;
7416esac
7417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7418 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007420 grep -v '^ *+' conftest.er1 >conftest.err
7421 rm -f conftest.er1
7422 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007424 (exit $ac_status); } && {
7425 test -z "$ac_c_werror_flag" ||
7426 test ! -s conftest.err
7427 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007428 ac_lo=0 ac_mid=0
7429 while :; do
7430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007431/* confdefs.h. */
7432_ACEOF
7433cat confdefs.h >>conftest.$ac_ext
7434cat >>conftest.$ac_ext <<_ACEOF
7435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007436$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007437 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007438int
7439main ()
7440{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007441static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007442test_array [0] = 0
7443
7444 ;
7445 return 0;
7446}
7447_ACEOF
7448rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007449if { (ac_try="$ac_compile"
7450case "(($ac_try" in
7451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7452 *) ac_try_echo=$ac_try;;
7453esac
7454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007457 grep -v '^ *+' conftest.er1 >conftest.err
7458 rm -f conftest.er1
7459 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007461 (exit $ac_status); } && {
7462 test -z "$ac_c_werror_flag" ||
7463 test ! -s conftest.err
7464 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007465 ac_hi=$ac_mid; break
7466else
7467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007468sed 's/^/| /' conftest.$ac_ext >&5
7469
Martin v. Löwiseba40652007-08-30 20:10:57 +00007470 ac_lo=`expr $ac_mid + 1`
7471 if test $ac_lo -le $ac_mid; then
7472 ac_lo= ac_hi=
7473 break
7474 fi
7475 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007477
7478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007479 done
7480else
7481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007482sed 's/^/| /' conftest.$ac_ext >&5
7483
Martin v. Löwiseba40652007-08-30 20:10:57 +00007484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007485/* confdefs.h. */
7486_ACEOF
7487cat confdefs.h >>conftest.$ac_ext
7488cat >>conftest.$ac_ext <<_ACEOF
7489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007490$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007491 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007492int
7493main ()
7494{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007495static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007496test_array [0] = 0
7497
7498 ;
7499 return 0;
7500}
7501_ACEOF
7502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007503if { (ac_try="$ac_compile"
7504case "(($ac_try" in
7505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7506 *) ac_try_echo=$ac_try;;
7507esac
7508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007511 grep -v '^ *+' conftest.er1 >conftest.err
7512 rm -f conftest.er1
7513 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007515 (exit $ac_status); } && {
7516 test -z "$ac_c_werror_flag" ||
7517 test ! -s conftest.err
7518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007519 ac_hi=-1 ac_mid=-1
7520 while :; do
7521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007522/* confdefs.h. */
7523_ACEOF
7524cat confdefs.h >>conftest.$ac_ext
7525cat >>conftest.$ac_ext <<_ACEOF
7526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007527$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007528 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007529int
7530main ()
7531{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007532static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007533test_array [0] = 0
7534
7535 ;
7536 return 0;
7537}
7538_ACEOF
7539rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007540if { (ac_try="$ac_compile"
7541case "(($ac_try" in
7542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7543 *) ac_try_echo=$ac_try;;
7544esac
7545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007548 grep -v '^ *+' conftest.er1 >conftest.err
7549 rm -f conftest.er1
7550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007552 (exit $ac_status); } && {
7553 test -z "$ac_c_werror_flag" ||
7554 test ! -s conftest.err
7555 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007556 ac_lo=$ac_mid; break
7557else
7558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007559sed 's/^/| /' conftest.$ac_ext >&5
7560
Martin v. Löwiseba40652007-08-30 20:10:57 +00007561 ac_hi=`expr '(' $ac_mid ')' - 1`
7562 if test $ac_mid -le $ac_hi; then
7563 ac_lo= ac_hi=
7564 break
7565 fi
7566 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007568
7569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007570 done
7571else
7572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007573sed 's/^/| /' conftest.$ac_ext >&5
7574
Martin v. Löwiseba40652007-08-30 20:10:57 +00007575 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007577
7578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007580
7581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007582# Binary search between lo and hi bounds.
7583while test "x$ac_lo" != "x$ac_hi"; do
7584 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007586/* confdefs.h. */
7587_ACEOF
7588cat confdefs.h >>conftest.$ac_ext
7589cat >>conftest.$ac_ext <<_ACEOF
7590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007591$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007592 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007593int
7594main ()
7595{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007596static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007597test_array [0] = 0
7598
7599 ;
7600 return 0;
7601}
7602_ACEOF
7603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007604if { (ac_try="$ac_compile"
7605case "(($ac_try" in
7606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7607 *) ac_try_echo=$ac_try;;
7608esac
7609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007612 grep -v '^ *+' conftest.er1 >conftest.err
7613 rm -f conftest.er1
7614 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616 (exit $ac_status); } && {
7617 test -z "$ac_c_werror_flag" ||
7618 test ! -s conftest.err
7619 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007620 ac_hi=$ac_mid
7621else
7622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007623sed 's/^/| /' conftest.$ac_ext >&5
7624
Martin v. Löwiseba40652007-08-30 20:10:57 +00007625 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007627
7628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007629done
7630case $ac_lo in
7631?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007632'') if test "$ac_cv_type_long" = yes; then
7633 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007634See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007635echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007636See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007637 { (exit 77); exit 77; }; }
7638 else
7639 ac_cv_sizeof_long=0
7640 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007641esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007642else
Martin v. Löwis11437992002-04-12 09:54:03 +00007643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007644/* confdefs.h. */
7645_ACEOF
7646cat confdefs.h >>conftest.$ac_ext
7647cat >>conftest.$ac_ext <<_ACEOF
7648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007649$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007650 typedef long ac__type_sizeof_;
7651static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7652static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007653#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007654#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007655int
7656main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007657{
Martin v. Löwis11437992002-04-12 09:54:03 +00007658
7659 FILE *f = fopen ("conftest.val", "w");
7660 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661 return 1;
7662 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007663 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007664 long int i = longval ();
7665 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7666 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007667 fprintf (f, "%ld\n", i);
7668 }
7669 else
7670 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007671 unsigned long int i = ulongval ();
7672 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7673 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 fprintf (f, "%lu\n", i);
7675 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007676 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007677
7678 ;
7679 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007680}
Martin v. Löwis11437992002-04-12 09:54:03 +00007681_ACEOF
7682rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007683if { (ac_try="$ac_link"
7684case "(($ac_try" in
7685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7686 *) ac_try_echo=$ac_try;;
7687esac
7688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7689 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007690 ac_status=$?
7691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007693 { (case "(($ac_try" in
7694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7695 *) ac_try_echo=$ac_try;;
7696esac
7697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7698 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007699 ac_status=$?
7700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7701 (exit $ac_status); }; }; then
7702 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007703else
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 echo "$as_me: program exited with status $ac_status" >&5
7705echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007706sed 's/^/| /' conftest.$ac_ext >&5
7707
Martin v. Löwis11437992002-04-12 09:54:03 +00007708( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007709if test "$ac_cv_type_long" = yes; then
7710 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007711See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007712echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007713See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 { (exit 77); exit 77; }; }
7715 else
7716 ac_cv_sizeof_long=0
7717 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719rm -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 +00007720fi
7721rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7724echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7725
7726
7727
Martin v. Löwis11437992002-04-12 09:54:03 +00007728cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007729#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007730_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007731
7732
Martin v. Löwiseba40652007-08-30 20:10:57 +00007733{ echo "$as_me:$LINENO: checking for void *" >&5
7734echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007735if test "${ac_cv_type_void_p+set}" = set; then
7736 echo $ECHO_N "(cached) $ECHO_C" >&6
7737else
7738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007739/* confdefs.h. */
7740_ACEOF
7741cat confdefs.h >>conftest.$ac_ext
7742cat >>conftest.$ac_ext <<_ACEOF
7743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007744$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007746int
7747main ()
7748{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007749if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007751if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 return 0;
7753 ;
7754 return 0;
7755}
7756_ACEOF
7757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007758if { (ac_try="$ac_compile"
7759case "(($ac_try" in
7760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7761 *) ac_try_echo=$ac_try;;
7762esac
7763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007766 grep -v '^ *+' conftest.er1 >conftest.err
7767 rm -f conftest.er1
7768 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007770 (exit $ac_status); } && {
7771 test -z "$ac_c_werror_flag" ||
7772 test ! -s conftest.err
7773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007774 ac_cv_type_void_p=yes
7775else
7776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007777sed 's/^/| /' conftest.$ac_ext >&5
7778
Martin v. Löwiseba40652007-08-30 20:10:57 +00007779 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007780fi
Brett Cannon19fab762007-06-02 03:02:29 +00007781
Martin v. Löwiseba40652007-08-30 20:10:57 +00007782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7783fi
7784{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7785echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7786
7787# The cast to long int works around a bug in the HP C Compiler
7788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7790# This bug is HP SR number 8606223364.
7791{ echo "$as_me:$LINENO: checking size of void *" >&5
7792echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007793if test "${ac_cv_sizeof_void_p+set}" = set; then
7794 echo $ECHO_N "(cached) $ECHO_C" >&6
7795else
Martin v. Löwis11437992002-04-12 09:54:03 +00007796 if test "$cross_compiling" = yes; then
7797 # Depending upon the size, compute the lo and hi bounds.
7798cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007799/* confdefs.h. */
7800_ACEOF
7801cat confdefs.h >>conftest.$ac_ext
7802cat >>conftest.$ac_ext <<_ACEOF
7803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007804$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007805 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007806int
7807main ()
7808{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007809static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007810test_array [0] = 0
7811
7812 ;
7813 return 0;
7814}
7815_ACEOF
7816rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007817if { (ac_try="$ac_compile"
7818case "(($ac_try" in
7819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7820 *) ac_try_echo=$ac_try;;
7821esac
7822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7823 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007825 grep -v '^ *+' conftest.er1 >conftest.err
7826 rm -f conftest.er1
7827 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007829 (exit $ac_status); } && {
7830 test -z "$ac_c_werror_flag" ||
7831 test ! -s conftest.err
7832 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 ac_lo=0 ac_mid=0
7834 while :; do
7835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007836/* confdefs.h. */
7837_ACEOF
7838cat confdefs.h >>conftest.$ac_ext
7839cat >>conftest.$ac_ext <<_ACEOF
7840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007841$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007842 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007843int
7844main ()
7845{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007846static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007847test_array [0] = 0
7848
7849 ;
7850 return 0;
7851}
7852_ACEOF
7853rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007854if { (ac_try="$ac_compile"
7855case "(($ac_try" in
7856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7857 *) ac_try_echo=$ac_try;;
7858esac
7859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007862 grep -v '^ *+' conftest.er1 >conftest.err
7863 rm -f conftest.er1
7864 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007866 (exit $ac_status); } && {
7867 test -z "$ac_c_werror_flag" ||
7868 test ! -s conftest.err
7869 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 ac_hi=$ac_mid; break
7871else
7872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007873sed 's/^/| /' conftest.$ac_ext >&5
7874
Martin v. Löwiseba40652007-08-30 20:10:57 +00007875 ac_lo=`expr $ac_mid + 1`
7876 if test $ac_lo -le $ac_mid; then
7877 ac_lo= ac_hi=
7878 break
7879 fi
7880 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007882
7883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 done
7885else
7886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007887sed 's/^/| /' conftest.$ac_ext >&5
7888
Martin v. Löwiseba40652007-08-30 20:10:57 +00007889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007890/* confdefs.h. */
7891_ACEOF
7892cat confdefs.h >>conftest.$ac_ext
7893cat >>conftest.$ac_ext <<_ACEOF
7894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007895$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007896 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007897int
7898main ()
7899{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007900static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007901test_array [0] = 0
7902
7903 ;
7904 return 0;
7905}
7906_ACEOF
7907rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007908if { (ac_try="$ac_compile"
7909case "(($ac_try" in
7910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7911 *) ac_try_echo=$ac_try;;
7912esac
7913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007916 grep -v '^ *+' conftest.er1 >conftest.err
7917 rm -f conftest.er1
7918 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007920 (exit $ac_status); } && {
7921 test -z "$ac_c_werror_flag" ||
7922 test ! -s conftest.err
7923 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007924 ac_hi=-1 ac_mid=-1
7925 while :; do
7926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007927/* confdefs.h. */
7928_ACEOF
7929cat confdefs.h >>conftest.$ac_ext
7930cat >>conftest.$ac_ext <<_ACEOF
7931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007932$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007933 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007934int
7935main ()
7936{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007937static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007938test_array [0] = 0
7939
7940 ;
7941 return 0;
7942}
7943_ACEOF
7944rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007945if { (ac_try="$ac_compile"
7946case "(($ac_try" in
7947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7948 *) ac_try_echo=$ac_try;;
7949esac
7950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007953 grep -v '^ *+' conftest.er1 >conftest.err
7954 rm -f conftest.er1
7955 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957 (exit $ac_status); } && {
7958 test -z "$ac_c_werror_flag" ||
7959 test ! -s conftest.err
7960 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 ac_lo=$ac_mid; break
7962else
7963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007964sed 's/^/| /' conftest.$ac_ext >&5
7965
Martin v. Löwiseba40652007-08-30 20:10:57 +00007966 ac_hi=`expr '(' $ac_mid ')' - 1`
7967 if test $ac_mid -le $ac_hi; then
7968 ac_lo= ac_hi=
7969 break
7970 fi
7971 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007973
7974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 done
7976else
7977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007978sed 's/^/| /' conftest.$ac_ext >&5
7979
Martin v. Löwiseba40652007-08-30 20:10:57 +00007980 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007982
7983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007985
7986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007987# Binary search between lo and hi bounds.
7988while test "x$ac_lo" != "x$ac_hi"; do
7989 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* confdefs.h. */
7992_ACEOF
7993cat confdefs.h >>conftest.$ac_ext
7994cat >>conftest.$ac_ext <<_ACEOF
7995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007997 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007998int
7999main ()
8000{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008001static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008002test_array [0] = 0
8003
8004 ;
8005 return 0;
8006}
8007_ACEOF
8008rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008009if { (ac_try="$ac_compile"
8010case "(($ac_try" in
8011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8012 *) ac_try_echo=$ac_try;;
8013esac
8014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8015 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008017 grep -v '^ *+' conftest.er1 >conftest.err
8018 rm -f conftest.er1
8019 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021 (exit $ac_status); } && {
8022 test -z "$ac_c_werror_flag" ||
8023 test ! -s conftest.err
8024 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 ac_hi=$ac_mid
8026else
8027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008028sed 's/^/| /' conftest.$ac_ext >&5
8029
Martin v. Löwiseba40652007-08-30 20:10:57 +00008030 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008032
8033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008034done
8035case $ac_lo in
8036?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008037'') if test "$ac_cv_type_void_p" = yes; then
8038 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008039See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008040echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008041See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008042 { (exit 77); exit 77; }; }
8043 else
8044 ac_cv_sizeof_void_p=0
8045 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008046esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008047else
Martin v. Löwis11437992002-04-12 09:54:03 +00008048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008049/* confdefs.h. */
8050_ACEOF
8051cat confdefs.h >>conftest.$ac_ext
8052cat >>conftest.$ac_ext <<_ACEOF
8053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008054$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008055 typedef void * ac__type_sizeof_;
8056static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8057static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008058#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008059#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008060int
8061main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008062{
Martin v. Löwis11437992002-04-12 09:54:03 +00008063
8064 FILE *f = fopen ("conftest.val", "w");
8065 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066 return 1;
8067 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008068 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008069 long int i = longval ();
8070 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8071 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008072 fprintf (f, "%ld\n", i);
8073 }
8074 else
8075 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008076 unsigned long int i = ulongval ();
8077 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8078 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 fprintf (f, "%lu\n", i);
8080 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008081 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008082
8083 ;
8084 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008085}
Martin v. Löwis11437992002-04-12 09:54:03 +00008086_ACEOF
8087rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008088if { (ac_try="$ac_link"
8089case "(($ac_try" in
8090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8091 *) ac_try_echo=$ac_try;;
8092esac
8093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8094 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 ac_status=$?
8096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8097 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008098 { (case "(($ac_try" in
8099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8100 *) ac_try_echo=$ac_try;;
8101esac
8102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8103 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008104 ac_status=$?
8105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8106 (exit $ac_status); }; }; then
8107 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008108else
Martin v. Löwis11437992002-04-12 09:54:03 +00008109 echo "$as_me: program exited with status $ac_status" >&5
8110echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008111sed 's/^/| /' conftest.$ac_ext >&5
8112
Martin v. Löwis11437992002-04-12 09:54:03 +00008113( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008114if test "$ac_cv_type_void_p" = yes; then
8115 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008116See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008117echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008118See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 { (exit 77); exit 77; }; }
8120 else
8121 ac_cv_sizeof_void_p=0
8122 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008124rm -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 +00008125fi
8126rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008128{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8129echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8130
8131
8132
Martin v. Löwis11437992002-04-12 09:54:03 +00008133cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008134#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008135_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008136
8137
Martin v. Löwiseba40652007-08-30 20:10:57 +00008138{ echo "$as_me:$LINENO: checking for short" >&5
8139echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008140if test "${ac_cv_type_short+set}" = set; then
8141 echo $ECHO_N "(cached) $ECHO_C" >&6
8142else
8143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008144/* confdefs.h. */
8145_ACEOF
8146cat confdefs.h >>conftest.$ac_ext
8147cat >>conftest.$ac_ext <<_ACEOF
8148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008149$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008151int
8152main ()
8153{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008154if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008155 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008156if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008157 return 0;
8158 ;
8159 return 0;
8160}
8161_ACEOF
8162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008163if { (ac_try="$ac_compile"
8164case "(($ac_try" in
8165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8166 *) ac_try_echo=$ac_try;;
8167esac
8168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008171 grep -v '^ *+' conftest.er1 >conftest.err
8172 rm -f conftest.er1
8173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008175 (exit $ac_status); } && {
8176 test -z "$ac_c_werror_flag" ||
8177 test ! -s conftest.err
8178 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008179 ac_cv_type_short=yes
8180else
8181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008182sed 's/^/| /' conftest.$ac_ext >&5
8183
Martin v. Löwiseba40652007-08-30 20:10:57 +00008184 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008185fi
Brett Cannon19fab762007-06-02 03:02:29 +00008186
Martin v. Löwiseba40652007-08-30 20:10:57 +00008187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8188fi
8189{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8190echo "${ECHO_T}$ac_cv_type_short" >&6; }
8191
8192# The cast to long int works around a bug in the HP C Compiler
8193# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8194# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8195# This bug is HP SR number 8606223364.
8196{ echo "$as_me:$LINENO: checking size of short" >&5
8197echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008198if test "${ac_cv_sizeof_short+set}" = set; then
8199 echo $ECHO_N "(cached) $ECHO_C" >&6
8200else
Martin v. Löwis11437992002-04-12 09:54:03 +00008201 if test "$cross_compiling" = yes; then
8202 # Depending upon the size, compute the lo and hi bounds.
8203cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008204/* confdefs.h. */
8205_ACEOF
8206cat confdefs.h >>conftest.$ac_ext
8207cat >>conftest.$ac_ext <<_ACEOF
8208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008209$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008210 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008211int
8212main ()
8213{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008215test_array [0] = 0
8216
8217 ;
8218 return 0;
8219}
8220_ACEOF
8221rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008222if { (ac_try="$ac_compile"
8223case "(($ac_try" in
8224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8225 *) ac_try_echo=$ac_try;;
8226esac
8227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8228 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008230 grep -v '^ *+' conftest.er1 >conftest.err
8231 rm -f conftest.er1
8232 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008234 (exit $ac_status); } && {
8235 test -z "$ac_c_werror_flag" ||
8236 test ! -s conftest.err
8237 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008238 ac_lo=0 ac_mid=0
8239 while :; do
8240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008241/* confdefs.h. */
8242_ACEOF
8243cat confdefs.h >>conftest.$ac_ext
8244cat >>conftest.$ac_ext <<_ACEOF
8245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008246$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008247 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008248int
8249main ()
8250{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008252test_array [0] = 0
8253
8254 ;
8255 return 0;
8256}
8257_ACEOF
8258rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008259if { (ac_try="$ac_compile"
8260case "(($ac_try" in
8261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8262 *) ac_try_echo=$ac_try;;
8263esac
8264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008267 grep -v '^ *+' conftest.er1 >conftest.err
8268 rm -f conftest.er1
8269 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008271 (exit $ac_status); } && {
8272 test -z "$ac_c_werror_flag" ||
8273 test ! -s conftest.err
8274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 ac_hi=$ac_mid; break
8276else
8277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008278sed 's/^/| /' conftest.$ac_ext >&5
8279
Martin v. Löwiseba40652007-08-30 20:10:57 +00008280 ac_lo=`expr $ac_mid + 1`
8281 if test $ac_lo -le $ac_mid; then
8282 ac_lo= ac_hi=
8283 break
8284 fi
8285 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008287
8288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 done
8290else
8291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008292sed 's/^/| /' conftest.$ac_ext >&5
8293
Martin v. Löwiseba40652007-08-30 20:10:57 +00008294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008295/* confdefs.h. */
8296_ACEOF
8297cat confdefs.h >>conftest.$ac_ext
8298cat >>conftest.$ac_ext <<_ACEOF
8299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008300$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008301 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008302int
8303main ()
8304{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008305static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008306test_array [0] = 0
8307
8308 ;
8309 return 0;
8310}
8311_ACEOF
8312rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008313if { (ac_try="$ac_compile"
8314case "(($ac_try" in
8315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8316 *) ac_try_echo=$ac_try;;
8317esac
8318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008321 grep -v '^ *+' conftest.er1 >conftest.err
8322 rm -f conftest.er1
8323 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008325 (exit $ac_status); } && {
8326 test -z "$ac_c_werror_flag" ||
8327 test ! -s conftest.err
8328 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008329 ac_hi=-1 ac_mid=-1
8330 while :; do
8331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008332/* confdefs.h. */
8333_ACEOF
8334cat confdefs.h >>conftest.$ac_ext
8335cat >>conftest.$ac_ext <<_ACEOF
8336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008337$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008338 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008339int
8340main ()
8341{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008343test_array [0] = 0
8344
8345 ;
8346 return 0;
8347}
8348_ACEOF
8349rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008350if { (ac_try="$ac_compile"
8351case "(($ac_try" in
8352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8353 *) ac_try_echo=$ac_try;;
8354esac
8355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008358 grep -v '^ *+' conftest.er1 >conftest.err
8359 rm -f conftest.er1
8360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008362 (exit $ac_status); } && {
8363 test -z "$ac_c_werror_flag" ||
8364 test ! -s conftest.err
8365 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008366 ac_lo=$ac_mid; break
8367else
8368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008369sed 's/^/| /' conftest.$ac_ext >&5
8370
Martin v. Löwiseba40652007-08-30 20:10:57 +00008371 ac_hi=`expr '(' $ac_mid ')' - 1`
8372 if test $ac_mid -le $ac_hi; then
8373 ac_lo= ac_hi=
8374 break
8375 fi
8376 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008378
8379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008380 done
8381else
8382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008383sed 's/^/| /' conftest.$ac_ext >&5
8384
Martin v. Löwiseba40652007-08-30 20:10:57 +00008385 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008387
8388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008390
8391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008392# Binary search between lo and hi bounds.
8393while test "x$ac_lo" != "x$ac_hi"; do
8394 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008396/* confdefs.h. */
8397_ACEOF
8398cat confdefs.h >>conftest.$ac_ext
8399cat >>conftest.$ac_ext <<_ACEOF
8400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008401$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008402 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008403int
8404main ()
8405{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008406static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008407test_array [0] = 0
8408
8409 ;
8410 return 0;
8411}
8412_ACEOF
8413rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008414if { (ac_try="$ac_compile"
8415case "(($ac_try" in
8416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8417 *) ac_try_echo=$ac_try;;
8418esac
8419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008422 grep -v '^ *+' conftest.er1 >conftest.err
8423 rm -f conftest.er1
8424 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008426 (exit $ac_status); } && {
8427 test -z "$ac_c_werror_flag" ||
8428 test ! -s conftest.err
8429 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 ac_hi=$ac_mid
8431else
8432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008433sed 's/^/| /' conftest.$ac_ext >&5
8434
Martin v. Löwiseba40652007-08-30 20:10:57 +00008435 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008437
8438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008439done
8440case $ac_lo in
8441?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008442'') if test "$ac_cv_type_short" = yes; then
8443 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008444See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008445echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008446See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008447 { (exit 77); exit 77; }; }
8448 else
8449 ac_cv_sizeof_short=0
8450 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008451esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008452else
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008454/* confdefs.h. */
8455_ACEOF
8456cat confdefs.h >>conftest.$ac_ext
8457cat >>conftest.$ac_ext <<_ACEOF
8458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008459$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008460 typedef short ac__type_sizeof_;
8461static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8462static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008463#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008464#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008465int
8466main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008467{
Martin v. Löwis11437992002-04-12 09:54:03 +00008468
8469 FILE *f = fopen ("conftest.val", "w");
8470 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471 return 1;
8472 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008474 long int i = longval ();
8475 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8476 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 fprintf (f, "%ld\n", i);
8478 }
8479 else
8480 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008481 unsigned long int i = ulongval ();
8482 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8483 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 fprintf (f, "%lu\n", i);
8485 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008486 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008487
8488 ;
8489 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008490}
Martin v. Löwis11437992002-04-12 09:54:03 +00008491_ACEOF
8492rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008493if { (ac_try="$ac_link"
8494case "(($ac_try" in
8495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8496 *) ac_try_echo=$ac_try;;
8497esac
8498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8499 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008500 ac_status=$?
8501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8502 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008503 { (case "(($ac_try" in
8504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8505 *) ac_try_echo=$ac_try;;
8506esac
8507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8508 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 ac_status=$?
8510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8511 (exit $ac_status); }; }; then
8512 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008513else
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 echo "$as_me: program exited with status $ac_status" >&5
8515echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008516sed 's/^/| /' conftest.$ac_ext >&5
8517
Martin v. Löwis11437992002-04-12 09:54:03 +00008518( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008519if test "$ac_cv_type_short" = yes; then
8520 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008521See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008522echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008523See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 { (exit 77); exit 77; }; }
8525 else
8526 ac_cv_sizeof_short=0
8527 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529rm -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 +00008530fi
8531rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008533{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8534echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8535
8536
8537
Martin v. Löwis11437992002-04-12 09:54:03 +00008538cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008539#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008540_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008541
8542
Martin v. Löwiseba40652007-08-30 20:10:57 +00008543{ echo "$as_me:$LINENO: checking for float" >&5
8544echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008545if test "${ac_cv_type_float+set}" = set; then
8546 echo $ECHO_N "(cached) $ECHO_C" >&6
8547else
8548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008549/* confdefs.h. */
8550_ACEOF
8551cat confdefs.h >>conftest.$ac_ext
8552cat >>conftest.$ac_ext <<_ACEOF
8553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008554$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008555typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008556int
8557main ()
8558{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008559if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008561if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 return 0;
8563 ;
8564 return 0;
8565}
8566_ACEOF
8567rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008568if { (ac_try="$ac_compile"
8569case "(($ac_try" in
8570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8571 *) ac_try_echo=$ac_try;;
8572esac
8573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8574 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008576 grep -v '^ *+' conftest.er1 >conftest.err
8577 rm -f conftest.er1
8578 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008580 (exit $ac_status); } && {
8581 test -z "$ac_c_werror_flag" ||
8582 test ! -s conftest.err
8583 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 ac_cv_type_float=yes
8585else
8586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008587sed 's/^/| /' conftest.$ac_ext >&5
8588
Martin v. Löwiseba40652007-08-30 20:10:57 +00008589 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008590fi
Brett Cannon19fab762007-06-02 03:02:29 +00008591
Martin v. Löwiseba40652007-08-30 20:10:57 +00008592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8593fi
8594{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8595echo "${ECHO_T}$ac_cv_type_float" >&6; }
8596
8597# The cast to long int works around a bug in the HP C Compiler
8598# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8599# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8600# This bug is HP SR number 8606223364.
8601{ echo "$as_me:$LINENO: checking size of float" >&5
8602echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008603if test "${ac_cv_sizeof_float+set}" = set; then
8604 echo $ECHO_N "(cached) $ECHO_C" >&6
8605else
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 if test "$cross_compiling" = yes; then
8607 # Depending upon the size, compute the lo and hi bounds.
8608cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008609/* confdefs.h. */
8610_ACEOF
8611cat confdefs.h >>conftest.$ac_ext
8612cat >>conftest.$ac_ext <<_ACEOF
8613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008614$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008615 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008616int
8617main ()
8618{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008619static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008620test_array [0] = 0
8621
8622 ;
8623 return 0;
8624}
8625_ACEOF
8626rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008627if { (ac_try="$ac_compile"
8628case "(($ac_try" in
8629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8630 *) ac_try_echo=$ac_try;;
8631esac
8632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008635 grep -v '^ *+' conftest.er1 >conftest.err
8636 rm -f conftest.er1
8637 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008639 (exit $ac_status); } && {
8640 test -z "$ac_c_werror_flag" ||
8641 test ! -s conftest.err
8642 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 ac_lo=0 ac_mid=0
8644 while :; do
8645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008646/* confdefs.h. */
8647_ACEOF
8648cat confdefs.h >>conftest.$ac_ext
8649cat >>conftest.$ac_ext <<_ACEOF
8650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008651$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008652 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008653int
8654main ()
8655{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008657test_array [0] = 0
8658
8659 ;
8660 return 0;
8661}
8662_ACEOF
8663rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008664if { (ac_try="$ac_compile"
8665case "(($ac_try" in
8666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8667 *) ac_try_echo=$ac_try;;
8668esac
8669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008672 grep -v '^ *+' conftest.er1 >conftest.err
8673 rm -f conftest.er1
8674 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008676 (exit $ac_status); } && {
8677 test -z "$ac_c_werror_flag" ||
8678 test ! -s conftest.err
8679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_hi=$ac_mid; break
8681else
8682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008683sed 's/^/| /' conftest.$ac_ext >&5
8684
Martin v. Löwiseba40652007-08-30 20:10:57 +00008685 ac_lo=`expr $ac_mid + 1`
8686 if test $ac_lo -le $ac_mid; then
8687 ac_lo= ac_hi=
8688 break
8689 fi
8690 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008692
8693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 done
8695else
8696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008697sed 's/^/| /' conftest.$ac_ext >&5
8698
Martin v. Löwiseba40652007-08-30 20:10:57 +00008699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008700/* confdefs.h. */
8701_ACEOF
8702cat confdefs.h >>conftest.$ac_ext
8703cat >>conftest.$ac_ext <<_ACEOF
8704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008705$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008706 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008707int
8708main ()
8709{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008710static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008711test_array [0] = 0
8712
8713 ;
8714 return 0;
8715}
8716_ACEOF
8717rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008718if { (ac_try="$ac_compile"
8719case "(($ac_try" in
8720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8721 *) ac_try_echo=$ac_try;;
8722esac
8723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008726 grep -v '^ *+' conftest.er1 >conftest.err
8727 rm -f conftest.er1
8728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008730 (exit $ac_status); } && {
8731 test -z "$ac_c_werror_flag" ||
8732 test ! -s conftest.err
8733 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008734 ac_hi=-1 ac_mid=-1
8735 while :; do
8736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008737/* confdefs.h. */
8738_ACEOF
8739cat confdefs.h >>conftest.$ac_ext
8740cat >>conftest.$ac_ext <<_ACEOF
8741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008742$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008743 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008744int
8745main ()
8746{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008747static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008748test_array [0] = 0
8749
8750 ;
8751 return 0;
8752}
8753_ACEOF
8754rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008755if { (ac_try="$ac_compile"
8756case "(($ac_try" in
8757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8758 *) ac_try_echo=$ac_try;;
8759esac
8760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008763 grep -v '^ *+' conftest.er1 >conftest.err
8764 rm -f conftest.er1
8765 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008767 (exit $ac_status); } && {
8768 test -z "$ac_c_werror_flag" ||
8769 test ! -s conftest.err
8770 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008771 ac_lo=$ac_mid; break
8772else
8773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008774sed 's/^/| /' conftest.$ac_ext >&5
8775
Martin v. Löwiseba40652007-08-30 20:10:57 +00008776 ac_hi=`expr '(' $ac_mid ')' - 1`
8777 if test $ac_mid -le $ac_hi; then
8778 ac_lo= ac_hi=
8779 break
8780 fi
8781 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008783
8784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008785 done
8786else
8787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008788sed 's/^/| /' conftest.$ac_ext >&5
8789
Martin v. Löwiseba40652007-08-30 20:10:57 +00008790 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008792
8793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008795
8796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008797# Binary search between lo and hi bounds.
8798while test "x$ac_lo" != "x$ac_hi"; do
8799 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008801/* confdefs.h. */
8802_ACEOF
8803cat confdefs.h >>conftest.$ac_ext
8804cat >>conftest.$ac_ext <<_ACEOF
8805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008806$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008807 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008808int
8809main ()
8810{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008812test_array [0] = 0
8813
8814 ;
8815 return 0;
8816}
8817_ACEOF
8818rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008819if { (ac_try="$ac_compile"
8820case "(($ac_try" in
8821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8822 *) ac_try_echo=$ac_try;;
8823esac
8824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008827 grep -v '^ *+' conftest.er1 >conftest.err
8828 rm -f conftest.er1
8829 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831 (exit $ac_status); } && {
8832 test -z "$ac_c_werror_flag" ||
8833 test ! -s conftest.err
8834 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 ac_hi=$ac_mid
8836else
8837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008838sed 's/^/| /' conftest.$ac_ext >&5
8839
Martin v. Löwiseba40652007-08-30 20:10:57 +00008840 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008842
8843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008844done
8845case $ac_lo in
8846?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008847'') if test "$ac_cv_type_float" = yes; then
8848 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008849See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008850echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008851See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008852 { (exit 77); exit 77; }; }
8853 else
8854 ac_cv_sizeof_float=0
8855 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008856esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008857else
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* confdefs.h. */
8860_ACEOF
8861cat confdefs.h >>conftest.$ac_ext
8862cat >>conftest.$ac_ext <<_ACEOF
8863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008864$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008865 typedef float ac__type_sizeof_;
8866static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8867static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008868#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008869#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008870int
8871main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008872{
Martin v. Löwis11437992002-04-12 09:54:03 +00008873
8874 FILE *f = fopen ("conftest.val", "w");
8875 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876 return 1;
8877 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008879 long int i = longval ();
8880 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8881 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 fprintf (f, "%ld\n", i);
8883 }
8884 else
8885 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008886 unsigned long int i = ulongval ();
8887 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8888 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 fprintf (f, "%lu\n", i);
8890 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008891 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008892
8893 ;
8894 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008895}
Martin v. Löwis11437992002-04-12 09:54:03 +00008896_ACEOF
8897rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008898if { (ac_try="$ac_link"
8899case "(($ac_try" in
8900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8901 *) ac_try_echo=$ac_try;;
8902esac
8903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8904 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 ac_status=$?
8906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8907 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008908 { (case "(($ac_try" in
8909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8910 *) ac_try_echo=$ac_try;;
8911esac
8912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8913 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008914 ac_status=$?
8915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8916 (exit $ac_status); }; }; then
8917 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008918else
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 echo "$as_me: program exited with status $ac_status" >&5
8920echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008921sed 's/^/| /' conftest.$ac_ext >&5
8922
Martin v. Löwis11437992002-04-12 09:54:03 +00008923( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008924if test "$ac_cv_type_float" = yes; then
8925 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008926See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008927echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008928See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929 { (exit 77); exit 77; }; }
8930 else
8931 ac_cv_sizeof_float=0
8932 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934rm -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 +00008935fi
8936rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008938{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8939echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
8940
8941
8942
Martin v. Löwis11437992002-04-12 09:54:03 +00008943cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008944#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008945_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008946
8947
Martin v. Löwiseba40652007-08-30 20:10:57 +00008948{ echo "$as_me:$LINENO: checking for double" >&5
8949echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008950if test "${ac_cv_type_double+set}" = set; then
8951 echo $ECHO_N "(cached) $ECHO_C" >&6
8952else
8953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008954/* confdefs.h. */
8955_ACEOF
8956cat confdefs.h >>conftest.$ac_ext
8957cat >>conftest.$ac_ext <<_ACEOF
8958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008959$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008961int
8962main ()
8963{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008964if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008966if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 return 0;
8968 ;
8969 return 0;
8970}
8971_ACEOF
8972rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008973if { (ac_try="$ac_compile"
8974case "(($ac_try" in
8975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8976 *) ac_try_echo=$ac_try;;
8977esac
8978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008981 grep -v '^ *+' conftest.er1 >conftest.err
8982 rm -f conftest.er1
8983 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008985 (exit $ac_status); } && {
8986 test -z "$ac_c_werror_flag" ||
8987 test ! -s conftest.err
8988 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 ac_cv_type_double=yes
8990else
8991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008992sed 's/^/| /' conftest.$ac_ext >&5
8993
Martin v. Löwiseba40652007-08-30 20:10:57 +00008994 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008995fi
Brett Cannon19fab762007-06-02 03:02:29 +00008996
Martin v. Löwiseba40652007-08-30 20:10:57 +00008997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8998fi
8999{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9000echo "${ECHO_T}$ac_cv_type_double" >&6; }
9001
9002# The cast to long int works around a bug in the HP C Compiler
9003# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9004# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9005# This bug is HP SR number 8606223364.
9006{ echo "$as_me:$LINENO: checking size of double" >&5
9007echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009008if test "${ac_cv_sizeof_double+set}" = set; then
9009 echo $ECHO_N "(cached) $ECHO_C" >&6
9010else
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 if test "$cross_compiling" = yes; then
9012 # Depending upon the size, compute the lo and hi bounds.
9013cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009014/* confdefs.h. */
9015_ACEOF
9016cat confdefs.h >>conftest.$ac_ext
9017cat >>conftest.$ac_ext <<_ACEOF
9018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009019$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009020 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009021int
9022main ()
9023{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009024static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009025test_array [0] = 0
9026
9027 ;
9028 return 0;
9029}
9030_ACEOF
9031rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009032if { (ac_try="$ac_compile"
9033case "(($ac_try" in
9034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9035 *) ac_try_echo=$ac_try;;
9036esac
9037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9038 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009040 grep -v '^ *+' conftest.er1 >conftest.err
9041 rm -f conftest.er1
9042 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009044 (exit $ac_status); } && {
9045 test -z "$ac_c_werror_flag" ||
9046 test ! -s conftest.err
9047 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 ac_lo=0 ac_mid=0
9049 while :; do
9050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009051/* confdefs.h. */
9052_ACEOF
9053cat confdefs.h >>conftest.$ac_ext
9054cat >>conftest.$ac_ext <<_ACEOF
9055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009056$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009057 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009058int
9059main ()
9060{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009061static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009062test_array [0] = 0
9063
9064 ;
9065 return 0;
9066}
9067_ACEOF
9068rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009069if { (ac_try="$ac_compile"
9070case "(($ac_try" in
9071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9072 *) ac_try_echo=$ac_try;;
9073esac
9074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009077 grep -v '^ *+' conftest.er1 >conftest.err
9078 rm -f conftest.er1
9079 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009081 (exit $ac_status); } && {
9082 test -z "$ac_c_werror_flag" ||
9083 test ! -s conftest.err
9084 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 ac_hi=$ac_mid; break
9086else
9087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009088sed 's/^/| /' conftest.$ac_ext >&5
9089
Martin v. Löwiseba40652007-08-30 20:10:57 +00009090 ac_lo=`expr $ac_mid + 1`
9091 if test $ac_lo -le $ac_mid; then
9092 ac_lo= ac_hi=
9093 break
9094 fi
9095 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009097
9098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 done
9100else
9101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009102sed 's/^/| /' conftest.$ac_ext >&5
9103
Martin v. Löwiseba40652007-08-30 20:10:57 +00009104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009105/* confdefs.h. */
9106_ACEOF
9107cat confdefs.h >>conftest.$ac_ext
9108cat >>conftest.$ac_ext <<_ACEOF
9109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009110$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009111 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009112int
9113main ()
9114{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009115static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009116test_array [0] = 0
9117
9118 ;
9119 return 0;
9120}
9121_ACEOF
9122rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009123if { (ac_try="$ac_compile"
9124case "(($ac_try" in
9125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9126 *) ac_try_echo=$ac_try;;
9127esac
9128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9129 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009131 grep -v '^ *+' conftest.er1 >conftest.err
9132 rm -f conftest.er1
9133 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009135 (exit $ac_status); } && {
9136 test -z "$ac_c_werror_flag" ||
9137 test ! -s conftest.err
9138 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 ac_hi=-1 ac_mid=-1
9140 while :; do
9141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009142/* confdefs.h. */
9143_ACEOF
9144cat confdefs.h >>conftest.$ac_ext
9145cat >>conftest.$ac_ext <<_ACEOF
9146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009147$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009148 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009149int
9150main ()
9151{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009152static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009153test_array [0] = 0
9154
9155 ;
9156 return 0;
9157}
9158_ACEOF
9159rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009160if { (ac_try="$ac_compile"
9161case "(($ac_try" in
9162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9163 *) ac_try_echo=$ac_try;;
9164esac
9165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009168 grep -v '^ *+' conftest.er1 >conftest.err
9169 rm -f conftest.er1
9170 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009172 (exit $ac_status); } && {
9173 test -z "$ac_c_werror_flag" ||
9174 test ! -s conftest.err
9175 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 ac_lo=$ac_mid; break
9177else
9178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009179sed 's/^/| /' conftest.$ac_ext >&5
9180
Martin v. Löwiseba40652007-08-30 20:10:57 +00009181 ac_hi=`expr '(' $ac_mid ')' - 1`
9182 if test $ac_mid -le $ac_hi; then
9183 ac_lo= ac_hi=
9184 break
9185 fi
9186 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009188
9189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 done
9191else
9192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009193sed 's/^/| /' conftest.$ac_ext >&5
9194
Martin v. Löwiseba40652007-08-30 20:10:57 +00009195 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009197
9198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009200
9201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009202# Binary search between lo and hi bounds.
9203while test "x$ac_lo" != "x$ac_hi"; do
9204 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009206/* confdefs.h. */
9207_ACEOF
9208cat confdefs.h >>conftest.$ac_ext
9209cat >>conftest.$ac_ext <<_ACEOF
9210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009211$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009212 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009213int
9214main ()
9215{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009216static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009217test_array [0] = 0
9218
9219 ;
9220 return 0;
9221}
9222_ACEOF
9223rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009224if { (ac_try="$ac_compile"
9225case "(($ac_try" in
9226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9227 *) ac_try_echo=$ac_try;;
9228esac
9229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9230 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009232 grep -v '^ *+' conftest.er1 >conftest.err
9233 rm -f conftest.er1
9234 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009236 (exit $ac_status); } && {
9237 test -z "$ac_c_werror_flag" ||
9238 test ! -s conftest.err
9239 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 ac_hi=$ac_mid
9241else
9242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009243sed 's/^/| /' conftest.$ac_ext >&5
9244
Martin v. Löwiseba40652007-08-30 20:10:57 +00009245 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009247
9248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009249done
9250case $ac_lo in
9251?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009252'') if test "$ac_cv_type_double" = yes; then
9253 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009254See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009255echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009256See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009257 { (exit 77); exit 77; }; }
9258 else
9259 ac_cv_sizeof_double=0
9260 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009261esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009262else
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009264/* confdefs.h. */
9265_ACEOF
9266cat confdefs.h >>conftest.$ac_ext
9267cat >>conftest.$ac_ext <<_ACEOF
9268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009269$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009270 typedef double ac__type_sizeof_;
9271static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9272static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009273#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009274#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009275int
9276main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009277{
Martin v. Löwis11437992002-04-12 09:54:03 +00009278
9279 FILE *f = fopen ("conftest.val", "w");
9280 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009281 return 1;
9282 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009283 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009284 long int i = longval ();
9285 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9286 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 fprintf (f, "%ld\n", i);
9288 }
9289 else
9290 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009291 unsigned long int i = ulongval ();
9292 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9293 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 fprintf (f, "%lu\n", i);
9295 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009296 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009297
9298 ;
9299 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009300}
Martin v. Löwis11437992002-04-12 09:54:03 +00009301_ACEOF
9302rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009303if { (ac_try="$ac_link"
9304case "(($ac_try" in
9305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9306 *) ac_try_echo=$ac_try;;
9307esac
9308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9309 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 ac_status=$?
9311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9312 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009313 { (case "(($ac_try" in
9314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9315 *) ac_try_echo=$ac_try;;
9316esac
9317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9318 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009319 ac_status=$?
9320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9321 (exit $ac_status); }; }; then
9322 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009323else
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 echo "$as_me: program exited with status $ac_status" >&5
9325echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009326sed 's/^/| /' conftest.$ac_ext >&5
9327
Martin v. Löwis11437992002-04-12 09:54:03 +00009328( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009329if test "$ac_cv_type_double" = yes; then
9330 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009331See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009332echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009333See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334 { (exit 77); exit 77; }; }
9335 else
9336 ac_cv_sizeof_double=0
9337 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339rm -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 +00009340fi
9341rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009343{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9344echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9345
9346
9347
Martin v. Löwis11437992002-04-12 09:54:03 +00009348cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009349#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009350_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009351
9352
Martin v. Löwiseba40652007-08-30 20:10:57 +00009353{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9354echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009355if test "${ac_cv_type_fpos_t+set}" = set; then
9356 echo $ECHO_N "(cached) $ECHO_C" >&6
9357else
9358 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009359/* confdefs.h. */
9360_ACEOF
9361cat confdefs.h >>conftest.$ac_ext
9362cat >>conftest.$ac_ext <<_ACEOF
9363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009364$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009365typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009366int
9367main ()
9368{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009369if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009371if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 return 0;
9373 ;
9374 return 0;
9375}
9376_ACEOF
9377rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009378if { (ac_try="$ac_compile"
9379case "(($ac_try" in
9380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9381 *) ac_try_echo=$ac_try;;
9382esac
9383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9384 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009386 grep -v '^ *+' conftest.er1 >conftest.err
9387 rm -f conftest.er1
9388 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009390 (exit $ac_status); } && {
9391 test -z "$ac_c_werror_flag" ||
9392 test ! -s conftest.err
9393 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009394 ac_cv_type_fpos_t=yes
9395else
9396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009397sed 's/^/| /' conftest.$ac_ext >&5
9398
Martin v. Löwiseba40652007-08-30 20:10:57 +00009399 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009400fi
Brett Cannon19fab762007-06-02 03:02:29 +00009401
Martin v. Löwiseba40652007-08-30 20:10:57 +00009402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9403fi
9404{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9405echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9406
9407# The cast to long int works around a bug in the HP C Compiler
9408# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9409# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9410# This bug is HP SR number 8606223364.
9411{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9412echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009413if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9414 echo $ECHO_N "(cached) $ECHO_C" >&6
9415else
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 if test "$cross_compiling" = yes; then
9417 # Depending upon the size, compute the lo and hi bounds.
9418cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009419/* confdefs.h. */
9420_ACEOF
9421cat confdefs.h >>conftest.$ac_ext
9422cat >>conftest.$ac_ext <<_ACEOF
9423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009424$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009425 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009426int
9427main ()
9428{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009429static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009430test_array [0] = 0
9431
9432 ;
9433 return 0;
9434}
9435_ACEOF
9436rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009437if { (ac_try="$ac_compile"
9438case "(($ac_try" in
9439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9440 *) ac_try_echo=$ac_try;;
9441esac
9442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009445 grep -v '^ *+' conftest.er1 >conftest.err
9446 rm -f conftest.er1
9447 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009449 (exit $ac_status); } && {
9450 test -z "$ac_c_werror_flag" ||
9451 test ! -s conftest.err
9452 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 ac_lo=0 ac_mid=0
9454 while :; do
9455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009456/* confdefs.h. */
9457_ACEOF
9458cat confdefs.h >>conftest.$ac_ext
9459cat >>conftest.$ac_ext <<_ACEOF
9460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009461$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009462 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009463int
9464main ()
9465{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009466static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009467test_array [0] = 0
9468
9469 ;
9470 return 0;
9471}
9472_ACEOF
9473rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009474if { (ac_try="$ac_compile"
9475case "(($ac_try" in
9476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9477 *) ac_try_echo=$ac_try;;
9478esac
9479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009482 grep -v '^ *+' conftest.er1 >conftest.err
9483 rm -f conftest.er1
9484 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486 (exit $ac_status); } && {
9487 test -z "$ac_c_werror_flag" ||
9488 test ! -s conftest.err
9489 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 ac_hi=$ac_mid; break
9491else
9492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009493sed 's/^/| /' conftest.$ac_ext >&5
9494
Martin v. Löwiseba40652007-08-30 20:10:57 +00009495 ac_lo=`expr $ac_mid + 1`
9496 if test $ac_lo -le $ac_mid; then
9497 ac_lo= ac_hi=
9498 break
9499 fi
9500 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502
9503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 done
9505else
9506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009507sed 's/^/| /' conftest.$ac_ext >&5
9508
Martin v. Löwiseba40652007-08-30 20:10:57 +00009509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009510/* confdefs.h. */
9511_ACEOF
9512cat confdefs.h >>conftest.$ac_ext
9513cat >>conftest.$ac_ext <<_ACEOF
9514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009515$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009516 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009517int
9518main ()
9519{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009520static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009521test_array [0] = 0
9522
9523 ;
9524 return 0;
9525}
9526_ACEOF
9527rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009528if { (ac_try="$ac_compile"
9529case "(($ac_try" in
9530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9531 *) ac_try_echo=$ac_try;;
9532esac
9533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009536 grep -v '^ *+' conftest.er1 >conftest.err
9537 rm -f conftest.er1
9538 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009540 (exit $ac_status); } && {
9541 test -z "$ac_c_werror_flag" ||
9542 test ! -s conftest.err
9543 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009544 ac_hi=-1 ac_mid=-1
9545 while :; do
9546 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009547/* confdefs.h. */
9548_ACEOF
9549cat confdefs.h >>conftest.$ac_ext
9550cat >>conftest.$ac_ext <<_ACEOF
9551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009552$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009553 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009554int
9555main ()
9556{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009557static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009558test_array [0] = 0
9559
9560 ;
9561 return 0;
9562}
9563_ACEOF
9564rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009565if { (ac_try="$ac_compile"
9566case "(($ac_try" in
9567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9568 *) ac_try_echo=$ac_try;;
9569esac
9570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009573 grep -v '^ *+' conftest.er1 >conftest.err
9574 rm -f conftest.er1
9575 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009577 (exit $ac_status); } && {
9578 test -z "$ac_c_werror_flag" ||
9579 test ! -s conftest.err
9580 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009581 ac_lo=$ac_mid; break
9582else
9583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009584sed 's/^/| /' conftest.$ac_ext >&5
9585
Martin v. Löwiseba40652007-08-30 20:10:57 +00009586 ac_hi=`expr '(' $ac_mid ')' - 1`
9587 if test $ac_mid -le $ac_hi; then
9588 ac_lo= ac_hi=
9589 break
9590 fi
9591 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009593
9594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009595 done
9596else
9597 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009598sed 's/^/| /' conftest.$ac_ext >&5
9599
Martin v. Löwiseba40652007-08-30 20:10:57 +00009600 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009602
9603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009605
9606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009607# Binary search between lo and hi bounds.
9608while test "x$ac_lo" != "x$ac_hi"; do
9609 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009611/* confdefs.h. */
9612_ACEOF
9613cat confdefs.h >>conftest.$ac_ext
9614cat >>conftest.$ac_ext <<_ACEOF
9615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009616$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009617 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009618int
9619main ()
9620{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009622test_array [0] = 0
9623
9624 ;
9625 return 0;
9626}
9627_ACEOF
9628rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009629if { (ac_try="$ac_compile"
9630case "(($ac_try" in
9631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9632 *) ac_try_echo=$ac_try;;
9633esac
9634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009637 grep -v '^ *+' conftest.er1 >conftest.err
9638 rm -f conftest.er1
9639 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641 (exit $ac_status); } && {
9642 test -z "$ac_c_werror_flag" ||
9643 test ! -s conftest.err
9644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 ac_hi=$ac_mid
9646else
9647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009648sed 's/^/| /' conftest.$ac_ext >&5
9649
Martin v. Löwiseba40652007-08-30 20:10:57 +00009650 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009652
9653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009654done
9655case $ac_lo in
9656?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009657'') if test "$ac_cv_type_fpos_t" = yes; then
9658 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009659See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009660echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009661See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009662 { (exit 77); exit 77; }; }
9663 else
9664 ac_cv_sizeof_fpos_t=0
9665 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009666esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009667else
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* confdefs.h. */
9670_ACEOF
9671cat confdefs.h >>conftest.$ac_ext
9672cat >>conftest.$ac_ext <<_ACEOF
9673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009674$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009675 typedef fpos_t ac__type_sizeof_;
9676static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9677static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009678#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009679#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009680int
9681main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009682{
Martin v. Löwis11437992002-04-12 09:54:03 +00009683
9684 FILE *f = fopen ("conftest.val", "w");
9685 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009686 return 1;
9687 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009689 long int i = longval ();
9690 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9691 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 fprintf (f, "%ld\n", i);
9693 }
9694 else
9695 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009696 unsigned long int i = ulongval ();
9697 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9698 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 fprintf (f, "%lu\n", i);
9700 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009701 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009702
9703 ;
9704 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009705}
Martin v. Löwis11437992002-04-12 09:54:03 +00009706_ACEOF
9707rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009708if { (ac_try="$ac_link"
9709case "(($ac_try" in
9710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9711 *) ac_try_echo=$ac_try;;
9712esac
9713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9714 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 ac_status=$?
9716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9717 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009718 { (case "(($ac_try" in
9719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9720 *) ac_try_echo=$ac_try;;
9721esac
9722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9723 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 ac_status=$?
9725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9726 (exit $ac_status); }; }; then
9727 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009728else
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 echo "$as_me: program exited with status $ac_status" >&5
9730echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009731sed 's/^/| /' conftest.$ac_ext >&5
9732
Martin v. Löwis11437992002-04-12 09:54:03 +00009733( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009734if test "$ac_cv_type_fpos_t" = yes; then
9735 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009736See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009737echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009738See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739 { (exit 77); exit 77; }; }
9740 else
9741 ac_cv_sizeof_fpos_t=0
9742 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744rm -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 +00009745fi
9746rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009748{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9749echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9750
9751
9752
Martin v. Löwis11437992002-04-12 09:54:03 +00009753cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009754#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009755_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009756
Michael W. Hudson54241132001-12-07 15:38:26 +00009757
Martin v. Löwiseba40652007-08-30 20:10:57 +00009758{ echo "$as_me:$LINENO: checking for size_t" >&5
9759echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009760if test "${ac_cv_type_size_t+set}" = set; then
9761 echo $ECHO_N "(cached) $ECHO_C" >&6
9762else
9763 cat >conftest.$ac_ext <<_ACEOF
9764/* confdefs.h. */
9765_ACEOF
9766cat confdefs.h >>conftest.$ac_ext
9767cat >>conftest.$ac_ext <<_ACEOF
9768/* end confdefs.h. */
9769$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009770typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009771int
9772main ()
9773{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009774if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009775 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009776if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009777 return 0;
9778 ;
9779 return 0;
9780}
9781_ACEOF
9782rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009783if { (ac_try="$ac_compile"
9784case "(($ac_try" in
9785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9786 *) ac_try_echo=$ac_try;;
9787esac
9788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009790 ac_status=$?
9791 grep -v '^ *+' conftest.er1 >conftest.err
9792 rm -f conftest.er1
9793 cat conftest.err >&5
9794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009795 (exit $ac_status); } && {
9796 test -z "$ac_c_werror_flag" ||
9797 test ! -s conftest.err
9798 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009799 ac_cv_type_size_t=yes
9800else
9801 echo "$as_me: failed program was:" >&5
9802sed 's/^/| /' conftest.$ac_ext >&5
9803
Martin v. Löwiseba40652007-08-30 20:10:57 +00009804 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009805fi
Brett Cannon19fab762007-06-02 03:02:29 +00009806
Martin v. Löwiseba40652007-08-30 20:10:57 +00009807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9808fi
9809{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9810echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9811
9812# The cast to long int works around a bug in the HP C Compiler
9813# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9814# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9815# This bug is HP SR number 8606223364.
9816{ echo "$as_me:$LINENO: checking size of size_t" >&5
9817echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009818if test "${ac_cv_sizeof_size_t+set}" = set; then
9819 echo $ECHO_N "(cached) $ECHO_C" >&6
9820else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009821 if test "$cross_compiling" = yes; then
9822 # Depending upon the size, compute the lo and hi bounds.
9823cat >conftest.$ac_ext <<_ACEOF
9824/* confdefs.h. */
9825_ACEOF
9826cat confdefs.h >>conftest.$ac_ext
9827cat >>conftest.$ac_ext <<_ACEOF
9828/* end confdefs.h. */
9829$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009830 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009831int
9832main ()
9833{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009834static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009835test_array [0] = 0
9836
9837 ;
9838 return 0;
9839}
9840_ACEOF
9841rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009842if { (ac_try="$ac_compile"
9843case "(($ac_try" in
9844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9845 *) ac_try_echo=$ac_try;;
9846esac
9847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9848 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009849 ac_status=$?
9850 grep -v '^ *+' conftest.er1 >conftest.err
9851 rm -f conftest.er1
9852 cat conftest.err >&5
9853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009854 (exit $ac_status); } && {
9855 test -z "$ac_c_werror_flag" ||
9856 test ! -s conftest.err
9857 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009858 ac_lo=0 ac_mid=0
9859 while :; do
9860 cat >conftest.$ac_ext <<_ACEOF
9861/* confdefs.h. */
9862_ACEOF
9863cat confdefs.h >>conftest.$ac_ext
9864cat >>conftest.$ac_ext <<_ACEOF
9865/* end confdefs.h. */
9866$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009867 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009868int
9869main ()
9870{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009871static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009872test_array [0] = 0
9873
9874 ;
9875 return 0;
9876}
9877_ACEOF
9878rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009879if { (ac_try="$ac_compile"
9880case "(($ac_try" in
9881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9882 *) ac_try_echo=$ac_try;;
9883esac
9884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009886 ac_status=$?
9887 grep -v '^ *+' conftest.er1 >conftest.err
9888 rm -f conftest.er1
9889 cat conftest.err >&5
9890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009891 (exit $ac_status); } && {
9892 test -z "$ac_c_werror_flag" ||
9893 test ! -s conftest.err
9894 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009895 ac_hi=$ac_mid; break
9896else
9897 echo "$as_me: failed program was:" >&5
9898sed 's/^/| /' conftest.$ac_ext >&5
9899
Martin v. Löwiseba40652007-08-30 20:10:57 +00009900 ac_lo=`expr $ac_mid + 1`
9901 if test $ac_lo -le $ac_mid; then
9902 ac_lo= ac_hi=
9903 break
9904 fi
9905 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907
9908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009909 done
9910else
9911 echo "$as_me: failed program was:" >&5
9912sed 's/^/| /' conftest.$ac_ext >&5
9913
Martin v. Löwiseba40652007-08-30 20:10:57 +00009914 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009915/* confdefs.h. */
9916_ACEOF
9917cat confdefs.h >>conftest.$ac_ext
9918cat >>conftest.$ac_ext <<_ACEOF
9919/* end confdefs.h. */
9920$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009921 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009922int
9923main ()
9924{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009925static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009926test_array [0] = 0
9927
9928 ;
9929 return 0;
9930}
9931_ACEOF
9932rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933if { (ac_try="$ac_compile"
9934case "(($ac_try" in
9935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9936 *) ac_try_echo=$ac_try;;
9937esac
9938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9939 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009940 ac_status=$?
9941 grep -v '^ *+' conftest.er1 >conftest.err
9942 rm -f conftest.er1
9943 cat conftest.err >&5
9944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945 (exit $ac_status); } && {
9946 test -z "$ac_c_werror_flag" ||
9947 test ! -s conftest.err
9948 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009949 ac_hi=-1 ac_mid=-1
9950 while :; do
9951 cat >conftest.$ac_ext <<_ACEOF
9952/* confdefs.h. */
9953_ACEOF
9954cat confdefs.h >>conftest.$ac_ext
9955cat >>conftest.$ac_ext <<_ACEOF
9956/* end confdefs.h. */
9957$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009958 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009959int
9960main ()
9961{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009962static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009963test_array [0] = 0
9964
9965 ;
9966 return 0;
9967}
9968_ACEOF
9969rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009970if { (ac_try="$ac_compile"
9971case "(($ac_try" in
9972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9973 *) ac_try_echo=$ac_try;;
9974esac
9975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9976 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009977 ac_status=$?
9978 grep -v '^ *+' conftest.er1 >conftest.err
9979 rm -f conftest.er1
9980 cat conftest.err >&5
9981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009982 (exit $ac_status); } && {
9983 test -z "$ac_c_werror_flag" ||
9984 test ! -s conftest.err
9985 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009986 ac_lo=$ac_mid; break
9987else
9988 echo "$as_me: failed program was:" >&5
9989sed 's/^/| /' conftest.$ac_ext >&5
9990
Martin v. Löwiseba40652007-08-30 20:10:57 +00009991 ac_hi=`expr '(' $ac_mid ')' - 1`
9992 if test $ac_mid -le $ac_hi; then
9993 ac_lo= ac_hi=
9994 break
9995 fi
9996 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009998
9999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010000 done
10001else
10002 echo "$as_me: failed program was:" >&5
10003sed 's/^/| /' conftest.$ac_ext >&5
10004
Martin v. Löwiseba40652007-08-30 20:10:57 +000010005 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010007
10008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010010
10011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010012# Binary search between lo and hi bounds.
10013while test "x$ac_lo" != "x$ac_hi"; do
10014 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10015 cat >conftest.$ac_ext <<_ACEOF
10016/* confdefs.h. */
10017_ACEOF
10018cat confdefs.h >>conftest.$ac_ext
10019cat >>conftest.$ac_ext <<_ACEOF
10020/* end confdefs.h. */
10021$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010022 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010023int
10024main ()
10025{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010026static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010027test_array [0] = 0
10028
10029 ;
10030 return 0;
10031}
10032_ACEOF
10033rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010034if { (ac_try="$ac_compile"
10035case "(($ac_try" in
10036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10037 *) ac_try_echo=$ac_try;;
10038esac
10039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10040 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010041 ac_status=$?
10042 grep -v '^ *+' conftest.er1 >conftest.err
10043 rm -f conftest.er1
10044 cat conftest.err >&5
10045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010046 (exit $ac_status); } && {
10047 test -z "$ac_c_werror_flag" ||
10048 test ! -s conftest.err
10049 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010050 ac_hi=$ac_mid
10051else
10052 echo "$as_me: failed program was:" >&5
10053sed 's/^/| /' conftest.$ac_ext >&5
10054
Martin v. Löwiseba40652007-08-30 20:10:57 +000010055 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010057
10058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010059done
10060case $ac_lo in
10061?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010062'') if test "$ac_cv_type_size_t" = yes; then
10063 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010064See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010065echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010066See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010067 { (exit 77); exit 77; }; }
10068 else
10069 ac_cv_sizeof_size_t=0
10070 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010071esac
10072else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010073 cat >conftest.$ac_ext <<_ACEOF
10074/* confdefs.h. */
10075_ACEOF
10076cat confdefs.h >>conftest.$ac_ext
10077cat >>conftest.$ac_ext <<_ACEOF
10078/* end confdefs.h. */
10079$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010080 typedef size_t ac__type_sizeof_;
10081static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10082static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010083#include <stdio.h>
10084#include <stdlib.h>
10085int
10086main ()
10087{
10088
10089 FILE *f = fopen ("conftest.val", "w");
10090 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091 return 1;
10092 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010093 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010094 long int i = longval ();
10095 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10096 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010097 fprintf (f, "%ld\n", i);
10098 }
10099 else
10100 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010101 unsigned long int i = ulongval ();
10102 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10103 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010104 fprintf (f, "%lu\n", i);
10105 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010106 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010107
10108 ;
10109 return 0;
10110}
10111_ACEOF
10112rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010113if { (ac_try="$ac_link"
10114case "(($ac_try" in
10115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10116 *) ac_try_echo=$ac_try;;
10117esac
10118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10119 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010120 ac_status=$?
10121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10122 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010123 { (case "(($ac_try" in
10124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10125 *) ac_try_echo=$ac_try;;
10126esac
10127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10128 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010129 ac_status=$?
10130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10131 (exit $ac_status); }; }; then
10132 ac_cv_sizeof_size_t=`cat conftest.val`
10133else
10134 echo "$as_me: program exited with status $ac_status" >&5
10135echo "$as_me: failed program was:" >&5
10136sed 's/^/| /' conftest.$ac_ext >&5
10137
10138( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010139if test "$ac_cv_type_size_t" = yes; then
10140 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010141See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010142echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010143See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144 { (exit 77); exit 77; }; }
10145 else
10146 ac_cv_sizeof_size_t=0
10147 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149rm -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 +000010150fi
10151rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010153{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10154echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10155
10156
10157
Martin v. Löwis18e16552006-02-15 17:27:45 +000010158cat >>confdefs.h <<_ACEOF
10159#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10160_ACEOF
10161
10162
Christian Heimes951cc0f2008-01-31 23:08:23 +000010163{ echo "$as_me:$LINENO: checking for pid_t" >&5
10164echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10165if test "${ac_cv_type_pid_t+set}" = set; then
10166 echo $ECHO_N "(cached) $ECHO_C" >&6
10167else
10168 cat >conftest.$ac_ext <<_ACEOF
10169/* confdefs.h. */
10170_ACEOF
10171cat confdefs.h >>conftest.$ac_ext
10172cat >>conftest.$ac_ext <<_ACEOF
10173/* end confdefs.h. */
10174$ac_includes_default
10175typedef pid_t ac__type_new_;
10176int
10177main ()
10178{
10179if ((ac__type_new_ *) 0)
10180 return 0;
10181if (sizeof (ac__type_new_))
10182 return 0;
10183 ;
10184 return 0;
10185}
10186_ACEOF
10187rm -f conftest.$ac_objext
10188if { (ac_try="$ac_compile"
10189case "(($ac_try" in
10190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10191 *) ac_try_echo=$ac_try;;
10192esac
10193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10194 (eval "$ac_compile") 2>conftest.er1
10195 ac_status=$?
10196 grep -v '^ *+' conftest.er1 >conftest.err
10197 rm -f conftest.er1
10198 cat conftest.err >&5
10199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10200 (exit $ac_status); } && {
10201 test -z "$ac_c_werror_flag" ||
10202 test ! -s conftest.err
10203 } && test -s conftest.$ac_objext; then
10204 ac_cv_type_pid_t=yes
10205else
10206 echo "$as_me: failed program was:" >&5
10207sed 's/^/| /' conftest.$ac_ext >&5
10208
10209 ac_cv_type_pid_t=no
10210fi
10211
10212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10213fi
10214{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10215echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10216
10217# The cast to long int works around a bug in the HP C Compiler
10218# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10219# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10220# This bug is HP SR number 8606223364.
10221{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10222echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10223if test "${ac_cv_sizeof_pid_t+set}" = set; then
10224 echo $ECHO_N "(cached) $ECHO_C" >&6
10225else
10226 if test "$cross_compiling" = yes; then
10227 # Depending upon the size, compute the lo and hi bounds.
10228cat >conftest.$ac_ext <<_ACEOF
10229/* confdefs.h. */
10230_ACEOF
10231cat confdefs.h >>conftest.$ac_ext
10232cat >>conftest.$ac_ext <<_ACEOF
10233/* end confdefs.h. */
10234$ac_includes_default
10235 typedef pid_t ac__type_sizeof_;
10236int
10237main ()
10238{
10239static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10240test_array [0] = 0
10241
10242 ;
10243 return 0;
10244}
10245_ACEOF
10246rm -f conftest.$ac_objext
10247if { (ac_try="$ac_compile"
10248case "(($ac_try" in
10249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10250 *) ac_try_echo=$ac_try;;
10251esac
10252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10253 (eval "$ac_compile") 2>conftest.er1
10254 ac_status=$?
10255 grep -v '^ *+' conftest.er1 >conftest.err
10256 rm -f conftest.er1
10257 cat conftest.err >&5
10258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10259 (exit $ac_status); } && {
10260 test -z "$ac_c_werror_flag" ||
10261 test ! -s conftest.err
10262 } && test -s conftest.$ac_objext; then
10263 ac_lo=0 ac_mid=0
10264 while :; do
10265 cat >conftest.$ac_ext <<_ACEOF
10266/* confdefs.h. */
10267_ACEOF
10268cat confdefs.h >>conftest.$ac_ext
10269cat >>conftest.$ac_ext <<_ACEOF
10270/* end confdefs.h. */
10271$ac_includes_default
10272 typedef pid_t ac__type_sizeof_;
10273int
10274main ()
10275{
10276static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10277test_array [0] = 0
10278
10279 ;
10280 return 0;
10281}
10282_ACEOF
10283rm -f conftest.$ac_objext
10284if { (ac_try="$ac_compile"
10285case "(($ac_try" in
10286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10287 *) ac_try_echo=$ac_try;;
10288esac
10289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10290 (eval "$ac_compile") 2>conftest.er1
10291 ac_status=$?
10292 grep -v '^ *+' conftest.er1 >conftest.err
10293 rm -f conftest.er1
10294 cat conftest.err >&5
10295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10296 (exit $ac_status); } && {
10297 test -z "$ac_c_werror_flag" ||
10298 test ! -s conftest.err
10299 } && test -s conftest.$ac_objext; then
10300 ac_hi=$ac_mid; break
10301else
10302 echo "$as_me: failed program was:" >&5
10303sed 's/^/| /' conftest.$ac_ext >&5
10304
10305 ac_lo=`expr $ac_mid + 1`
10306 if test $ac_lo -le $ac_mid; then
10307 ac_lo= ac_hi=
10308 break
10309 fi
10310 ac_mid=`expr 2 '*' $ac_mid + 1`
10311fi
10312
10313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10314 done
10315else
10316 echo "$as_me: failed program was:" >&5
10317sed 's/^/| /' conftest.$ac_ext >&5
10318
10319 cat >conftest.$ac_ext <<_ACEOF
10320/* confdefs.h. */
10321_ACEOF
10322cat confdefs.h >>conftest.$ac_ext
10323cat >>conftest.$ac_ext <<_ACEOF
10324/* end confdefs.h. */
10325$ac_includes_default
10326 typedef pid_t ac__type_sizeof_;
10327int
10328main ()
10329{
10330static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10331test_array [0] = 0
10332
10333 ;
10334 return 0;
10335}
10336_ACEOF
10337rm -f conftest.$ac_objext
10338if { (ac_try="$ac_compile"
10339case "(($ac_try" in
10340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10341 *) ac_try_echo=$ac_try;;
10342esac
10343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10344 (eval "$ac_compile") 2>conftest.er1
10345 ac_status=$?
10346 grep -v '^ *+' conftest.er1 >conftest.err
10347 rm -f conftest.er1
10348 cat conftest.err >&5
10349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10350 (exit $ac_status); } && {
10351 test -z "$ac_c_werror_flag" ||
10352 test ! -s conftest.err
10353 } && test -s conftest.$ac_objext; then
10354 ac_hi=-1 ac_mid=-1
10355 while :; do
10356 cat >conftest.$ac_ext <<_ACEOF
10357/* confdefs.h. */
10358_ACEOF
10359cat confdefs.h >>conftest.$ac_ext
10360cat >>conftest.$ac_ext <<_ACEOF
10361/* end confdefs.h. */
10362$ac_includes_default
10363 typedef pid_t ac__type_sizeof_;
10364int
10365main ()
10366{
10367static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10368test_array [0] = 0
10369
10370 ;
10371 return 0;
10372}
10373_ACEOF
10374rm -f conftest.$ac_objext
10375if { (ac_try="$ac_compile"
10376case "(($ac_try" in
10377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10378 *) ac_try_echo=$ac_try;;
10379esac
10380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10381 (eval "$ac_compile") 2>conftest.er1
10382 ac_status=$?
10383 grep -v '^ *+' conftest.er1 >conftest.err
10384 rm -f conftest.er1
10385 cat conftest.err >&5
10386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10387 (exit $ac_status); } && {
10388 test -z "$ac_c_werror_flag" ||
10389 test ! -s conftest.err
10390 } && test -s conftest.$ac_objext; then
10391 ac_lo=$ac_mid; break
10392else
10393 echo "$as_me: failed program was:" >&5
10394sed 's/^/| /' conftest.$ac_ext >&5
10395
10396 ac_hi=`expr '(' $ac_mid ')' - 1`
10397 if test $ac_mid -le $ac_hi; then
10398 ac_lo= ac_hi=
10399 break
10400 fi
10401 ac_mid=`expr 2 '*' $ac_mid`
10402fi
10403
10404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10405 done
10406else
10407 echo "$as_me: failed program was:" >&5
10408sed 's/^/| /' conftest.$ac_ext >&5
10409
10410 ac_lo= ac_hi=
10411fi
10412
10413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10414fi
10415
10416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10417# Binary search between lo and hi bounds.
10418while test "x$ac_lo" != "x$ac_hi"; do
10419 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10420 cat >conftest.$ac_ext <<_ACEOF
10421/* confdefs.h. */
10422_ACEOF
10423cat confdefs.h >>conftest.$ac_ext
10424cat >>conftest.$ac_ext <<_ACEOF
10425/* end confdefs.h. */
10426$ac_includes_default
10427 typedef pid_t ac__type_sizeof_;
10428int
10429main ()
10430{
10431static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10432test_array [0] = 0
10433
10434 ;
10435 return 0;
10436}
10437_ACEOF
10438rm -f conftest.$ac_objext
10439if { (ac_try="$ac_compile"
10440case "(($ac_try" in
10441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10442 *) ac_try_echo=$ac_try;;
10443esac
10444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10445 (eval "$ac_compile") 2>conftest.er1
10446 ac_status=$?
10447 grep -v '^ *+' conftest.er1 >conftest.err
10448 rm -f conftest.er1
10449 cat conftest.err >&5
10450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10451 (exit $ac_status); } && {
10452 test -z "$ac_c_werror_flag" ||
10453 test ! -s conftest.err
10454 } && test -s conftest.$ac_objext; then
10455 ac_hi=$ac_mid
10456else
10457 echo "$as_me: failed program was:" >&5
10458sed 's/^/| /' conftest.$ac_ext >&5
10459
10460 ac_lo=`expr '(' $ac_mid ')' + 1`
10461fi
10462
10463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10464done
10465case $ac_lo in
10466?*) ac_cv_sizeof_pid_t=$ac_lo;;
10467'') if test "$ac_cv_type_pid_t" = yes; then
10468 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10469See \`config.log' for more details." >&5
10470echo "$as_me: error: cannot compute sizeof (pid_t)
10471See \`config.log' for more details." >&2;}
10472 { (exit 77); exit 77; }; }
10473 else
10474 ac_cv_sizeof_pid_t=0
10475 fi ;;
10476esac
10477else
10478 cat >conftest.$ac_ext <<_ACEOF
10479/* confdefs.h. */
10480_ACEOF
10481cat confdefs.h >>conftest.$ac_ext
10482cat >>conftest.$ac_ext <<_ACEOF
10483/* end confdefs.h. */
10484$ac_includes_default
10485 typedef pid_t ac__type_sizeof_;
10486static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10487static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10488#include <stdio.h>
10489#include <stdlib.h>
10490int
10491main ()
10492{
10493
10494 FILE *f = fopen ("conftest.val", "w");
10495 if (! f)
10496 return 1;
10497 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10498 {
10499 long int i = longval ();
10500 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10501 return 1;
10502 fprintf (f, "%ld\n", i);
10503 }
10504 else
10505 {
10506 unsigned long int i = ulongval ();
10507 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10508 return 1;
10509 fprintf (f, "%lu\n", i);
10510 }
10511 return ferror (f) || fclose (f) != 0;
10512
10513 ;
10514 return 0;
10515}
10516_ACEOF
10517rm -f conftest$ac_exeext
10518if { (ac_try="$ac_link"
10519case "(($ac_try" in
10520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10521 *) ac_try_echo=$ac_try;;
10522esac
10523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10524 (eval "$ac_link") 2>&5
10525 ac_status=$?
10526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10528 { (case "(($ac_try" in
10529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10530 *) ac_try_echo=$ac_try;;
10531esac
10532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10533 (eval "$ac_try") 2>&5
10534 ac_status=$?
10535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10536 (exit $ac_status); }; }; then
10537 ac_cv_sizeof_pid_t=`cat conftest.val`
10538else
10539 echo "$as_me: program exited with status $ac_status" >&5
10540echo "$as_me: failed program was:" >&5
10541sed 's/^/| /' conftest.$ac_ext >&5
10542
10543( exit $ac_status )
10544if test "$ac_cv_type_pid_t" = yes; then
10545 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10546See \`config.log' for more details." >&5
10547echo "$as_me: error: cannot compute sizeof (pid_t)
10548See \`config.log' for more details." >&2;}
10549 { (exit 77); exit 77; }; }
10550 else
10551 ac_cv_sizeof_pid_t=0
10552 fi
10553fi
10554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10555fi
10556rm -f conftest.val
10557fi
10558{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10559echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10560
10561
10562
10563cat >>confdefs.h <<_ACEOF
10564#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10565_ACEOF
10566
10567
Michael W. Hudson54241132001-12-07 15:38:26 +000010568
Martin v. Löwiseba40652007-08-30 20:10:57 +000010569{ echo "$as_me:$LINENO: checking for long long support" >&5
10570echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010571have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010573/* confdefs.h. */
10574_ACEOF
10575cat confdefs.h >>conftest.$ac_ext
10576cat >>conftest.$ac_ext <<_ACEOF
10577/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010578
Martin v. Löwis11437992002-04-12 09:54:03 +000010579int
10580main ()
10581{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010582long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010583 ;
10584 return 0;
10585}
10586_ACEOF
10587rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010588if { (ac_try="$ac_compile"
10589case "(($ac_try" in
10590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10591 *) ac_try_echo=$ac_try;;
10592esac
10593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10594 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010596 grep -v '^ *+' conftest.er1 >conftest.err
10597 rm -f conftest.er1
10598 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010600 (exit $ac_status); } && {
10601 test -z "$ac_c_werror_flag" ||
10602 test ! -s conftest.err
10603 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010604
10605
10606cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010607#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010608_ACEOF
10609
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010610 have_long_long=yes
10611
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010612else
Martin v. Löwis11437992002-04-12 09:54:03 +000010613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010614sed 's/^/| /' conftest.$ac_ext >&5
10615
Martin v. Löwiseba40652007-08-30 20:10:57 +000010616
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010618
10619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10620{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10621echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010622if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010623{ echo "$as_me:$LINENO: checking for long long" >&5
10624echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010625if test "${ac_cv_type_long_long+set}" = set; then
10626 echo $ECHO_N "(cached) $ECHO_C" >&6
10627else
10628 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010629/* confdefs.h. */
10630_ACEOF
10631cat confdefs.h >>conftest.$ac_ext
10632cat >>conftest.$ac_ext <<_ACEOF
10633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010634$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010635typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010636int
10637main ()
10638{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010639if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010641if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010642 return 0;
10643 ;
10644 return 0;
10645}
10646_ACEOF
10647rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010648if { (ac_try="$ac_compile"
10649case "(($ac_try" in
10650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10651 *) ac_try_echo=$ac_try;;
10652esac
10653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10654 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010656 grep -v '^ *+' conftest.er1 >conftest.err
10657 rm -f conftest.er1
10658 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010660 (exit $ac_status); } && {
10661 test -z "$ac_c_werror_flag" ||
10662 test ! -s conftest.err
10663 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010664 ac_cv_type_long_long=yes
10665else
10666 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 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010670fi
Brett Cannon19fab762007-06-02 03:02:29 +000010671
Martin v. Löwiseba40652007-08-30 20:10:57 +000010672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10673fi
10674{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10675echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10676
10677# The cast to long int works around a bug in the HP C Compiler
10678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10680# This bug is HP SR number 8606223364.
10681{ echo "$as_me:$LINENO: checking size of long long" >&5
10682echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010683if test "${ac_cv_sizeof_long_long+set}" = set; then
10684 echo $ECHO_N "(cached) $ECHO_C" >&6
10685else
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 if test "$cross_compiling" = yes; then
10687 # Depending upon the size, compute the lo and hi bounds.
10688cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010689/* confdefs.h. */
10690_ACEOF
10691cat confdefs.h >>conftest.$ac_ext
10692cat >>conftest.$ac_ext <<_ACEOF
10693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010694$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010696int
10697main ()
10698{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010699static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010700test_array [0] = 0
10701
10702 ;
10703 return 0;
10704}
10705_ACEOF
10706rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010707if { (ac_try="$ac_compile"
10708case "(($ac_try" in
10709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10710 *) ac_try_echo=$ac_try;;
10711esac
10712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10713 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010715 grep -v '^ *+' conftest.er1 >conftest.err
10716 rm -f conftest.er1
10717 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010719 (exit $ac_status); } && {
10720 test -z "$ac_c_werror_flag" ||
10721 test ! -s conftest.err
10722 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 ac_lo=0 ac_mid=0
10724 while :; do
10725 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010726/* confdefs.h. */
10727_ACEOF
10728cat confdefs.h >>conftest.$ac_ext
10729cat >>conftest.$ac_ext <<_ACEOF
10730/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010731$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010732 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010733int
10734main ()
10735{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010736static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010737test_array [0] = 0
10738
10739 ;
10740 return 0;
10741}
10742_ACEOF
10743rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010744if { (ac_try="$ac_compile"
10745case "(($ac_try" in
10746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10747 *) ac_try_echo=$ac_try;;
10748esac
10749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10750 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010752 grep -v '^ *+' conftest.er1 >conftest.err
10753 rm -f conftest.er1
10754 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010756 (exit $ac_status); } && {
10757 test -z "$ac_c_werror_flag" ||
10758 test ! -s conftest.err
10759 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 ac_hi=$ac_mid; break
10761else
10762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010763sed 's/^/| /' conftest.$ac_ext >&5
10764
Martin v. Löwiseba40652007-08-30 20:10:57 +000010765 ac_lo=`expr $ac_mid + 1`
10766 if test $ac_lo -le $ac_mid; then
10767 ac_lo= ac_hi=
10768 break
10769 fi
10770 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010772
10773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 done
10775else
10776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010777sed 's/^/| /' conftest.$ac_ext >&5
10778
Martin v. Löwiseba40652007-08-30 20:10:57 +000010779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010780/* confdefs.h. */
10781_ACEOF
10782cat confdefs.h >>conftest.$ac_ext
10783cat >>conftest.$ac_ext <<_ACEOF
10784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010785$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010786 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010787int
10788main ()
10789{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010791test_array [0] = 0
10792
10793 ;
10794 return 0;
10795}
10796_ACEOF
10797rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010798if { (ac_try="$ac_compile"
10799case "(($ac_try" in
10800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10801 *) ac_try_echo=$ac_try;;
10802esac
10803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010806 grep -v '^ *+' conftest.er1 >conftest.err
10807 rm -f conftest.er1
10808 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010810 (exit $ac_status); } && {
10811 test -z "$ac_c_werror_flag" ||
10812 test ! -s conftest.err
10813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010814 ac_hi=-1 ac_mid=-1
10815 while :; do
10816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010817/* confdefs.h. */
10818_ACEOF
10819cat confdefs.h >>conftest.$ac_ext
10820cat >>conftest.$ac_ext <<_ACEOF
10821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010822$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010823 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010824int
10825main ()
10826{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010827static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010828test_array [0] = 0
10829
10830 ;
10831 return 0;
10832}
10833_ACEOF
10834rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010835if { (ac_try="$ac_compile"
10836case "(($ac_try" in
10837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10838 *) ac_try_echo=$ac_try;;
10839esac
10840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10841 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010843 grep -v '^ *+' conftest.er1 >conftest.err
10844 rm -f conftest.er1
10845 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010847 (exit $ac_status); } && {
10848 test -z "$ac_c_werror_flag" ||
10849 test ! -s conftest.err
10850 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010851 ac_lo=$ac_mid; break
10852else
10853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010854sed 's/^/| /' conftest.$ac_ext >&5
10855
Martin v. Löwiseba40652007-08-30 20:10:57 +000010856 ac_hi=`expr '(' $ac_mid ')' - 1`
10857 if test $ac_mid -le $ac_hi; then
10858 ac_lo= ac_hi=
10859 break
10860 fi
10861 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010863
10864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010865 done
10866else
10867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010868sed 's/^/| /' conftest.$ac_ext >&5
10869
Martin v. Löwiseba40652007-08-30 20:10:57 +000010870 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010872
10873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010875
10876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010877# Binary search between lo and hi bounds.
10878while test "x$ac_lo" != "x$ac_hi"; do
10879 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010881/* confdefs.h. */
10882_ACEOF
10883cat confdefs.h >>conftest.$ac_ext
10884cat >>conftest.$ac_ext <<_ACEOF
10885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010886$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010887 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010888int
10889main ()
10890{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010891static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010892test_array [0] = 0
10893
10894 ;
10895 return 0;
10896}
10897_ACEOF
10898rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010899if { (ac_try="$ac_compile"
10900case "(($ac_try" in
10901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10902 *) ac_try_echo=$ac_try;;
10903esac
10904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010907 grep -v '^ *+' conftest.er1 >conftest.err
10908 rm -f conftest.er1
10909 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010911 (exit $ac_status); } && {
10912 test -z "$ac_c_werror_flag" ||
10913 test ! -s conftest.err
10914 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010915 ac_hi=$ac_mid
10916else
10917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010918sed 's/^/| /' conftest.$ac_ext >&5
10919
Martin v. Löwiseba40652007-08-30 20:10:57 +000010920 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010922
10923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010924done
10925case $ac_lo in
10926?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010927'') if test "$ac_cv_type_long_long" = yes; then
10928 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010929See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010930echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010931See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010932 { (exit 77); exit 77; }; }
10933 else
10934 ac_cv_sizeof_long_long=0
10935 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010936esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010937else
Martin v. Löwis11437992002-04-12 09:54:03 +000010938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010939/* confdefs.h. */
10940_ACEOF
10941cat confdefs.h >>conftest.$ac_ext
10942cat >>conftest.$ac_ext <<_ACEOF
10943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010944$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010945 typedef long long ac__type_sizeof_;
10946static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10947static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010948#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010949#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010950int
10951main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010952{
Martin v. Löwis11437992002-04-12 09:54:03 +000010953
10954 FILE *f = fopen ("conftest.val", "w");
10955 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010956 return 1;
10957 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010958 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010959 long int i = longval ();
10960 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10961 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 fprintf (f, "%ld\n", i);
10963 }
10964 else
10965 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010966 unsigned long int i = ulongval ();
10967 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10968 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010969 fprintf (f, "%lu\n", i);
10970 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010971 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010972
10973 ;
10974 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010975}
Martin v. Löwis11437992002-04-12 09:54:03 +000010976_ACEOF
10977rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010978if { (ac_try="$ac_link"
10979case "(($ac_try" in
10980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10981 *) ac_try_echo=$ac_try;;
10982esac
10983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10984 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010985 ac_status=$?
10986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10987 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010988 { (case "(($ac_try" in
10989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10990 *) ac_try_echo=$ac_try;;
10991esac
10992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10993 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010994 ac_status=$?
10995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10996 (exit $ac_status); }; }; then
10997 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010998else
Martin v. Löwis11437992002-04-12 09:54:03 +000010999 echo "$as_me: program exited with status $ac_status" >&5
11000echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011001sed 's/^/| /' conftest.$ac_ext >&5
11002
Martin v. Löwis11437992002-04-12 09:54:03 +000011003( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011004if test "$ac_cv_type_long_long" = yes; then
11005 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011006See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011007echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011008See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011009 { (exit 77); exit 77; }; }
11010 else
11011 ac_cv_sizeof_long_long=0
11012 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011013fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011014rm -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 +000011015fi
11016rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011018{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11019echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11020
11021
11022
Martin v. Löwis11437992002-04-12 09:54:03 +000011023cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011024#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011025_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011026
Michael W. Hudson54241132001-12-07 15:38:26 +000011027
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011028fi
11029
Martin v. Löwiseba40652007-08-30 20:10:57 +000011030{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11031echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011032have_c99_bool=no
11033cat >conftest.$ac_ext <<_ACEOF
11034/* confdefs.h. */
11035_ACEOF
11036cat confdefs.h >>conftest.$ac_ext
11037cat >>conftest.$ac_ext <<_ACEOF
11038/* end confdefs.h. */
11039
11040int
11041main ()
11042{
11043_Bool x; x = (_Bool)0;
11044 ;
11045 return 0;
11046}
11047_ACEOF
11048rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011049if { (ac_try="$ac_compile"
11050case "(($ac_try" in
11051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11052 *) ac_try_echo=$ac_try;;
11053esac
11054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11055 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011056 ac_status=$?
11057 grep -v '^ *+' conftest.er1 >conftest.err
11058 rm -f conftest.er1
11059 cat conftest.err >&5
11060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011061 (exit $ac_status); } && {
11062 test -z "$ac_c_werror_flag" ||
11063 test ! -s conftest.err
11064 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011065
11066
11067cat >>confdefs.h <<\_ACEOF
11068#define HAVE_C99_BOOL 1
11069_ACEOF
11070
11071 have_c99_bool=yes
11072
11073else
11074 echo "$as_me: failed program was:" >&5
11075sed 's/^/| /' conftest.$ac_ext >&5
11076
Martin v. Löwiseba40652007-08-30 20:10:57 +000011077
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011079
11080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11081{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11082echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011083if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011084{ echo "$as_me:$LINENO: checking for _Bool" >&5
11085echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011086if test "${ac_cv_type__Bool+set}" = set; then
11087 echo $ECHO_N "(cached) $ECHO_C" >&6
11088else
11089 cat >conftest.$ac_ext <<_ACEOF
11090/* confdefs.h. */
11091_ACEOF
11092cat confdefs.h >>conftest.$ac_ext
11093cat >>conftest.$ac_ext <<_ACEOF
11094/* end confdefs.h. */
11095$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011096typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011097int
11098main ()
11099{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011100if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011101 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011102if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011103 return 0;
11104 ;
11105 return 0;
11106}
11107_ACEOF
11108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011109if { (ac_try="$ac_compile"
11110case "(($ac_try" in
11111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11112 *) ac_try_echo=$ac_try;;
11113esac
11114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011116 ac_status=$?
11117 grep -v '^ *+' conftest.er1 >conftest.err
11118 rm -f conftest.er1
11119 cat conftest.err >&5
11120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011121 (exit $ac_status); } && {
11122 test -z "$ac_c_werror_flag" ||
11123 test ! -s conftest.err
11124 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011125 ac_cv_type__Bool=yes
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 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011131fi
Brett Cannon19fab762007-06-02 03:02:29 +000011132
Martin v. Löwiseba40652007-08-30 20:10:57 +000011133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11134fi
11135{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11136echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11137
11138# The cast to long int works around a bug in the HP C Compiler
11139# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11140# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11141# This bug is HP SR number 8606223364.
11142{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11143echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011144if test "${ac_cv_sizeof__Bool+set}" = set; then
11145 echo $ECHO_N "(cached) $ECHO_C" >&6
11146else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011147 if test "$cross_compiling" = yes; then
11148 # Depending upon the size, compute the lo and hi bounds.
11149cat >conftest.$ac_ext <<_ACEOF
11150/* confdefs.h. */
11151_ACEOF
11152cat confdefs.h >>conftest.$ac_ext
11153cat >>conftest.$ac_ext <<_ACEOF
11154/* end confdefs.h. */
11155$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011156 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011157int
11158main ()
11159{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011160static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011161test_array [0] = 0
11162
11163 ;
11164 return 0;
11165}
11166_ACEOF
11167rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011168if { (ac_try="$ac_compile"
11169case "(($ac_try" in
11170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11171 *) ac_try_echo=$ac_try;;
11172esac
11173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011175 ac_status=$?
11176 grep -v '^ *+' conftest.er1 >conftest.err
11177 rm -f conftest.er1
11178 cat conftest.err >&5
11179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011180 (exit $ac_status); } && {
11181 test -z "$ac_c_werror_flag" ||
11182 test ! -s conftest.err
11183 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011184 ac_lo=0 ac_mid=0
11185 while :; do
11186 cat >conftest.$ac_ext <<_ACEOF
11187/* confdefs.h. */
11188_ACEOF
11189cat confdefs.h >>conftest.$ac_ext
11190cat >>conftest.$ac_ext <<_ACEOF
11191/* end confdefs.h. */
11192$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011193 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011194int
11195main ()
11196{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011197static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011198test_array [0] = 0
11199
11200 ;
11201 return 0;
11202}
11203_ACEOF
11204rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011205if { (ac_try="$ac_compile"
11206case "(($ac_try" in
11207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11208 *) ac_try_echo=$ac_try;;
11209esac
11210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011212 ac_status=$?
11213 grep -v '^ *+' conftest.er1 >conftest.err
11214 rm -f conftest.er1
11215 cat conftest.err >&5
11216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011217 (exit $ac_status); } && {
11218 test -z "$ac_c_werror_flag" ||
11219 test ! -s conftest.err
11220 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011221 ac_hi=$ac_mid; break
11222else
11223 echo "$as_me: failed program was:" >&5
11224sed 's/^/| /' conftest.$ac_ext >&5
11225
Martin v. Löwiseba40652007-08-30 20:10:57 +000011226 ac_lo=`expr $ac_mid + 1`
11227 if test $ac_lo -le $ac_mid; then
11228 ac_lo= ac_hi=
11229 break
11230 fi
11231 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011233
11234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011235 done
11236else
11237 echo "$as_me: failed program was:" >&5
11238sed 's/^/| /' conftest.$ac_ext >&5
11239
Martin v. Löwiseba40652007-08-30 20:10:57 +000011240 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011241/* confdefs.h. */
11242_ACEOF
11243cat confdefs.h >>conftest.$ac_ext
11244cat >>conftest.$ac_ext <<_ACEOF
11245/* end confdefs.h. */
11246$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011247 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011248int
11249main ()
11250{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011251static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011252test_array [0] = 0
11253
11254 ;
11255 return 0;
11256}
11257_ACEOF
11258rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011259if { (ac_try="$ac_compile"
11260case "(($ac_try" in
11261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11262 *) ac_try_echo=$ac_try;;
11263esac
11264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011266 ac_status=$?
11267 grep -v '^ *+' conftest.er1 >conftest.err
11268 rm -f conftest.er1
11269 cat conftest.err >&5
11270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011271 (exit $ac_status); } && {
11272 test -z "$ac_c_werror_flag" ||
11273 test ! -s conftest.err
11274 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011275 ac_hi=-1 ac_mid=-1
11276 while :; do
11277 cat >conftest.$ac_ext <<_ACEOF
11278/* confdefs.h. */
11279_ACEOF
11280cat confdefs.h >>conftest.$ac_ext
11281cat >>conftest.$ac_ext <<_ACEOF
11282/* end confdefs.h. */
11283$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011284 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011285int
11286main ()
11287{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011288static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011289test_array [0] = 0
11290
11291 ;
11292 return 0;
11293}
11294_ACEOF
11295rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011296if { (ac_try="$ac_compile"
11297case "(($ac_try" in
11298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11299 *) ac_try_echo=$ac_try;;
11300esac
11301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11302 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011303 ac_status=$?
11304 grep -v '^ *+' conftest.er1 >conftest.err
11305 rm -f conftest.er1
11306 cat conftest.err >&5
11307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011308 (exit $ac_status); } && {
11309 test -z "$ac_c_werror_flag" ||
11310 test ! -s conftest.err
11311 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011312 ac_lo=$ac_mid; break
11313else
11314 echo "$as_me: failed program was:" >&5
11315sed 's/^/| /' conftest.$ac_ext >&5
11316
Martin v. Löwiseba40652007-08-30 20:10:57 +000011317 ac_hi=`expr '(' $ac_mid ')' - 1`
11318 if test $ac_mid -le $ac_hi; then
11319 ac_lo= ac_hi=
11320 break
11321 fi
11322 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011324
11325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011326 done
11327else
11328 echo "$as_me: failed program was:" >&5
11329sed 's/^/| /' conftest.$ac_ext >&5
11330
Martin v. Löwiseba40652007-08-30 20:10:57 +000011331 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011333
11334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011336
11337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011338# Binary search between lo and hi bounds.
11339while test "x$ac_lo" != "x$ac_hi"; do
11340 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11341 cat >conftest.$ac_ext <<_ACEOF
11342/* confdefs.h. */
11343_ACEOF
11344cat confdefs.h >>conftest.$ac_ext
11345cat >>conftest.$ac_ext <<_ACEOF
11346/* end confdefs.h. */
11347$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011348 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011349int
11350main ()
11351{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011352static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011353test_array [0] = 0
11354
11355 ;
11356 return 0;
11357}
11358_ACEOF
11359rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011360if { (ac_try="$ac_compile"
11361case "(($ac_try" in
11362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11363 *) ac_try_echo=$ac_try;;
11364esac
11365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011367 ac_status=$?
11368 grep -v '^ *+' conftest.er1 >conftest.err
11369 rm -f conftest.er1
11370 cat conftest.err >&5
11371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011372 (exit $ac_status); } && {
11373 test -z "$ac_c_werror_flag" ||
11374 test ! -s conftest.err
11375 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011376 ac_hi=$ac_mid
11377else
11378 echo "$as_me: failed program was:" >&5
11379sed 's/^/| /' conftest.$ac_ext >&5
11380
Martin v. Löwiseba40652007-08-30 20:10:57 +000011381 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011382fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011383
11384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011385done
11386case $ac_lo in
11387?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011388'') if test "$ac_cv_type__Bool" = yes; then
11389 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011390See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011391echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011392See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011393 { (exit 77); exit 77; }; }
11394 else
11395 ac_cv_sizeof__Bool=0
11396 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011397esac
11398else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011399 cat >conftest.$ac_ext <<_ACEOF
11400/* confdefs.h. */
11401_ACEOF
11402cat confdefs.h >>conftest.$ac_ext
11403cat >>conftest.$ac_ext <<_ACEOF
11404/* end confdefs.h. */
11405$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011406 typedef _Bool ac__type_sizeof_;
11407static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11408static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011409#include <stdio.h>
11410#include <stdlib.h>
11411int
11412main ()
11413{
11414
11415 FILE *f = fopen ("conftest.val", "w");
11416 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011417 return 1;
11418 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011419 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011420 long int i = longval ();
11421 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11422 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011423 fprintf (f, "%ld\n", i);
11424 }
11425 else
11426 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011427 unsigned long int i = ulongval ();
11428 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11429 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011430 fprintf (f, "%lu\n", i);
11431 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011432 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011433
11434 ;
11435 return 0;
11436}
11437_ACEOF
11438rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011439if { (ac_try="$ac_link"
11440case "(($ac_try" in
11441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11442 *) ac_try_echo=$ac_try;;
11443esac
11444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11445 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011446 ac_status=$?
11447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11448 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011449 { (case "(($ac_try" in
11450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11451 *) ac_try_echo=$ac_try;;
11452esac
11453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11454 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011455 ac_status=$?
11456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11457 (exit $ac_status); }; }; then
11458 ac_cv_sizeof__Bool=`cat conftest.val`
11459else
11460 echo "$as_me: program exited with status $ac_status" >&5
11461echo "$as_me: failed program was:" >&5
11462sed 's/^/| /' conftest.$ac_ext >&5
11463
11464( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011465if test "$ac_cv_type__Bool" = yes; then
11466 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011467See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011468echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011469See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011470 { (exit 77); exit 77; }; }
11471 else
11472 ac_cv_sizeof__Bool=0
11473 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011475rm -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 +000011476fi
11477rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011479{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11480echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11481
11482
11483
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011484cat >>confdefs.h <<_ACEOF
11485#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11486_ACEOF
11487
11488
11489fi
11490
Martin v. Löwiseba40652007-08-30 20:10:57 +000011491{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11492echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011493if test "${ac_cv_type_uintptr_t+set}" = set; then
11494 echo $ECHO_N "(cached) $ECHO_C" >&6
11495else
11496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011497/* confdefs.h. */
11498_ACEOF
11499cat confdefs.h >>conftest.$ac_ext
11500cat >>conftest.$ac_ext <<_ACEOF
11501/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011502#ifdef HAVE_STDINT_H
11503 #include <stdint.h>
11504 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011505
Martin v. Löwiseba40652007-08-30 20:10:57 +000011506typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011507int
11508main ()
11509{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011511 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011512if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011513 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ;
11515 return 0;
11516}
11517_ACEOF
11518rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011519if { (ac_try="$ac_compile"
11520case "(($ac_try" in
11521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11522 *) ac_try_echo=$ac_try;;
11523esac
11524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11525 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011527 grep -v '^ *+' conftest.er1 >conftest.err
11528 rm -f conftest.er1
11529 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011531 (exit $ac_status); } && {
11532 test -z "$ac_c_werror_flag" ||
11533 test ! -s conftest.err
11534 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011535 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011536else
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011538sed 's/^/| /' conftest.$ac_ext >&5
11539
Martin v. Löwiseba40652007-08-30 20:10:57 +000011540 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011542
11543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011545{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11546echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011547if test $ac_cv_type_uintptr_t = yes; then
11548
11549cat >>confdefs.h <<_ACEOF
11550#define HAVE_UINTPTR_T 1
11551_ACEOF
11552
Martin v. Löwiseba40652007-08-30 20:10:57 +000011553{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11554echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011555if test "${ac_cv_type_uintptr_t+set}" = set; then
11556 echo $ECHO_N "(cached) $ECHO_C" >&6
11557else
11558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011559/* confdefs.h. */
11560_ACEOF
11561cat confdefs.h >>conftest.$ac_ext
11562cat >>conftest.$ac_ext <<_ACEOF
11563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011564$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011566int
11567main ()
11568{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011570 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011571if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011572 return 0;
11573 ;
11574 return 0;
11575}
11576_ACEOF
11577rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011578if { (ac_try="$ac_compile"
11579case "(($ac_try" in
11580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11581 *) ac_try_echo=$ac_try;;
11582esac
11583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011586 grep -v '^ *+' conftest.er1 >conftest.err
11587 rm -f conftest.er1
11588 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011590 (exit $ac_status); } && {
11591 test -z "$ac_c_werror_flag" ||
11592 test ! -s conftest.err
11593 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011594 ac_cv_type_uintptr_t=yes
11595else
11596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011597sed 's/^/| /' conftest.$ac_ext >&5
11598
Martin v. Löwiseba40652007-08-30 20:10:57 +000011599 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011600fi
Brett Cannon19fab762007-06-02 03:02:29 +000011601
Martin v. Löwiseba40652007-08-30 20:10:57 +000011602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11603fi
11604{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11605echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11606
11607# The cast to long int works around a bug in the HP C Compiler
11608# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11609# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11610# This bug is HP SR number 8606223364.
11611{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11612echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011613if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11614 echo $ECHO_N "(cached) $ECHO_C" >&6
11615else
Martin v. Löwis11437992002-04-12 09:54:03 +000011616 if test "$cross_compiling" = yes; then
11617 # Depending upon the size, compute the lo and hi bounds.
11618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011619/* confdefs.h. */
11620_ACEOF
11621cat confdefs.h >>conftest.$ac_ext
11622cat >>conftest.$ac_ext <<_ACEOF
11623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011624$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011625 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011626int
11627main ()
11628{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011629static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011630test_array [0] = 0
11631
11632 ;
11633 return 0;
11634}
11635_ACEOF
11636rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011637if { (ac_try="$ac_compile"
11638case "(($ac_try" in
11639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11640 *) ac_try_echo=$ac_try;;
11641esac
11642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011645 grep -v '^ *+' conftest.er1 >conftest.err
11646 rm -f conftest.er1
11647 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011649 (exit $ac_status); } && {
11650 test -z "$ac_c_werror_flag" ||
11651 test ! -s conftest.err
11652 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 ac_lo=0 ac_mid=0
11654 while :; do
11655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011656/* confdefs.h. */
11657_ACEOF
11658cat confdefs.h >>conftest.$ac_ext
11659cat >>conftest.$ac_ext <<_ACEOF
11660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011661$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011662 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011663int
11664main ()
11665{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011666static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011667test_array [0] = 0
11668
11669 ;
11670 return 0;
11671}
11672_ACEOF
11673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011674if { (ac_try="$ac_compile"
11675case "(($ac_try" in
11676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11677 *) ac_try_echo=$ac_try;;
11678esac
11679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011682 grep -v '^ *+' conftest.er1 >conftest.err
11683 rm -f conftest.er1
11684 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011686 (exit $ac_status); } && {
11687 test -z "$ac_c_werror_flag" ||
11688 test ! -s conftest.err
11689 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 ac_hi=$ac_mid; break
11691else
11692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011693sed 's/^/| /' conftest.$ac_ext >&5
11694
Martin v. Löwiseba40652007-08-30 20:10:57 +000011695 ac_lo=`expr $ac_mid + 1`
11696 if test $ac_lo -le $ac_mid; then
11697 ac_lo= ac_hi=
11698 break
11699 fi
11700 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011702
11703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011704 done
11705else
11706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011707sed 's/^/| /' conftest.$ac_ext >&5
11708
Martin v. Löwiseba40652007-08-30 20:10:57 +000011709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011710/* confdefs.h. */
11711_ACEOF
11712cat confdefs.h >>conftest.$ac_ext
11713cat >>conftest.$ac_ext <<_ACEOF
11714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011715$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011716 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011717int
11718main ()
11719{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011720static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011721test_array [0] = 0
11722
11723 ;
11724 return 0;
11725}
11726_ACEOF
11727rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011728if { (ac_try="$ac_compile"
11729case "(($ac_try" in
11730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11731 *) ac_try_echo=$ac_try;;
11732esac
11733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011736 grep -v '^ *+' conftest.er1 >conftest.err
11737 rm -f conftest.er1
11738 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011740 (exit $ac_status); } && {
11741 test -z "$ac_c_werror_flag" ||
11742 test ! -s conftest.err
11743 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011744 ac_hi=-1 ac_mid=-1
11745 while :; do
11746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011747/* confdefs.h. */
11748_ACEOF
11749cat confdefs.h >>conftest.$ac_ext
11750cat >>conftest.$ac_ext <<_ACEOF
11751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011752$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011753 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011754int
11755main ()
11756{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011757static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011758test_array [0] = 0
11759
11760 ;
11761 return 0;
11762}
11763_ACEOF
11764rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011765if { (ac_try="$ac_compile"
11766case "(($ac_try" in
11767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11768 *) ac_try_echo=$ac_try;;
11769esac
11770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011773 grep -v '^ *+' conftest.er1 >conftest.err
11774 rm -f conftest.er1
11775 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011777 (exit $ac_status); } && {
11778 test -z "$ac_c_werror_flag" ||
11779 test ! -s conftest.err
11780 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011781 ac_lo=$ac_mid; break
11782else
11783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011784sed 's/^/| /' conftest.$ac_ext >&5
11785
Martin v. Löwiseba40652007-08-30 20:10:57 +000011786 ac_hi=`expr '(' $ac_mid ')' - 1`
11787 if test $ac_mid -le $ac_hi; then
11788 ac_lo= ac_hi=
11789 break
11790 fi
11791 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011793
11794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011795 done
11796else
11797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011798sed 's/^/| /' conftest.$ac_ext >&5
11799
Martin v. Löwiseba40652007-08-30 20:10:57 +000011800 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011802
11803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011805
11806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011807# Binary search between lo and hi bounds.
11808while test "x$ac_lo" != "x$ac_hi"; do
11809 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011811/* confdefs.h. */
11812_ACEOF
11813cat confdefs.h >>conftest.$ac_ext
11814cat >>conftest.$ac_ext <<_ACEOF
11815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011816$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011817 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011818int
11819main ()
11820{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011821static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011822test_array [0] = 0
11823
11824 ;
11825 return 0;
11826}
11827_ACEOF
11828rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011829if { (ac_try="$ac_compile"
11830case "(($ac_try" in
11831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11832 *) ac_try_echo=$ac_try;;
11833esac
11834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011837 grep -v '^ *+' conftest.er1 >conftest.err
11838 rm -f conftest.er1
11839 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011841 (exit $ac_status); } && {
11842 test -z "$ac_c_werror_flag" ||
11843 test ! -s conftest.err
11844 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011845 ac_hi=$ac_mid
11846else
11847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011848sed 's/^/| /' conftest.$ac_ext >&5
11849
Martin v. Löwiseba40652007-08-30 20:10:57 +000011850 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011852
11853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011854done
11855case $ac_lo in
11856?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011857'') if test "$ac_cv_type_uintptr_t" = yes; then
11858 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011859See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011860echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011861See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011862 { (exit 77); exit 77; }; }
11863 else
11864 ac_cv_sizeof_uintptr_t=0
11865 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011866esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011867else
Martin v. Löwis11437992002-04-12 09:54:03 +000011868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011869/* confdefs.h. */
11870_ACEOF
11871cat confdefs.h >>conftest.$ac_ext
11872cat >>conftest.$ac_ext <<_ACEOF
11873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011874$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011875 typedef uintptr_t ac__type_sizeof_;
11876static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11877static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011878#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011879#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011880int
11881main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011882{
Martin v. Löwis11437992002-04-12 09:54:03 +000011883
11884 FILE *f = fopen ("conftest.val", "w");
11885 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011886 return 1;
11887 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011888 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011889 long int i = longval ();
11890 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11891 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011892 fprintf (f, "%ld\n", i);
11893 }
11894 else
11895 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011896 unsigned long int i = ulongval ();
11897 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11898 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011899 fprintf (f, "%lu\n", i);
11900 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011901 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011902
11903 ;
11904 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011905}
Martin v. Löwis11437992002-04-12 09:54:03 +000011906_ACEOF
11907rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011908if { (ac_try="$ac_link"
11909case "(($ac_try" in
11910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11911 *) ac_try_echo=$ac_try;;
11912esac
11913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11914 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011915 ac_status=$?
11916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11917 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011918 { (case "(($ac_try" in
11919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11920 *) ac_try_echo=$ac_try;;
11921esac
11922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11923 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011924 ac_status=$?
11925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11926 (exit $ac_status); }; }; then
11927 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011928else
Martin v. Löwis11437992002-04-12 09:54:03 +000011929 echo "$as_me: program exited with status $ac_status" >&5
11930echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011931sed 's/^/| /' conftest.$ac_ext >&5
11932
Martin v. Löwis11437992002-04-12 09:54:03 +000011933( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011934if test "$ac_cv_type_uintptr_t" = yes; then
11935 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011936See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011937echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011938See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011939 { (exit 77); exit 77; }; }
11940 else
11941 ac_cv_sizeof_uintptr_t=0
11942 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011944rm -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 +000011945fi
11946rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011948{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11949echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
11950
11951
11952
Martin v. Löwis11437992002-04-12 09:54:03 +000011953cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011954#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011955_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011956
Michael W. Hudson54241132001-12-07 15:38:26 +000011957
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011958fi
11959
Martin v. Löwisebe26702006-10-02 14:55:51 +000011960
11961
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011962# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011963{ echo "$as_me:$LINENO: checking size of off_t" >&5
11964echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011965if test "${ac_cv_sizeof_off_t+set}" = set; then
11966 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011967else
11968 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011969 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011970else
Martin v. Löwis11437992002-04-12 09:54:03 +000011971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011972/* confdefs.h. */
11973_ACEOF
11974cat confdefs.h >>conftest.$ac_ext
11975cat >>conftest.$ac_ext <<_ACEOF
11976/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011977#include <stdio.h>
11978#include <sys/types.h>
11979main()
11980{
11981 FILE *f=fopen("conftestval", "w");
11982 if (!f) exit(1);
11983 fprintf(f, "%d\n", sizeof(off_t));
11984 exit(0);
11985}
Martin v. Löwis11437992002-04-12 09:54:03 +000011986_ACEOF
11987rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011988if { (ac_try="$ac_link"
11989case "(($ac_try" in
11990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11991 *) ac_try_echo=$ac_try;;
11992esac
11993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11994 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011995 ac_status=$?
11996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11997 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011998 { (case "(($ac_try" in
11999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12000 *) ac_try_echo=$ac_try;;
12001esac
12002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12003 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012004 ac_status=$?
12005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12006 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012007 ac_cv_sizeof_off_t=`cat conftestval`
12008else
Martin v. Löwis11437992002-04-12 09:54:03 +000012009 echo "$as_me: program exited with status $ac_status" >&5
12010echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012011sed 's/^/| /' conftest.$ac_ext >&5
12012
Martin v. Löwis11437992002-04-12 09:54:03 +000012013( exit $ac_status )
12014ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012016rm -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 +000012017fi
12018
Martin v. Löwiseba40652007-08-30 20:10:57 +000012019
12020
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012021fi
12022
Martin v. Löwiseba40652007-08-30 20:10:57 +000012023{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12024echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012025
12026cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012027#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012028_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012029
Michael W. Hudson54241132001-12-07 15:38:26 +000012030
Martin v. Löwiseba40652007-08-30 20:10:57 +000012031{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12032echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012033if test "$have_long_long" = yes -a \
12034 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12035 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012036
Martin v. Löwis11437992002-04-12 09:54:03 +000012037cat >>confdefs.h <<\_ACEOF
12038#define HAVE_LARGEFILE_SUPPORT 1
12039_ACEOF
12040
Martin v. Löwiseba40652007-08-30 20:10:57 +000012041 { echo "$as_me:$LINENO: result: yes" >&5
12042echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012043else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012044 { echo "$as_me:$LINENO: result: no" >&5
12045echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012046fi
12047
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012048# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012049{ echo "$as_me:$LINENO: checking size of time_t" >&5
12050echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012051if test "${ac_cv_sizeof_time_t+set}" = set; then
12052 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012053else
12054 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012055 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012056else
Martin v. Löwis11437992002-04-12 09:54:03 +000012057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012058/* confdefs.h. */
12059_ACEOF
12060cat confdefs.h >>conftest.$ac_ext
12061cat >>conftest.$ac_ext <<_ACEOF
12062/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012063#include <stdio.h>
12064#include <time.h>
12065main()
12066{
12067 FILE *f=fopen("conftestval", "w");
12068 if (!f) exit(1);
12069 fprintf(f, "%d\n", sizeof(time_t));
12070 exit(0);
12071}
Martin v. Löwis11437992002-04-12 09:54:03 +000012072_ACEOF
12073rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012074if { (ac_try="$ac_link"
12075case "(($ac_try" in
12076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12077 *) ac_try_echo=$ac_try;;
12078esac
12079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12080 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012081 ac_status=$?
12082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12083 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012084 { (case "(($ac_try" in
12085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12086 *) ac_try_echo=$ac_try;;
12087esac
12088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12089 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012090 ac_status=$?
12091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12092 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012093 ac_cv_sizeof_time_t=`cat conftestval`
12094else
Martin v. Löwis11437992002-04-12 09:54:03 +000012095 echo "$as_me: program exited with status $ac_status" >&5
12096echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012097sed 's/^/| /' conftest.$ac_ext >&5
12098
Martin v. Löwis11437992002-04-12 09:54:03 +000012099( exit $ac_status )
12100ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012102rm -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 +000012103fi
12104
Martin v. Löwiseba40652007-08-30 20:10:57 +000012105
12106
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012107fi
12108
Martin v. Löwiseba40652007-08-30 20:10:57 +000012109{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12110echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012111
12112cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012113#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012114_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012115
Michael W. Hudson54241132001-12-07 15:38:26 +000012116
12117
Trent Mick635f6fb2000-08-23 21:33:05 +000012118# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012119ac_save_cc="$CC"
12120if test "$ac_cv_kpthread" = "yes"
12121then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012122elif test "$ac_cv_kthread" = "yes"
12123then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012124elif test "$ac_cv_pthread" = "yes"
12125then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012127{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12128echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012129have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012130cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012131/* confdefs.h. */
12132_ACEOF
12133cat confdefs.h >>conftest.$ac_ext
12134cat >>conftest.$ac_ext <<_ACEOF
12135/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012136#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012137int
12138main ()
12139{
Guido van Rossum12580492000-09-24 16:47:19 +000012140pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012141 ;
12142 return 0;
12143}
12144_ACEOF
12145rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012146if { (ac_try="$ac_compile"
12147case "(($ac_try" in
12148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12149 *) ac_try_echo=$ac_try;;
12150esac
12151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12152 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012154 grep -v '^ *+' conftest.er1 >conftest.err
12155 rm -f conftest.er1
12156 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012158 (exit $ac_status); } && {
12159 test -z "$ac_c_werror_flag" ||
12160 test ! -s conftest.err
12161 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012162 have_pthread_t=yes
12163else
Martin v. Löwis11437992002-04-12 09:54:03 +000012164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012165sed 's/^/| /' conftest.$ac_ext >&5
12166
Martin v. Löwiseba40652007-08-30 20:10:57 +000012167
Trent Mick635f6fb2000-08-23 21:33:05 +000012168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012169
12170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12171{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12172echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012173if test "$have_pthread_t" = yes ; then
12174 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012175 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12176echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12178 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012179else
12180 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012181 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012182else
Martin v. Löwis11437992002-04-12 09:54:03 +000012183 cat >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 <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012190#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012191 main()
12192 {
12193 FILE *f=fopen("conftestval", "w");
12194 if (!f) exit(1);
12195 fprintf(f, "%d\n", sizeof(pthread_t));
12196 exit(0);
12197 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012198_ACEOF
12199rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012200if { (ac_try="$ac_link"
12201case "(($ac_try" in
12202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12203 *) ac_try_echo=$ac_try;;
12204esac
12205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12206 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 ac_status=$?
12208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012210 { (case "(($ac_try" in
12211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12212 *) ac_try_echo=$ac_try;;
12213esac
12214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12215 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 ac_status=$?
12217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12218 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012219 ac_cv_sizeof_pthread_t=`cat conftestval`
12220else
Martin v. Löwis11437992002-04-12 09:54:03 +000012221 echo "$as_me: program exited with status $ac_status" >&5
12222echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012223sed 's/^/| /' conftest.$ac_ext >&5
12224
Martin v. Löwis11437992002-04-12 09:54:03 +000012225( exit $ac_status )
12226ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012228rm -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 +000012229fi
12230
Martin v. Löwiseba40652007-08-30 20:10:57 +000012231
12232
Trent Mick635f6fb2000-08-23 21:33:05 +000012233fi
12234
Martin v. Löwiseba40652007-08-30 20:10:57 +000012235 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12236echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012237
12238cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012239#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012240_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012241
12242fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012243CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012244
Martin v. Löwiseba40652007-08-30 20:10:57 +000012245{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12246echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12247# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012248if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012249 enableval=$enable_toolbox_glue;
12250fi
Jack Jansene578a632001-08-15 01:27:14 +000012251
12252
12253if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012254then
Jack Jansene578a632001-08-15 01:27:14 +000012255 case $ac_sys_system/$ac_sys_release in
12256 Darwin/*)
12257 enable_toolbox_glue="yes";;
12258 *)
12259 enable_toolbox_glue="no";;
12260 esac
12261fi
12262case "$enable_toolbox_glue" in
12263yes)
Jack Jansene578a632001-08-15 01:27:14 +000012264 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012265 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012266
12267cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012268#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012269_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012270
12271 ;;
12272*)
Jack Jansene578a632001-08-15 01:27:14 +000012273 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012274 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012275 ;;
12276esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012277{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12278echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012279
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012280
12281case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012282 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012283 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12284 ;;
12285 Darwin/*)
12286 OTHER_LIBTOOL_OPT=""
12287 ;;
12288esac
12289
12290
12291case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012292 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012293 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12294 if test "${enable_universalsdk}"; then
12295 :
12296 else
12297 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12298 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012299 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012300 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012301 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012302 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12303 if test ${gcc_version} '<' 4.0
12304 then
12305 LIBTOOL_CRUFT="-lcc_dynamic"
12306 else
12307 LIBTOOL_CRUFT=""
12308 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012309 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012310 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012311 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012312esac
12313
Martin v. Löwiseba40652007-08-30 20:10:57 +000012314{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12315echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012316if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012317then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012318 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012320 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012321
Martin v. Löwis11437992002-04-12 09:54:03 +000012322cat >>confdefs.h <<\_ACEOF
12323#define WITH_NEXT_FRAMEWORK 1
12324_ACEOF
12325
Martin v. Löwiseba40652007-08-30 20:10:57 +000012326 { echo "$as_me:$LINENO: result: yes" >&5
12327echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012328else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012329 { echo "$as_me:$LINENO: result: no" >&5
12330echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012331fi
12332
Martin v. Löwiseba40652007-08-30 20:10:57 +000012333{ echo "$as_me:$LINENO: checking for dyld" >&5
12334echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012335case $ac_sys_system/$ac_sys_release in
12336 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012337
Martin v. Löwis11437992002-04-12 09:54:03 +000012338cat >>confdefs.h <<\_ACEOF
12339#define WITH_DYLD 1
12340_ACEOF
12341
Martin v. Löwiseba40652007-08-30 20:10:57 +000012342 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12343echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012344 ;;
12345 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012346 { echo "$as_me:$LINENO: result: no" >&5
12347echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012348 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012349esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012350
Guido van Rossum0a516c91994-09-12 10:58:40 +000012351# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012352
Michael W. Hudson54241132001-12-07 15:38:26 +000012353
12354
12355
12356
Guido van Rossum0a516c91994-09-12 10:58:40 +000012357# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012358# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012359{ echo "$as_me:$LINENO: checking SO" >&5
12360echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012361if test -z "$SO"
12362then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012363 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012364 hp*|HP*)
12365 case `uname -m` in
12366 ia64) SO=.so;;
12367 *) SO=.sl;;
12368 esac
12369 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012370 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012371 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012372 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012373else
12374 # this might also be a termcap variable, see #610332
12375 echo
12376 echo '====================================================================='
12377 echo '+ +'
12378 echo '+ WARNING: You have set SO in your environment. +'
12379 echo '+ Do you really mean to change the extension for shared libraries? +'
12380 echo '+ Continuing in 10 seconds to let you to ponder. +'
12381 echo '+ +'
12382 echo '====================================================================='
12383 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012385{ echo "$as_me:$LINENO: result: $SO" >&5
12386echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012387
12388cat >>confdefs.h <<_ACEOF
12389#define SHLIB_EXT "$SO"
12390_ACEOF
12391
Guido van Rossum0a516c91994-09-12 10:58:40 +000012392# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012393# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012394# (Shared libraries in this instance are shared modules to be loaded into
12395# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12397echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012398if test -z "$LDSHARED"
12399then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012400 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012401 AIX*)
12402 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012403 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012404 ;;
12405 BeOS*)
12406 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012407 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012408 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012409 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012410 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012412 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012413 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012414 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012415 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012416 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012417 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012418 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012419 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12420 if test "$enable_framework" ; then
12421 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012422 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12423 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012424 else
12425 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012426 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012427 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012428 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012429 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12430 if test "$enable_framework" ; then
12431 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012432 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12433 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012434 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012435 # No framework, use the Python app as bundle-loader
12436 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012437 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012438 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012439 Darwin/*)
12440 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12441 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012442 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012443 if test ${cur_target} '>' 10.2; then
12444 cur_target=10.3
12445 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012446 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012447
12448 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12449 # environment with a value that is the same as what we'll use
12450 # in the Makefile to ensure that we'll get the same compiler
12451 # environment during configure and build time.
12452 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12453 export MACOSX_DEPLOYMENT_TARGET
12454
Ronald Oussoren988117f2006-04-29 11:31:35 +000012455 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012456 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012457 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012458 if test "${enable_universalsdk}"; then
12459 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12460 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012461 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12462 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012463 else
12464 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12465 if test "$enable_framework" ; then
12466 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012467 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12468 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012469 else
12470 # No framework, use the Python app as bundle-loader
12471 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12472 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12473 fi
12474 fi
12475 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012476 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012477 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012478 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012479 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012480 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012481 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012482 else
12483 LDSHARED="ld -Bshareable ${LDFLAGS}"
12484 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012485 OpenBSD*)
12486 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12487 then
12488 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12489 else
12490 case `uname -r` in
12491 [01].* | 2.[0-7] | 2.[0-7].*)
12492 LDSHARED="ld -Bshareable ${LDFLAGS}"
12493 ;;
12494 *)
12495 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12496 ;;
12497 esac
12498 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012499 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012500 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012501 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012502 then LDSHARED='$(CC) -shared'
12503 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012504 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012505 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012506 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012507 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012508 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012509 *) LDSHARED="ld";;
12510 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012512{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12513echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012514BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012515# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012516# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012517{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12518echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012519if test -z "$CCSHARED"
12520then
Guido van Rossum07397971997-04-29 21:49:50 +000012521 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012522 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012523 then CCSHARED="-fPIC";
12524 elif test `uname -p` = sparc;
12525 then CCSHARED="-xcode=pic32";
12526 else CCSHARED="-Kpic";
12527 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012528 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012529 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012530 else CCSHARED="+z";
12531 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012532 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012533 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012534 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012535 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012536 if test "$GCC" = "yes"
12537 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012538 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012539 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012540 SCO_SV*)
12541 if test "$GCC" = "yes"
12542 then CCSHARED="-fPIC"
12543 else CCSHARED="-Kpic -belf"
12544 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012545 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012546 IRIX*/6*) case $CC in
12547 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012548 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012549 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012550 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012551 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012553{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12554echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012555# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012556# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012557{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12558echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012559if test -z "$LINKFORSHARED"
12560then
Guido van Rossum07397971997-04-29 21:49:50 +000012561 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012562 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012563 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012564 LINKFORSHARED="-Wl,-E -Wl,+s";;
12565# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012566 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012567 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012568 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012569 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012570 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12571 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012572 # not used by the core itself but which needs to be in the core so
12573 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012574 # -prebind is no longer used, because it actually seems to give a
12575 # slowdown in stead of a speedup, maybe due to the large number of
12576 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012577
12578 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012579 if test "$enable_framework"
12580 then
Jack Jansenda49e192005-01-07 13:08:22 +000012581 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012582 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012583 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012584 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012585 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012586 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012587 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012588 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12589 then
12590 LINKFORSHARED="-Wl,--export-dynamic"
12591 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012592 SunOS/5*) case $CC in
12593 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012594 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012595 then
12596 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012597 fi;;
12598 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012599 CYGWIN*)
12600 if test $enable_shared = "no"
12601 then
12602 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12603 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012604 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012606{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12607echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012608
Michael W. Hudson54241132001-12-07 15:38:26 +000012609
Martin v. Löwiseba40652007-08-30 20:10:57 +000012610{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12611echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012612if test ! "$LIBRARY" = "$LDLIBRARY"
12613then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012614 case $ac_sys_system in
12615 CYGWIN*)
12616 # Cygwin needs CCSHARED when building extension DLLs
12617 # but not when building the interpreter DLL.
12618 CFLAGSFORSHARED='';;
12619 *)
12620 CFLAGSFORSHARED='$(CCSHARED)'
12621 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012623{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12624echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012625
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012626# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12627# library (with --enable-shared).
12628# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012629# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12630# if it is not required, since it creates a dependency of the shared library
12631# to LIBS. This, in turn, means that applications linking the shared libpython
12632# don't need to link LIBS explicitly. The default should be only changed
12633# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012634
Martin v. Löwiseba40652007-08-30 20:10:57 +000012635{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12636echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012637case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012638 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012639 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012640esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012641{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12642echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012643
12644
Guido van Rossum627b2d71993-12-24 10:39:16 +000012645# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012646
Martin v. Löwiseba40652007-08-30 20:10:57 +000012647{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12648echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012649if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12650 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012651else
Martin v. Löwis11437992002-04-12 09:54:03 +000012652 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012653LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012654cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012655/* confdefs.h. */
12656_ACEOF
12657cat confdefs.h >>conftest.$ac_ext
12658cat >>conftest.$ac_ext <<_ACEOF
12659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012660
Martin v. Löwiseba40652007-08-30 20:10:57 +000012661/* Override any GCC internal prototype to avoid an error.
12662 Use char because int might match the return type of a GCC
12663 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012664#ifdef __cplusplus
12665extern "C"
12666#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012667char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012668int
12669main ()
12670{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012671return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012672 ;
12673 return 0;
12674}
12675_ACEOF
12676rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012677if { (ac_try="$ac_link"
12678case "(($ac_try" in
12679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12680 *) ac_try_echo=$ac_try;;
12681esac
12682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12683 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012685 grep -v '^ *+' conftest.er1 >conftest.err
12686 rm -f conftest.er1
12687 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012689 (exit $ac_status); } && {
12690 test -z "$ac_c_werror_flag" ||
12691 test ! -s conftest.err
12692 } && test -s conftest$ac_exeext &&
12693 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012694 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012695else
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012697sed 's/^/| /' conftest.$ac_ext >&5
12698
Martin v. Löwiseba40652007-08-30 20:10:57 +000012699 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012701
12702rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012703 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012704LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012706{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12707echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012708if test $ac_cv_lib_dl_dlopen = yes; then
12709 cat >>confdefs.h <<_ACEOF
12710#define HAVE_LIBDL 1
12711_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012712
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012713 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012714
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012715fi
12716 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012717
Martin v. Löwiseba40652007-08-30 20:10:57 +000012718{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12719echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012720if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12721 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012722else
Martin v. Löwis11437992002-04-12 09:54:03 +000012723 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012724LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012725cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012726/* confdefs.h. */
12727_ACEOF
12728cat confdefs.h >>conftest.$ac_ext
12729cat >>conftest.$ac_ext <<_ACEOF
12730/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012731
Martin v. Löwiseba40652007-08-30 20:10:57 +000012732/* Override any GCC internal prototype to avoid an error.
12733 Use char because int might match the return type of a GCC
12734 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012735#ifdef __cplusplus
12736extern "C"
12737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012738char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012739int
12740main ()
12741{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012742return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012743 ;
12744 return 0;
12745}
12746_ACEOF
12747rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012748if { (ac_try="$ac_link"
12749case "(($ac_try" in
12750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12751 *) ac_try_echo=$ac_try;;
12752esac
12753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12754 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012756 grep -v '^ *+' conftest.er1 >conftest.err
12757 rm -f conftest.er1
12758 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012760 (exit $ac_status); } && {
12761 test -z "$ac_c_werror_flag" ||
12762 test ! -s conftest.err
12763 } && test -s conftest$ac_exeext &&
12764 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012766else
Martin v. Löwis11437992002-04-12 09:54:03 +000012767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012768sed 's/^/| /' conftest.$ac_ext >&5
12769
Martin v. Löwiseba40652007-08-30 20:10:57 +000012770 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012772
12773rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012774 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012775LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012777{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12778echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012779if test $ac_cv_lib_dld_shl_load = yes; then
12780 cat >>confdefs.h <<_ACEOF
12781#define HAVE_LIBDLD 1
12782_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012783
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012784 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012785
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012786fi
12787 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012788
12789# only check for sem_ini if thread support is requested
12790if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012791 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12792echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012793if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012795else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012796 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012797cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012798/* confdefs.h. */
12799_ACEOF
12800cat confdefs.h >>conftest.$ac_ext
12801cat >>conftest.$ac_ext <<_ACEOF
12802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012803
Martin v. Löwiseba40652007-08-30 20:10:57 +000012804/* Override any GCC internal prototype to avoid an error.
12805 Use char because int might match the return type of a GCC
12806 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012807#ifdef __cplusplus
12808extern "C"
12809#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012810char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012811int
12812main ()
12813{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012814return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 ;
12816 return 0;
12817}
12818_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012819for ac_lib in '' pthread rt posix4; do
12820 if test -z "$ac_lib"; then
12821 ac_res="none required"
12822 else
12823 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012824 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012825 fi
12826 rm -f conftest.$ac_objext conftest$ac_exeext
12827if { (ac_try="$ac_link"
12828case "(($ac_try" in
12829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12830 *) ac_try_echo=$ac_try;;
12831esac
12832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12833 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012834 ac_status=$?
12835 grep -v '^ *+' conftest.er1 >conftest.err
12836 rm -f conftest.er1
12837 cat conftest.err >&5
12838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012839 (exit $ac_status); } && {
12840 test -z "$ac_c_werror_flag" ||
12841 test ! -s conftest.err
12842 } && test -s conftest$ac_exeext &&
12843 $as_test_x conftest$ac_exeext; then
12844 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012845else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012846 echo "$as_me: failed program was:" >&5
12847sed 's/^/| /' conftest.$ac_ext >&5
12848
Martin v. Löwiseba40652007-08-30 20:10:57 +000012849
Brett Cannon19fab762007-06-02 03:02:29 +000012850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012851
12852rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12853 conftest$ac_exeext
12854 if test "${ac_cv_search_sem_init+set}" = set; then
12855 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012857done
12858if test "${ac_cv_search_sem_init+set}" = set; then
12859 :
12860else
12861 ac_cv_search_sem_init=no
12862fi
12863rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012864LIBS=$ac_func_search_save_LIBS
12865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12867echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12868ac_res=$ac_cv_search_sem_init
12869if test "$ac_res" != no; then
12870 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012871
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012872fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012873 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012874 # posix4 on Solaris 2.6
12875 # pthread (first!) on Linux
12876fi
12877
Martin v. Löwis19d17342003-06-14 21:03:05 +000012878# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012879{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12880echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012881if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12882 echo $ECHO_N "(cached) $ECHO_C" >&6
12883else
12884 ac_check_lib_save_LIBS=$LIBS
12885LIBS="-lintl $LIBS"
12886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012887/* confdefs.h. */
12888_ACEOF
12889cat confdefs.h >>conftest.$ac_ext
12890cat >>conftest.$ac_ext <<_ACEOF
12891/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012892
Martin v. Löwiseba40652007-08-30 20:10:57 +000012893/* Override any GCC internal prototype to avoid an error.
12894 Use char because int might match the return type of a GCC
12895 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012896#ifdef __cplusplus
12897extern "C"
12898#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012899char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012900int
12901main ()
12902{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012903return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012904 ;
12905 return 0;
12906}
12907_ACEOF
12908rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012909if { (ac_try="$ac_link"
12910case "(($ac_try" in
12911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12912 *) ac_try_echo=$ac_try;;
12913esac
12914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12915 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012917 grep -v '^ *+' conftest.er1 >conftest.err
12918 rm -f conftest.er1
12919 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012921 (exit $ac_status); } && {
12922 test -z "$ac_c_werror_flag" ||
12923 test ! -s conftest.err
12924 } && test -s conftest$ac_exeext &&
12925 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012926 ac_cv_lib_intl_textdomain=yes
12927else
12928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012929sed 's/^/| /' conftest.$ac_ext >&5
12930
Martin v. Löwiseba40652007-08-30 20:10:57 +000012931 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012933
12934rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012935 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012936LIBS=$ac_check_lib_save_LIBS
12937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012938{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12939echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012940if test $ac_cv_lib_intl_textdomain = yes; then
12941
12942cat >>confdefs.h <<\_ACEOF
12943#define WITH_LIBINTL 1
12944_ACEOF
12945
12946fi
12947
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012948
12949# checks for system dependent C++ extensions support
12950case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12952echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012954/* confdefs.h. */
12955_ACEOF
12956cat confdefs.h >>conftest.$ac_ext
12957cat >>conftest.$ac_ext <<_ACEOF
12958/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012959#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012960int
12961main ()
12962{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012963loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 ;
12965 return 0;
12966}
12967_ACEOF
12968rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012969if { (ac_try="$ac_link"
12970case "(($ac_try" in
12971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12972 *) ac_try_echo=$ac_try;;
12973esac
12974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12975 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012977 grep -v '^ *+' conftest.er1 >conftest.err
12978 rm -f conftest.er1
12979 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012981 (exit $ac_status); } && {
12982 test -z "$ac_c_werror_flag" ||
12983 test ! -s conftest.err
12984 } && test -s conftest$ac_exeext &&
12985 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012986
Martin v. Löwis11437992002-04-12 09:54:03 +000012987cat >>confdefs.h <<\_ACEOF
12988#define AIX_GENUINE_CPLUSPLUS 1
12989_ACEOF
12990
Martin v. Löwiseba40652007-08-30 20:10:57 +000012991 { echo "$as_me:$LINENO: result: yes" >&5
12992echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012993else
Martin v. Löwis11437992002-04-12 09:54:03 +000012994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012995sed 's/^/| /' conftest.$ac_ext >&5
12996
Martin v. Löwiseba40652007-08-30 20:10:57 +000012997 { echo "$as_me:$LINENO: result: no" >&5
12998echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013000
13001rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013002 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013003 *) ;;
13004esac
13005
Guido van Rossum70c7f481998-03-26 18:44:10 +000013006# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013007# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013008{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13009echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013010if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13011 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013012else
Martin v. Löwis11437992002-04-12 09:54:03 +000013013 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013014LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013015cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013016/* confdefs.h. */
13017_ACEOF
13018cat confdefs.h >>conftest.$ac_ext
13019cat >>conftest.$ac_ext <<_ACEOF
13020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013021
Martin v. Löwiseba40652007-08-30 20:10:57 +000013022/* Override any GCC internal prototype to avoid an error.
13023 Use char because int might match the return type of a GCC
13024 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013025#ifdef __cplusplus
13026extern "C"
13027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013028char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013029int
13030main ()
13031{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013032return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 ;
13034 return 0;
13035}
13036_ACEOF
13037rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013038if { (ac_try="$ac_link"
13039case "(($ac_try" in
13040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13041 *) ac_try_echo=$ac_try;;
13042esac
13043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13044 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013046 grep -v '^ *+' conftest.er1 >conftest.err
13047 rm -f conftest.er1
13048 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013050 (exit $ac_status); } && {
13051 test -z "$ac_c_werror_flag" ||
13052 test ! -s conftest.err
13053 } && test -s conftest$ac_exeext &&
13054 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013055 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013056else
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013058sed 's/^/| /' conftest.$ac_ext >&5
13059
Martin v. Löwiseba40652007-08-30 20:10:57 +000013060 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013062
13063rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013064 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013065LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013067{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13068echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013069if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013070 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013071fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013072 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013073{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13074echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013075if test "${ac_cv_lib_socket_socket+set}" = set; then
13076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013077else
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013079LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013081/* confdefs.h. */
13082_ACEOF
13083cat confdefs.h >>conftest.$ac_ext
13084cat >>conftest.$ac_ext <<_ACEOF
13085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
Martin v. Löwiseba40652007-08-30 20:10:57 +000013087/* Override any GCC internal prototype to avoid an error.
13088 Use char because int might match the return type of a GCC
13089 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013090#ifdef __cplusplus
13091extern "C"
13092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013093char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013094int
13095main ()
13096{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013097return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 ;
13099 return 0;
13100}
13101_ACEOF
13102rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013103if { (ac_try="$ac_link"
13104case "(($ac_try" in
13105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13106 *) ac_try_echo=$ac_try;;
13107esac
13108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13109 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013111 grep -v '^ *+' conftest.er1 >conftest.err
13112 rm -f conftest.er1
13113 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013115 (exit $ac_status); } && {
13116 test -z "$ac_c_werror_flag" ||
13117 test ! -s conftest.err
13118 } && test -s conftest$ac_exeext &&
13119 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013121else
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013123sed 's/^/| /' conftest.$ac_ext >&5
13124
Martin v. Löwiseba40652007-08-30 20:10:57 +000013125 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013127
13128rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013130LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013132{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13133echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013134if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013135 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013136fi
13137 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013138
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013139case "$ac_sys_system" in
13140BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013141{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13142echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013143if test "${ac_cv_lib_net_socket+set}" = set; then
13144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013145else
Martin v. Löwis11437992002-04-12 09:54:03 +000013146 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013147LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013149/* confdefs.h. */
13150_ACEOF
13151cat confdefs.h >>conftest.$ac_ext
13152cat >>conftest.$ac_ext <<_ACEOF
13153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013154
Martin v. Löwiseba40652007-08-30 20:10:57 +000013155/* Override any GCC internal prototype to avoid an error.
13156 Use char because int might match the return type of a GCC
13157 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013158#ifdef __cplusplus
13159extern "C"
13160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013161char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013162int
13163main ()
13164{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013165return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013166 ;
13167 return 0;
13168}
13169_ACEOF
13170rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013171if { (ac_try="$ac_link"
13172case "(($ac_try" in
13173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13174 *) ac_try_echo=$ac_try;;
13175esac
13176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13177 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013179 grep -v '^ *+' conftest.er1 >conftest.err
13180 rm -f conftest.er1
13181 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013183 (exit $ac_status); } && {
13184 test -z "$ac_c_werror_flag" ||
13185 test ! -s conftest.err
13186 } && test -s conftest$ac_exeext &&
13187 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013188 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013189else
Martin v. Löwis11437992002-04-12 09:54:03 +000013190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013191sed 's/^/| /' conftest.$ac_ext >&5
13192
Martin v. Löwiseba40652007-08-30 20:10:57 +000013193 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013195
13196rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013198LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013200{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13201echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013202if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013203 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013204fi
13205 # BeOS
13206;;
13207esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013208
Martin v. Löwiseba40652007-08-30 20:10:57 +000013209{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13210echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013211
Martin v. Löwiseba40652007-08-30 20:10:57 +000013212# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013213if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013214 withval=$with_libs;
13215{ echo "$as_me:$LINENO: result: $withval" >&5
13216echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013217LIBS="$withval $LIBS"
13218
13219else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013220 { echo "$as_me:$LINENO: result: no" >&5
13221echo "${ECHO_T}no" >&6; }
13222fi
13223
Guido van Rossum7f43da71994-08-01 12:15:30 +000013224
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013225# Check for use of the system libffi library
Matthias Klose9afb9852007-10-24 20:00:44 +000013226if test "${ac_cv_header_ffi_h+set}" = set; then
13227 { echo "$as_me:$LINENO: checking for ffi.h" >&5
13228echo $ECHO_N "checking for ffi.h... $ECHO_C" >&6; }
13229if test "${ac_cv_header_ffi_h+set}" = set; then
13230 echo $ECHO_N "(cached) $ECHO_C" >&6
13231fi
13232{ echo "$as_me:$LINENO: result: $ac_cv_header_ffi_h" >&5
13233echo "${ECHO_T}$ac_cv_header_ffi_h" >&6; }
13234else
13235 # Is the header compilable?
13236{ echo "$as_me:$LINENO: checking ffi.h usability" >&5
13237echo $ECHO_N "checking ffi.h usability... $ECHO_C" >&6; }
13238cat >conftest.$ac_ext <<_ACEOF
13239/* confdefs.h. */
13240_ACEOF
13241cat confdefs.h >>conftest.$ac_ext
13242cat >>conftest.$ac_ext <<_ACEOF
13243/* end confdefs.h. */
13244$ac_includes_default
13245#include <ffi.h>
13246_ACEOF
13247rm -f conftest.$ac_objext
13248if { (ac_try="$ac_compile"
13249case "(($ac_try" in
13250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13251 *) ac_try_echo=$ac_try;;
13252esac
13253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13254 (eval "$ac_compile") 2>conftest.er1
13255 ac_status=$?
13256 grep -v '^ *+' conftest.er1 >conftest.err
13257 rm -f conftest.er1
13258 cat conftest.err >&5
13259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13260 (exit $ac_status); } && {
13261 test -z "$ac_c_werror_flag" ||
13262 test ! -s conftest.err
13263 } && test -s conftest.$ac_objext; then
13264 ac_header_compiler=yes
13265else
13266 echo "$as_me: failed program was:" >&5
13267sed 's/^/| /' conftest.$ac_ext >&5
13268
13269 ac_header_compiler=no
13270fi
13271
13272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13273{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13274echo "${ECHO_T}$ac_header_compiler" >&6; }
13275
13276# Is the header present?
13277{ echo "$as_me:$LINENO: checking ffi.h presence" >&5
13278echo $ECHO_N "checking ffi.h presence... $ECHO_C" >&6; }
13279cat >conftest.$ac_ext <<_ACEOF
13280/* confdefs.h. */
13281_ACEOF
13282cat confdefs.h >>conftest.$ac_ext
13283cat >>conftest.$ac_ext <<_ACEOF
13284/* end confdefs.h. */
13285#include <ffi.h>
13286_ACEOF
13287if { (ac_try="$ac_cpp conftest.$ac_ext"
13288case "(($ac_try" in
13289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13290 *) ac_try_echo=$ac_try;;
13291esac
13292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13293 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13294 ac_status=$?
13295 grep -v '^ *+' conftest.er1 >conftest.err
13296 rm -f conftest.er1
13297 cat conftest.err >&5
13298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13299 (exit $ac_status); } >/dev/null && {
13300 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13301 test ! -s conftest.err
13302 }; then
13303 ac_header_preproc=yes
13304else
13305 echo "$as_me: failed program was:" >&5
13306sed 's/^/| /' conftest.$ac_ext >&5
13307
13308 ac_header_preproc=no
13309fi
13310
13311rm -f conftest.err conftest.$ac_ext
13312{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13313echo "${ECHO_T}$ac_header_preproc" >&6; }
13314
13315# So? What about this header?
13316case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13317 yes:no: )
13318 { echo "$as_me:$LINENO: WARNING: ffi.h: accepted by the compiler, rejected by the preprocessor!" >&5
13319echo "$as_me: WARNING: ffi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13320 { echo "$as_me:$LINENO: WARNING: ffi.h: proceeding with the compiler's result" >&5
13321echo "$as_me: WARNING: ffi.h: proceeding with the compiler's result" >&2;}
13322 ac_header_preproc=yes
13323 ;;
13324 no:yes:* )
13325 { echo "$as_me:$LINENO: WARNING: ffi.h: present but cannot be compiled" >&5
13326echo "$as_me: WARNING: ffi.h: present but cannot be compiled" >&2;}
13327 { echo "$as_me:$LINENO: WARNING: ffi.h: check for missing prerequisite headers?" >&5
13328echo "$as_me: WARNING: ffi.h: check for missing prerequisite headers?" >&2;}
13329 { echo "$as_me:$LINENO: WARNING: ffi.h: see the Autoconf documentation" >&5
13330echo "$as_me: WARNING: ffi.h: see the Autoconf documentation" >&2;}
13331 { echo "$as_me:$LINENO: WARNING: ffi.h: section \"Present But Cannot Be Compiled\"" >&5
13332echo "$as_me: WARNING: ffi.h: section \"Present But Cannot Be Compiled\"" >&2;}
13333 { echo "$as_me:$LINENO: WARNING: ffi.h: proceeding with the preprocessor's result" >&5
13334echo "$as_me: WARNING: ffi.h: proceeding with the preprocessor's result" >&2;}
13335 { echo "$as_me:$LINENO: WARNING: ffi.h: in the future, the compiler will take precedence" >&5
13336echo "$as_me: WARNING: ffi.h: in the future, the compiler will take precedence" >&2;}
13337 ( cat <<\_ASBOX
13338## ------------------------------------------------ ##
13339## Report this to http://www.python.org/python-bugs ##
13340## ------------------------------------------------ ##
13341_ASBOX
13342 ) | sed "s/^/$as_me: WARNING: /" >&2
13343 ;;
13344esac
13345{ echo "$as_me:$LINENO: checking for ffi.h" >&5
13346echo $ECHO_N "checking for ffi.h... $ECHO_C" >&6; }
13347if test "${ac_cv_header_ffi_h+set}" = set; then
13348 echo $ECHO_N "(cached) $ECHO_C" >&6
13349else
13350 ac_cv_header_ffi_h=$ac_header_preproc
13351fi
13352{ echo "$as_me:$LINENO: result: $ac_cv_header_ffi_h" >&5
13353echo "${ECHO_T}$ac_cv_header_ffi_h" >&6; }
13354
13355fi
13356
13357
Martin v. Löwiseba40652007-08-30 20:10:57 +000013358{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13359echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013360
Martin v. Löwiseba40652007-08-30 20:10:57 +000013361# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013362if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013363 withval=$with_system_ffi;
13364fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013365
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013366
Matthias Klose9afb9852007-10-24 20:00:44 +000013367if test -z "$with_system_ffi" && test "$ac_cv_header_ffi_h" = yes; then
13368 case "$ac_sys_system/`uname -m`" in
Thomas Heller486b1b02007-11-02 19:10:24 +000013369 Linux/alpha*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
Matthias Klose6e183f82007-10-25 06:37:24 +000013370 Linux/arm*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
Thomas Heller486b1b02007-11-02 19:10:24 +000013371 Linux/ppc*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
13372 Linux/s390*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
Matthias Klose9afb9852007-10-24 20:00:44 +000013373 *) with_system_ffi="no"
13374 esac
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013376{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13377echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013378
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013379# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013380
13381
Martin v. Löwiseba40652007-08-30 20:10:57 +000013382{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13383echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013384
Martin v. Löwiseba40652007-08-30 20:10:57 +000013385# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013386if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013387 withval=$with_signal_module;
13388fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013389
13390
13391if test -z "$with_signal_module"
13392then with_signal_module="yes"
13393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013394{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13395echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013396
13397if test "${with_signal_module}" = "yes"; then
13398 USE_SIGNAL_MODULE=""
13399 SIGNAL_OBJS=""
13400else
13401 USE_SIGNAL_MODULE="#"
13402 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13403fi
13404
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013405# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013406
Barry Warsawc0d24d82000-06-29 16:12:00 +000013407USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013408
Martin v. Löwiseba40652007-08-30 20:10:57 +000013409{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13410echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013411
Guido van Rossumec2f0731997-01-22 20:54:01 +000013412
Martin v. Löwiseba40652007-08-30 20:10:57 +000013413# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013414if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013415 withval=$with_dec_threads;
13416{ echo "$as_me:$LINENO: result: $withval" >&5
13417echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013418LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013419if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013420 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013421fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013422else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423 { echo "$as_me:$LINENO: result: no" >&5
13424echo "${ECHO_T}no" >&6; }
13425fi
13426
Martin v. Löwis11437992002-04-12 09:54:03 +000013427
13428# Templates for things AC_DEFINEd more than once.
13429# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013430
13431
Martin v. Löwis11437992002-04-12 09:54:03 +000013432
13433
13434
13435
13436
Martin v. Löwiseba40652007-08-30 20:10:57 +000013437{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13438echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013439
Martin v. Löwiseba40652007-08-30 20:10:57 +000013440# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013441if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013442 withval=$with_threads;
13443fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013444
13445
Barry Warsawc0d24d82000-06-29 16:12:00 +000013446# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013447
Martin v. Löwiseba40652007-08-30 20:10:57 +000013448# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013449if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013450 withval=$with_thread; with_threads=$with_thread
13451fi
13452
Barry Warsawc0d24d82000-06-29 16:12:00 +000013453
13454if test -z "$with_threads"
13455then with_threads="yes"
13456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013457{ echo "$as_me:$LINENO: result: $with_threads" >&5
13458echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013459
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013460
Barry Warsawc0d24d82000-06-29 16:12:00 +000013461if test "$with_threads" = "no"
13462then
13463 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013464elif test "$ac_cv_pthread_is_default" = yes
13465then
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013467#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013468_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013469
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013470 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013471 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013472#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013473_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013474
13475 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013476 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013477elif test "$ac_cv_kpthread" = "yes"
13478then
13479 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013480 if test "$ac_cv_cxx_thread" = "yes"; then
13481 CXX="$CXX -Kpthread"
13482 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013483 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013484#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013485_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013486
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013487 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013488 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013489elif test "$ac_cv_kthread" = "yes"
13490then
13491 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013492 if test "$ac_cv_cxx_thread" = "yes"; then
13493 CXX="$CXX -Kthread"
13494 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013495 cat >>confdefs.h <<\_ACEOF
13496#define WITH_THREAD 1
13497_ACEOF
13498
13499 posix_threads=yes
13500 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013501elif test "$ac_cv_pthread" = "yes"
13502then
13503 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013504 if test "$ac_cv_cxx_thread" = "yes"; then
13505 CXX="$CXX -pthread"
13506 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013507 cat >>confdefs.h <<\_ACEOF
13508#define WITH_THREAD 1
13509_ACEOF
13510
13511 posix_threads=yes
13512 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013513else
13514 if test ! -z "$with_threads" -a -d "$with_threads"
13515 then LDFLAGS="$LDFLAGS -L$with_threads"
13516 fi
13517 if test ! -z "$withval" -a -d "$withval"
13518 then LDFLAGS="$LDFLAGS -L$withval"
13519 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013520
13521 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013522 # define _POSIX_THREADS in unistd.h. Some apparently don't
13523 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013524 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13525echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013527/* confdefs.h. */
13528_ACEOF
13529cat confdefs.h >>conftest.$ac_ext
13530cat >>conftest.$ac_ext <<_ACEOF
13531/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013532
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013533#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013534#ifdef _POSIX_THREADS
13535yes
13536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013537
13538_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013540 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013541 unistd_defines_pthreads=yes
13542else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013543 unistd_defines_pthreads=no
13544fi
13545rm -f conftest*
13546
Martin v. Löwiseba40652007-08-30 20:10:57 +000013547 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13548echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013549
Martin v. Löwis11437992002-04-12 09:54:03 +000013550 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013551#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013552_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013553
Martin v. Löwis11437992002-04-12 09:54:03 +000013554 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013555 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13556echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013557if test "${ac_cv_header_cthreads_h+set}" = set; then
13558 echo $ECHO_N "(cached) $ECHO_C" >&6
13559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013560{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13561echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013562else
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013564{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13565echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013566cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013567/* confdefs.h. */
13568_ACEOF
13569cat confdefs.h >>conftest.$ac_ext
13570cat >>conftest.$ac_ext <<_ACEOF
13571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013572$ac_includes_default
13573#include <cthreads.h>
13574_ACEOF
13575rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013576if { (ac_try="$ac_compile"
13577case "(($ac_try" in
13578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13579 *) ac_try_echo=$ac_try;;
13580esac
13581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13582 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013584 grep -v '^ *+' conftest.er1 >conftest.err
13585 rm -f conftest.er1
13586 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013588 (exit $ac_status); } && {
13589 test -z "$ac_c_werror_flag" ||
13590 test ! -s conftest.err
13591 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013592 ac_header_compiler=yes
13593else
13594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013595sed 's/^/| /' conftest.$ac_ext >&5
13596
Martin v. Löwiseba40652007-08-30 20:10:57 +000013597 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013599
13600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13601{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13602echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013603
13604# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013605{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13606echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013608/* confdefs.h. */
13609_ACEOF
13610cat confdefs.h >>conftest.$ac_ext
13611cat >>conftest.$ac_ext <<_ACEOF
13612/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013613#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013614_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013615if { (ac_try="$ac_cpp conftest.$ac_ext"
13616case "(($ac_try" in
13617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13618 *) ac_try_echo=$ac_try;;
13619esac
13620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13621 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013622 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013623 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013624 rm -f conftest.er1
13625 cat conftest.err >&5
13626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013627 (exit $ac_status); } >/dev/null && {
13628 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13629 test ! -s conftest.err
13630 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 ac_header_preproc=yes
13632else
13633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013634sed 's/^/| /' conftest.$ac_ext >&5
13635
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013638
Martin v. Löwis11437992002-04-12 09:54:03 +000013639rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013640{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13641echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013642
13643# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013644case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13645 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13647echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013648 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13649echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13650 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013651 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013652 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013653 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13654echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013655 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13656echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13657 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13658echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13659 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13660echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013661 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13662echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013663 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13664echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013665 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013666## ------------------------------------------------ ##
13667## Report this to http://www.python.org/python-bugs ##
13668## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013669_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013670 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013671 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013672esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013673{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13674echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013675if test "${ac_cv_header_cthreads_h+set}" = set; then
13676 echo $ECHO_N "(cached) $ECHO_C" >&6
13677else
13678 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013680{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13681echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013682
13683fi
13684if test $ac_cv_header_cthreads_h = yes; then
13685 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013686#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013687_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013688
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013690#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013691_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013692
Martin v. Löwis11437992002-04-12 09:54:03 +000013693
13694cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013695#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013696_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013697
13698 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013699 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013700else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013701
Martin v. Löwis11437992002-04-12 09:54:03 +000013702 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013703 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13704echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013705if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13706 echo $ECHO_N "(cached) $ECHO_C" >&6
13707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013708{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13709echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013710else
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013712{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13713echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013714cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013715/* confdefs.h. */
13716_ACEOF
13717cat confdefs.h >>conftest.$ac_ext
13718cat >>conftest.$ac_ext <<_ACEOF
13719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013720$ac_includes_default
13721#include <mach/cthreads.h>
13722_ACEOF
13723rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013724if { (ac_try="$ac_compile"
13725case "(($ac_try" in
13726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13727 *) ac_try_echo=$ac_try;;
13728esac
13729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013732 grep -v '^ *+' conftest.er1 >conftest.err
13733 rm -f conftest.er1
13734 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013736 (exit $ac_status); } && {
13737 test -z "$ac_c_werror_flag" ||
13738 test ! -s conftest.err
13739 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 ac_header_compiler=yes
13741else
13742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013743sed 's/^/| /' conftest.$ac_ext >&5
13744
Martin v. Löwiseba40652007-08-30 20:10:57 +000013745 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013747
13748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13749{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13750echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013751
13752# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013753{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13754echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013755cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013756/* confdefs.h. */
13757_ACEOF
13758cat confdefs.h >>conftest.$ac_ext
13759cat >>conftest.$ac_ext <<_ACEOF
13760/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013761#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013762_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013763if { (ac_try="$ac_cpp conftest.$ac_ext"
13764case "(($ac_try" in
13765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13766 *) ac_try_echo=$ac_try;;
13767esac
13768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13769 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013771 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 rm -f conftest.er1
13773 cat conftest.err >&5
13774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013775 (exit $ac_status); } >/dev/null && {
13776 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13777 test ! -s conftest.err
13778 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 ac_header_preproc=yes
13780else
13781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013782sed 's/^/| /' conftest.$ac_ext >&5
13783
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013786
Martin v. Löwis11437992002-04-12 09:54:03 +000013787rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013788{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13789echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013790
13791# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013792case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13793 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13795echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013796 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13797echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13798 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013799 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013800 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013801 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13802echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013803 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13804echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13805 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13806echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13807 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13808echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013809 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13810echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013811 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13812echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013813 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013814## ------------------------------------------------ ##
13815## Report this to http://www.python.org/python-bugs ##
13816## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013817_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013818 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013819 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013820esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013821{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13822echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013823if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13824 echo $ECHO_N "(cached) $ECHO_C" >&6
13825else
13826 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013828{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13829echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013830
13831fi
13832if test $ac_cv_header_mach_cthreads_h = yes; then
13833 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013834#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013835_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013836
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013838#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013839_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013840
Martin v. Löwis11437992002-04-12 09:54:03 +000013841
13842cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013843#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013844_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013845
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013846 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013847else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013848
Martin v. Löwiseba40652007-08-30 20:10:57 +000013849 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13850echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013851
Martin v. Löwiseba40652007-08-30 20:10:57 +000013852# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013853if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013854 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13855echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013856 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013857#define WITH_THREAD 1
13858_ACEOF
13859
13860
13861cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013862#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013863_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013864
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013865 LIBS="-lpth $LIBS"
13866 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013867else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013868 { echo "$as_me:$LINENO: result: no" >&5
13869echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013870
13871 # Just looking for pthread_create in libpthread is not enough:
13872 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13873 # So we really have to include pthread.h, and then link.
13874 _libs=$LIBS
13875 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013876 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13877echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013879/* confdefs.h. */
13880_ACEOF
13881cat confdefs.h >>conftest.$ac_ext
13882cat >>conftest.$ac_ext <<_ACEOF
13883/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013884#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013885
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013886void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013887int
13888main ()
13889{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013890
13891pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013892 ;
13893 return 0;
13894}
13895_ACEOF
13896rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013897if { (ac_try="$ac_link"
13898case "(($ac_try" in
13899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13900 *) ac_try_echo=$ac_try;;
13901esac
13902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13903 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013905 grep -v '^ *+' conftest.er1 >conftest.err
13906 rm -f conftest.er1
13907 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013909 (exit $ac_status); } && {
13910 test -z "$ac_c_werror_flag" ||
13911 test ! -s conftest.err
13912 } && test -s conftest$ac_exeext &&
13913 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013914
Martin v. Löwiseba40652007-08-30 20:10:57 +000013915 { echo "$as_me:$LINENO: result: yes" >&5
13916echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013918#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013919_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013920
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013921 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013922 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013923else
Martin v. Löwis11437992002-04-12 09:54:03 +000013924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013925sed 's/^/| /' conftest.$ac_ext >&5
13926
Martin v. Löwis11437992002-04-12 09:54:03 +000013927
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013928 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013929 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13930echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013931if test "${ac_cv_func_pthread_detach+set}" = set; then
13932 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013933else
Martin v. Löwis11437992002-04-12 09:54:03 +000013934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013935/* confdefs.h. */
13936_ACEOF
13937cat confdefs.h >>conftest.$ac_ext
13938cat >>conftest.$ac_ext <<_ACEOF
13939/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013940/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13941 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13942#define pthread_detach innocuous_pthread_detach
13943
Guido van Rossumad678af1998-10-02 14:42:15 +000013944/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013945 which can conflict with char pthread_detach (); below.
13946 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013947 <limits.h> exists even on freestanding compilers. */
13948
13949#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013950# include <limits.h>
13951#else
13952# include <assert.h>
13953#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013954
13955#undef pthread_detach
13956
Martin v. Löwiseba40652007-08-30 20:10:57 +000013957/* Override any GCC internal prototype to avoid an error.
13958 Use char because int might match the return type of a GCC
13959 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013960#ifdef __cplusplus
13961extern "C"
13962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013963char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013964/* The GNU C library defines this for functions which it implements
13965 to always fail with ENOSYS. Some functions are actually named
13966 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013967#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013968choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013969#endif
13970
Skip Montanaro6dead952003-09-25 14:50:04 +000013971int
13972main ()
13973{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013974return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013975 ;
13976 return 0;
13977}
13978_ACEOF
13979rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013980if { (ac_try="$ac_link"
13981case "(($ac_try" in
13982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13983 *) ac_try_echo=$ac_try;;
13984esac
13985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13986 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013988 grep -v '^ *+' conftest.er1 >conftest.err
13989 rm -f conftest.er1
13990 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013992 (exit $ac_status); } && {
13993 test -z "$ac_c_werror_flag" ||
13994 test ! -s conftest.err
13995 } && test -s conftest$ac_exeext &&
13996 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013997 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013998else
Martin v. Löwis11437992002-04-12 09:54:03 +000013999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014000sed 's/^/| /' conftest.$ac_ext >&5
14001
Martin v. Löwiseba40652007-08-30 20:10:57 +000014002 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014004
14005rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014006 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014008{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14009echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014010if test $ac_cv_func_pthread_detach = yes; then
14011 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014012#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014013_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014014
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014015 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014016 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014017else
Guido van Rossumad678af1998-10-02 14:42:15 +000014018
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014019 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014020 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14021echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014022if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14023 echo $ECHO_N "(cached) $ECHO_C" >&6
14024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014025{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14026echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014027else
14028 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014029{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14030echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014031cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014032/* confdefs.h. */
14033_ACEOF
14034cat confdefs.h >>conftest.$ac_ext
14035cat >>conftest.$ac_ext <<_ACEOF
14036/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014037$ac_includes_default
14038#include <atheos/threads.h>
14039_ACEOF
14040rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014041if { (ac_try="$ac_compile"
14042case "(($ac_try" in
14043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14044 *) ac_try_echo=$ac_try;;
14045esac
14046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014049 grep -v '^ *+' conftest.er1 >conftest.err
14050 rm -f conftest.er1
14051 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014053 (exit $ac_status); } && {
14054 test -z "$ac_c_werror_flag" ||
14055 test ! -s conftest.err
14056 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014057 ac_header_compiler=yes
14058else
14059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014060sed 's/^/| /' conftest.$ac_ext >&5
14061
Martin v. Löwiseba40652007-08-30 20:10:57 +000014062 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014064
14065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14066{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14067echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014068
14069# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014070{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14071echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014072cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014073/* confdefs.h. */
14074_ACEOF
14075cat confdefs.h >>conftest.$ac_ext
14076cat >>conftest.$ac_ext <<_ACEOF
14077/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014078#include <atheos/threads.h>
14079_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014080if { (ac_try="$ac_cpp conftest.$ac_ext"
14081case "(($ac_try" in
14082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14083 *) ac_try_echo=$ac_try;;
14084esac
14085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14086 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014087 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014088 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014089 rm -f conftest.er1
14090 cat conftest.err >&5
14091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014092 (exit $ac_status); } >/dev/null && {
14093 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14094 test ! -s conftest.err
14095 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014096 ac_header_preproc=yes
14097else
14098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014099sed 's/^/| /' conftest.$ac_ext >&5
14100
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014101 ac_header_preproc=no
14102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014103
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014104rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014105{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14106echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014107
14108# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014109case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14110 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014111 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14112echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014113 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14114echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14115 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014116 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014117 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014118 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14119echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014120 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14121echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14122 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14123echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14124 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14125echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014126 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14127echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014128 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14129echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014130 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014131## ------------------------------------------------ ##
14132## Report this to http://www.python.org/python-bugs ##
14133## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014134_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014135 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014136 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014137esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014138{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14139echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014140if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14141 echo $ECHO_N "(cached) $ECHO_C" >&6
14142else
14143 ac_cv_header_atheos_threads_h=$ac_header_preproc
14144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014145{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14146echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014147
14148fi
14149if test $ac_cv_header_atheos_threads_h = yes; then
14150 cat >>confdefs.h <<\_ACEOF
14151#define WITH_THREAD 1
14152_ACEOF
14153
14154
14155cat >>confdefs.h <<\_ACEOF
14156#define ATHEOS_THREADS 1
14157_ACEOF
14158
14159 THREADOBJ="Python/thread.o"
14160else
14161
Martin v. Löwis11437992002-04-12 09:54:03 +000014162 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014163 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14164echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014165if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14166 echo $ECHO_N "(cached) $ECHO_C" >&6
14167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014168{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14169echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014170else
Martin v. Löwis11437992002-04-12 09:54:03 +000014171 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014172{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14173echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014175/* confdefs.h. */
14176_ACEOF
14177cat confdefs.h >>conftest.$ac_ext
14178cat >>conftest.$ac_ext <<_ACEOF
14179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014180$ac_includes_default
14181#include <kernel/OS.h>
14182_ACEOF
14183rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014184if { (ac_try="$ac_compile"
14185case "(($ac_try" in
14186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14187 *) ac_try_echo=$ac_try;;
14188esac
14189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014192 grep -v '^ *+' conftest.er1 >conftest.err
14193 rm -f conftest.er1
14194 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014196 (exit $ac_status); } && {
14197 test -z "$ac_c_werror_flag" ||
14198 test ! -s conftest.err
14199 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014200 ac_header_compiler=yes
14201else
14202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014203sed 's/^/| /' conftest.$ac_ext >&5
14204
Martin v. Löwiseba40652007-08-30 20:10:57 +000014205 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014207
14208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14209{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14210echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014211
14212# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014213{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14214echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014215cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014216/* confdefs.h. */
14217_ACEOF
14218cat confdefs.h >>conftest.$ac_ext
14219cat >>conftest.$ac_ext <<_ACEOF
14220/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014221#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014222_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014223if { (ac_try="$ac_cpp conftest.$ac_ext"
14224case "(($ac_try" in
14225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14226 *) ac_try_echo=$ac_try;;
14227esac
14228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14229 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014230 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014231 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014232 rm -f conftest.er1
14233 cat conftest.err >&5
14234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014235 (exit $ac_status); } >/dev/null && {
14236 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14237 test ! -s conftest.err
14238 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014239 ac_header_preproc=yes
14240else
14241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014242sed 's/^/| /' conftest.$ac_ext >&5
14243
Martin v. Löwis11437992002-04-12 09:54:03 +000014244 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014246
Martin v. Löwis11437992002-04-12 09:54:03 +000014247rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014248{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14249echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014250
Martin v. Löwis11437992002-04-12 09:54:03 +000014251# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014252case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14253 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014254 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14255echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014256 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14257echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14258 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014259 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014260 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014261 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14262echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014263 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14264echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14265 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14266echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14267 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14268echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014269 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14270echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014271 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14272echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014273 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014274## ------------------------------------------------ ##
14275## Report this to http://www.python.org/python-bugs ##
14276## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014277_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014278 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014279 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014280esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014281{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14282echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014283if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14284 echo $ECHO_N "(cached) $ECHO_C" >&6
14285else
14286 ac_cv_header_kernel_OS_h=$ac_header_preproc
14287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014288{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14289echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014290
14291fi
14292if test $ac_cv_header_kernel_OS_h = yes; then
14293 cat >>confdefs.h <<\_ACEOF
14294#define WITH_THREAD 1
14295_ACEOF
14296
14297
14298cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014299#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014300_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014301
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014302 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014303else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014304
Martin v. Löwiseba40652007-08-30 20:10:57 +000014305 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14306echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014307if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14308 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014309else
Martin v. Löwis11437992002-04-12 09:54:03 +000014310 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014311LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014312cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014313/* confdefs.h. */
14314_ACEOF
14315cat confdefs.h >>conftest.$ac_ext
14316cat >>conftest.$ac_ext <<_ACEOF
14317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014318
Martin v. Löwiseba40652007-08-30 20:10:57 +000014319/* Override any GCC internal prototype to avoid an error.
14320 Use char because int might match the return type of a GCC
14321 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014322#ifdef __cplusplus
14323extern "C"
14324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014325char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014326int
14327main ()
14328{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014329return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014330 ;
14331 return 0;
14332}
14333_ACEOF
14334rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014335if { (ac_try="$ac_link"
14336case "(($ac_try" in
14337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14338 *) ac_try_echo=$ac_try;;
14339esac
14340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14341 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014343 grep -v '^ *+' conftest.er1 >conftest.err
14344 rm -f conftest.er1
14345 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014347 (exit $ac_status); } && {
14348 test -z "$ac_c_werror_flag" ||
14349 test ! -s conftest.err
14350 } && test -s conftest$ac_exeext &&
14351 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014352 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014353else
Martin v. Löwis11437992002-04-12 09:54:03 +000014354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014355sed 's/^/| /' conftest.$ac_ext >&5
14356
Martin v. Löwiseba40652007-08-30 20:10:57 +000014357 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014359
14360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014361 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014362LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014364{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14365echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014366if test $ac_cv_lib_pthreads_pthread_create = yes; then
14367 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014368#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014369_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014370
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014371 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014372 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014373 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014374else
Greg Steinadf63d62000-07-05 10:38:09 +000014375
Martin v. Löwiseba40652007-08-30 20:10:57 +000014376 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14377echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014378if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14379 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014380else
Martin v. Löwis11437992002-04-12 09:54:03 +000014381 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014382LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014383cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014384/* confdefs.h. */
14385_ACEOF
14386cat confdefs.h >>conftest.$ac_ext
14387cat >>conftest.$ac_ext <<_ACEOF
14388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014389
Martin v. Löwiseba40652007-08-30 20:10:57 +000014390/* Override any GCC internal prototype to avoid an error.
14391 Use char because int might match the return type of a GCC
14392 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014393#ifdef __cplusplus
14394extern "C"
14395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014396char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014397int
14398main ()
14399{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014400return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 ;
14402 return 0;
14403}
14404_ACEOF
14405rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014406if { (ac_try="$ac_link"
14407case "(($ac_try" in
14408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14409 *) ac_try_echo=$ac_try;;
14410esac
14411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14412 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014414 grep -v '^ *+' conftest.er1 >conftest.err
14415 rm -f conftest.er1
14416 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014418 (exit $ac_status); } && {
14419 test -z "$ac_c_werror_flag" ||
14420 test ! -s conftest.err
14421 } && test -s conftest$ac_exeext &&
14422 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014424else
Martin v. Löwis11437992002-04-12 09:54:03 +000014425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014426sed 's/^/| /' conftest.$ac_ext >&5
14427
Martin v. Löwiseba40652007-08-30 20:10:57 +000014428 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014430
14431rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014432 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014433LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014435{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14436echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014437if test $ac_cv_lib_c_r_pthread_create = yes; then
14438 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014439#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014440_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014441
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014442 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014443 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014444 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014445else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014446
Martin v. Löwiseba40652007-08-30 20:10:57 +000014447 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14448echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014449if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14450 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014451else
Martin v. Löwis11437992002-04-12 09:54:03 +000014452 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014453LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014454cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014455/* confdefs.h. */
14456_ACEOF
14457cat confdefs.h >>conftest.$ac_ext
14458cat >>conftest.$ac_ext <<_ACEOF
14459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014460
Martin v. Löwiseba40652007-08-30 20:10:57 +000014461/* Override any GCC internal prototype to avoid an error.
14462 Use char because int might match the return type of a GCC
14463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014464#ifdef __cplusplus
14465extern "C"
14466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014467char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014468int
14469main ()
14470{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014471return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 ;
14473 return 0;
14474}
14475_ACEOF
14476rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014477if { (ac_try="$ac_link"
14478case "(($ac_try" in
14479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14480 *) ac_try_echo=$ac_try;;
14481esac
14482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14483 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014485 grep -v '^ *+' conftest.er1 >conftest.err
14486 rm -f conftest.er1
14487 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014489 (exit $ac_status); } && {
14490 test -z "$ac_c_werror_flag" ||
14491 test ! -s conftest.err
14492 } && test -s conftest$ac_exeext &&
14493 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014495else
Martin v. Löwis11437992002-04-12 09:54:03 +000014496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014497sed 's/^/| /' conftest.$ac_ext >&5
14498
Martin v. Löwiseba40652007-08-30 20:10:57 +000014499 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014501
14502rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014503 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014504LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014506{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14507echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014508if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14509 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014510#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014511_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014512
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014513 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014514 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014515 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014516else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014517
Martin v. Löwiseba40652007-08-30 20:10:57 +000014518 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14519echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014520if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14521 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014522else
Martin v. Löwis11437992002-04-12 09:54:03 +000014523 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014524LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014525cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014526/* confdefs.h. */
14527_ACEOF
14528cat confdefs.h >>conftest.$ac_ext
14529cat >>conftest.$ac_ext <<_ACEOF
14530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014531
Martin v. Löwiseba40652007-08-30 20:10:57 +000014532/* Override any GCC internal prototype to avoid an error.
14533 Use char because int might match the return type of a GCC
14534 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014535#ifdef __cplusplus
14536extern "C"
14537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014538char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014539int
14540main ()
14541{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014542return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014543 ;
14544 return 0;
14545}
14546_ACEOF
14547rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014548if { (ac_try="$ac_link"
14549case "(($ac_try" in
14550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14551 *) ac_try_echo=$ac_try;;
14552esac
14553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14554 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014556 grep -v '^ *+' conftest.er1 >conftest.err
14557 rm -f conftest.er1
14558 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014560 (exit $ac_status); } && {
14561 test -z "$ac_c_werror_flag" ||
14562 test ! -s conftest.err
14563 } && test -s conftest$ac_exeext &&
14564 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014565 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014566else
Martin v. Löwis11437992002-04-12 09:54:03 +000014567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014568sed 's/^/| /' conftest.$ac_ext >&5
14569
Martin v. Löwiseba40652007-08-30 20:10:57 +000014570 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014572
14573rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014575LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014577{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14578echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014579if test $ac_cv_lib_cma_pthread_create = yes; then
14580 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014581#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014582_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014583
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014584 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014585 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014586 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014587else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014588
Martin v. Löwis130fb172001-07-19 11:00:41 +000014589 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014590fi
14591
Guido van Rossum627b2d71993-12-24 10:39:16 +000014592
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014593fi
14594
Guido van Rossum0be3e491997-05-22 20:33:33 +000014595fi
14596
Guido van Rossum49545951997-12-02 19:28:29 +000014597fi
14598
Guido van Rossumb93a8621998-05-07 13:27:32 +000014599fi
14600
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014601
Michael W. Hudson54241132001-12-07 15:38:26 +000014602fi
14603
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014604
14605fi
14606
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014608
14609rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014610 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014611fi
14612
Martin v. Löwis11437992002-04-12 09:54:03 +000014613fi
14614
14615
14616fi
14617
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014618
Michael W. Hudson54241132001-12-07 15:38:26 +000014619
Martin v. Löwiseba40652007-08-30 20:10:57 +000014620 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14621echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014622if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14623 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014624else
Martin v. Löwis11437992002-04-12 09:54:03 +000014625 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014626LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014628/* confdefs.h. */
14629_ACEOF
14630cat confdefs.h >>conftest.$ac_ext
14631cat >>conftest.$ac_ext <<_ACEOF
14632/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014633
Martin v. Löwiseba40652007-08-30 20:10:57 +000014634/* Override any GCC internal prototype to avoid an error.
14635 Use char because int might match the return type of a GCC
14636 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014637#ifdef __cplusplus
14638extern "C"
14639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014640char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014641int
14642main ()
14643{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014644return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014645 ;
14646 return 0;
14647}
14648_ACEOF
14649rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014650if { (ac_try="$ac_link"
14651case "(($ac_try" in
14652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14653 *) ac_try_echo=$ac_try;;
14654esac
14655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14656 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014658 grep -v '^ *+' conftest.er1 >conftest.err
14659 rm -f conftest.er1
14660 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014662 (exit $ac_status); } && {
14663 test -z "$ac_c_werror_flag" ||
14664 test ! -s conftest.err
14665 } && test -s conftest$ac_exeext &&
14666 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014667 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014668else
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014670sed 's/^/| /' conftest.$ac_ext >&5
14671
Martin v. Löwiseba40652007-08-30 20:10:57 +000014672 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014674
14675rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014676 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014677LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014679{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14680echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014681if test $ac_cv_lib_mpc_usconfig = yes; then
14682 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014683#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014684_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014685
Martin v. Löwis130fb172001-07-19 11:00:41 +000014686 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014687 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014688 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014689fi
14690
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014691
Neal Norwitza978ab02002-11-02 16:58:05 +000014692 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014693 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14694echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014695if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014697else
Martin v. Löwis11437992002-04-12 09:54:03 +000014698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014699LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014701/* confdefs.h. */
14702_ACEOF
14703cat confdefs.h >>conftest.$ac_ext
14704cat >>conftest.$ac_ext <<_ACEOF
14705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014706
Martin v. Löwiseba40652007-08-30 20:10:57 +000014707/* Override any GCC internal prototype to avoid an error.
14708 Use char because int might match the return type of a GCC
14709 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014710#ifdef __cplusplus
14711extern "C"
14712#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014713char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014714int
14715main ()
14716{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014717return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014718 ;
14719 return 0;
14720}
14721_ACEOF
14722rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014723if { (ac_try="$ac_link"
14724case "(($ac_try" in
14725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14726 *) ac_try_echo=$ac_try;;
14727esac
14728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14729 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014731 grep -v '^ *+' conftest.er1 >conftest.err
14732 rm -f conftest.er1
14733 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014735 (exit $ac_status); } && {
14736 test -z "$ac_c_werror_flag" ||
14737 test ! -s conftest.err
14738 } && test -s conftest$ac_exeext &&
14739 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014741else
Martin v. Löwis11437992002-04-12 09:54:03 +000014742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014743sed 's/^/| /' conftest.$ac_ext >&5
14744
Martin v. Löwiseba40652007-08-30 20:10:57 +000014745 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014747
14748rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014750LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014752{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14753echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014754if test $ac_cv_lib_thread_thr_create = yes; then
14755 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014756#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014757_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014758
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014759 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014760 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014761 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014762fi
14763
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014764 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014765
Martin v. Löwis130fb172001-07-19 11:00:41 +000014766 if test "$USE_THREAD_MODULE" != "#"
14767 then
14768 # If the above checks didn't disable threads, (at least) OSF1
14769 # needs this '-threads' argument during linking.
14770 case $ac_sys_system in
14771 OSF1) LDLAST=-threads;;
14772 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014773 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014774fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014775
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014776if test "$posix_threads" = "yes"; then
14777 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014778
14779cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014780#define _POSIX_THREADS 1
14781_ACEOF
14782
14783 fi
14784
14785 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14786 case $ac_sys_system/$ac_sys_release in
14787 SunOS/5.6)
14788cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014789#define HAVE_PTHREAD_DESTRUCTOR 1
14790_ACEOF
14791
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014792 ;;
14793 SunOS/5.8)
14794cat >>confdefs.h <<\_ACEOF
14795#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14796_ACEOF
14797
14798 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014799 AIX/5)
14800cat >>confdefs.h <<\_ACEOF
14801#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14802_ACEOF
14803
14804 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014805 esac
14806
Martin v. Löwiseba40652007-08-30 20:10:57 +000014807 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14808echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014809 if test "${ac_cv_pthread_system_supported+set}" = set; then
14810 echo $ECHO_N "(cached) $ECHO_C" >&6
14811else
14812 if test "$cross_compiling" = yes; then
14813 ac_cv_pthread_system_supported=no
14814else
14815 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014816/* confdefs.h. */
14817_ACEOF
14818cat confdefs.h >>conftest.$ac_ext
14819cat >>conftest.$ac_ext <<_ACEOF
14820/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014821#include <pthread.h>
14822 void *foo(void *parm) {
14823 return NULL;
14824 }
14825 main() {
14826 pthread_attr_t attr;
14827 pthread_t id;
14828 if (pthread_attr_init(&attr)) exit(-1);
14829 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14830 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14831 exit(0);
14832 }
14833_ACEOF
14834rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014835if { (ac_try="$ac_link"
14836case "(($ac_try" in
14837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14838 *) ac_try_echo=$ac_try;;
14839esac
14840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14841 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014842 ac_status=$?
14843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14844 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014845 { (case "(($ac_try" in
14846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14847 *) ac_try_echo=$ac_try;;
14848esac
14849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14850 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014851 ac_status=$?
14852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14853 (exit $ac_status); }; }; then
14854 ac_cv_pthread_system_supported=yes
14855else
14856 echo "$as_me: program exited with status $ac_status" >&5
14857echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014858sed 's/^/| /' conftest.$ac_ext >&5
14859
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014860( exit $ac_status )
14861ac_cv_pthread_system_supported=no
14862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014863rm -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 +000014864fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014865
Martin v. Löwiseba40652007-08-30 20:10:57 +000014866
14867
Guido van Rossum627b2d71993-12-24 10:39:16 +000014868fi
14869
Martin v. Löwiseba40652007-08-30 20:10:57 +000014870 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14871echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014872 if test "$ac_cv_pthread_system_supported" = "yes"; then
14873
14874cat >>confdefs.h <<\_ACEOF
14875#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14876_ACEOF
14877
14878 fi
14879
14880for ac_func in pthread_sigmask
14881do
14882as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014883{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14884echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14885if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014886 echo $ECHO_N "(cached) $ECHO_C" >&6
14887else
14888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014889/* confdefs.h. */
14890_ACEOF
14891cat confdefs.h >>conftest.$ac_ext
14892cat >>conftest.$ac_ext <<_ACEOF
14893/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014894/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14895 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14896#define $ac_func innocuous_$ac_func
14897
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014898/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014899 which can conflict with char $ac_func (); below.
14900 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014901 <limits.h> exists even on freestanding compilers. */
14902
14903#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014904# include <limits.h>
14905#else
14906# include <assert.h>
14907#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014908
14909#undef $ac_func
14910
Martin v. Löwiseba40652007-08-30 20:10:57 +000014911/* Override any GCC internal prototype to avoid an error.
14912 Use char because int might match the return type of a GCC
14913 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014914#ifdef __cplusplus
14915extern "C"
14916#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014917char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014918/* The GNU C library defines this for functions which it implements
14919 to always fail with ENOSYS. Some functions are actually named
14920 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014921#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014922choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014923#endif
14924
Skip Montanaro6dead952003-09-25 14:50:04 +000014925int
14926main ()
14927{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014928return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014929 ;
14930 return 0;
14931}
14932_ACEOF
14933rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014934if { (ac_try="$ac_link"
14935case "(($ac_try" in
14936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14937 *) ac_try_echo=$ac_try;;
14938esac
14939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14940 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014942 grep -v '^ *+' conftest.er1 >conftest.err
14943 rm -f conftest.er1
14944 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014946 (exit $ac_status); } && {
14947 test -z "$ac_c_werror_flag" ||
14948 test ! -s conftest.err
14949 } && test -s conftest$ac_exeext &&
14950 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014951 eval "$as_ac_var=yes"
14952else
14953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014954sed 's/^/| /' conftest.$ac_ext >&5
14955
Martin v. Löwiseba40652007-08-30 20:10:57 +000014956 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014958
14959rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014962ac_res=`eval echo '${'$as_ac_var'}'`
14963 { echo "$as_me:$LINENO: result: $ac_res" >&5
14964echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014965if test `eval echo '${'$as_ac_var'}'` = yes; then
14966 cat >>confdefs.h <<_ACEOF
14967#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14968_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014969 case $ac_sys_system in
14970 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014971
Jason Tishlerfac083d2003-07-22 15:20:49 +000014972cat >>confdefs.h <<\_ACEOF
14973#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14974_ACEOF
14975
14976 ;;
14977 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014978fi
14979done
14980
14981fi
14982
14983
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014984# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014985
14986
Martin v. Löwiseba40652007-08-30 20:10:57 +000014987{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14988echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14989# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014990if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014991 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014992 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014993 { echo "$as_me:$LINENO: result: no" >&5
14994echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014995 ipv6=no
14996 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997 *) { echo "$as_me:$LINENO: result: yes" >&5
14998echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014999 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015000#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015001_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015002
15003 ipv6=yes
15004 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015006else
Martin v. Löwis11437992002-04-12 09:54:03 +000015007
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015008 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015009 { echo "$as_me:$LINENO: result: no" >&5
15010echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015011 ipv6=no
15012
15013else
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015015/* confdefs.h. */
15016_ACEOF
15017cat confdefs.h >>conftest.$ac_ext
15018cat >>conftest.$ac_ext <<_ACEOF
15019/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015020 /* AF_INET6 available check */
15021#include <sys/types.h>
15022#include <sys/socket.h>
15023main()
15024{
15025 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15026 exit(1);
15027 else
15028 exit(0);
15029}
15030
Martin v. Löwis11437992002-04-12 09:54:03 +000015031_ACEOF
15032rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015033if { (ac_try="$ac_link"
15034case "(($ac_try" in
15035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15036 *) ac_try_echo=$ac_try;;
15037esac
15038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15039 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 ac_status=$?
15041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015043 { (case "(($ac_try" in
15044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15045 *) ac_try_echo=$ac_try;;
15046esac
15047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15048 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ac_status=$?
15050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15051 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015052 { echo "$as_me:$LINENO: result: yes" >&5
15053echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015054 ipv6=yes
15055else
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 echo "$as_me: program exited with status $ac_status" >&5
15057echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015058sed 's/^/| /' conftest.$ac_ext >&5
15059
Martin v. Löwis11437992002-04-12 09:54:03 +000015060( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061{ echo "$as_me:$LINENO: result: no" >&5
15062echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015063 ipv6=no
15064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015065rm -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 +000015066fi
15067
Martin v. Löwiseba40652007-08-30 20:10:57 +000015068
15069
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015070if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015071 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15072echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015073 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015074/* confdefs.h. */
15075_ACEOF
15076cat confdefs.h >>conftest.$ac_ext
15077cat >>conftest.$ac_ext <<_ACEOF
15078/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015079#include <sys/types.h>
15080#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015081int
15082main ()
15083{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015084struct sockaddr_in6 x;
15085x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 ;
15087 return 0;
15088}
15089_ACEOF
15090rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015091if { (ac_try="$ac_compile"
15092case "(($ac_try" in
15093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15094 *) ac_try_echo=$ac_try;;
15095esac
15096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15097 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015099 grep -v '^ *+' conftest.er1 >conftest.err
15100 rm -f conftest.er1
15101 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015103 (exit $ac_status); } && {
15104 test -z "$ac_c_werror_flag" ||
15105 test ! -s conftest.err
15106 } && test -s conftest.$ac_objext; then
15107 { echo "$as_me:$LINENO: result: yes" >&5
15108echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015109 ipv6=yes
15110else
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015112sed 's/^/| /' conftest.$ac_ext >&5
15113
Martin v. Löwiseba40652007-08-30 20:10:57 +000015114 { echo "$as_me:$LINENO: result: no" >&5
15115echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015116 ipv6=no
15117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015118
15119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015120fi
15121
15122if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015124#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015125_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015126
15127fi
15128
Martin v. Löwiseba40652007-08-30 20:10:57 +000015129fi
15130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015131
15132ipv6type=unknown
15133ipv6lib=none
15134ipv6trylibc=no
15135
15136if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015137 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15138echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015139 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15140 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015141 case $i in
15142 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015144/* confdefs.h. */
15145_ACEOF
15146cat confdefs.h >>conftest.$ac_ext
15147cat >>conftest.$ac_ext <<_ACEOF
15148/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015149
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015150#include <netinet/in.h>
15151#ifdef IPV6_INRIA_VERSION
15152yes
15153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015154_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015156 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015157 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015158fi
15159rm -f conftest*
15160
15161 ;;
15162 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015164/* confdefs.h. */
15165_ACEOF
15166cat confdefs.h >>conftest.$ac_ext
15167cat >>conftest.$ac_ext <<_ACEOF
15168/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015169
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015170#include <netinet/in.h>
15171#ifdef __KAME__
15172yes
15173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015174_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015175if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015176 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015177 ipv6type=$i;
15178 ipv6lib=inet6
15179 ipv6libdir=/usr/local/v6/lib
15180 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015181fi
15182rm -f conftest*
15183
15184 ;;
15185 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015187/* confdefs.h. */
15188_ACEOF
15189cat confdefs.h >>conftest.$ac_ext
15190cat >>conftest.$ac_ext <<_ACEOF
15191/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015192
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015193#include <features.h>
15194#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15195yes
15196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015197_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015199 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015200 ipv6type=$i;
15201 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015202fi
15203rm -f conftest*
15204
15205 ;;
15206 linux-inet6)
15207 if test -d /usr/inet6; then
15208 ipv6type=$i
15209 ipv6lib=inet6
15210 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015211 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015212 fi
15213 ;;
15214 solaris)
15215 if test -f /etc/netconfig; then
15216 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15217 ipv6type=$i
15218 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015219 fi
15220 fi
15221 ;;
15222 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015224/* confdefs.h. */
15225_ACEOF
15226cat confdefs.h >>conftest.$ac_ext
15227cat >>conftest.$ac_ext <<_ACEOF
15228/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015229
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015230#include <sys/param.h>
15231#ifdef _TOSHIBA_INET6
15232yes
15233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015234_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015235if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015236 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015237 ipv6type=$i;
15238 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015239 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015240fi
15241rm -f conftest*
15242
15243 ;;
15244 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015246/* confdefs.h. */
15247_ACEOF
15248cat confdefs.h >>conftest.$ac_ext
15249cat >>conftest.$ac_ext <<_ACEOF
15250/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015251
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015252#include </usr/local/v6/include/sys/v6config.h>
15253#ifdef __V6D__
15254yes
15255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015256_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015258 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015259 ipv6type=$i;
15260 ipv6lib=v6;
15261 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015262 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015263fi
15264rm -f conftest*
15265
15266 ;;
15267 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015269/* confdefs.h. */
15270_ACEOF
15271cat confdefs.h >>conftest.$ac_ext
15272cat >>conftest.$ac_ext <<_ACEOF
15273/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015274
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015275#include <sys/param.h>
15276#ifdef _ZETA_MINAMI_INET6
15277yes
15278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015279_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015281 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015282 ipv6type=$i;
15283 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015284 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015285fi
15286rm -f conftest*
15287
15288 ;;
15289 esac
15290 if test "$ipv6type" != "unknown"; then
15291 break
15292 fi
15293 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15295echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015296fi
15297
15298if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15299 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15300 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15301 echo "using lib$ipv6lib"
15302 else
15303 if test $ipv6trylibc = "yes"; then
15304 echo "using libc"
15305 else
15306 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15307 echo "You need to fetch lib$ipv6lib.a from appropriate"
15308 echo 'ipv6 kit and compile beforehand.'
15309 exit 1
15310 fi
15311 fi
15312fi
15313
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015314# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015315{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15316echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015317
Martin v. Löwiseba40652007-08-30 20:10:57 +000015318# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015319if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015320 withval=$with_doc_strings;
15321fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015322
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015323
15324if test -z "$with_doc_strings"
15325then with_doc_strings="yes"
15326fi
15327if test "$with_doc_strings" != "no"
15328then
15329
15330cat >>confdefs.h <<\_ACEOF
15331#define WITH_DOC_STRINGS 1
15332_ACEOF
15333
15334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015335{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15336echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015337
Neil Schemenauera35c6882001-02-27 04:45:05 +000015338# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015339{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15340echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015341
Martin v. Löwiseba40652007-08-30 20:10:57 +000015342# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015343if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015345if test "$withval" != no
15346then
15347
15348cat >>confdefs.h <<\_ACEOF
15349#define WITH_TSC 1
15350_ACEOF
15351
Martin v. Löwiseba40652007-08-30 20:10:57 +000015352 { echo "$as_me:$LINENO: result: yes" >&5
15353echo "${ECHO_T}yes" >&6; }
15354else { echo "$as_me:$LINENO: result: no" >&5
15355echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015356fi
15357else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015358 { echo "$as_me:$LINENO: result: no" >&5
15359echo "${ECHO_T}no" >&6; }
15360fi
15361
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015362
15363# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015364{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15365echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015366
Martin v. Löwiseba40652007-08-30 20:10:57 +000015367# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015368if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015369 withval=$with_pymalloc;
15370fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015371
Neil Schemenauera35c6882001-02-27 04:45:05 +000015372
Neil Schemenauer16c22972002-03-22 15:34:49 +000015373if test -z "$with_pymalloc"
15374then with_pymalloc="yes"
15375fi
15376if test "$with_pymalloc" != "no"
15377then
Martin v. Löwis11437992002-04-12 09:54:03 +000015378
15379cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015380#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015381_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015382
15383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015384{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15385echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015386
Barry Warsawef82cd72000-06-30 16:21:01 +000015387# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015388{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15389echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015390
Martin v. Löwiseba40652007-08-30 20:10:57 +000015391# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015392if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015393 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015394if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015395then
15396
15397cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015398#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015399_ACEOF
15400
Martin v. Löwiseba40652007-08-30 20:10:57 +000015401 { echo "$as_me:$LINENO: result: yes" >&5
15402echo "${ECHO_T}yes" >&6; }
15403else { echo "$as_me:$LINENO: result: no" >&5
15404echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015405fi
15406else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015407 { echo "$as_me:$LINENO: result: no" >&5
15408echo "${ECHO_T}no" >&6; }
15409fi
15410
Barry Warsawef82cd72000-06-30 16:21:01 +000015411
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015412# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015413
Guido van Rossum98935bf2001-09-05 19:13:16 +000015414DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015415
Guido van Rossume97ee181999-12-20 21:27:22 +000015416# the dlopen() function means we might want to use dynload_shlib.o. some
15417# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015418
Thomas Wouters3a584202000-08-05 23:28:51 +000015419for ac_func in dlopen
15420do
Martin v. Löwis11437992002-04-12 09:54:03 +000015421as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015422{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15423echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15424if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015425 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015426else
Martin v. Löwis11437992002-04-12 09:54:03 +000015427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015428/* confdefs.h. */
15429_ACEOF
15430cat confdefs.h >>conftest.$ac_ext
15431cat >>conftest.$ac_ext <<_ACEOF
15432/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015433/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15434 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15435#define $ac_func innocuous_$ac_func
15436
Guido van Rossume97ee181999-12-20 21:27:22 +000015437/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015438 which can conflict with char $ac_func (); below.
15439 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015440 <limits.h> exists even on freestanding compilers. */
15441
15442#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015443# include <limits.h>
15444#else
15445# include <assert.h>
15446#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015447
15448#undef $ac_func
15449
Martin v. Löwiseba40652007-08-30 20:10:57 +000015450/* Override any GCC internal prototype to avoid an error.
15451 Use char because int might match the return type of a GCC
15452 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015453#ifdef __cplusplus
15454extern "C"
15455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015456char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015457/* The GNU C library defines this for functions which it implements
15458 to always fail with ENOSYS. Some functions are actually named
15459 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015460#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015461choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015462#endif
15463
Skip Montanaro6dead952003-09-25 14:50:04 +000015464int
15465main ()
15466{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015467return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015468 ;
15469 return 0;
15470}
15471_ACEOF
15472rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015473if { (ac_try="$ac_link"
15474case "(($ac_try" in
15475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15476 *) ac_try_echo=$ac_try;;
15477esac
15478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15479 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015481 grep -v '^ *+' conftest.er1 >conftest.err
15482 rm -f conftest.er1
15483 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015485 (exit $ac_status); } && {
15486 test -z "$ac_c_werror_flag" ||
15487 test ! -s conftest.err
15488 } && test -s conftest$ac_exeext &&
15489 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015490 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015491else
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015493sed 's/^/| /' conftest.$ac_ext >&5
15494
Martin v. Löwiseba40652007-08-30 20:10:57 +000015495 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015497
15498rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015499 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015501ac_res=`eval echo '${'$as_ac_var'}'`
15502 { echo "$as_me:$LINENO: result: $ac_res" >&5
15503echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015504if test `eval echo '${'$as_ac_var'}'` = yes; then
15505 cat >>confdefs.h <<_ACEOF
15506#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15507_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015508
Guido van Rossume97ee181999-12-20 21:27:22 +000015509fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015510done
Guido van Rossume97ee181999-12-20 21:27:22 +000015511
Michael W. Hudson54241132001-12-07 15:38:26 +000015512
Guido van Rossume97ee181999-12-20 21:27:22 +000015513# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15514# loading of modules.
15515
Martin v. Löwiseba40652007-08-30 20:10:57 +000015516{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15517echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015518if test -z "$DYNLOADFILE"
15519then
15520 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015521 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15522 if test "$ac_cv_func_dlopen" = yes
15523 then DYNLOADFILE="dynload_shlib.o"
15524 else DYNLOADFILE="dynload_aix.o"
15525 fi
15526 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015527 BeOS*) DYNLOADFILE="dynload_beos.o";;
15528 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015529 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15530 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015531 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015532 *)
15533 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15534 # out any dynamic loading
15535 if test "$ac_cv_func_dlopen" = yes
15536 then DYNLOADFILE="dynload_shlib.o"
15537 else DYNLOADFILE="dynload_stub.o"
15538 fi
15539 ;;
15540 esac
15541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015542{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15543echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015544if test "$DYNLOADFILE" != "dynload_stub.o"
15545then
Martin v. Löwis11437992002-04-12 09:54:03 +000015546
15547cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015548#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015549_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015550
15551fi
15552
Neil Schemenauer4e425612001-06-19 15:44:15 +000015553# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15554
Michael W. Hudson54241132001-12-07 15:38:26 +000015555
Martin v. Löwiseba40652007-08-30 20:10:57 +000015556{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15557echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015558if test -z "$MACHDEP_OBJS"
15559then
Jack Jansene578a632001-08-15 01:27:14 +000015560 MACHDEP_OBJS=$extra_machdep_objs
15561else
15562 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015564{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15565echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015566
Guido van Rossum627b2d71993-12-24 10:39:16 +000015567# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
Martin v. Löwisd6320502004-08-12 13:45:08 +000015639
Martin v. Löwisc3001752005-01-23 09:27:24 +000015640
15641
Neal Norwitz05a45592006-03-20 06:30:08 +000015642
15643
Martin v. Löwis382abef2007-02-19 10:55:19 +000015644
15645
Christian Heimes36281872007-11-30 21:11:28 +000015646
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015647for ac_func in alarm bind_textdomain_codeset chown clock confstr \
Christian Heimes36281872007-11-30 21:11:28 +000015648 ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015649 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015650 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015651 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015652 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015653 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015654 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015655 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015656 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015657 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015658 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015659do
Martin v. Löwis11437992002-04-12 09:54:03 +000015660as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015661{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15662echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15663if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015665else
Martin v. Löwis11437992002-04-12 09:54:03 +000015666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015667/* confdefs.h. */
15668_ACEOF
15669cat confdefs.h >>conftest.$ac_ext
15670cat >>conftest.$ac_ext <<_ACEOF
15671/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015672/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15673 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15674#define $ac_func innocuous_$ac_func
15675
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015676/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015677 which can conflict with char $ac_func (); below.
15678 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015679 <limits.h> exists even on freestanding compilers. */
15680
15681#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015682# include <limits.h>
15683#else
15684# include <assert.h>
15685#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015686
15687#undef $ac_func
15688
Martin v. Löwiseba40652007-08-30 20:10:57 +000015689/* Override any GCC internal prototype to avoid an error.
15690 Use char because int might match the return type of a GCC
15691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015692#ifdef __cplusplus
15693extern "C"
15694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015695char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015696/* The GNU C library defines this for functions which it implements
15697 to always fail with ENOSYS. Some functions are actually named
15698 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015699#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015700choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015701#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015702
Skip Montanaro6dead952003-09-25 14:50:04 +000015703int
15704main ()
15705{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015706return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 ;
15708 return 0;
15709}
15710_ACEOF
15711rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015712if { (ac_try="$ac_link"
15713case "(($ac_try" in
15714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15715 *) ac_try_echo=$ac_try;;
15716esac
15717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15718 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015720 grep -v '^ *+' conftest.er1 >conftest.err
15721 rm -f conftest.er1
15722 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015724 (exit $ac_status); } && {
15725 test -z "$ac_c_werror_flag" ||
15726 test ! -s conftest.err
15727 } && test -s conftest$ac_exeext &&
15728 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015729 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015730else
Martin v. Löwis11437992002-04-12 09:54:03 +000015731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015732sed 's/^/| /' conftest.$ac_ext >&5
15733
Martin v. Löwiseba40652007-08-30 20:10:57 +000015734 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015736
15737rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015738 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015740ac_res=`eval echo '${'$as_ac_var'}'`
15741 { echo "$as_me:$LINENO: result: $ac_res" >&5
15742echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015743if test `eval echo '${'$as_ac_var'}'` = yes; then
15744 cat >>confdefs.h <<_ACEOF
15745#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15746_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015747
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015748fi
15749done
15750
Michael W. Hudson54241132001-12-07 15:38:26 +000015751
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015752# For some functions, having a definition is not sufficient, since
15753# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015754{ echo "$as_me:$LINENO: checking for chroot" >&5
15755echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015756cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015757/* confdefs.h. */
15758_ACEOF
15759cat confdefs.h >>conftest.$ac_ext
15760cat >>conftest.$ac_ext <<_ACEOF
15761/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015762#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015763int
15764main ()
15765{
15766void *x=chroot
15767 ;
15768 return 0;
15769}
15770_ACEOF
15771rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015772if { (ac_try="$ac_compile"
15773case "(($ac_try" in
15774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15775 *) ac_try_echo=$ac_try;;
15776esac
15777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015780 grep -v '^ *+' conftest.er1 >conftest.err
15781 rm -f conftest.er1
15782 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015784 (exit $ac_status); } && {
15785 test -z "$ac_c_werror_flag" ||
15786 test ! -s conftest.err
15787 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015788
15789cat >>confdefs.h <<\_ACEOF
15790#define HAVE_CHROOT 1
15791_ACEOF
15792
Martin v. Löwiseba40652007-08-30 20:10:57 +000015793 { echo "$as_me:$LINENO: result: yes" >&5
15794echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015795else
15796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015797sed 's/^/| /' conftest.$ac_ext >&5
15798
Martin v. Löwiseba40652007-08-30 20:10:57 +000015799 { echo "$as_me:$LINENO: result: no" >&5
15800echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015801
15802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015803
15804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15805{ echo "$as_me:$LINENO: checking for link" >&5
15806echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015807cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015808/* confdefs.h. */
15809_ACEOF
15810cat confdefs.h >>conftest.$ac_ext
15811cat >>conftest.$ac_ext <<_ACEOF
15812/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015813#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015814int
15815main ()
15816{
15817void *x=link
15818 ;
15819 return 0;
15820}
15821_ACEOF
15822rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015823if { (ac_try="$ac_compile"
15824case "(($ac_try" in
15825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15826 *) ac_try_echo=$ac_try;;
15827esac
15828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015831 grep -v '^ *+' conftest.er1 >conftest.err
15832 rm -f conftest.er1
15833 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015835 (exit $ac_status); } && {
15836 test -z "$ac_c_werror_flag" ||
15837 test ! -s conftest.err
15838 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015839
15840cat >>confdefs.h <<\_ACEOF
15841#define HAVE_LINK 1
15842_ACEOF
15843
Martin v. Löwiseba40652007-08-30 20:10:57 +000015844 { echo "$as_me:$LINENO: result: yes" >&5
15845echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015846else
15847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015848sed 's/^/| /' conftest.$ac_ext >&5
15849
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850 { echo "$as_me:$LINENO: result: no" >&5
15851echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015852
15853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015854
15855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15856{ echo "$as_me:$LINENO: checking for symlink" >&5
15857echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015858cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015859/* confdefs.h. */
15860_ACEOF
15861cat confdefs.h >>conftest.$ac_ext
15862cat >>conftest.$ac_ext <<_ACEOF
15863/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015864#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015865int
15866main ()
15867{
15868void *x=symlink
15869 ;
15870 return 0;
15871}
15872_ACEOF
15873rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015874if { (ac_try="$ac_compile"
15875case "(($ac_try" in
15876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15877 *) ac_try_echo=$ac_try;;
15878esac
15879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015882 grep -v '^ *+' conftest.er1 >conftest.err
15883 rm -f conftest.er1
15884 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015886 (exit $ac_status); } && {
15887 test -z "$ac_c_werror_flag" ||
15888 test ! -s conftest.err
15889 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015890
15891cat >>confdefs.h <<\_ACEOF
15892#define HAVE_SYMLINK 1
15893_ACEOF
15894
Martin v. Löwiseba40652007-08-30 20:10:57 +000015895 { echo "$as_me:$LINENO: result: yes" >&5
15896echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015897else
15898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015899sed 's/^/| /' conftest.$ac_ext >&5
15900
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901 { echo "$as_me:$LINENO: result: no" >&5
15902echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015903
15904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905
15906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15907{ echo "$as_me:$LINENO: checking for fchdir" >&5
15908echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015910/* confdefs.h. */
15911_ACEOF
15912cat confdefs.h >>conftest.$ac_ext
15913cat >>conftest.$ac_ext <<_ACEOF
15914/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015915#include <unistd.h>
15916int
15917main ()
15918{
15919void *x=fchdir
15920 ;
15921 return 0;
15922}
15923_ACEOF
15924rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015925if { (ac_try="$ac_compile"
15926case "(($ac_try" in
15927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15928 *) ac_try_echo=$ac_try;;
15929esac
15930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15931 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015933 grep -v '^ *+' conftest.er1 >conftest.err
15934 rm -f conftest.er1
15935 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015937 (exit $ac_status); } && {
15938 test -z "$ac_c_werror_flag" ||
15939 test ! -s conftest.err
15940 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015941
15942cat >>confdefs.h <<\_ACEOF
15943#define HAVE_FCHDIR 1
15944_ACEOF
15945
Martin v. Löwiseba40652007-08-30 20:10:57 +000015946 { echo "$as_me:$LINENO: result: yes" >&5
15947echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015948else
15949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015950sed 's/^/| /' conftest.$ac_ext >&5
15951
Martin v. Löwiseba40652007-08-30 20:10:57 +000015952 { echo "$as_me:$LINENO: result: no" >&5
15953echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015954
15955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015956
15957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15958{ echo "$as_me:$LINENO: checking for fsync" >&5
15959echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015960cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015961/* confdefs.h. */
15962_ACEOF
15963cat confdefs.h >>conftest.$ac_ext
15964cat >>conftest.$ac_ext <<_ACEOF
15965/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015966#include <unistd.h>
15967int
15968main ()
15969{
15970void *x=fsync
15971 ;
15972 return 0;
15973}
15974_ACEOF
15975rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015976if { (ac_try="$ac_compile"
15977case "(($ac_try" in
15978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15979 *) ac_try_echo=$ac_try;;
15980esac
15981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015984 grep -v '^ *+' conftest.er1 >conftest.err
15985 rm -f conftest.er1
15986 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015988 (exit $ac_status); } && {
15989 test -z "$ac_c_werror_flag" ||
15990 test ! -s conftest.err
15991 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015992
15993cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015994#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015995_ACEOF
15996
Martin v. Löwiseba40652007-08-30 20:10:57 +000015997 { echo "$as_me:$LINENO: result: yes" >&5
15998echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015999else
16000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016001sed 's/^/| /' conftest.$ac_ext >&5
16002
Martin v. Löwiseba40652007-08-30 20:10:57 +000016003 { echo "$as_me:$LINENO: result: no" >&5
16004echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016005
16006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016007
16008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16009{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16010echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016011cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016012/* confdefs.h. */
16013_ACEOF
16014cat confdefs.h >>conftest.$ac_ext
16015cat >>conftest.$ac_ext <<_ACEOF
16016/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016017#include <unistd.h>
16018int
16019main ()
16020{
16021void *x=fdatasync
16022 ;
16023 return 0;
16024}
16025_ACEOF
16026rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016027if { (ac_try="$ac_compile"
16028case "(($ac_try" in
16029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16030 *) ac_try_echo=$ac_try;;
16031esac
16032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16033 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016035 grep -v '^ *+' conftest.er1 >conftest.err
16036 rm -f conftest.er1
16037 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016039 (exit $ac_status); } && {
16040 test -z "$ac_c_werror_flag" ||
16041 test ! -s conftest.err
16042 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016043
16044cat >>confdefs.h <<\_ACEOF
16045#define HAVE_FDATASYNC 1
16046_ACEOF
16047
Martin v. Löwiseba40652007-08-30 20:10:57 +000016048 { echo "$as_me:$LINENO: result: yes" >&5
16049echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016050else
16051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016052sed 's/^/| /' conftest.$ac_ext >&5
16053
Martin v. Löwiseba40652007-08-30 20:10:57 +000016054 { echo "$as_me:$LINENO: result: no" >&5
16055echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016056
16057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016058
16059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016060
Martin v. Löwisd5843682002-11-21 20:41:28 +000016061# On some systems (eg. FreeBSD 5), we would find a definition of the
16062# functions ctermid_r, setgroups in the library, but no prototype
16063# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16064# address to avoid compiler warnings and potential miscompilations
16065# because of the missing prototypes.
16066
Martin v. Löwiseba40652007-08-30 20:10:57 +000016067{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16068echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016069cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016070/* confdefs.h. */
16071_ACEOF
16072cat confdefs.h >>conftest.$ac_ext
16073cat >>conftest.$ac_ext <<_ACEOF
16074/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016075
16076#include "confdefs.h"
16077#include <stdio.h>
16078
Martin v. Löwisd5843682002-11-21 20:41:28 +000016079int
16080main ()
16081{
16082void* p = ctermid_r
16083 ;
16084 return 0;
16085}
16086_ACEOF
16087rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016088if { (ac_try="$ac_compile"
16089case "(($ac_try" in
16090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16091 *) ac_try_echo=$ac_try;;
16092esac
16093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16094 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016096 grep -v '^ *+' conftest.er1 >conftest.err
16097 rm -f conftest.er1
16098 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016100 (exit $ac_status); } && {
16101 test -z "$ac_c_werror_flag" ||
16102 test ! -s conftest.err
16103 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016104
16105cat >>confdefs.h <<\_ACEOF
16106#define HAVE_CTERMID_R 1
16107_ACEOF
16108
Martin v. Löwiseba40652007-08-30 20:10:57 +000016109 { echo "$as_me:$LINENO: result: yes" >&5
16110echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016111else
16112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016113sed 's/^/| /' conftest.$ac_ext >&5
16114
Martin v. Löwiseba40652007-08-30 20:10:57 +000016115 { echo "$as_me:$LINENO: result: no" >&5
16116echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016117
16118fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016119
Martin v. Löwiseba40652007-08-30 20:10:57 +000016120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16121
16122{ echo "$as_me:$LINENO: checking for flock" >&5
16123echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016124cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016125/* confdefs.h. */
16126_ACEOF
16127cat confdefs.h >>conftest.$ac_ext
16128cat >>conftest.$ac_ext <<_ACEOF
16129/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016130
16131#include "confdefs.h"
16132#include <sys/file.h>
16133
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016134int
16135main ()
16136{
16137void* p = flock
16138 ;
16139 return 0;
16140}
16141_ACEOF
16142rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016143if { (ac_try="$ac_compile"
16144case "(($ac_try" in
16145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16146 *) ac_try_echo=$ac_try;;
16147esac
16148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16149 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016151 grep -v '^ *+' conftest.er1 >conftest.err
16152 rm -f conftest.er1
16153 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016155 (exit $ac_status); } && {
16156 test -z "$ac_c_werror_flag" ||
16157 test ! -s conftest.err
16158 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016159
16160cat >>confdefs.h <<\_ACEOF
16161#define HAVE_FLOCK 1
16162_ACEOF
16163
Martin v. Löwiseba40652007-08-30 20:10:57 +000016164 { echo "$as_me:$LINENO: result: yes" >&5
16165echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016166else
16167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016168sed 's/^/| /' conftest.$ac_ext >&5
16169
Martin v. Löwiseba40652007-08-30 20:10:57 +000016170 { echo "$as_me:$LINENO: result: no" >&5
16171echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016172
16173fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016174
Martin v. Löwiseba40652007-08-30 20:10:57 +000016175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16176
16177{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16178echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016179cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016180/* confdefs.h. */
16181_ACEOF
16182cat confdefs.h >>conftest.$ac_ext
16183cat >>conftest.$ac_ext <<_ACEOF
16184/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016185
16186#include "confdefs.h"
16187#include <unistd.h>
16188
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016189int
16190main ()
16191{
16192void* p = getpagesize
16193 ;
16194 return 0;
16195}
16196_ACEOF
16197rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016198if { (ac_try="$ac_compile"
16199case "(($ac_try" in
16200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16201 *) ac_try_echo=$ac_try;;
16202esac
16203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016206 grep -v '^ *+' conftest.er1 >conftest.err
16207 rm -f conftest.er1
16208 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016210 (exit $ac_status); } && {
16211 test -z "$ac_c_werror_flag" ||
16212 test ! -s conftest.err
16213 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016214
16215cat >>confdefs.h <<\_ACEOF
16216#define HAVE_GETPAGESIZE 1
16217_ACEOF
16218
Martin v. Löwiseba40652007-08-30 20:10:57 +000016219 { echo "$as_me:$LINENO: result: yes" >&5
16220echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016221else
16222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016223sed 's/^/| /' conftest.$ac_ext >&5
16224
Martin v. Löwiseba40652007-08-30 20:10:57 +000016225 { echo "$as_me:$LINENO: result: no" >&5
16226echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016227
16228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016229
16230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016231
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016232for ac_prog in true
16233do
16234 # Extract the first word of "$ac_prog", so it can be a program name with args.
16235set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016236{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016238if test "${ac_cv_prog_TRUE+set}" = set; then
16239 echo $ECHO_N "(cached) $ECHO_C" >&6
16240else
16241 if test -n "$TRUE"; then
16242 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16243else
16244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16245for as_dir in $PATH
16246do
16247 IFS=$as_save_IFS
16248 test -z "$as_dir" && as_dir=.
16249 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016250 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 +000016251 ac_cv_prog_TRUE="$ac_prog"
16252 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16253 break 2
16254 fi
16255done
16256done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016257IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016258
16259fi
16260fi
16261TRUE=$ac_cv_prog_TRUE
16262if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016263 { echo "$as_me:$LINENO: result: $TRUE" >&5
16264echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016265else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266 { echo "$as_me:$LINENO: result: no" >&5
16267echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016268fi
16269
Martin v. Löwiseba40652007-08-30 20:10:57 +000016270
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016271 test -n "$TRUE" && break
16272done
16273test -n "$TRUE" || TRUE="/bin/true"
16274
16275
Martin v. Löwiseba40652007-08-30 20:10:57 +000016276{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16277echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016278if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16279 echo $ECHO_N "(cached) $ECHO_C" >&6
16280else
16281 ac_check_lib_save_LIBS=$LIBS
16282LIBS="-lc $LIBS"
16283cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016284/* confdefs.h. */
16285_ACEOF
16286cat confdefs.h >>conftest.$ac_ext
16287cat >>conftest.$ac_ext <<_ACEOF
16288/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016289
Martin v. Löwiseba40652007-08-30 20:10:57 +000016290/* Override any GCC internal prototype to avoid an error.
16291 Use char because int might match the return type of a GCC
16292 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016293#ifdef __cplusplus
16294extern "C"
16295#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016296char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016297int
16298main ()
16299{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016300return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016301 ;
16302 return 0;
16303}
16304_ACEOF
16305rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016306if { (ac_try="$ac_link"
16307case "(($ac_try" in
16308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16309 *) ac_try_echo=$ac_try;;
16310esac
16311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16312 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016314 grep -v '^ *+' conftest.er1 >conftest.err
16315 rm -f conftest.er1
16316 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016318 (exit $ac_status); } && {
16319 test -z "$ac_c_werror_flag" ||
16320 test ! -s conftest.err
16321 } && test -s conftest$ac_exeext &&
16322 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016323 ac_cv_lib_c_inet_aton=yes
16324else
16325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016326sed 's/^/| /' conftest.$ac_ext >&5
16327
Martin v. Löwiseba40652007-08-30 20:10:57 +000016328 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016330
16331rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016333LIBS=$ac_check_lib_save_LIBS
16334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016335{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16336echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016337if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016338 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016339else
16340
Martin v. Löwiseba40652007-08-30 20:10:57 +000016341{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16342echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016343if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16344 echo $ECHO_N "(cached) $ECHO_C" >&6
16345else
16346 ac_check_lib_save_LIBS=$LIBS
16347LIBS="-lresolv $LIBS"
16348cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016349/* confdefs.h. */
16350_ACEOF
16351cat confdefs.h >>conftest.$ac_ext
16352cat >>conftest.$ac_ext <<_ACEOF
16353/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016354
Martin v. Löwiseba40652007-08-30 20:10:57 +000016355/* Override any GCC internal prototype to avoid an error.
16356 Use char because int might match the return type of a GCC
16357 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016358#ifdef __cplusplus
16359extern "C"
16360#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016361char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016362int
16363main ()
16364{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016365return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016366 ;
16367 return 0;
16368}
16369_ACEOF
16370rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016371if { (ac_try="$ac_link"
16372case "(($ac_try" in
16373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16374 *) ac_try_echo=$ac_try;;
16375esac
16376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16377 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016379 grep -v '^ *+' conftest.er1 >conftest.err
16380 rm -f conftest.er1
16381 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016383 (exit $ac_status); } && {
16384 test -z "$ac_c_werror_flag" ||
16385 test ! -s conftest.err
16386 } && test -s conftest$ac_exeext &&
16387 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016388 ac_cv_lib_resolv_inet_aton=yes
16389else
16390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016391sed 's/^/| /' conftest.$ac_ext >&5
16392
Martin v. Löwiseba40652007-08-30 20:10:57 +000016393 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016395
16396rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016397 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016398LIBS=$ac_check_lib_save_LIBS
16399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016400{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16401echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016402if test $ac_cv_lib_resolv_inet_aton = yes; then
16403 cat >>confdefs.h <<_ACEOF
16404#define HAVE_LIBRESOLV 1
16405_ACEOF
16406
16407 LIBS="-lresolv $LIBS"
16408
16409fi
16410
16411
16412fi
16413
16414
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016415# On Tru64, chflags seems to be present, but calling it will
16416# exit Python
16417{ echo "$as_me:$LINENO: checking for chflags" >&5
16418echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16419if test "$cross_compiling" = yes; then
16420 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16421See \`config.log' for more details." >&5
16422echo "$as_me: error: cannot run test program while cross compiling
16423See \`config.log' for more details." >&2;}
16424 { (exit 1); exit 1; }; }
16425else
16426 cat >conftest.$ac_ext <<_ACEOF
16427/* confdefs.h. */
16428_ACEOF
16429cat confdefs.h >>conftest.$ac_ext
16430cat >>conftest.$ac_ext <<_ACEOF
16431/* end confdefs.h. */
16432
16433#include <sys/stat.h>
16434#include <unistd.h>
16435int main(int argc, char*argv[])
16436{
16437 if(chflags(argv[0], 0) != 0)
16438 return 1;
16439 return 0;
16440}
16441
16442_ACEOF
16443rm -f conftest$ac_exeext
16444if { (ac_try="$ac_link"
16445case "(($ac_try" in
16446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16447 *) ac_try_echo=$ac_try;;
16448esac
16449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16450 (eval "$ac_link") 2>&5
16451 ac_status=$?
16452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16453 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16454 { (case "(($ac_try" in
16455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16456 *) ac_try_echo=$ac_try;;
16457esac
16458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16459 (eval "$ac_try") 2>&5
16460 ac_status=$?
16461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16462 (exit $ac_status); }; }; then
16463
16464cat >>confdefs.h <<\_ACEOF
16465#define HAVE_CHFLAGS 1
16466_ACEOF
16467
16468 { echo "$as_me:$LINENO: result: yes" >&5
16469echo "${ECHO_T}yes" >&6; }
16470else
16471 echo "$as_me: program exited with status $ac_status" >&5
16472echo "$as_me: failed program was:" >&5
16473sed 's/^/| /' conftest.$ac_ext >&5
16474
16475( exit $ac_status )
16476{ echo "$as_me:$LINENO: result: no" >&5
16477echo "${ECHO_T}no" >&6; }
16478
16479fi
16480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16481fi
16482
16483
16484
16485{ echo "$as_me:$LINENO: checking for lchflags" >&5
16486echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16487if test "$cross_compiling" = yes; then
16488 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16489See \`config.log' for more details." >&5
16490echo "$as_me: error: cannot run test program while cross compiling
16491See \`config.log' for more details." >&2;}
16492 { (exit 1); exit 1; }; }
16493else
16494 cat >conftest.$ac_ext <<_ACEOF
16495/* confdefs.h. */
16496_ACEOF
16497cat confdefs.h >>conftest.$ac_ext
16498cat >>conftest.$ac_ext <<_ACEOF
16499/* end confdefs.h. */
16500
16501#include <sys/stat.h>
16502#include <unistd.h>
16503int main(int argc, char*argv[])
16504{
16505 if(lchflags(argv[0], 0) != 0)
16506 return 1;
16507 return 0;
16508}
16509
16510_ACEOF
16511rm -f conftest$ac_exeext
16512if { (ac_try="$ac_link"
16513case "(($ac_try" in
16514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16515 *) ac_try_echo=$ac_try;;
16516esac
16517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16518 (eval "$ac_link") 2>&5
16519 ac_status=$?
16520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16521 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16522 { (case "(($ac_try" in
16523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16524 *) ac_try_echo=$ac_try;;
16525esac
16526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16527 (eval "$ac_try") 2>&5
16528 ac_status=$?
16529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16530 (exit $ac_status); }; }; then
16531
16532cat >>confdefs.h <<\_ACEOF
16533#define HAVE_LCHFLAGS 1
16534_ACEOF
16535
16536 { echo "$as_me:$LINENO: result: yes" >&5
16537echo "${ECHO_T}yes" >&6; }
16538else
16539 echo "$as_me: program exited with status $ac_status" >&5
16540echo "$as_me: failed program was:" >&5
16541sed 's/^/| /' conftest.$ac_ext >&5
16542
16543( exit $ac_status )
16544{ echo "$as_me:$LINENO: result: no" >&5
16545echo "${ECHO_T}no" >&6; }
16546
16547fi
16548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16549fi
16550
16551
16552
Ronald Oussorenf8752642006-07-06 10:13:35 +000016553case $ac_sys_system/$ac_sys_release in
16554Darwin/*)
16555 _CUR_CFLAGS="${CFLAGS}"
16556 _CUR_LDFLAGS="${LDFLAGS}"
16557 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16558 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16559 ;;
16560esac
16561
Martin v. Löwiseba40652007-08-30 20:10:57 +000016562{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16563echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016564if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16565 echo $ECHO_N "(cached) $ECHO_C" >&6
16566else
16567 ac_check_lib_save_LIBS=$LIBS
16568LIBS="-lz $LIBS"
16569cat >conftest.$ac_ext <<_ACEOF
16570/* confdefs.h. */
16571_ACEOF
16572cat confdefs.h >>conftest.$ac_ext
16573cat >>conftest.$ac_ext <<_ACEOF
16574/* end confdefs.h. */
16575
Martin v. Löwiseba40652007-08-30 20:10:57 +000016576/* Override any GCC internal prototype to avoid an error.
16577 Use char because int might match the return type of a GCC
16578 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016579#ifdef __cplusplus
16580extern "C"
16581#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016582char inflateCopy ();
16583int
16584main ()
16585{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016587 ;
16588 return 0;
16589}
16590_ACEOF
16591rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016592if { (ac_try="$ac_link"
16593case "(($ac_try" in
16594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16595 *) ac_try_echo=$ac_try;;
16596esac
16597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16598 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016599 ac_status=$?
16600 grep -v '^ *+' conftest.er1 >conftest.err
16601 rm -f conftest.er1
16602 cat conftest.err >&5
16603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016604 (exit $ac_status); } && {
16605 test -z "$ac_c_werror_flag" ||
16606 test ! -s conftest.err
16607 } && test -s conftest$ac_exeext &&
16608 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016609 ac_cv_lib_z_inflateCopy=yes
16610else
16611 echo "$as_me: failed program was:" >&5
16612sed 's/^/| /' conftest.$ac_ext >&5
16613
Martin v. Löwiseba40652007-08-30 20:10:57 +000016614 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016616
16617rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016618 conftest$ac_exeext conftest.$ac_ext
16619LIBS=$ac_check_lib_save_LIBS
16620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016621{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16622echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016623if test $ac_cv_lib_z_inflateCopy = yes; then
16624
16625cat >>confdefs.h <<\_ACEOF
16626#define HAVE_ZLIB_COPY 1
16627_ACEOF
16628
16629fi
16630
16631
Ronald Oussorenf8752642006-07-06 10:13:35 +000016632case $ac_sys_system/$ac_sys_release in
16633Darwin/*)
16634 CFLAGS="${_CUR_CFLAGS}"
16635 LDFLAGS="${_CUR_LDFLAGS}"
16636 ;;
16637esac
16638
Martin v. Löwiseba40652007-08-30 20:10:57 +000016639{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16640echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016641cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016642/* confdefs.h. */
16643_ACEOF
16644cat confdefs.h >>conftest.$ac_ext
16645cat >>conftest.$ac_ext <<_ACEOF
16646/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016647
16648#include "confdefs.h"
16649#include <netdb.h>
16650
Martin v. Löwise9416172003-05-03 10:12:45 +000016651int
16652main ()
16653{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016654void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016655 ;
16656 return 0;
16657}
16658_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016659rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016660if { (ac_try="$ac_link"
16661case "(($ac_try" in
16662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16663 *) ac_try_echo=$ac_try;;
16664esac
16665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16666 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016668 grep -v '^ *+' conftest.er1 >conftest.err
16669 rm -f conftest.er1
16670 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016672 (exit $ac_status); } && {
16673 test -z "$ac_c_werror_flag" ||
16674 test ! -s conftest.err
16675 } && test -s conftest$ac_exeext &&
16676 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016677
16678cat >>confdefs.h <<\_ACEOF
16679#define HAVE_HSTRERROR 1
16680_ACEOF
16681
Martin v. Löwiseba40652007-08-30 20:10:57 +000016682 { echo "$as_me:$LINENO: result: yes" >&5
16683echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016684else
16685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016686sed 's/^/| /' conftest.$ac_ext >&5
16687
Martin v. Löwiseba40652007-08-30 20:10:57 +000016688 { echo "$as_me:$LINENO: result: no" >&5
16689echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016690
16691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016692
16693rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016694 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016695
Martin v. Löwiseba40652007-08-30 20:10:57 +000016696{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16697echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016699/* confdefs.h. */
16700_ACEOF
16701cat confdefs.h >>conftest.$ac_ext
16702cat >>conftest.$ac_ext <<_ACEOF
16703/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016704
16705#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016706#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016707#include <sys/socket.h>
16708#include <netinet/in.h>
16709#include <arpa/inet.h>
16710
Martin v. Löwise9416172003-05-03 10:12:45 +000016711int
16712main ()
16713{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016714void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016715 ;
16716 return 0;
16717}
16718_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016719rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016720if { (ac_try="$ac_link"
16721case "(($ac_try" in
16722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16723 *) ac_try_echo=$ac_try;;
16724esac
16725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16726 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016728 grep -v '^ *+' conftest.er1 >conftest.err
16729 rm -f conftest.er1
16730 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016732 (exit $ac_status); } && {
16733 test -z "$ac_c_werror_flag" ||
16734 test ! -s conftest.err
16735 } && test -s conftest$ac_exeext &&
16736 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016737
16738cat >>confdefs.h <<\_ACEOF
16739#define HAVE_INET_ATON 1
16740_ACEOF
16741
Martin v. Löwiseba40652007-08-30 20:10:57 +000016742 { echo "$as_me:$LINENO: result: yes" >&5
16743echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016744else
16745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016746sed 's/^/| /' conftest.$ac_ext >&5
16747
Martin v. Löwiseba40652007-08-30 20:10:57 +000016748 { echo "$as_me:$LINENO: result: no" >&5
16749echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016750
16751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016752
16753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016754 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016755
Martin v. Löwiseba40652007-08-30 20:10:57 +000016756{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16757echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016759/* confdefs.h. */
16760_ACEOF
16761cat confdefs.h >>conftest.$ac_ext
16762cat >>conftest.$ac_ext <<_ACEOF
16763/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016764
16765#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016766#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016767#include <sys/socket.h>
16768#include <netinet/in.h>
16769#include <arpa/inet.h>
16770
Martin v. Löwise9416172003-05-03 10:12:45 +000016771int
16772main ()
16773{
16774void* p = inet_pton
16775 ;
16776 return 0;
16777}
16778_ACEOF
16779rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016780if { (ac_try="$ac_compile"
16781case "(($ac_try" in
16782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16783 *) ac_try_echo=$ac_try;;
16784esac
16785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16786 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016788 grep -v '^ *+' conftest.er1 >conftest.err
16789 rm -f conftest.er1
16790 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016792 (exit $ac_status); } && {
16793 test -z "$ac_c_werror_flag" ||
16794 test ! -s conftest.err
16795 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016796
16797cat >>confdefs.h <<\_ACEOF
16798#define HAVE_INET_PTON 1
16799_ACEOF
16800
Martin v. Löwiseba40652007-08-30 20:10:57 +000016801 { echo "$as_me:$LINENO: result: yes" >&5
16802echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016803else
16804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016805sed 's/^/| /' conftest.$ac_ext >&5
16806
Martin v. Löwiseba40652007-08-30 20:10:57 +000016807 { echo "$as_me:$LINENO: result: no" >&5
16808echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016809
16810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016811
16812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016813
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016814# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016815{ echo "$as_me:$LINENO: checking for setgroups" >&5
16816echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016817cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016818/* confdefs.h. */
16819_ACEOF
16820cat confdefs.h >>conftest.$ac_ext
16821cat >>conftest.$ac_ext <<_ACEOF
16822/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016823
16824#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016825#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016826#ifdef HAVE_GRP_H
16827#include <grp.h>
16828#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016829
Martin v. Löwisd5843682002-11-21 20:41:28 +000016830int
16831main ()
16832{
16833void* p = setgroups
16834 ;
16835 return 0;
16836}
16837_ACEOF
16838rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016839if { (ac_try="$ac_compile"
16840case "(($ac_try" in
16841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16842 *) ac_try_echo=$ac_try;;
16843esac
16844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016847 grep -v '^ *+' conftest.er1 >conftest.err
16848 rm -f conftest.er1
16849 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016851 (exit $ac_status); } && {
16852 test -z "$ac_c_werror_flag" ||
16853 test ! -s conftest.err
16854 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016855
16856cat >>confdefs.h <<\_ACEOF
16857#define HAVE_SETGROUPS 1
16858_ACEOF
16859
Martin v. Löwiseba40652007-08-30 20:10:57 +000016860 { echo "$as_me:$LINENO: result: yes" >&5
16861echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016862else
16863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016864sed 's/^/| /' conftest.$ac_ext >&5
16865
Martin v. Löwiseba40652007-08-30 20:10:57 +000016866 { echo "$as_me:$LINENO: result: no" >&5
16867echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016868
16869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016870
16871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016872
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016873# check for openpty and forkpty
16874
Martin v. Löwis11437992002-04-12 09:54:03 +000016875
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016876for ac_func in openpty
16877do
Martin v. Löwis11437992002-04-12 09:54:03 +000016878as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016879{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16880echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16881if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016882 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016883else
Martin v. Löwis11437992002-04-12 09:54:03 +000016884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016885/* confdefs.h. */
16886_ACEOF
16887cat confdefs.h >>conftest.$ac_ext
16888cat >>conftest.$ac_ext <<_ACEOF
16889/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016890/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16891 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16892#define $ac_func innocuous_$ac_func
16893
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016894/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016895 which can conflict with char $ac_func (); below.
16896 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016897 <limits.h> exists even on freestanding compilers. */
16898
16899#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016900# include <limits.h>
16901#else
16902# include <assert.h>
16903#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016904
16905#undef $ac_func
16906
Martin v. Löwiseba40652007-08-30 20:10:57 +000016907/* Override any GCC internal prototype to avoid an error.
16908 Use char because int might match the return type of a GCC
16909 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016910#ifdef __cplusplus
16911extern "C"
16912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016913char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016914/* The GNU C library defines this for functions which it implements
16915 to always fail with ENOSYS. Some functions are actually named
16916 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016917#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016918choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016919#endif
16920
Skip Montanaro6dead952003-09-25 14:50:04 +000016921int
16922main ()
16923{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016924return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016925 ;
16926 return 0;
16927}
16928_ACEOF
16929rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016930if { (ac_try="$ac_link"
16931case "(($ac_try" in
16932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16933 *) ac_try_echo=$ac_try;;
16934esac
16935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16936 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016938 grep -v '^ *+' conftest.er1 >conftest.err
16939 rm -f conftest.er1
16940 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016942 (exit $ac_status); } && {
16943 test -z "$ac_c_werror_flag" ||
16944 test ! -s conftest.err
16945 } && test -s conftest$ac_exeext &&
16946 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016947 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016948else
Martin v. Löwis11437992002-04-12 09:54:03 +000016949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016950sed 's/^/| /' conftest.$ac_ext >&5
16951
Martin v. Löwiseba40652007-08-30 20:10:57 +000016952 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016954
16955rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016956 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016958ac_res=`eval echo '${'$as_ac_var'}'`
16959 { echo "$as_me:$LINENO: result: $ac_res" >&5
16960echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016961if test `eval echo '${'$as_ac_var'}'` = yes; then
16962 cat >>confdefs.h <<_ACEOF
16963#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16964_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016965
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016966else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016967 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16968echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016969if test "${ac_cv_lib_util_openpty+set}" = set; then
16970 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016971else
Martin v. Löwis11437992002-04-12 09:54:03 +000016972 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016973LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016975/* confdefs.h. */
16976_ACEOF
16977cat confdefs.h >>conftest.$ac_ext
16978cat >>conftest.$ac_ext <<_ACEOF
16979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016980
Martin v. Löwiseba40652007-08-30 20:10:57 +000016981/* Override any GCC internal prototype to avoid an error.
16982 Use char because int might match the return type of a GCC
16983 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016984#ifdef __cplusplus
16985extern "C"
16986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016987char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016988int
16989main ()
16990{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016991return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016992 ;
16993 return 0;
16994}
16995_ACEOF
16996rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016997if { (ac_try="$ac_link"
16998case "(($ac_try" in
16999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17000 *) ac_try_echo=$ac_try;;
17001esac
17002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17003 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017005 grep -v '^ *+' conftest.er1 >conftest.err
17006 rm -f conftest.er1
17007 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017009 (exit $ac_status); } && {
17010 test -z "$ac_c_werror_flag" ||
17011 test ! -s conftest.err
17012 } && test -s conftest$ac_exeext &&
17013 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017014 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017015else
Martin v. Löwis11437992002-04-12 09:54:03 +000017016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017017sed 's/^/| /' conftest.$ac_ext >&5
17018
Martin v. Löwiseba40652007-08-30 20:10:57 +000017019 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017021
17022rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017024LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017026{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17027echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017028if test $ac_cv_lib_util_openpty = yes; then
17029 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017030#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017031_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017032 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017033else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017034 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17035echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017036if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17037 echo $ECHO_N "(cached) $ECHO_C" >&6
17038else
17039 ac_check_lib_save_LIBS=$LIBS
17040LIBS="-lbsd $LIBS"
17041cat >conftest.$ac_ext <<_ACEOF
17042/* confdefs.h. */
17043_ACEOF
17044cat confdefs.h >>conftest.$ac_ext
17045cat >>conftest.$ac_ext <<_ACEOF
17046/* end confdefs.h. */
17047
Martin v. Löwiseba40652007-08-30 20:10:57 +000017048/* Override any GCC internal prototype to avoid an error.
17049 Use char because int might match the return type of a GCC
17050 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017051#ifdef __cplusplus
17052extern "C"
17053#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017054char openpty ();
17055int
17056main ()
17057{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017058return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017059 ;
17060 return 0;
17061}
17062_ACEOF
17063rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017064if { (ac_try="$ac_link"
17065case "(($ac_try" in
17066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17067 *) ac_try_echo=$ac_try;;
17068esac
17069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17070 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017071 ac_status=$?
17072 grep -v '^ *+' conftest.er1 >conftest.err
17073 rm -f conftest.er1
17074 cat conftest.err >&5
17075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017076 (exit $ac_status); } && {
17077 test -z "$ac_c_werror_flag" ||
17078 test ! -s conftest.err
17079 } && test -s conftest$ac_exeext &&
17080 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017081 ac_cv_lib_bsd_openpty=yes
17082else
17083 echo "$as_me: failed program was:" >&5
17084sed 's/^/| /' conftest.$ac_ext >&5
17085
Martin v. Löwiseba40652007-08-30 20:10:57 +000017086 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017088
17089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017090 conftest$ac_exeext conftest.$ac_ext
17091LIBS=$ac_check_lib_save_LIBS
17092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017093{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17094echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017095if test $ac_cv_lib_bsd_openpty = yes; then
17096 cat >>confdefs.h <<\_ACEOF
17097#define HAVE_OPENPTY 1
17098_ACEOF
17099 LIBS="$LIBS -lbsd"
17100fi
17101
17102
17103fi
17104
Fred Drake8cef4cf2000-06-28 16:40:38 +000017105
17106fi
17107done
17108
Martin v. Löwis11437992002-04-12 09:54:03 +000017109
Fred Drake8cef4cf2000-06-28 16:40:38 +000017110for ac_func in forkpty
17111do
Martin v. Löwis11437992002-04-12 09:54:03 +000017112as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017113{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17114echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17115if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017116 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017117else
Martin v. Löwis11437992002-04-12 09:54:03 +000017118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017119/* confdefs.h. */
17120_ACEOF
17121cat confdefs.h >>conftest.$ac_ext
17122cat >>conftest.$ac_ext <<_ACEOF
17123/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017124/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17125 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17126#define $ac_func innocuous_$ac_func
17127
Fred Drake8cef4cf2000-06-28 16:40:38 +000017128/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017129 which can conflict with char $ac_func (); below.
17130 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017131 <limits.h> exists even on freestanding compilers. */
17132
17133#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017134# include <limits.h>
17135#else
17136# include <assert.h>
17137#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017138
17139#undef $ac_func
17140
Martin v. Löwiseba40652007-08-30 20:10:57 +000017141/* Override any GCC internal prototype to avoid an error.
17142 Use char because int might match the return type of a GCC
17143 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017144#ifdef __cplusplus
17145extern "C"
17146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017147char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017148/* The GNU C library defines this for functions which it implements
17149 to always fail with ENOSYS. Some functions are actually named
17150 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017151#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017152choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017153#endif
17154
Skip Montanaro6dead952003-09-25 14:50:04 +000017155int
17156main ()
17157{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017158return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017159 ;
17160 return 0;
17161}
17162_ACEOF
17163rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017164if { (ac_try="$ac_link"
17165case "(($ac_try" in
17166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17167 *) ac_try_echo=$ac_try;;
17168esac
17169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17170 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017172 grep -v '^ *+' conftest.er1 >conftest.err
17173 rm -f conftest.er1
17174 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017176 (exit $ac_status); } && {
17177 test -z "$ac_c_werror_flag" ||
17178 test ! -s conftest.err
17179 } && test -s conftest$ac_exeext &&
17180 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017181 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017182else
Martin v. Löwis11437992002-04-12 09:54:03 +000017183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017184sed 's/^/| /' conftest.$ac_ext >&5
17185
Martin v. Löwiseba40652007-08-30 20:10:57 +000017186 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017188
17189rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017190 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017192ac_res=`eval echo '${'$as_ac_var'}'`
17193 { echo "$as_me:$LINENO: result: $ac_res" >&5
17194echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017195if test `eval echo '${'$as_ac_var'}'` = yes; then
17196 cat >>confdefs.h <<_ACEOF
17197#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17198_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017199
Fred Drake8cef4cf2000-06-28 16:40:38 +000017200else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017201 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17202echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017203if test "${ac_cv_lib_util_forkpty+set}" = set; then
17204 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017205else
Martin v. Löwis11437992002-04-12 09:54:03 +000017206 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017207LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017209/* confdefs.h. */
17210_ACEOF
17211cat confdefs.h >>conftest.$ac_ext
17212cat >>conftest.$ac_ext <<_ACEOF
17213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017214
Martin v. Löwiseba40652007-08-30 20:10:57 +000017215/* Override any GCC internal prototype to avoid an error.
17216 Use char because int might match the return type of a GCC
17217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017218#ifdef __cplusplus
17219extern "C"
17220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017221char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017222int
17223main ()
17224{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017225return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017226 ;
17227 return 0;
17228}
17229_ACEOF
17230rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017231if { (ac_try="$ac_link"
17232case "(($ac_try" in
17233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17234 *) ac_try_echo=$ac_try;;
17235esac
17236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17237 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017239 grep -v '^ *+' conftest.er1 >conftest.err
17240 rm -f conftest.er1
17241 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017243 (exit $ac_status); } && {
17244 test -z "$ac_c_werror_flag" ||
17245 test ! -s conftest.err
17246 } && test -s conftest$ac_exeext &&
17247 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017248 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017249else
Martin v. Löwis11437992002-04-12 09:54:03 +000017250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017251sed 's/^/| /' conftest.$ac_ext >&5
17252
Martin v. Löwiseba40652007-08-30 20:10:57 +000017253 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017255
17256rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017257 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017258LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017260{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17261echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017262if test $ac_cv_lib_util_forkpty = yes; then
17263 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017264#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017265_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017266 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017267else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017268 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17269echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017270if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17271 echo $ECHO_N "(cached) $ECHO_C" >&6
17272else
17273 ac_check_lib_save_LIBS=$LIBS
17274LIBS="-lbsd $LIBS"
17275cat >conftest.$ac_ext <<_ACEOF
17276/* confdefs.h. */
17277_ACEOF
17278cat confdefs.h >>conftest.$ac_ext
17279cat >>conftest.$ac_ext <<_ACEOF
17280/* end confdefs.h. */
17281
Martin v. Löwiseba40652007-08-30 20:10:57 +000017282/* Override any GCC internal prototype to avoid an error.
17283 Use char because int might match the return type of a GCC
17284 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017285#ifdef __cplusplus
17286extern "C"
17287#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017288char forkpty ();
17289int
17290main ()
17291{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017292return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017293 ;
17294 return 0;
17295}
17296_ACEOF
17297rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017298if { (ac_try="$ac_link"
17299case "(($ac_try" in
17300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17301 *) ac_try_echo=$ac_try;;
17302esac
17303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17304 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017305 ac_status=$?
17306 grep -v '^ *+' conftest.er1 >conftest.err
17307 rm -f conftest.er1
17308 cat conftest.err >&5
17309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017310 (exit $ac_status); } && {
17311 test -z "$ac_c_werror_flag" ||
17312 test ! -s conftest.err
17313 } && test -s conftest$ac_exeext &&
17314 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017315 ac_cv_lib_bsd_forkpty=yes
17316else
17317 echo "$as_me: failed program was:" >&5
17318sed 's/^/| /' conftest.$ac_ext >&5
17319
Martin v. Löwiseba40652007-08-30 20:10:57 +000017320 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017322
17323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017324 conftest$ac_exeext conftest.$ac_ext
17325LIBS=$ac_check_lib_save_LIBS
17326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017327{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17328echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017329if test $ac_cv_lib_bsd_forkpty = yes; then
17330 cat >>confdefs.h <<\_ACEOF
17331#define HAVE_FORKPTY 1
17332_ACEOF
17333 LIBS="$LIBS -lbsd"
17334fi
17335
17336
17337fi
17338
Fred Drake8cef4cf2000-06-28 16:40:38 +000017339
17340fi
17341done
17342
Jack Jansendd19cf82001-12-06 22:36:17 +000017343
Michael W. Hudson54241132001-12-07 15:38:26 +000017344# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017345
17346
17347
17348
17349
17350
Fred Drake8cef4cf2000-06-28 16:40:38 +000017351for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17352do
Martin v. Löwis11437992002-04-12 09:54:03 +000017353as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017354{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17355echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17356if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017357 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017358else
Martin v. Löwis11437992002-04-12 09:54:03 +000017359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017360/* confdefs.h. */
17361_ACEOF
17362cat confdefs.h >>conftest.$ac_ext
17363cat >>conftest.$ac_ext <<_ACEOF
17364/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017365/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17366 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17367#define $ac_func innocuous_$ac_func
17368
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017369/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017370 which can conflict with char $ac_func (); below.
17371 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017372 <limits.h> exists even on freestanding compilers. */
17373
17374#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017375# include <limits.h>
17376#else
17377# include <assert.h>
17378#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017379
17380#undef $ac_func
17381
Martin v. Löwiseba40652007-08-30 20:10:57 +000017382/* Override any GCC internal prototype to avoid an error.
17383 Use char because int might match the return type of a GCC
17384 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017385#ifdef __cplusplus
17386extern "C"
17387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017388char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017389/* The GNU C library defines this for functions which it implements
17390 to always fail with ENOSYS. Some functions are actually named
17391 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017392#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017393choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017394#endif
17395
Skip Montanaro6dead952003-09-25 14:50:04 +000017396int
17397main ()
17398{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017399return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017400 ;
17401 return 0;
17402}
17403_ACEOF
17404rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017405if { (ac_try="$ac_link"
17406case "(($ac_try" in
17407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17408 *) ac_try_echo=$ac_try;;
17409esac
17410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17411 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017413 grep -v '^ *+' conftest.er1 >conftest.err
17414 rm -f conftest.er1
17415 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017417 (exit $ac_status); } && {
17418 test -z "$ac_c_werror_flag" ||
17419 test ! -s conftest.err
17420 } && test -s conftest$ac_exeext &&
17421 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017422 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017423else
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017425sed 's/^/| /' conftest.$ac_ext >&5
17426
Martin v. Löwiseba40652007-08-30 20:10:57 +000017427 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017429
17430rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017431 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017433ac_res=`eval echo '${'$as_ac_var'}'`
17434 { echo "$as_me:$LINENO: result: $ac_res" >&5
17435echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017436if test `eval echo '${'$as_ac_var'}'` = yes; then
17437 cat >>confdefs.h <<_ACEOF
17438#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17439_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017440
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017441fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017442done
17443
Michael W. Hudson54241132001-12-07 15:38:26 +000017444
Martin v. Löwis11437992002-04-12 09:54:03 +000017445
17446
17447
17448
17449
Martin v. Löwis1142de32002-03-29 16:28:31 +000017450for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000017451do
Martin v. Löwis11437992002-04-12 09:54:03 +000017452as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017453{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17454echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17455if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017456 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017457else
Martin v. Löwis11437992002-04-12 09:54:03 +000017458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017459/* confdefs.h. */
17460_ACEOF
17461cat confdefs.h >>conftest.$ac_ext
17462cat >>conftest.$ac_ext <<_ACEOF
17463/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017464/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17465 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17466#define $ac_func innocuous_$ac_func
17467
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017468/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017469 which can conflict with char $ac_func (); below.
17470 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017471 <limits.h> exists even on freestanding compilers. */
17472
17473#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017474# include <limits.h>
17475#else
17476# include <assert.h>
17477#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017478
17479#undef $ac_func
17480
Martin v. Löwiseba40652007-08-30 20:10:57 +000017481/* Override any GCC internal prototype to avoid an error.
17482 Use char because int might match the return type of a GCC
17483 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017484#ifdef __cplusplus
17485extern "C"
17486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017487char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017488/* The GNU C library defines this for functions which it implements
17489 to always fail with ENOSYS. Some functions are actually named
17490 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017491#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017492choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017493#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017494
Skip Montanaro6dead952003-09-25 14:50:04 +000017495int
17496main ()
17497{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017498return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017499 ;
17500 return 0;
17501}
17502_ACEOF
17503rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017504if { (ac_try="$ac_link"
17505case "(($ac_try" in
17506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17507 *) ac_try_echo=$ac_try;;
17508esac
17509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17510 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017512 grep -v '^ *+' conftest.er1 >conftest.err
17513 rm -f conftest.er1
17514 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017516 (exit $ac_status); } && {
17517 test -z "$ac_c_werror_flag" ||
17518 test ! -s conftest.err
17519 } && test -s conftest$ac_exeext &&
17520 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017521 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017522else
Martin v. Löwis11437992002-04-12 09:54:03 +000017523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017524sed 's/^/| /' conftest.$ac_ext >&5
17525
Martin v. Löwiseba40652007-08-30 20:10:57 +000017526 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017528
17529rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017532ac_res=`eval echo '${'$as_ac_var'}'`
17533 { echo "$as_me:$LINENO: result: $ac_res" >&5
17534echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017535if test `eval echo '${'$as_ac_var'}'` = yes; then
17536 cat >>confdefs.h <<_ACEOF
17537#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17538_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017539
Martin v. Löwis1142de32002-03-29 16:28:31 +000017540else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017541 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017542 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017543 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17544 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017545esac
17546
Martin v. Löwis1142de32002-03-29 16:28:31 +000017547fi
17548done
17549
17550
Martin v. Löwis11437992002-04-12 09:54:03 +000017551
Martin v. Löwis1142de32002-03-29 16:28:31 +000017552for ac_func in getpgrp
17553do
Martin v. Löwis11437992002-04-12 09:54:03 +000017554as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017555{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17556echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17557if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017558 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017559else
Martin v. Löwis11437992002-04-12 09:54:03 +000017560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017561/* confdefs.h. */
17562_ACEOF
17563cat confdefs.h >>conftest.$ac_ext
17564cat >>conftest.$ac_ext <<_ACEOF
17565/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017566/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17567 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17568#define $ac_func innocuous_$ac_func
17569
Martin v. Löwis1142de32002-03-29 16:28:31 +000017570/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017571 which can conflict with char $ac_func (); below.
17572 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017573 <limits.h> exists even on freestanding compilers. */
17574
17575#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017576# include <limits.h>
17577#else
17578# include <assert.h>
17579#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017580
17581#undef $ac_func
17582
Martin v. Löwiseba40652007-08-30 20:10:57 +000017583/* Override any GCC internal prototype to avoid an error.
17584 Use char because int might match the return type of a GCC
17585 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017586#ifdef __cplusplus
17587extern "C"
17588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017589char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017590/* The GNU C library defines this for functions which it implements
17591 to always fail with ENOSYS. Some functions are actually named
17592 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017593#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017594choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017595#endif
17596
Skip Montanaro6dead952003-09-25 14:50:04 +000017597int
17598main ()
17599{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017600return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017601 ;
17602 return 0;
17603}
17604_ACEOF
17605rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017606if { (ac_try="$ac_link"
17607case "(($ac_try" in
17608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17609 *) ac_try_echo=$ac_try;;
17610esac
17611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17612 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017614 grep -v '^ *+' conftest.er1 >conftest.err
17615 rm -f conftest.er1
17616 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017618 (exit $ac_status); } && {
17619 test -z "$ac_c_werror_flag" ||
17620 test ! -s conftest.err
17621 } && test -s conftest$ac_exeext &&
17622 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017623 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017624else
Martin v. Löwis11437992002-04-12 09:54:03 +000017625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017626sed 's/^/| /' conftest.$ac_ext >&5
17627
Martin v. Löwiseba40652007-08-30 20:10:57 +000017628 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017630
17631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017632 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017634ac_res=`eval echo '${'$as_ac_var'}'`
17635 { echo "$as_me:$LINENO: result: $ac_res" >&5
17636echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017637if test `eval echo '${'$as_ac_var'}'` = yes; then
17638 cat >>confdefs.h <<_ACEOF
17639#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17640_ACEOF
17641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017642/* confdefs.h. */
17643_ACEOF
17644cat confdefs.h >>conftest.$ac_ext
17645cat >>conftest.$ac_ext <<_ACEOF
17646/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017647#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017648int
17649main ()
17650{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017651getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 ;
17653 return 0;
17654}
17655_ACEOF
17656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017657if { (ac_try="$ac_compile"
17658case "(($ac_try" in
17659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17660 *) ac_try_echo=$ac_try;;
17661esac
17662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017665 grep -v '^ *+' conftest.er1 >conftest.err
17666 rm -f conftest.er1
17667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017669 (exit $ac_status); } && {
17670 test -z "$ac_c_werror_flag" ||
17671 test ! -s conftest.err
17672 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017673
17674cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017675#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017676_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017677
Martin v. Löwis11437992002-04-12 09:54:03 +000017678
Guido van Rossumf78abae1997-01-21 22:02:36 +000017679else
Martin v. Löwis11437992002-04-12 09:54:03 +000017680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017681sed 's/^/| /' conftest.$ac_ext >&5
17682
Martin v. Löwiseba40652007-08-30 20:10:57 +000017683
Guido van Rossum627b2d71993-12-24 10:39:16 +000017684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017685
17686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017687
Guido van Rossum627b2d71993-12-24 10:39:16 +000017688fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017689done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017690
Jack Jansen150753c2003-03-29 22:07:47 +000017691
17692for ac_func in setpgrp
17693do
17694as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017695{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17696echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17697if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017698 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017699else
Martin v. Löwis11437992002-04-12 09:54:03 +000017700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017701/* confdefs.h. */
17702_ACEOF
17703cat confdefs.h >>conftest.$ac_ext
17704cat >>conftest.$ac_ext <<_ACEOF
17705/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017706/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17707 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17708#define $ac_func innocuous_$ac_func
17709
Jack Jansen150753c2003-03-29 22:07:47 +000017710/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017711 which can conflict with char $ac_func (); below.
17712 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017713 <limits.h> exists even on freestanding compilers. */
17714
17715#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017716# include <limits.h>
17717#else
17718# include <assert.h>
17719#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017720
17721#undef $ac_func
17722
Martin v. Löwiseba40652007-08-30 20:10:57 +000017723/* Override any GCC internal prototype to avoid an error.
17724 Use char because int might match the return type of a GCC
17725 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017726#ifdef __cplusplus
17727extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017728#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017729char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017730/* The GNU C library defines this for functions which it implements
17731 to always fail with ENOSYS. Some functions are actually named
17732 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017733#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017734choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017735#endif
17736
Skip Montanaro6dead952003-09-25 14:50:04 +000017737int
17738main ()
17739{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017740return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017741 ;
17742 return 0;
17743}
17744_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017745rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017746if { (ac_try="$ac_link"
17747case "(($ac_try" in
17748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17749 *) ac_try_echo=$ac_try;;
17750esac
17751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17752 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017754 grep -v '^ *+' conftest.er1 >conftest.err
17755 rm -f conftest.er1
17756 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017758 (exit $ac_status); } && {
17759 test -z "$ac_c_werror_flag" ||
17760 test ! -s conftest.err
17761 } && test -s conftest$ac_exeext &&
17762 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017763 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017764else
Jack Jansen150753c2003-03-29 22:07:47 +000017765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017766sed 's/^/| /' conftest.$ac_ext >&5
17767
Martin v. Löwiseba40652007-08-30 20:10:57 +000017768 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017770
17771rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017772 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017774ac_res=`eval echo '${'$as_ac_var'}'`
17775 { echo "$as_me:$LINENO: result: $ac_res" >&5
17776echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017777if test `eval echo '${'$as_ac_var'}'` = yes; then
17778 cat >>confdefs.h <<_ACEOF
17779#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17780_ACEOF
17781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017782/* confdefs.h. */
17783_ACEOF
17784cat confdefs.h >>conftest.$ac_ext
17785cat >>conftest.$ac_ext <<_ACEOF
17786/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017787#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017788int
17789main ()
17790{
17791setpgrp(0,0);
17792 ;
17793 return 0;
17794}
17795_ACEOF
17796rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017797if { (ac_try="$ac_compile"
17798case "(($ac_try" in
17799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17800 *) ac_try_echo=$ac_try;;
17801esac
17802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17803 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017805 grep -v '^ *+' conftest.er1 >conftest.err
17806 rm -f conftest.er1
17807 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017809 (exit $ac_status); } && {
17810 test -z "$ac_c_werror_flag" ||
17811 test ! -s conftest.err
17812 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017813
17814cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017815#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017816_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017817
Jack Jansen150753c2003-03-29 22:07:47 +000017818
17819else
17820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017821sed 's/^/| /' conftest.$ac_ext >&5
17822
Martin v. Löwiseba40652007-08-30 20:10:57 +000017823
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017825
17826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017827
17828fi
17829done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017830
Martin v. Löwis11437992002-04-12 09:54:03 +000017831
Thomas Wouters3a584202000-08-05 23:28:51 +000017832for ac_func in gettimeofday
17833do
Martin v. Löwis11437992002-04-12 09:54:03 +000017834as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017835{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17836echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17837if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017838 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017839else
Martin v. Löwis11437992002-04-12 09:54:03 +000017840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017841/* confdefs.h. */
17842_ACEOF
17843cat confdefs.h >>conftest.$ac_ext
17844cat >>conftest.$ac_ext <<_ACEOF
17845/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017846/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17847 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17848#define $ac_func innocuous_$ac_func
17849
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017850/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017851 which can conflict with char $ac_func (); below.
17852 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017853 <limits.h> exists even on freestanding compilers. */
17854
17855#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017856# include <limits.h>
17857#else
17858# include <assert.h>
17859#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017860
17861#undef $ac_func
17862
Martin v. Löwiseba40652007-08-30 20:10:57 +000017863/* Override any GCC internal prototype to avoid an error.
17864 Use char because int might match the return type of a GCC
17865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017866#ifdef __cplusplus
17867extern "C"
17868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017869char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017870/* The GNU C library defines this for functions which it implements
17871 to always fail with ENOSYS. Some functions are actually named
17872 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017873#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017874choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017875#endif
17876
Skip Montanaro6dead952003-09-25 14:50:04 +000017877int
17878main ()
17879{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017880return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017881 ;
17882 return 0;
17883}
17884_ACEOF
17885rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017886if { (ac_try="$ac_link"
17887case "(($ac_try" in
17888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17889 *) ac_try_echo=$ac_try;;
17890esac
17891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17892 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017894 grep -v '^ *+' conftest.er1 >conftest.err
17895 rm -f conftest.er1
17896 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017898 (exit $ac_status); } && {
17899 test -z "$ac_c_werror_flag" ||
17900 test ! -s conftest.err
17901 } && test -s conftest$ac_exeext &&
17902 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017903 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017904else
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017906sed 's/^/| /' conftest.$ac_ext >&5
17907
Martin v. Löwiseba40652007-08-30 20:10:57 +000017908 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017910
17911rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017912 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017914ac_res=`eval echo '${'$as_ac_var'}'`
17915 { echo "$as_me:$LINENO: result: $ac_res" >&5
17916echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017917if test `eval echo '${'$as_ac_var'}'` = yes; then
17918 cat >>confdefs.h <<_ACEOF
17919#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17920_ACEOF
17921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017922/* confdefs.h. */
17923_ACEOF
17924cat confdefs.h >>conftest.$ac_ext
17925cat >>conftest.$ac_ext <<_ACEOF
17926/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017927#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017928int
17929main ()
17930{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017931gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017932 ;
17933 return 0;
17934}
17935_ACEOF
17936rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017937if { (ac_try="$ac_compile"
17938case "(($ac_try" in
17939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17940 *) ac_try_echo=$ac_try;;
17941esac
17942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17943 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017944 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017945 grep -v '^ *+' conftest.er1 >conftest.err
17946 rm -f conftest.er1
17947 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017949 (exit $ac_status); } && {
17950 test -z "$ac_c_werror_flag" ||
17951 test ! -s conftest.err
17952 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000017953 :
17954else
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017956sed 's/^/| /' conftest.$ac_ext >&5
17957
Martin v. Löwis11437992002-04-12 09:54:03 +000017958
17959cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017960#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017961_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017962
Martin v. Löwis11437992002-04-12 09:54:03 +000017963
Guido van Rossum627b2d71993-12-24 10:39:16 +000017964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017965
17966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017967
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017968fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017969done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017970
Michael W. Hudson54241132001-12-07 15:38:26 +000017971
Martin v. Löwiseba40652007-08-30 20:10:57 +000017972{ echo "$as_me:$LINENO: checking for major" >&5
17973echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017975/* confdefs.h. */
17976_ACEOF
17977cat confdefs.h >>conftest.$ac_ext
17978cat >>conftest.$ac_ext <<_ACEOF
17979/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017980
Neal Norwitz6eb37f02003-02-23 23:28:15 +000017981#if defined(MAJOR_IN_MKDEV)
17982#include <sys/mkdev.h>
17983#elif defined(MAJOR_IN_SYSMACROS)
17984#include <sys/sysmacros.h>
17985#else
17986#include <sys/types.h>
17987#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017988
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017989int
17990main ()
17991{
17992
17993 makedev(major(0),minor(0));
17994
17995 ;
17996 return 0;
17997}
17998_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000017999rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018000if { (ac_try="$ac_link"
18001case "(($ac_try" in
18002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18003 *) ac_try_echo=$ac_try;;
18004esac
18005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18006 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018008 grep -v '^ *+' conftest.er1 >conftest.err
18009 rm -f conftest.er1
18010 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018012 (exit $ac_status); } && {
18013 test -z "$ac_c_werror_flag" ||
18014 test ! -s conftest.err
18015 } && test -s conftest$ac_exeext &&
18016 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018017
18018
18019cat >>confdefs.h <<\_ACEOF
18020#define HAVE_DEVICE_MACROS 1
18021_ACEOF
18022
Martin v. Löwiseba40652007-08-30 20:10:57 +000018023 { echo "$as_me:$LINENO: result: yes" >&5
18024echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018025
18026else
18027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018028sed 's/^/| /' conftest.$ac_ext >&5
18029
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018030
Martin v. Löwiseba40652007-08-30 20:10:57 +000018031 { echo "$as_me:$LINENO: result: no" >&5
18032echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018033
18034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018035
18036rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018037 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018038
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018039# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018040# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018041{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18042echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018043cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018044/* confdefs.h. */
18045_ACEOF
18046cat confdefs.h >>conftest.$ac_ext
18047cat >>conftest.$ac_ext <<_ACEOF
18048/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018049
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018050#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018051#include <sys/socket.h>
18052#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018053#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018054
Martin v. Löwis11437992002-04-12 09:54:03 +000018055int
18056main ()
18057{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018058
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018059getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018060
Martin v. Löwis11437992002-04-12 09:54:03 +000018061 ;
18062 return 0;
18063}
18064_ACEOF
18065rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018066if { (ac_try="$ac_link"
18067case "(($ac_try" in
18068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18069 *) ac_try_echo=$ac_try;;
18070esac
18071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18072 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018074 grep -v '^ *+' conftest.er1 >conftest.err
18075 rm -f conftest.er1
18076 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018078 (exit $ac_status); } && {
18079 test -z "$ac_c_werror_flag" ||
18080 test ! -s conftest.err
18081 } && test -s conftest$ac_exeext &&
18082 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018083
Martin v. Löwiseba40652007-08-30 20:10:57 +000018084{ echo "$as_me:$LINENO: result: yes" >&5
18085echo "${ECHO_T}yes" >&6; }
18086{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18087echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018088if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018089 { echo "$as_me:$LINENO: result: buggy" >&5
18090echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018091buggygetaddrinfo=yes
18092else
Martin v. Löwis11437992002-04-12 09:54:03 +000018093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018094/* confdefs.h. */
18095_ACEOF
18096cat confdefs.h >>conftest.$ac_ext
18097cat >>conftest.$ac_ext <<_ACEOF
18098/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018099
18100#include <sys/types.h>
18101#include <netdb.h>
18102#include <string.h>
18103#include <sys/socket.h>
18104#include <netinet/in.h>
18105
18106main()
18107{
18108 int passive, gaierr, inet4 = 0, inet6 = 0;
18109 struct addrinfo hints, *ai, *aitop;
18110 char straddr[INET6_ADDRSTRLEN], strport[16];
18111
18112 for (passive = 0; passive <= 1; passive++) {
18113 memset(&hints, 0, sizeof(hints));
18114 hints.ai_family = AF_UNSPEC;
18115 hints.ai_flags = passive ? AI_PASSIVE : 0;
18116 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018117 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018118 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18119 (void)gai_strerror(gaierr);
18120 goto bad;
18121 }
18122 for (ai = aitop; ai; ai = ai->ai_next) {
18123 if (ai->ai_addr == NULL ||
18124 ai->ai_addrlen == 0 ||
18125 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18126 straddr, sizeof(straddr), strport, sizeof(strport),
18127 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18128 goto bad;
18129 }
18130 switch (ai->ai_family) {
18131 case AF_INET:
18132 if (strcmp(strport, "54321") != 0) {
18133 goto bad;
18134 }
18135 if (passive) {
18136 if (strcmp(straddr, "0.0.0.0") != 0) {
18137 goto bad;
18138 }
18139 } else {
18140 if (strcmp(straddr, "127.0.0.1") != 0) {
18141 goto bad;
18142 }
18143 }
18144 inet4++;
18145 break;
18146 case AF_INET6:
18147 if (strcmp(strport, "54321") != 0) {
18148 goto bad;
18149 }
18150 if (passive) {
18151 if (strcmp(straddr, "::") != 0) {
18152 goto bad;
18153 }
18154 } else {
18155 if (strcmp(straddr, "::1") != 0) {
18156 goto bad;
18157 }
18158 }
18159 inet6++;
18160 break;
18161 case AF_UNSPEC:
18162 goto bad;
18163 break;
18164 default:
18165 /* another family support? */
18166 break;
18167 }
18168 }
18169 }
18170
18171 if (!(inet4 == 0 || inet4 == 2))
18172 goto bad;
18173 if (!(inet6 == 0 || inet6 == 2))
18174 goto bad;
18175
18176 if (aitop)
18177 freeaddrinfo(aitop);
18178 exit(0);
18179
18180 bad:
18181 if (aitop)
18182 freeaddrinfo(aitop);
18183 exit(1);
18184}
18185
Martin v. Löwis11437992002-04-12 09:54:03 +000018186_ACEOF
18187rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018188if { (ac_try="$ac_link"
18189case "(($ac_try" in
18190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18191 *) ac_try_echo=$ac_try;;
18192esac
18193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18194 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018195 ac_status=$?
18196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018198 { (case "(($ac_try" in
18199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18200 *) ac_try_echo=$ac_try;;
18201esac
18202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18203 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018204 ac_status=$?
18205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18206 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018207 { echo "$as_me:$LINENO: result: good" >&5
18208echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018209buggygetaddrinfo=no
18210else
Martin v. Löwis11437992002-04-12 09:54:03 +000018211 echo "$as_me: program exited with status $ac_status" >&5
18212echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018213sed 's/^/| /' conftest.$ac_ext >&5
18214
Martin v. Löwis11437992002-04-12 09:54:03 +000018215( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018216{ echo "$as_me:$LINENO: result: buggy" >&5
18217echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018218buggygetaddrinfo=yes
18219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018220rm -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 +000018221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018222
18223
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018224else
Martin v. Löwis11437992002-04-12 09:54:03 +000018225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018226sed 's/^/| /' conftest.$ac_ext >&5
18227
Martin v. Löwis11437992002-04-12 09:54:03 +000018228
Martin v. Löwiseba40652007-08-30 20:10:57 +000018229{ echo "$as_me:$LINENO: result: no" >&5
18230echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018231buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018232
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018234
18235rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018237
18238if test "$buggygetaddrinfo" = "yes"; then
18239 if test "$ipv6" = "yes"; then
18240 echo 'Fatal: You must get working getaddrinfo() function.'
18241 echo ' or you can specify "--disable-ipv6"'.
18242 exit 1
18243 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018244else
Martin v. Löwis11437992002-04-12 09:54:03 +000018245
18246cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018247#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018248_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018249
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018250fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018251
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018252for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018253do
Martin v. Löwis11437992002-04-12 09:54:03 +000018254as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018255{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18256echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18257if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018258 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018259else
Martin v. Löwis11437992002-04-12 09:54:03 +000018260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018261/* confdefs.h. */
18262_ACEOF
18263cat confdefs.h >>conftest.$ac_ext
18264cat >>conftest.$ac_ext <<_ACEOF
18265/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018266/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18267 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18268#define $ac_func innocuous_$ac_func
18269
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018270/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018271 which can conflict with char $ac_func (); below.
18272 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018273 <limits.h> exists even on freestanding compilers. */
18274
18275#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018276# include <limits.h>
18277#else
18278# include <assert.h>
18279#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018280
18281#undef $ac_func
18282
Martin v. Löwiseba40652007-08-30 20:10:57 +000018283/* Override any GCC internal prototype to avoid an error.
18284 Use char because int might match the return type of a GCC
18285 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018286#ifdef __cplusplus
18287extern "C"
18288#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018289char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018290/* The GNU C library defines this for functions which it implements
18291 to always fail with ENOSYS. Some functions are actually named
18292 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018293#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018294choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018295#endif
18296
Skip Montanaro6dead952003-09-25 14:50:04 +000018297int
18298main ()
18299{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018300return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018301 ;
18302 return 0;
18303}
18304_ACEOF
18305rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018306if { (ac_try="$ac_link"
18307case "(($ac_try" in
18308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18309 *) ac_try_echo=$ac_try;;
18310esac
18311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18312 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018314 grep -v '^ *+' conftest.er1 >conftest.err
18315 rm -f conftest.er1
18316 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018318 (exit $ac_status); } && {
18319 test -z "$ac_c_werror_flag" ||
18320 test ! -s conftest.err
18321 } && test -s conftest$ac_exeext &&
18322 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018323 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018324else
Martin v. Löwis11437992002-04-12 09:54:03 +000018325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018326sed 's/^/| /' conftest.$ac_ext >&5
18327
Martin v. Löwiseba40652007-08-30 20:10:57 +000018328 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018330
18331rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018332 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018334ac_res=`eval echo '${'$as_ac_var'}'`
18335 { echo "$as_me:$LINENO: result: $ac_res" >&5
18336echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018337if test `eval echo '${'$as_ac_var'}'` = yes; then
18338 cat >>confdefs.h <<_ACEOF
18339#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18340_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018341
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018342fi
18343done
18344
Michael W. Hudson54241132001-12-07 15:38:26 +000018345
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018346# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018347{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18348echo $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 +000018349if test "${ac_cv_header_time+set}" = set; then
18350 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018351else
Martin v. Löwis11437992002-04-12 09:54:03 +000018352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018353/* confdefs.h. */
18354_ACEOF
18355cat confdefs.h >>conftest.$ac_ext
18356cat >>conftest.$ac_ext <<_ACEOF
18357/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018358#include <sys/types.h>
18359#include <sys/time.h>
18360#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018361
Martin v. Löwis11437992002-04-12 09:54:03 +000018362int
18363main ()
18364{
18365if ((struct tm *) 0)
18366return 0;
18367 ;
18368 return 0;
18369}
18370_ACEOF
18371rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018372if { (ac_try="$ac_compile"
18373case "(($ac_try" in
18374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18375 *) ac_try_echo=$ac_try;;
18376esac
18377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018380 grep -v '^ *+' conftest.er1 >conftest.err
18381 rm -f conftest.er1
18382 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018384 (exit $ac_status); } && {
18385 test -z "$ac_c_werror_flag" ||
18386 test ! -s conftest.err
18387 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018388 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018389else
Martin v. Löwis11437992002-04-12 09:54:03 +000018390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018391sed 's/^/| /' conftest.$ac_ext >&5
18392
Martin v. Löwiseba40652007-08-30 20:10:57 +000018393 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018395
18396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018398{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18399echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018400if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018401
18402cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018403#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018404_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018405
18406fi
18407
Martin v. Löwiseba40652007-08-30 20:10:57 +000018408{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18409echo $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 +000018410if test "${ac_cv_struct_tm+set}" = set; then
18411 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018412else
Martin v. Löwis11437992002-04-12 09:54:03 +000018413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018414/* confdefs.h. */
18415_ACEOF
18416cat confdefs.h >>conftest.$ac_ext
18417cat >>conftest.$ac_ext <<_ACEOF
18418/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018419#include <sys/types.h>
18420#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018421
Martin v. Löwis11437992002-04-12 09:54:03 +000018422int
18423main ()
18424{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018425struct tm tm;
18426 int *p = &tm.tm_sec;
18427 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018428 ;
18429 return 0;
18430}
18431_ACEOF
18432rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018433if { (ac_try="$ac_compile"
18434case "(($ac_try" in
18435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18436 *) ac_try_echo=$ac_try;;
18437esac
18438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18439 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018441 grep -v '^ *+' conftest.er1 >conftest.err
18442 rm -f conftest.er1
18443 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018445 (exit $ac_status); } && {
18446 test -z "$ac_c_werror_flag" ||
18447 test ! -s conftest.err
18448 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018449 ac_cv_struct_tm=time.h
18450else
Martin v. Löwis11437992002-04-12 09:54:03 +000018451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018452sed 's/^/| /' conftest.$ac_ext >&5
18453
Martin v. Löwiseba40652007-08-30 20:10:57 +000018454 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018456
18457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018459{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18460echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018461if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018462
18463cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018464#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018465_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018466
18467fi
18468
Martin v. Löwiseba40652007-08-30 20:10:57 +000018469{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18470echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018471if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18472 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018473else
Martin v. Löwis11437992002-04-12 09:54:03 +000018474 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018475/* confdefs.h. */
18476_ACEOF
18477cat confdefs.h >>conftest.$ac_ext
18478cat >>conftest.$ac_ext <<_ACEOF
18479/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018480#include <sys/types.h>
18481#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018482
18483
Martin v. Löwis11437992002-04-12 09:54:03 +000018484int
18485main ()
18486{
18487static struct tm ac_aggr;
18488if (ac_aggr.tm_zone)
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
Martin v. Löwis11437992002-04-12 09:54:03 +000018511 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +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 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018517/* confdefs.h. */
18518_ACEOF
18519cat confdefs.h >>conftest.$ac_ext
18520cat >>conftest.$ac_ext <<_ACEOF
18521/* end confdefs.h. */
18522#include <sys/types.h>
18523#include <$ac_cv_struct_tm>
18524
18525
18526int
18527main ()
18528{
18529static struct tm ac_aggr;
18530if (sizeof ac_aggr.tm_zone)
18531return 0;
18532 ;
18533 return 0;
18534}
18535_ACEOF
18536rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018537if { (ac_try="$ac_compile"
18538case "(($ac_try" in
18539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18540 *) ac_try_echo=$ac_try;;
18541esac
18542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18543 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018545 grep -v '^ *+' conftest.er1 >conftest.err
18546 rm -f conftest.er1
18547 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018549 (exit $ac_status); } && {
18550 test -z "$ac_c_werror_flag" ||
18551 test ! -s conftest.err
18552 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018553 ac_cv_member_struct_tm_tm_zone=yes
18554else
18555 echo "$as_me: failed program was:" >&5
18556sed 's/^/| /' conftest.$ac_ext >&5
18557
Martin v. Löwiseba40652007-08-30 20:10:57 +000018558 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018560
18561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018563
18564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018566{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18567echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018568if test $ac_cv_member_struct_tm_tm_zone = yes; then
18569
18570cat >>confdefs.h <<_ACEOF
18571#define HAVE_STRUCT_TM_TM_ZONE 1
18572_ACEOF
18573
18574
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018575fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018576
Martin v. Löwis11437992002-04-12 09:54:03 +000018577if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18578
18579cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018580#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018581_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018582
18583else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018584 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18585echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18586if test "${ac_cv_have_decl_tzname+set}" = set; then
18587 echo $ECHO_N "(cached) $ECHO_C" >&6
18588else
18589 cat >conftest.$ac_ext <<_ACEOF
18590/* confdefs.h. */
18591_ACEOF
18592cat confdefs.h >>conftest.$ac_ext
18593cat >>conftest.$ac_ext <<_ACEOF
18594/* end confdefs.h. */
18595#include <time.h>
18596
18597int
18598main ()
18599{
18600#ifndef tzname
18601 (void) tzname;
18602#endif
18603
18604 ;
18605 return 0;
18606}
18607_ACEOF
18608rm -f conftest.$ac_objext
18609if { (ac_try="$ac_compile"
18610case "(($ac_try" in
18611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18612 *) ac_try_echo=$ac_try;;
18613esac
18614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18615 (eval "$ac_compile") 2>conftest.er1
18616 ac_status=$?
18617 grep -v '^ *+' conftest.er1 >conftest.err
18618 rm -f conftest.er1
18619 cat conftest.err >&5
18620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18621 (exit $ac_status); } && {
18622 test -z "$ac_c_werror_flag" ||
18623 test ! -s conftest.err
18624 } && test -s conftest.$ac_objext; then
18625 ac_cv_have_decl_tzname=yes
18626else
18627 echo "$as_me: failed program was:" >&5
18628sed 's/^/| /' conftest.$ac_ext >&5
18629
18630 ac_cv_have_decl_tzname=no
18631fi
18632
18633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18634fi
18635{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18636echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18637if test $ac_cv_have_decl_tzname = yes; then
18638
18639cat >>confdefs.h <<_ACEOF
18640#define HAVE_DECL_TZNAME 1
18641_ACEOF
18642
18643
18644else
18645 cat >>confdefs.h <<_ACEOF
18646#define HAVE_DECL_TZNAME 0
18647_ACEOF
18648
18649
18650fi
18651
18652
18653 { echo "$as_me:$LINENO: checking for tzname" >&5
18654echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018655if test "${ac_cv_var_tzname+set}" = set; then
18656 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018657else
Martin v. Löwis11437992002-04-12 09:54:03 +000018658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018659/* confdefs.h. */
18660_ACEOF
18661cat confdefs.h >>conftest.$ac_ext
18662cat >>conftest.$ac_ext <<_ACEOF
18663/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018664#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018665#if !HAVE_DECL_TZNAME
18666extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018667#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018668
Martin v. Löwis11437992002-04-12 09:54:03 +000018669int
18670main ()
18671{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018672return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018673 ;
18674 return 0;
18675}
18676_ACEOF
18677rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018678if { (ac_try="$ac_link"
18679case "(($ac_try" in
18680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18681 *) ac_try_echo=$ac_try;;
18682esac
18683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18684 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018686 grep -v '^ *+' conftest.er1 >conftest.err
18687 rm -f conftest.er1
18688 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018690 (exit $ac_status); } && {
18691 test -z "$ac_c_werror_flag" ||
18692 test ! -s conftest.err
18693 } && test -s conftest$ac_exeext &&
18694 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018695 ac_cv_var_tzname=yes
18696else
Martin v. Löwis11437992002-04-12 09:54:03 +000018697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018698sed 's/^/| /' conftest.$ac_ext >&5
18699
Martin v. Löwiseba40652007-08-30 20:10:57 +000018700 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018702
18703rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018704 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018706{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18707echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018708 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018709
18710cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018711#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018712_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018713
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018714 fi
18715fi
18716
Martin v. Löwiseba40652007-08-30 20:10:57 +000018717{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18718echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018719if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18720 echo $ECHO_N "(cached) $ECHO_C" >&6
18721else
18722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018723/* confdefs.h. */
18724_ACEOF
18725cat confdefs.h >>conftest.$ac_ext
18726cat >>conftest.$ac_ext <<_ACEOF
18727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018728$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018729int
18730main ()
18731{
18732static struct stat ac_aggr;
18733if (ac_aggr.st_rdev)
18734return 0;
18735 ;
18736 return 0;
18737}
18738_ACEOF
18739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018740if { (ac_try="$ac_compile"
18741case "(($ac_try" in
18742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18743 *) ac_try_echo=$ac_try;;
18744esac
18745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018748 grep -v '^ *+' conftest.er1 >conftest.err
18749 rm -f conftest.er1
18750 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018752 (exit $ac_status); } && {
18753 test -z "$ac_c_werror_flag" ||
18754 test ! -s conftest.err
18755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018756 ac_cv_member_struct_stat_st_rdev=yes
18757else
18758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018759sed 's/^/| /' conftest.$ac_ext >&5
18760
Martin v. Löwiseba40652007-08-30 20:10:57 +000018761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018762/* confdefs.h. */
18763_ACEOF
18764cat confdefs.h >>conftest.$ac_ext
18765cat >>conftest.$ac_ext <<_ACEOF
18766/* end confdefs.h. */
18767$ac_includes_default
18768int
18769main ()
18770{
18771static struct stat ac_aggr;
18772if (sizeof ac_aggr.st_rdev)
18773return 0;
18774 ;
18775 return 0;
18776}
18777_ACEOF
18778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018779if { (ac_try="$ac_compile"
18780case "(($ac_try" in
18781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18782 *) ac_try_echo=$ac_try;;
18783esac
18784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18785 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018787 grep -v '^ *+' conftest.er1 >conftest.err
18788 rm -f conftest.er1
18789 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018791 (exit $ac_status); } && {
18792 test -z "$ac_c_werror_flag" ||
18793 test ! -s conftest.err
18794 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018795 ac_cv_member_struct_stat_st_rdev=yes
18796else
18797 echo "$as_me: failed program was:" >&5
18798sed 's/^/| /' conftest.$ac_ext >&5
18799
Martin v. Löwiseba40652007-08-30 20:10:57 +000018800 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018802
18803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018805
18806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018808{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18809echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018810if test $ac_cv_member_struct_stat_st_rdev = yes; then
18811
18812cat >>confdefs.h <<_ACEOF
18813#define HAVE_STRUCT_STAT_ST_RDEV 1
18814_ACEOF
18815
18816
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018817fi
18818
Martin v. Löwiseba40652007-08-30 20:10:57 +000018819{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18820echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018821if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18822 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018823else
Martin v. Löwis11437992002-04-12 09:54:03 +000018824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018825/* confdefs.h. */
18826_ACEOF
18827cat confdefs.h >>conftest.$ac_ext
18828cat >>conftest.$ac_ext <<_ACEOF
18829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018830$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018831int
18832main ()
18833{
18834static struct stat ac_aggr;
18835if (ac_aggr.st_blksize)
18836return 0;
18837 ;
18838 return 0;
18839}
18840_ACEOF
18841rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018842if { (ac_try="$ac_compile"
18843case "(($ac_try" in
18844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18845 *) ac_try_echo=$ac_try;;
18846esac
18847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18848 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018850 grep -v '^ *+' conftest.er1 >conftest.err
18851 rm -f conftest.er1
18852 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018854 (exit $ac_status); } && {
18855 test -z "$ac_c_werror_flag" ||
18856 test ! -s conftest.err
18857 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018858 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018859else
Martin v. Löwis11437992002-04-12 09:54:03 +000018860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018861sed 's/^/| /' conftest.$ac_ext >&5
18862
Martin v. Löwiseba40652007-08-30 20:10:57 +000018863 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018864/* confdefs.h. */
18865_ACEOF
18866cat confdefs.h >>conftest.$ac_ext
18867cat >>conftest.$ac_ext <<_ACEOF
18868/* end confdefs.h. */
18869$ac_includes_default
18870int
18871main ()
18872{
18873static struct stat ac_aggr;
18874if (sizeof ac_aggr.st_blksize)
18875return 0;
18876 ;
18877 return 0;
18878}
18879_ACEOF
18880rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018881if { (ac_try="$ac_compile"
18882case "(($ac_try" in
18883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18884 *) ac_try_echo=$ac_try;;
18885esac
18886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18887 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018889 grep -v '^ *+' conftest.er1 >conftest.err
18890 rm -f conftest.er1
18891 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018893 (exit $ac_status); } && {
18894 test -z "$ac_c_werror_flag" ||
18895 test ! -s conftest.err
18896 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018897 ac_cv_member_struct_stat_st_blksize=yes
18898else
18899 echo "$as_me: failed program was:" >&5
18900sed 's/^/| /' conftest.$ac_ext >&5
18901
Martin v. Löwiseba40652007-08-30 20:10:57 +000018902 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018904
18905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018907
18908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018910{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
18911echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018912if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018913
Martin v. Löwis11437992002-04-12 09:54:03 +000018914cat >>confdefs.h <<_ACEOF
18915#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
18916_ACEOF
18917
18918
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018919fi
18920
Martin v. Löwiseba40652007-08-30 20:10:57 +000018921{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
18922echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018923if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
18924 echo $ECHO_N "(cached) $ECHO_C" >&6
18925else
18926 cat >conftest.$ac_ext <<_ACEOF
18927/* confdefs.h. */
18928_ACEOF
18929cat confdefs.h >>conftest.$ac_ext
18930cat >>conftest.$ac_ext <<_ACEOF
18931/* end confdefs.h. */
18932$ac_includes_default
18933int
18934main ()
18935{
18936static struct stat ac_aggr;
18937if (ac_aggr.st_flags)
18938return 0;
18939 ;
18940 return 0;
18941}
18942_ACEOF
18943rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018944if { (ac_try="$ac_compile"
18945case "(($ac_try" in
18946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18947 *) ac_try_echo=$ac_try;;
18948esac
18949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18950 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018951 ac_status=$?
18952 grep -v '^ *+' conftest.er1 >conftest.err
18953 rm -f conftest.er1
18954 cat conftest.err >&5
18955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018956 (exit $ac_status); } && {
18957 test -z "$ac_c_werror_flag" ||
18958 test ! -s conftest.err
18959 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018960 ac_cv_member_struct_stat_st_flags=yes
18961else
18962 echo "$as_me: failed program was:" >&5
18963sed 's/^/| /' conftest.$ac_ext >&5
18964
Martin v. Löwiseba40652007-08-30 20:10:57 +000018965 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018966/* confdefs.h. */
18967_ACEOF
18968cat confdefs.h >>conftest.$ac_ext
18969cat >>conftest.$ac_ext <<_ACEOF
18970/* end confdefs.h. */
18971$ac_includes_default
18972int
18973main ()
18974{
18975static struct stat ac_aggr;
18976if (sizeof ac_aggr.st_flags)
18977return 0;
18978 ;
18979 return 0;
18980}
18981_ACEOF
18982rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018983if { (ac_try="$ac_compile"
18984case "(($ac_try" in
18985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18986 *) ac_try_echo=$ac_try;;
18987esac
18988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18989 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018990 ac_status=$?
18991 grep -v '^ *+' conftest.er1 >conftest.err
18992 rm -f conftest.er1
18993 cat conftest.err >&5
18994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018995 (exit $ac_status); } && {
18996 test -z "$ac_c_werror_flag" ||
18997 test ! -s conftest.err
18998 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018999 ac_cv_member_struct_stat_st_flags=yes
19000else
19001 echo "$as_me: failed program was:" >&5
19002sed 's/^/| /' conftest.$ac_ext >&5
19003
Martin v. Löwiseba40652007-08-30 20:10:57 +000019004 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019006
19007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019009
19010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019012{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19013echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019014if test $ac_cv_member_struct_stat_st_flags = yes; then
19015
19016cat >>confdefs.h <<_ACEOF
19017#define HAVE_STRUCT_STAT_ST_FLAGS 1
19018_ACEOF
19019
19020
19021fi
19022
Martin v. Löwiseba40652007-08-30 20:10:57 +000019023{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19024echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019025if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19026 echo $ECHO_N "(cached) $ECHO_C" >&6
19027else
19028 cat >conftest.$ac_ext <<_ACEOF
19029/* confdefs.h. */
19030_ACEOF
19031cat confdefs.h >>conftest.$ac_ext
19032cat >>conftest.$ac_ext <<_ACEOF
19033/* end confdefs.h. */
19034$ac_includes_default
19035int
19036main ()
19037{
19038static struct stat ac_aggr;
19039if (ac_aggr.st_gen)
19040return 0;
19041 ;
19042 return 0;
19043}
19044_ACEOF
19045rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019046if { (ac_try="$ac_compile"
19047case "(($ac_try" in
19048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19049 *) ac_try_echo=$ac_try;;
19050esac
19051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019053 ac_status=$?
19054 grep -v '^ *+' conftest.er1 >conftest.err
19055 rm -f conftest.er1
19056 cat conftest.err >&5
19057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019058 (exit $ac_status); } && {
19059 test -z "$ac_c_werror_flag" ||
19060 test ! -s conftest.err
19061 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019062 ac_cv_member_struct_stat_st_gen=yes
19063else
19064 echo "$as_me: failed program was:" >&5
19065sed 's/^/| /' conftest.$ac_ext >&5
19066
Martin v. Löwiseba40652007-08-30 20:10:57 +000019067 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019068/* confdefs.h. */
19069_ACEOF
19070cat confdefs.h >>conftest.$ac_ext
19071cat >>conftest.$ac_ext <<_ACEOF
19072/* end confdefs.h. */
19073$ac_includes_default
19074int
19075main ()
19076{
19077static struct stat ac_aggr;
19078if (sizeof ac_aggr.st_gen)
19079return 0;
19080 ;
19081 return 0;
19082}
19083_ACEOF
19084rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019085if { (ac_try="$ac_compile"
19086case "(($ac_try" in
19087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19088 *) ac_try_echo=$ac_try;;
19089esac
19090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19091 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019092 ac_status=$?
19093 grep -v '^ *+' conftest.er1 >conftest.err
19094 rm -f conftest.er1
19095 cat conftest.err >&5
19096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019097 (exit $ac_status); } && {
19098 test -z "$ac_c_werror_flag" ||
19099 test ! -s conftest.err
19100 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019101 ac_cv_member_struct_stat_st_gen=yes
19102else
19103 echo "$as_me: failed program was:" >&5
19104sed 's/^/| /' conftest.$ac_ext >&5
19105
Martin v. Löwiseba40652007-08-30 20:10:57 +000019106 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019108
19109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019111
19112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019114{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19115echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019116if test $ac_cv_member_struct_stat_st_gen = yes; then
19117
19118cat >>confdefs.h <<_ACEOF
19119#define HAVE_STRUCT_STAT_ST_GEN 1
19120_ACEOF
19121
19122
19123fi
19124
Martin v. Löwiseba40652007-08-30 20:10:57 +000019125{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19126echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019127if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19128 echo $ECHO_N "(cached) $ECHO_C" >&6
19129else
19130 cat >conftest.$ac_ext <<_ACEOF
19131/* confdefs.h. */
19132_ACEOF
19133cat confdefs.h >>conftest.$ac_ext
19134cat >>conftest.$ac_ext <<_ACEOF
19135/* end confdefs.h. */
19136$ac_includes_default
19137int
19138main ()
19139{
19140static struct stat ac_aggr;
19141if (ac_aggr.st_birthtime)
19142return 0;
19143 ;
19144 return 0;
19145}
19146_ACEOF
19147rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019148if { (ac_try="$ac_compile"
19149case "(($ac_try" in
19150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19151 *) ac_try_echo=$ac_try;;
19152esac
19153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019155 ac_status=$?
19156 grep -v '^ *+' conftest.er1 >conftest.err
19157 rm -f conftest.er1
19158 cat conftest.err >&5
19159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019160 (exit $ac_status); } && {
19161 test -z "$ac_c_werror_flag" ||
19162 test ! -s conftest.err
19163 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019164 ac_cv_member_struct_stat_st_birthtime=yes
19165else
19166 echo "$as_me: failed program was:" >&5
19167sed 's/^/| /' conftest.$ac_ext >&5
19168
Martin v. Löwiseba40652007-08-30 20:10:57 +000019169 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019170/* confdefs.h. */
19171_ACEOF
19172cat confdefs.h >>conftest.$ac_ext
19173cat >>conftest.$ac_ext <<_ACEOF
19174/* end confdefs.h. */
19175$ac_includes_default
19176int
19177main ()
19178{
19179static struct stat ac_aggr;
19180if (sizeof ac_aggr.st_birthtime)
19181return 0;
19182 ;
19183 return 0;
19184}
19185_ACEOF
19186rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019187if { (ac_try="$ac_compile"
19188case "(($ac_try" in
19189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19190 *) ac_try_echo=$ac_try;;
19191esac
19192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019194 ac_status=$?
19195 grep -v '^ *+' conftest.er1 >conftest.err
19196 rm -f conftest.er1
19197 cat conftest.err >&5
19198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019199 (exit $ac_status); } && {
19200 test -z "$ac_c_werror_flag" ||
19201 test ! -s conftest.err
19202 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019203 ac_cv_member_struct_stat_st_birthtime=yes
19204else
19205 echo "$as_me: failed program was:" >&5
19206sed 's/^/| /' conftest.$ac_ext >&5
19207
Martin v. Löwiseba40652007-08-30 20:10:57 +000019208 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019210
19211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019213
19214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019216{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19217echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019218if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19219
19220cat >>confdefs.h <<_ACEOF
19221#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19222_ACEOF
19223
19224
19225fi
19226
Martin v. Löwiseba40652007-08-30 20:10:57 +000019227{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19228echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019229if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19230 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019231else
Martin v. Löwis11437992002-04-12 09:54:03 +000019232 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019233/* confdefs.h. */
19234_ACEOF
19235cat confdefs.h >>conftest.$ac_ext
19236cat >>conftest.$ac_ext <<_ACEOF
19237/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019238$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019239int
19240main ()
19241{
19242static struct stat ac_aggr;
19243if (ac_aggr.st_blocks)
19244return 0;
19245 ;
19246 return 0;
19247}
19248_ACEOF
19249rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019250if { (ac_try="$ac_compile"
19251case "(($ac_try" in
19252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19253 *) ac_try_echo=$ac_try;;
19254esac
19255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19256 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019258 grep -v '^ *+' conftest.er1 >conftest.err
19259 rm -f conftest.er1
19260 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019262 (exit $ac_status); } && {
19263 test -z "$ac_c_werror_flag" ||
19264 test ! -s conftest.err
19265 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019266 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019267else
Martin v. Löwis11437992002-04-12 09:54:03 +000019268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019269sed 's/^/| /' conftest.$ac_ext >&5
19270
Martin v. Löwiseba40652007-08-30 20:10:57 +000019271 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019272/* confdefs.h. */
19273_ACEOF
19274cat confdefs.h >>conftest.$ac_ext
19275cat >>conftest.$ac_ext <<_ACEOF
19276/* end confdefs.h. */
19277$ac_includes_default
19278int
19279main ()
19280{
19281static struct stat ac_aggr;
19282if (sizeof ac_aggr.st_blocks)
19283return 0;
19284 ;
19285 return 0;
19286}
19287_ACEOF
19288rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019289if { (ac_try="$ac_compile"
19290case "(($ac_try" in
19291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19292 *) ac_try_echo=$ac_try;;
19293esac
19294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19295 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019297 grep -v '^ *+' conftest.er1 >conftest.err
19298 rm -f conftest.er1
19299 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019301 (exit $ac_status); } && {
19302 test -z "$ac_c_werror_flag" ||
19303 test ! -s conftest.err
19304 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019305 ac_cv_member_struct_stat_st_blocks=yes
19306else
19307 echo "$as_me: failed program was:" >&5
19308sed 's/^/| /' conftest.$ac_ext >&5
19309
Martin v. Löwiseba40652007-08-30 20:10:57 +000019310 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019312
19313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019315
19316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019318{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19319echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019320if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019321
Martin v. Löwis11437992002-04-12 09:54:03 +000019322cat >>confdefs.h <<_ACEOF
19323#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19324_ACEOF
19325
19326
19327cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019328#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019329_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019330
19331else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019332 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019333 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019334 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19335 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019336esac
19337
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019338fi
19339
Michael W. Hudson54241132001-12-07 15:38:26 +000019340
Martin v. Löwis11437992002-04-12 09:54:03 +000019341
Martin v. Löwiseba40652007-08-30 20:10:57 +000019342{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19343echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019344if test "${ac_cv_header_time_altzone+set}" = set; then
19345 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019346else
Martin v. Löwis11437992002-04-12 09:54:03 +000019347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019348/* confdefs.h. */
19349_ACEOF
19350cat confdefs.h >>conftest.$ac_ext
19351cat >>conftest.$ac_ext <<_ACEOF
19352/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019353#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019354int
19355main ()
19356{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019357return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019358 ;
19359 return 0;
19360}
19361_ACEOF
19362rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019363if { (ac_try="$ac_compile"
19364case "(($ac_try" in
19365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19366 *) ac_try_echo=$ac_try;;
19367esac
19368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19369 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019371 grep -v '^ *+' conftest.er1 >conftest.err
19372 rm -f conftest.er1
19373 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019375 (exit $ac_status); } && {
19376 test -z "$ac_c_werror_flag" ||
19377 test ! -s conftest.err
19378 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019379 ac_cv_header_time_altzone=yes
19380else
Martin v. Löwis11437992002-04-12 09:54:03 +000019381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019382sed 's/^/| /' conftest.$ac_ext >&5
19383
Martin v. Löwiseba40652007-08-30 20:10:57 +000019384 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019385fi
19386
Martin v. Löwiseba40652007-08-30 20:10:57 +000019387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19388fi
19389
19390{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19391echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019392if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019393
19394cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019395#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019396_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019397
19398fi
19399
Guido van Rossumda88dad1995-01-26 00:46:29 +000019400was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019401{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19402echo $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 +000019403cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019404/* confdefs.h. */
19405_ACEOF
19406cat confdefs.h >>conftest.$ac_ext
19407cat >>conftest.$ac_ext <<_ACEOF
19408/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019409
19410#include <sys/types.h>
19411#include <sys/select.h>
19412#include <sys/time.h>
19413
Martin v. Löwis11437992002-04-12 09:54:03 +000019414int
19415main ()
19416{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019417;
Martin v. Löwis11437992002-04-12 09:54:03 +000019418 ;
19419 return 0;
19420}
19421_ACEOF
19422rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019423if { (ac_try="$ac_compile"
19424case "(($ac_try" in
19425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19426 *) ac_try_echo=$ac_try;;
19427esac
19428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019431 grep -v '^ *+' conftest.er1 >conftest.err
19432 rm -f conftest.er1
19433 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019435 (exit $ac_status); } && {
19436 test -z "$ac_c_werror_flag" ||
19437 test ! -s conftest.err
19438 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019439
19440
19441cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019442#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019443_ACEOF
19444
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019445 was_it_defined=yes
19446
Guido van Rossumf78abae1997-01-21 22:02:36 +000019447else
Martin v. Löwis11437992002-04-12 09:54:03 +000019448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019449sed 's/^/| /' conftest.$ac_ext >&5
19450
Brett Cannon19fab762007-06-02 03:02:29 +000019451
Martin v. Löwiseba40652007-08-30 20:10:57 +000019452fi
19453
19454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19455{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19456echo "${ECHO_T}$was_it_defined" >&6; }
19457
19458{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19459echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019460if test "${ac_cv_struct_addrinfo+set}" = set; then
19461 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019462else
Martin v. Löwis11437992002-04-12 09:54:03 +000019463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019464/* confdefs.h. */
19465_ACEOF
19466cat confdefs.h >>conftest.$ac_ext
19467cat >>conftest.$ac_ext <<_ACEOF
19468/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019469
19470# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019471int
19472main ()
19473{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019474struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019475 ;
19476 return 0;
19477}
19478_ACEOF
19479rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019480if { (ac_try="$ac_compile"
19481case "(($ac_try" in
19482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19483 *) ac_try_echo=$ac_try;;
19484esac
19485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019488 grep -v '^ *+' conftest.er1 >conftest.err
19489 rm -f conftest.er1
19490 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019492 (exit $ac_status); } && {
19493 test -z "$ac_c_werror_flag" ||
19494 test ! -s conftest.err
19495 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019496 ac_cv_struct_addrinfo=yes
19497else
Martin v. Löwis11437992002-04-12 09:54:03 +000019498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019499sed 's/^/| /' conftest.$ac_ext >&5
19500
Martin v. Löwiseba40652007-08-30 20:10:57 +000019501 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019502fi
19503
Martin v. Löwiseba40652007-08-30 20:10:57 +000019504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19505fi
19506
19507{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19508echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019509if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019510
19511cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019512#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019513_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019514
19515fi
19516
Martin v. Löwiseba40652007-08-30 20:10:57 +000019517{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19518echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019519if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19520 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019521else
Martin v. Löwis11437992002-04-12 09:54:03 +000019522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019523/* confdefs.h. */
19524_ACEOF
19525cat confdefs.h >>conftest.$ac_ext
19526cat >>conftest.$ac_ext <<_ACEOF
19527/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019528
19529# include <sys/types.h>
19530# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019531int
19532main ()
19533{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019534struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019535 ;
19536 return 0;
19537}
19538_ACEOF
19539rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019540if { (ac_try="$ac_compile"
19541case "(($ac_try" in
19542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19543 *) ac_try_echo=$ac_try;;
19544esac
19545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019548 grep -v '^ *+' conftest.er1 >conftest.err
19549 rm -f conftest.er1
19550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019552 (exit $ac_status); } && {
19553 test -z "$ac_c_werror_flag" ||
19554 test ! -s conftest.err
19555 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019556 ac_cv_struct_sockaddr_storage=yes
19557else
Martin v. Löwis11437992002-04-12 09:54:03 +000019558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019559sed 's/^/| /' conftest.$ac_ext >&5
19560
Martin v. Löwiseba40652007-08-30 20:10:57 +000019561 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019562fi
19563
Martin v. Löwiseba40652007-08-30 20:10:57 +000019564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19565fi
19566
19567{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19568echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019569if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019570
19571cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019572#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019573_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019574
19575fi
19576
Guido van Rossum627b2d71993-12-24 10:39:16 +000019577# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019578
Michael W. Hudson54241132001-12-07 15:38:26 +000019579
Martin v. Löwiseba40652007-08-30 20:10:57 +000019580{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19581echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019582if test "${ac_cv_c_char_unsigned+set}" = set; then
19583 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019584else
Martin v. Löwis11437992002-04-12 09:54:03 +000019585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019586/* confdefs.h. */
19587_ACEOF
19588cat confdefs.h >>conftest.$ac_ext
19589cat >>conftest.$ac_ext <<_ACEOF
19590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019591$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019592int
19593main ()
19594{
19595static int test_array [1 - 2 * !(((char) -1) < 0)];
19596test_array [0] = 0
19597
19598 ;
19599 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019600}
Martin v. Löwis11437992002-04-12 09:54:03 +000019601_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
Michael W. Hudson54241132001-12-07 15:38:26 +000019619 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019620else
19621 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_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019626
19627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019629{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19630echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019631if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019632 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019633#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019634_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019635
19636fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019637
Martin v. Löwiseba40652007-08-30 20:10:57 +000019638{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19639echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019640if test "${ac_cv_c_const+set}" = set; then
19641 echo $ECHO_N "(cached) $ECHO_C" >&6
19642else
19643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019644/* confdefs.h. */
19645_ACEOF
19646cat confdefs.h >>conftest.$ac_ext
19647cat >>conftest.$ac_ext <<_ACEOF
19648/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019649
Martin v. Löwis11437992002-04-12 09:54:03 +000019650int
19651main ()
19652{
19653/* FIXME: Include the comments suggested by Paul. */
19654#ifndef __cplusplus
19655 /* Ultrix mips cc rejects this. */
19656 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019657 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019658 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019659 char const *const *pcpcc;
19660 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019661 /* NEC SVR4.0.2 mips cc rejects this. */
19662 struct point {int x, y;};
19663 static struct point const zero = {0,0};
19664 /* AIX XL C 1.02.0.0 rejects this.
19665 It does not let you subtract one const X* pointer from another in
19666 an arm of an if-expression whose if-part is not a constant
19667 expression */
19668 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019669 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019670 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019671 ++pcpcc;
19672 ppc = (char**) pcpcc;
19673 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019674 { /* SCO 3.2v4 cc rejects this. */
19675 char *t;
19676 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019677
Martin v. Löwis11437992002-04-12 09:54:03 +000019678 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019679 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019680 }
19681 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19682 int x[] = {25, 17};
19683 const int *foo = &x[0];
19684 ++foo;
19685 }
19686 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19687 typedef const int *iptr;
19688 iptr p = 0;
19689 ++p;
19690 }
19691 { /* AIX XL C 1.02.0.0 rejects this saying
19692 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19693 struct s { int j; const int *ap[3]; };
19694 struct s *b; b->j = 5;
19695 }
19696 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19697 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019698 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019699 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019700 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019701#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019702
Martin v. Löwis11437992002-04-12 09:54:03 +000019703 ;
19704 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019705}
Martin v. Löwis11437992002-04-12 09:54:03 +000019706_ACEOF
19707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019708if { (ac_try="$ac_compile"
19709case "(($ac_try" in
19710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19711 *) ac_try_echo=$ac_try;;
19712esac
19713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019716 grep -v '^ *+' conftest.er1 >conftest.err
19717 rm -f conftest.er1
19718 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019720 (exit $ac_status); } && {
19721 test -z "$ac_c_werror_flag" ||
19722 test ! -s conftest.err
19723 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019724 ac_cv_c_const=yes
19725else
Martin v. Löwis11437992002-04-12 09:54:03 +000019726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019727sed 's/^/| /' conftest.$ac_ext >&5
19728
Martin v. Löwiseba40652007-08-30 20:10:57 +000019729 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019731
19732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019734{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19735echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019736if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019737
19738cat >>confdefs.h <<\_ACEOF
19739#define const
19740_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019741
19742fi
19743
Michael W. Hudson54241132001-12-07 15:38:26 +000019744
Guido van Rossumda88dad1995-01-26 00:46:29 +000019745works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019746{ echo "$as_me:$LINENO: checking for working volatile" >&5
19747echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019748cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019749/* confdefs.h. */
19750_ACEOF
19751cat confdefs.h >>conftest.$ac_ext
19752cat >>conftest.$ac_ext <<_ACEOF
19753/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019754
Martin v. Löwis11437992002-04-12 09:54:03 +000019755int
19756main ()
19757{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019758volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019759 ;
19760 return 0;
19761}
19762_ACEOF
19763rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019764if { (ac_try="$ac_compile"
19765case "(($ac_try" in
19766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19767 *) ac_try_echo=$ac_try;;
19768esac
19769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019772 grep -v '^ *+' conftest.er1 >conftest.err
19773 rm -f conftest.er1
19774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019776 (exit $ac_status); } && {
19777 test -z "$ac_c_werror_flag" ||
19778 test ! -s conftest.err
19779 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019780 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019781else
Martin v. Löwis11437992002-04-12 09:54:03 +000019782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019783sed 's/^/| /' conftest.$ac_ext >&5
19784
Martin v. Löwis11437992002-04-12 09:54:03 +000019785
19786cat >>confdefs.h <<\_ACEOF
19787#define volatile
19788_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019789
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019790
Guido van Rossum627b2d71993-12-24 10:39:16 +000019791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019792
19793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19794{ echo "$as_me:$LINENO: result: $works" >&5
19795echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019796
Guido van Rossumda88dad1995-01-26 00:46:29 +000019797works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019798{ echo "$as_me:$LINENO: checking for working signed char" >&5
19799echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019800cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019801/* confdefs.h. */
19802_ACEOF
19803cat confdefs.h >>conftest.$ac_ext
19804cat >>conftest.$ac_ext <<_ACEOF
19805/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019806
Martin v. Löwis11437992002-04-12 09:54:03 +000019807int
19808main ()
19809{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019810signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019811 ;
19812 return 0;
19813}
19814_ACEOF
19815rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019816if { (ac_try="$ac_compile"
19817case "(($ac_try" in
19818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19819 *) ac_try_echo=$ac_try;;
19820esac
19821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019824 grep -v '^ *+' conftest.er1 >conftest.err
19825 rm -f conftest.er1
19826 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019828 (exit $ac_status); } && {
19829 test -z "$ac_c_werror_flag" ||
19830 test ! -s conftest.err
19831 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019832 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019833else
Martin v. Löwis11437992002-04-12 09:54:03 +000019834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019835sed 's/^/| /' conftest.$ac_ext >&5
19836
Martin v. Löwis11437992002-04-12 09:54:03 +000019837
19838cat >>confdefs.h <<\_ACEOF
19839#define signed
19840_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019841
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019842
Guido van Rossum7f43da71994-08-01 12:15:30 +000019843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019844
19845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19846{ echo "$as_me:$LINENO: result: $works" >&5
19847echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019848
Guido van Rossumda88dad1995-01-26 00:46:29 +000019849have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019850{ echo "$as_me:$LINENO: checking for prototypes" >&5
19851echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019853/* confdefs.h. */
19854_ACEOF
19855cat confdefs.h >>conftest.$ac_ext
19856cat >>conftest.$ac_ext <<_ACEOF
19857/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019858int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019859int
19860main ()
19861{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019862return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019863 ;
19864 return 0;
19865}
19866_ACEOF
19867rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019868if { (ac_try="$ac_compile"
19869case "(($ac_try" in
19870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19871 *) ac_try_echo=$ac_try;;
19872esac
19873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019876 grep -v '^ *+' conftest.er1 >conftest.err
19877 rm -f conftest.er1
19878 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019880 (exit $ac_status); } && {
19881 test -z "$ac_c_werror_flag" ||
19882 test ! -s conftest.err
19883 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019884
19885
19886cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019887#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019888_ACEOF
19889
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019890 have_prototypes=yes
19891
Guido van Rossumf78abae1997-01-21 22:02:36 +000019892else
Martin v. Löwis11437992002-04-12 09:54:03 +000019893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019894sed 's/^/| /' conftest.$ac_ext >&5
19895
Martin v. Löwiseba40652007-08-30 20:10:57 +000019896
Guido van Rossum7f43da71994-08-01 12:15:30 +000019897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019898
19899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19900{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
19901echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019902
Guido van Rossumda88dad1995-01-26 00:46:29 +000019903works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019904{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
19905echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019906cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019907/* confdefs.h. */
19908_ACEOF
19909cat confdefs.h >>conftest.$ac_ext
19910cat >>conftest.$ac_ext <<_ACEOF
19911/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019912
19913#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019914int foo(int x, ...) {
19915 va_list va;
19916 va_start(va, x);
19917 va_arg(va, int);
19918 va_arg(va, char *);
19919 va_arg(va, double);
19920 return 0;
19921}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019922
Martin v. Löwis11437992002-04-12 09:54:03 +000019923int
19924main ()
19925{
Guido van Rossum90eea071996-08-30 20:58:57 +000019926return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000019927 ;
19928 return 0;
19929}
19930_ACEOF
19931rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019932if { (ac_try="$ac_compile"
19933case "(($ac_try" in
19934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19935 *) ac_try_echo=$ac_try;;
19936esac
19937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19938 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019940 grep -v '^ *+' conftest.er1 >conftest.err
19941 rm -f conftest.er1
19942 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019944 (exit $ac_status); } && {
19945 test -z "$ac_c_werror_flag" ||
19946 test ! -s conftest.err
19947 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019948
19949
19950cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019951#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019952_ACEOF
19953
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019954 works=yes
19955
Guido van Rossumf78abae1997-01-21 22:02:36 +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öwiseba40652007-08-30 20:10:57 +000019960
Guido van Rossum627b2d71993-12-24 10:39:16 +000019961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019962
19963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19964{ echo "$as_me:$LINENO: result: $works" >&5
19965echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019966
Martin v. Löwisd6320502004-08-12 13:45:08 +000019967# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000019968{ echo "$as_me:$LINENO: checking for socketpair" >&5
19969echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019970cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000019971/* confdefs.h. */
19972_ACEOF
19973cat confdefs.h >>conftest.$ac_ext
19974cat >>conftest.$ac_ext <<_ACEOF
19975/* end confdefs.h. */
19976
19977#include <sys/types.h>
19978#include <sys/socket.h>
19979
19980int
19981main ()
19982{
19983void *x=socketpair
19984 ;
19985 return 0;
19986}
19987_ACEOF
19988rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019989if { (ac_try="$ac_compile"
19990case "(($ac_try" in
19991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19992 *) ac_try_echo=$ac_try;;
19993esac
19994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19995 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000019996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019997 grep -v '^ *+' conftest.er1 >conftest.err
19998 rm -f conftest.er1
19999 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020001 (exit $ac_status); } && {
20002 test -z "$ac_c_werror_flag" ||
20003 test ! -s conftest.err
20004 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020005
20006cat >>confdefs.h <<\_ACEOF
20007#define HAVE_SOCKETPAIR 1
20008_ACEOF
20009
Martin v. Löwiseba40652007-08-30 20:10:57 +000020010 { echo "$as_me:$LINENO: result: yes" >&5
20011echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020012else
20013 echo "$as_me: failed program was:" >&5
20014sed 's/^/| /' conftest.$ac_ext >&5
20015
Martin v. Löwiseba40652007-08-30 20:10:57 +000020016 { echo "$as_me:$LINENO: result: no" >&5
20017echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020018
20019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020020
20021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020022
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020023# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020024{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20025echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020026cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020027/* confdefs.h. */
20028_ACEOF
20029cat confdefs.h >>conftest.$ac_ext
20030cat >>conftest.$ac_ext <<_ACEOF
20031/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020032#include <sys/types.h>
20033#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020034int
20035main ()
20036{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020037struct sockaddr x;
20038x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020039 ;
20040 return 0;
20041}
20042_ACEOF
20043rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020044if { (ac_try="$ac_compile"
20045case "(($ac_try" in
20046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20047 *) ac_try_echo=$ac_try;;
20048esac
20049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20050 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020052 grep -v '^ *+' conftest.er1 >conftest.err
20053 rm -f conftest.er1
20054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020056 (exit $ac_status); } && {
20057 test -z "$ac_c_werror_flag" ||
20058 test ! -s conftest.err
20059 } && test -s conftest.$ac_objext; then
20060 { echo "$as_me:$LINENO: result: yes" >&5
20061echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020062
20063cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020064#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020065_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020066
20067else
Martin v. Löwis11437992002-04-12 09:54:03 +000020068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020069sed 's/^/| /' conftest.$ac_ext >&5
20070
Martin v. Löwiseba40652007-08-30 20:10:57 +000020071 { echo "$as_me:$LINENO: result: no" >&5
20072echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020074
20075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020076
Guido van Rossumda88dad1995-01-26 00:46:29 +000020077va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020078{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20079echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020081/* confdefs.h. */
20082_ACEOF
20083cat confdefs.h >>conftest.$ac_ext
20084cat >>conftest.$ac_ext <<_ACEOF
20085/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020086
20087#ifdef HAVE_STDARG_PROTOTYPES
20088#include <stdarg.h>
20089#else
20090#include <varargs.h>
20091#endif
20092
Martin v. Löwis11437992002-04-12 09:54:03 +000020093int
20094main ()
20095{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020096va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020097 ;
20098 return 0;
20099}
20100_ACEOF
20101rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020102if { (ac_try="$ac_compile"
20103case "(($ac_try" in
20104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20105 *) ac_try_echo=$ac_try;;
20106esac
20107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020110 grep -v '^ *+' conftest.er1 >conftest.err
20111 rm -f conftest.er1
20112 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020114 (exit $ac_status); } && {
20115 test -z "$ac_c_werror_flag" ||
20116 test ! -s conftest.err
20117 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020118 :
20119else
Martin v. Löwis11437992002-04-12 09:54:03 +000020120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020121sed 's/^/| /' conftest.$ac_ext >&5
20122
Martin v. Löwis11437992002-04-12 09:54:03 +000020123
20124
20125cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020126#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020127_ACEOF
20128
Guido van Rossumda88dad1995-01-26 00:46:29 +000020129 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020130
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020132
20133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20134{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20135echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020136
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020137# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020138
20139
20140
Martin v. Löwiseba40652007-08-30 20:10:57 +000020141{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20142echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020143if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020145else
Martin v. Löwis11437992002-04-12 09:54:03 +000020146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020147/* confdefs.h. */
20148_ACEOF
20149cat confdefs.h >>conftest.$ac_ext
20150cat >>conftest.$ac_ext <<_ACEOF
20151/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020152/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20153 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20154#define gethostbyname_r innocuous_gethostbyname_r
20155
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020156/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020157 which can conflict with char gethostbyname_r (); below.
20158 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020159 <limits.h> exists even on freestanding compilers. */
20160
20161#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020162# include <limits.h>
20163#else
20164# include <assert.h>
20165#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020166
20167#undef gethostbyname_r
20168
Martin v. Löwiseba40652007-08-30 20:10:57 +000020169/* Override any GCC internal prototype to avoid an error.
20170 Use char because int might match the return type of a GCC
20171 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020172#ifdef __cplusplus
20173extern "C"
20174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020175char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020176/* The GNU C library defines this for functions which it implements
20177 to always fail with ENOSYS. Some functions are actually named
20178 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020179#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020180choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020181#endif
20182
Skip Montanaro6dead952003-09-25 14:50:04 +000020183int
20184main ()
20185{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020186return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020187 ;
20188 return 0;
20189}
20190_ACEOF
20191rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020192if { (ac_try="$ac_link"
20193case "(($ac_try" in
20194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20195 *) ac_try_echo=$ac_try;;
20196esac
20197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20198 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020200 grep -v '^ *+' conftest.er1 >conftest.err
20201 rm -f conftest.er1
20202 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020204 (exit $ac_status); } && {
20205 test -z "$ac_c_werror_flag" ||
20206 test ! -s conftest.err
20207 } && test -s conftest$ac_exeext &&
20208 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020209 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020210else
Martin v. Löwis11437992002-04-12 09:54:03 +000020211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020212sed 's/^/| /' conftest.$ac_ext >&5
20213
Martin v. Löwiseba40652007-08-30 20:10:57 +000020214 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020216
20217rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020218 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020220{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20221echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020222if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020223
Martin v. Löwis11437992002-04-12 09:54:03 +000020224 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020225#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020226_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020227
Martin v. Löwiseba40652007-08-30 20:10:57 +000020228 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20229echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020230 OLD_CFLAGS=$CFLAGS
20231 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020232 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020233/* confdefs.h. */
20234_ACEOF
20235cat confdefs.h >>conftest.$ac_ext
20236cat >>conftest.$ac_ext <<_ACEOF
20237/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020238
20239# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020240
Martin v. Löwis11437992002-04-12 09:54:03 +000020241int
20242main ()
20243{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020244
20245 char *name;
20246 struct hostent *he, *res;
20247 char buffer[2048];
20248 int buflen = 2048;
20249 int h_errnop;
20250
20251 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020252
20253 ;
20254 return 0;
20255}
20256_ACEOF
20257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020258if { (ac_try="$ac_compile"
20259case "(($ac_try" in
20260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20261 *) ac_try_echo=$ac_try;;
20262esac
20263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020266 grep -v '^ *+' conftest.er1 >conftest.err
20267 rm -f conftest.er1
20268 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020270 (exit $ac_status); } && {
20271 test -z "$ac_c_werror_flag" ||
20272 test ! -s conftest.err
20273 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020274
20275 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020276#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020277_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020278
Martin v. Löwis11437992002-04-12 09:54:03 +000020279
20280cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020281#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020282_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020283
Martin v. Löwiseba40652007-08-30 20:10:57 +000020284 { echo "$as_me:$LINENO: result: yes" >&5
20285echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020286
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020287else
Martin v. Löwis11437992002-04-12 09:54:03 +000020288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020289sed 's/^/| /' conftest.$ac_ext >&5
20290
Martin v. Löwis11437992002-04-12 09:54:03 +000020291
Martin v. Löwiseba40652007-08-30 20:10:57 +000020292 { echo "$as_me:$LINENO: result: no" >&5
20293echo "${ECHO_T}no" >&6; }
20294 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20295echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020296 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020297/* confdefs.h. */
20298_ACEOF
20299cat confdefs.h >>conftest.$ac_ext
20300cat >>conftest.$ac_ext <<_ACEOF
20301/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020302
20303# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020304
Martin v. Löwis11437992002-04-12 09:54:03 +000020305int
20306main ()
20307{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020308
20309 char *name;
20310 struct hostent *he;
20311 char buffer[2048];
20312 int buflen = 2048;
20313 int h_errnop;
20314
20315 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020316
20317 ;
20318 return 0;
20319}
20320_ACEOF
20321rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020322if { (ac_try="$ac_compile"
20323case "(($ac_try" in
20324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20325 *) ac_try_echo=$ac_try;;
20326esac
20327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20328 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020330 grep -v '^ *+' conftest.er1 >conftest.err
20331 rm -f conftest.er1
20332 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020334 (exit $ac_status); } && {
20335 test -z "$ac_c_werror_flag" ||
20336 test ! -s conftest.err
20337 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020338
20339 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020340#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020341_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020342
Martin v. Löwis11437992002-04-12 09:54:03 +000020343
20344cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020345#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020346_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020347
Martin v. Löwiseba40652007-08-30 20:10:57 +000020348 { echo "$as_me:$LINENO: result: yes" >&5
20349echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020350
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020351else
Martin v. Löwis11437992002-04-12 09:54:03 +000020352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020353sed 's/^/| /' conftest.$ac_ext >&5
20354
Martin v. Löwis11437992002-04-12 09:54:03 +000020355
Martin v. Löwiseba40652007-08-30 20:10:57 +000020356 { echo "$as_me:$LINENO: result: no" >&5
20357echo "${ECHO_T}no" >&6; }
20358 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20359echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020361/* confdefs.h. */
20362_ACEOF
20363cat confdefs.h >>conftest.$ac_ext
20364cat >>conftest.$ac_ext <<_ACEOF
20365/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020366
20367# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020368
Martin v. Löwis11437992002-04-12 09:54:03 +000020369int
20370main ()
20371{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020372
20373 char *name;
20374 struct hostent *he;
20375 struct hostent_data data;
20376
20377 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020378
20379 ;
20380 return 0;
20381}
20382_ACEOF
20383rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020384if { (ac_try="$ac_compile"
20385case "(($ac_try" in
20386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20387 *) ac_try_echo=$ac_try;;
20388esac
20389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020392 grep -v '^ *+' conftest.er1 >conftest.err
20393 rm -f conftest.er1
20394 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020396 (exit $ac_status); } && {
20397 test -z "$ac_c_werror_flag" ||
20398 test ! -s conftest.err
20399 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020400
20401 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020402#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020403_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020404
Martin v. Löwis11437992002-04-12 09:54:03 +000020405
20406cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020407#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020408_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020409
Martin v. Löwiseba40652007-08-30 20:10:57 +000020410 { echo "$as_me:$LINENO: result: yes" >&5
20411echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020412
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020413else
Martin v. Löwis11437992002-04-12 09:54:03 +000020414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020415sed 's/^/| /' conftest.$ac_ext >&5
20416
Martin v. Löwis11437992002-04-12 09:54:03 +000020417
Martin v. Löwiseba40652007-08-30 20:10:57 +000020418 { echo "$as_me:$LINENO: result: no" >&5
20419echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020420
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020422
20423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020424
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020426
20427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020428
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020430
20431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020432 CFLAGS=$OLD_CFLAGS
20433
20434else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020435
Martin v. Löwis11437992002-04-12 09:54:03 +000020436
20437for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020438do
Martin v. Löwis11437992002-04-12 09:54:03 +000020439as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020440{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20441echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20442if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020443 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020444else
Martin v. Löwis11437992002-04-12 09:54:03 +000020445 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020446/* confdefs.h. */
20447_ACEOF
20448cat confdefs.h >>conftest.$ac_ext
20449cat >>conftest.$ac_ext <<_ACEOF
20450/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020451/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20452 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20453#define $ac_func innocuous_$ac_func
20454
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020455/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020456 which can conflict with char $ac_func (); below.
20457 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020458 <limits.h> exists even on freestanding compilers. */
20459
20460#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020461# include <limits.h>
20462#else
20463# include <assert.h>
20464#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020465
20466#undef $ac_func
20467
Martin v. Löwiseba40652007-08-30 20:10:57 +000020468/* Override any GCC internal prototype to avoid an error.
20469 Use char because int might match the return type of a GCC
20470 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020471#ifdef __cplusplus
20472extern "C"
20473#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020474char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020475/* The GNU C library defines this for functions which it implements
20476 to always fail with ENOSYS. Some functions are actually named
20477 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020478#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020479choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020480#endif
20481
Skip Montanaro6dead952003-09-25 14:50:04 +000020482int
20483main ()
20484{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020485return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020486 ;
20487 return 0;
20488}
20489_ACEOF
20490rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020491if { (ac_try="$ac_link"
20492case "(($ac_try" in
20493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20494 *) ac_try_echo=$ac_try;;
20495esac
20496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20497 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020499 grep -v '^ *+' conftest.er1 >conftest.err
20500 rm -f conftest.er1
20501 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020503 (exit $ac_status); } && {
20504 test -z "$ac_c_werror_flag" ||
20505 test ! -s conftest.err
20506 } && test -s conftest$ac_exeext &&
20507 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020508 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020509else
Martin v. Löwis11437992002-04-12 09:54:03 +000020510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020511sed 's/^/| /' conftest.$ac_ext >&5
20512
Martin v. Löwiseba40652007-08-30 20:10:57 +000020513 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020515
20516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020517 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020519ac_res=`eval echo '${'$as_ac_var'}'`
20520 { echo "$as_me:$LINENO: result: $ac_res" >&5
20521echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020522if test `eval echo '${'$as_ac_var'}'` = yes; then
20523 cat >>confdefs.h <<_ACEOF
20524#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20525_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020526
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020527fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020528done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020529
Michael W. Hudson54241132001-12-07 15:38:26 +000020530
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020531fi
20532
Michael W. Hudson54241132001-12-07 15:38:26 +000020533
20534
20535
20536
20537
20538
Guido van Rossum627b2d71993-12-24 10:39:16 +000020539# checks for system services
20540# (none yet)
20541
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020542# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020543{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20544echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020545if test "${ac_cv_func___fpu_control+set}" = set; then
20546 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020547else
Martin v. Löwis11437992002-04-12 09:54:03 +000020548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020549/* confdefs.h. */
20550_ACEOF
20551cat confdefs.h >>conftest.$ac_ext
20552cat >>conftest.$ac_ext <<_ACEOF
20553/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020554/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20555 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20556#define __fpu_control innocuous___fpu_control
20557
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020558/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020559 which can conflict with char __fpu_control (); below.
20560 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020561 <limits.h> exists even on freestanding compilers. */
20562
20563#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020564# include <limits.h>
20565#else
20566# include <assert.h>
20567#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020568
20569#undef __fpu_control
20570
Martin v. Löwiseba40652007-08-30 20:10:57 +000020571/* Override any GCC internal prototype to avoid an error.
20572 Use char because int might match the return type of a GCC
20573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020574#ifdef __cplusplus
20575extern "C"
20576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020577char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020578/* The GNU C library defines this for functions which it implements
20579 to always fail with ENOSYS. Some functions are actually named
20580 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020581#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020582choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020583#endif
20584
Skip Montanaro6dead952003-09-25 14:50:04 +000020585int
20586main ()
20587{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020588return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020589 ;
20590 return 0;
20591}
20592_ACEOF
20593rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020594if { (ac_try="$ac_link"
20595case "(($ac_try" in
20596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20597 *) ac_try_echo=$ac_try;;
20598esac
20599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20600 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020602 grep -v '^ *+' conftest.er1 >conftest.err
20603 rm -f conftest.er1
20604 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020606 (exit $ac_status); } && {
20607 test -z "$ac_c_werror_flag" ||
20608 test ! -s conftest.err
20609 } && test -s conftest$ac_exeext &&
20610 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020611 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020612else
Martin v. Löwis11437992002-04-12 09:54:03 +000020613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020614sed 's/^/| /' conftest.$ac_ext >&5
20615
Martin v. Löwiseba40652007-08-30 20:10:57 +000020616 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020618
20619rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020620 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020622{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20623echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020624if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020625 :
20626else
Martin v. Löwis11437992002-04-12 09:54:03 +000020627
Martin v. Löwiseba40652007-08-30 20:10:57 +000020628{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20629echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020630if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20631 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020632else
Martin v. Löwis11437992002-04-12 09:54:03 +000020633 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020634LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020635cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020636/* confdefs.h. */
20637_ACEOF
20638cat confdefs.h >>conftest.$ac_ext
20639cat >>conftest.$ac_ext <<_ACEOF
20640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020641
Martin v. Löwiseba40652007-08-30 20:10:57 +000020642/* Override any GCC internal prototype to avoid an error.
20643 Use char because int might match the return type of a GCC
20644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020645#ifdef __cplusplus
20646extern "C"
20647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020648char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020649int
20650main ()
20651{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020652return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020653 ;
20654 return 0;
20655}
20656_ACEOF
20657rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020658if { (ac_try="$ac_link"
20659case "(($ac_try" in
20660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20661 *) ac_try_echo=$ac_try;;
20662esac
20663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20664 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020666 grep -v '^ *+' conftest.er1 >conftest.err
20667 rm -f conftest.er1
20668 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020670 (exit $ac_status); } && {
20671 test -z "$ac_c_werror_flag" ||
20672 test ! -s conftest.err
20673 } && test -s conftest$ac_exeext &&
20674 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020675 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020676else
Martin v. Löwis11437992002-04-12 09:54:03 +000020677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020678sed 's/^/| /' conftest.$ac_ext >&5
20679
Martin v. Löwiseba40652007-08-30 20:10:57 +000020680 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020682
20683rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020684 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020685LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020687{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20688echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020689if test $ac_cv_lib_ieee___fpu_control = yes; then
20690 cat >>confdefs.h <<_ACEOF
20691#define HAVE_LIBIEEE 1
20692_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020693
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020694 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020695
Guido van Rossum627b2d71993-12-24 10:39:16 +000020696fi
20697
Michael W. Hudson54241132001-12-07 15:38:26 +000020698
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020699fi
20700
Michael W. Hudson54241132001-12-07 15:38:26 +000020701
Guido van Rossum7f253911997-05-09 02:42:48 +000020702# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020703{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20704echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020705
Martin v. Löwiseba40652007-08-30 20:10:57 +000020706# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020707if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020708 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020709if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020710then
20711
20712cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020713#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020714_ACEOF
20715
Martin v. Löwiseba40652007-08-30 20:10:57 +000020716 { echo "$as_me:$LINENO: result: yes" >&5
20717echo "${ECHO_T}yes" >&6; }
20718else { echo "$as_me:$LINENO: result: no" >&5
20719echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020720fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020721else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020722 { echo "$as_me:$LINENO: result: no" >&5
20723echo "${ECHO_T}no" >&6; }
20724fi
20725
Guido van Rossum7f253911997-05-09 02:42:48 +000020726
Guido van Rossum7f43da71994-08-01 12:15:30 +000020727# check for --with-libm=...
20728
Guido van Rossum563e7081996-09-10 18:20:48 +000020729case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020730Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020731BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020732*) LIBM=-lm
20733esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020734{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20735echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020736
Martin v. Löwiseba40652007-08-30 20:10:57 +000020737# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020738if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020739 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020740if test "$withval" = no
20741then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020742 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20743echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020744elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020745then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020746 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20747echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020748else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20749echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20750 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020751fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020752else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020753 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20754echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20755fi
20756
Guido van Rossum7f43da71994-08-01 12:15:30 +000020757
20758# check for --with-libc=...
20759
Martin v. Löwiseba40652007-08-30 20:10:57 +000020760{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20761echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020762
Martin v. Löwiseba40652007-08-30 20:10:57 +000020763# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020764if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020765 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020766if test "$withval" = no
20767then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020768 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20769echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020770elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020771then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020772 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20773echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020774else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20775echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20776 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020777fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020778else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020779 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20780echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20781fi
20782
Guido van Rossum7f43da71994-08-01 12:15:30 +000020783
Christian Heimes0a8143f2007-12-18 23:22:54 +000020784# ************************************
20785# * Check for mathematical functions *
20786# ************************************
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020787LIBS_SAVE=$LIBS
20788LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000020789
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020790for ac_func in hypot
20791do
Martin v. Löwis11437992002-04-12 09:54:03 +000020792as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020793{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20794echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20795if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020796 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020797else
Martin v. Löwis11437992002-04-12 09:54:03 +000020798 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020799/* confdefs.h. */
20800_ACEOF
20801cat confdefs.h >>conftest.$ac_ext
20802cat >>conftest.$ac_ext <<_ACEOF
20803/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020804/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20805 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20806#define $ac_func innocuous_$ac_func
20807
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020808/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020809 which can conflict with char $ac_func (); below.
20810 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020811 <limits.h> exists even on freestanding compilers. */
20812
20813#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020814# include <limits.h>
20815#else
20816# include <assert.h>
20817#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020818
20819#undef $ac_func
20820
Martin v. Löwiseba40652007-08-30 20:10:57 +000020821/* Override any GCC internal prototype to avoid an error.
20822 Use char because int might match the return type of a GCC
20823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020824#ifdef __cplusplus
20825extern "C"
20826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020827char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020828/* The GNU C library defines this for functions which it implements
20829 to always fail with ENOSYS. Some functions are actually named
20830 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020831#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020832choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020833#endif
20834
Skip Montanaro6dead952003-09-25 14:50:04 +000020835int
20836main ()
20837{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020838return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020839 ;
20840 return 0;
20841}
20842_ACEOF
20843rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020844if { (ac_try="$ac_link"
20845case "(($ac_try" in
20846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20847 *) ac_try_echo=$ac_try;;
20848esac
20849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20850 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020852 grep -v '^ *+' conftest.er1 >conftest.err
20853 rm -f conftest.er1
20854 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020856 (exit $ac_status); } && {
20857 test -z "$ac_c_werror_flag" ||
20858 test ! -s conftest.err
20859 } && test -s conftest$ac_exeext &&
20860 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020861 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020862else
Martin v. Löwis11437992002-04-12 09:54:03 +000020863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020864sed 's/^/| /' conftest.$ac_ext >&5
20865
Martin v. Löwiseba40652007-08-30 20:10:57 +000020866 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020868
20869rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020870 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020872ac_res=`eval echo '${'$as_ac_var'}'`
20873 { echo "$as_me:$LINENO: result: $ac_res" >&5
20874echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020875if test `eval echo '${'$as_ac_var'}'` = yes; then
20876 cat >>confdefs.h <<_ACEOF
20877#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20878_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020879
Michael W. Hudson54241132001-12-07 15:38:26 +000020880else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020881 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020882 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020883 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20884 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020885esac
20886
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020887fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020888done
20889
Michael W. Hudson54241132001-12-07 15:38:26 +000020890
Christian Heimes0a8143f2007-12-18 23:22:54 +000020891
20892
20893
20894
20895
Christian Heimes48723512008-01-20 14:28:28 +000020896
20897
20898
20899
20900
20901for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000020902do
20903as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20904{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20905echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20906if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20907 echo $ECHO_N "(cached) $ECHO_C" >&6
20908else
20909 cat >conftest.$ac_ext <<_ACEOF
20910/* confdefs.h. */
20911_ACEOF
20912cat confdefs.h >>conftest.$ac_ext
20913cat >>conftest.$ac_ext <<_ACEOF
20914/* end confdefs.h. */
20915/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20916 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20917#define $ac_func innocuous_$ac_func
20918
20919/* System header to define __stub macros and hopefully few prototypes,
20920 which can conflict with char $ac_func (); below.
20921 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20922 <limits.h> exists even on freestanding compilers. */
20923
20924#ifdef __STDC__
20925# include <limits.h>
20926#else
20927# include <assert.h>
20928#endif
20929
20930#undef $ac_func
20931
20932/* Override any GCC internal prototype to avoid an error.
20933 Use char because int might match the return type of a GCC
20934 builtin and then its argument prototype would still apply. */
20935#ifdef __cplusplus
20936extern "C"
20937#endif
20938char $ac_func ();
20939/* The GNU C library defines this for functions which it implements
20940 to always fail with ENOSYS. Some functions are actually named
20941 something starting with __ and the normal name is an alias. */
20942#if defined __stub_$ac_func || defined __stub___$ac_func
20943choke me
20944#endif
20945
20946int
20947main ()
20948{
20949return $ac_func ();
20950 ;
20951 return 0;
20952}
20953_ACEOF
20954rm -f conftest.$ac_objext conftest$ac_exeext
20955if { (ac_try="$ac_link"
20956case "(($ac_try" in
20957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20958 *) ac_try_echo=$ac_try;;
20959esac
20960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20961 (eval "$ac_link") 2>conftest.er1
20962 ac_status=$?
20963 grep -v '^ *+' conftest.er1 >conftest.err
20964 rm -f conftest.er1
20965 cat conftest.err >&5
20966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20967 (exit $ac_status); } && {
20968 test -z "$ac_c_werror_flag" ||
20969 test ! -s conftest.err
20970 } && test -s conftest$ac_exeext &&
20971 $as_test_x conftest$ac_exeext; then
20972 eval "$as_ac_var=yes"
20973else
20974 echo "$as_me: failed program was:" >&5
20975sed 's/^/| /' conftest.$ac_ext >&5
20976
20977 eval "$as_ac_var=no"
20978fi
20979
20980rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20981 conftest$ac_exeext conftest.$ac_ext
20982fi
20983ac_res=`eval echo '${'$as_ac_var'}'`
20984 { echo "$as_me:$LINENO: result: $ac_res" >&5
20985echo "${ECHO_T}$ac_res" >&6; }
20986if test `eval echo '${'$as_ac_var'}'` = yes; then
20987 cat >>confdefs.h <<_ACEOF
20988#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20989_ACEOF
20990
20991fi
20992done
20993
20994
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020995LIBS=$LIBS_SAVE
20996
Guido van Rossumef2255b2000-03-10 22:30:29 +000020997# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000020998if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020999 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21000echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021001if test "${ac_cv_header_wchar_h+set}" = set; then
21002 echo $ECHO_N "(cached) $ECHO_C" >&6
21003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021004{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21005echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021006else
Martin v. Löwis11437992002-04-12 09:54:03 +000021007 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021008{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21009echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021010cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021011/* confdefs.h. */
21012_ACEOF
21013cat confdefs.h >>conftest.$ac_ext
21014cat >>conftest.$ac_ext <<_ACEOF
21015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021016$ac_includes_default
21017#include <wchar.h>
21018_ACEOF
21019rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021020if { (ac_try="$ac_compile"
21021case "(($ac_try" in
21022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21023 *) ac_try_echo=$ac_try;;
21024esac
21025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021028 grep -v '^ *+' conftest.er1 >conftest.err
21029 rm -f conftest.er1
21030 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021032 (exit $ac_status); } && {
21033 test -z "$ac_c_werror_flag" ||
21034 test ! -s conftest.err
21035 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021036 ac_header_compiler=yes
21037else
21038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021039sed 's/^/| /' conftest.$ac_ext >&5
21040
Martin v. Löwiseba40652007-08-30 20:10:57 +000021041 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021043
21044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21045{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21046echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021047
21048# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021049{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21050echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021051cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021052/* confdefs.h. */
21053_ACEOF
21054cat confdefs.h >>conftest.$ac_ext
21055cat >>conftest.$ac_ext <<_ACEOF
21056/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021057#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021058_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021059if { (ac_try="$ac_cpp conftest.$ac_ext"
21060case "(($ac_try" in
21061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21062 *) ac_try_echo=$ac_try;;
21063esac
21064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21065 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021066 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021067 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021068 rm -f conftest.er1
21069 cat conftest.err >&5
21070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021071 (exit $ac_status); } >/dev/null && {
21072 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21073 test ! -s conftest.err
21074 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021075 ac_header_preproc=yes
21076else
21077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021078sed 's/^/| /' conftest.$ac_ext >&5
21079
Martin v. Löwis11437992002-04-12 09:54:03 +000021080 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021082
Martin v. Löwis11437992002-04-12 09:54:03 +000021083rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021084{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21085echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021086
21087# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021088case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21089 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021090 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21091echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021092 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21093echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21094 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021095 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021096 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021097 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21098echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021099 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21100echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21101 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21102echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21103 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21104echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021105 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21106echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021107 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21108echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021109 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021110## ------------------------------------------------ ##
21111## Report this to http://www.python.org/python-bugs ##
21112## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021113_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021114 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021115 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021116esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021117{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21118echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021119if test "${ac_cv_header_wchar_h+set}" = set; then
21120 echo $ECHO_N "(cached) $ECHO_C" >&6
21121else
21122 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021124{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21125echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021126
21127fi
21128if test $ac_cv_header_wchar_h = yes; then
21129
21130
21131cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021132#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021133_ACEOF
21134
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021135 wchar_h="yes"
21136
Guido van Rossumef2255b2000-03-10 22:30:29 +000021137else
Martin v. Löwis11437992002-04-12 09:54:03 +000021138 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021139
21140fi
21141
Michael W. Hudson54241132001-12-07 15:38:26 +000021142
Martin v. Löwis11437992002-04-12 09:54:03 +000021143
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021144# determine wchar_t size
21145if test "$wchar_h" = yes
21146then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021147 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21148echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021149if test "${ac_cv_type_wchar_t+set}" = set; then
21150 echo $ECHO_N "(cached) $ECHO_C" >&6
21151else
21152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021153/* confdefs.h. */
21154_ACEOF
21155cat confdefs.h >>conftest.$ac_ext
21156cat >>conftest.$ac_ext <<_ACEOF
21157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021158#include <wchar.h>
21159
Martin v. Löwiseba40652007-08-30 20:10:57 +000021160typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021161int
21162main ()
21163{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021164if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021165 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021166if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021167 return 0;
21168 ;
21169 return 0;
21170}
21171_ACEOF
21172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021173if { (ac_try="$ac_compile"
21174case "(($ac_try" in
21175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21176 *) ac_try_echo=$ac_try;;
21177esac
21178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021181 grep -v '^ *+' conftest.er1 >conftest.err
21182 rm -f conftest.er1
21183 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021185 (exit $ac_status); } && {
21186 test -z "$ac_c_werror_flag" ||
21187 test ! -s conftest.err
21188 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021189 ac_cv_type_wchar_t=yes
21190else
21191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021192sed 's/^/| /' conftest.$ac_ext >&5
21193
Martin v. Löwiseba40652007-08-30 20:10:57 +000021194 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021195fi
Brett Cannon19fab762007-06-02 03:02:29 +000021196
Martin v. Löwiseba40652007-08-30 20:10:57 +000021197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21198fi
21199{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21200echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21201
21202# The cast to long int works around a bug in the HP C Compiler
21203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21205# This bug is HP SR number 8606223364.
21206{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21207echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021208if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21209 echo $ECHO_N "(cached) $ECHO_C" >&6
21210else
Martin v. Löwis11437992002-04-12 09:54:03 +000021211 if test "$cross_compiling" = yes; then
21212 # Depending upon the size, compute the lo and hi bounds.
21213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021214/* confdefs.h. */
21215_ACEOF
21216cat confdefs.h >>conftest.$ac_ext
21217cat >>conftest.$ac_ext <<_ACEOF
21218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021219#include <wchar.h>
21220
Martin v. Löwiseba40652007-08-30 20:10:57 +000021221 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021222int
21223main ()
21224{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021225static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021226test_array [0] = 0
21227
21228 ;
21229 return 0;
21230}
21231_ACEOF
21232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233if { (ac_try="$ac_compile"
21234case "(($ac_try" in
21235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21236 *) ac_try_echo=$ac_try;;
21237esac
21238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021241 grep -v '^ *+' conftest.er1 >conftest.err
21242 rm -f conftest.er1
21243 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021245 (exit $ac_status); } && {
21246 test -z "$ac_c_werror_flag" ||
21247 test ! -s conftest.err
21248 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021249 ac_lo=0 ac_mid=0
21250 while :; do
21251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021252/* confdefs.h. */
21253_ACEOF
21254cat confdefs.h >>conftest.$ac_ext
21255cat >>conftest.$ac_ext <<_ACEOF
21256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021257#include <wchar.h>
21258
Martin v. Löwiseba40652007-08-30 20:10:57 +000021259 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021260int
21261main ()
21262{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021263static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021264test_array [0] = 0
21265
21266 ;
21267 return 0;
21268}
21269_ACEOF
21270rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021271if { (ac_try="$ac_compile"
21272case "(($ac_try" in
21273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21274 *) ac_try_echo=$ac_try;;
21275esac
21276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021279 grep -v '^ *+' conftest.er1 >conftest.err
21280 rm -f conftest.er1
21281 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021283 (exit $ac_status); } && {
21284 test -z "$ac_c_werror_flag" ||
21285 test ! -s conftest.err
21286 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021287 ac_hi=$ac_mid; break
21288else
21289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021290sed 's/^/| /' conftest.$ac_ext >&5
21291
Martin v. Löwiseba40652007-08-30 20:10:57 +000021292 ac_lo=`expr $ac_mid + 1`
21293 if test $ac_lo -le $ac_mid; then
21294 ac_lo= ac_hi=
21295 break
21296 fi
21297 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021299
21300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021301 done
21302else
21303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021304sed 's/^/| /' conftest.$ac_ext >&5
21305
Martin v. Löwiseba40652007-08-30 20:10:57 +000021306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021307/* confdefs.h. */
21308_ACEOF
21309cat confdefs.h >>conftest.$ac_ext
21310cat >>conftest.$ac_ext <<_ACEOF
21311/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021312#include <wchar.h>
21313
Martin v. Löwiseba40652007-08-30 20:10:57 +000021314 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021315int
21316main ()
21317{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021318static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021319test_array [0] = 0
21320
21321 ;
21322 return 0;
21323}
21324_ACEOF
21325rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021326if { (ac_try="$ac_compile"
21327case "(($ac_try" in
21328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21329 *) ac_try_echo=$ac_try;;
21330esac
21331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021334 grep -v '^ *+' conftest.er1 >conftest.err
21335 rm -f conftest.er1
21336 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021338 (exit $ac_status); } && {
21339 test -z "$ac_c_werror_flag" ||
21340 test ! -s conftest.err
21341 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021342 ac_hi=-1 ac_mid=-1
21343 while :; do
21344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021345/* confdefs.h. */
21346_ACEOF
21347cat confdefs.h >>conftest.$ac_ext
21348cat >>conftest.$ac_ext <<_ACEOF
21349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021350#include <wchar.h>
21351
Martin v. Löwiseba40652007-08-30 20:10:57 +000021352 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021353int
21354main ()
21355{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021356static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021357test_array [0] = 0
21358
21359 ;
21360 return 0;
21361}
21362_ACEOF
21363rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021364if { (ac_try="$ac_compile"
21365case "(($ac_try" in
21366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21367 *) ac_try_echo=$ac_try;;
21368esac
21369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021372 grep -v '^ *+' conftest.er1 >conftest.err
21373 rm -f conftest.er1
21374 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021376 (exit $ac_status); } && {
21377 test -z "$ac_c_werror_flag" ||
21378 test ! -s conftest.err
21379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021380 ac_lo=$ac_mid; break
21381else
21382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021383sed 's/^/| /' conftest.$ac_ext >&5
21384
Martin v. Löwiseba40652007-08-30 20:10:57 +000021385 ac_hi=`expr '(' $ac_mid ')' - 1`
21386 if test $ac_mid -le $ac_hi; then
21387 ac_lo= ac_hi=
21388 break
21389 fi
21390 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000021391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021392
21393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021394 done
21395else
21396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021397sed 's/^/| /' conftest.$ac_ext >&5
21398
Martin v. Löwiseba40652007-08-30 20:10:57 +000021399 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021401
21402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021404
21405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021406# Binary search between lo and hi bounds.
21407while test "x$ac_lo" != "x$ac_hi"; do
21408 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021410/* confdefs.h. */
21411_ACEOF
21412cat confdefs.h >>conftest.$ac_ext
21413cat >>conftest.$ac_ext <<_ACEOF
21414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021415#include <wchar.h>
21416
Martin v. Löwiseba40652007-08-30 20:10:57 +000021417 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021418int
21419main ()
21420{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021421static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021422test_array [0] = 0
21423
21424 ;
21425 return 0;
21426}
21427_ACEOF
21428rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021429if { (ac_try="$ac_compile"
21430case "(($ac_try" in
21431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21432 *) ac_try_echo=$ac_try;;
21433esac
21434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21435 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021436 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021437 grep -v '^ *+' conftest.er1 >conftest.err
21438 rm -f conftest.er1
21439 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021441 (exit $ac_status); } && {
21442 test -z "$ac_c_werror_flag" ||
21443 test ! -s conftest.err
21444 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021445 ac_hi=$ac_mid
21446else
21447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021448sed 's/^/| /' conftest.$ac_ext >&5
21449
Martin v. Löwiseba40652007-08-30 20:10:57 +000021450 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021452
21453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021454done
21455case $ac_lo in
21456?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021457'') if test "$ac_cv_type_wchar_t" = yes; then
21458 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021459See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021460echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021461See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021462 { (exit 77); exit 77; }; }
21463 else
21464 ac_cv_sizeof_wchar_t=0
21465 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021466esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021467else
Martin v. Löwis11437992002-04-12 09:54:03 +000021468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021469/* confdefs.h. */
21470_ACEOF
21471cat confdefs.h >>conftest.$ac_ext
21472cat >>conftest.$ac_ext <<_ACEOF
21473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021474#include <wchar.h>
21475
Martin v. Löwiseba40652007-08-30 20:10:57 +000021476 typedef wchar_t ac__type_sizeof_;
21477static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21478static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021479#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021480#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021481int
21482main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021483{
Martin v. Löwis11437992002-04-12 09:54:03 +000021484
21485 FILE *f = fopen ("conftest.val", "w");
21486 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021487 return 1;
21488 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021489 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021490 long int i = longval ();
21491 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21492 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021493 fprintf (f, "%ld\n", i);
21494 }
21495 else
21496 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021497 unsigned long int i = ulongval ();
21498 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21499 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021500 fprintf (f, "%lu\n", i);
21501 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021502 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021503
21504 ;
21505 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021506}
Martin v. Löwis11437992002-04-12 09:54:03 +000021507_ACEOF
21508rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021509if { (ac_try="$ac_link"
21510case "(($ac_try" in
21511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21512 *) ac_try_echo=$ac_try;;
21513esac
21514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21515 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021516 ac_status=$?
21517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21518 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021519 { (case "(($ac_try" in
21520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21521 *) ac_try_echo=$ac_try;;
21522esac
21523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21524 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021525 ac_status=$?
21526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21527 (exit $ac_status); }; }; then
21528 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021529else
Martin v. Löwis11437992002-04-12 09:54:03 +000021530 echo "$as_me: program exited with status $ac_status" >&5
21531echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021532sed 's/^/| /' conftest.$ac_ext >&5
21533
Martin v. Löwis11437992002-04-12 09:54:03 +000021534( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021535if test "$ac_cv_type_wchar_t" = yes; then
21536 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021537See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021538echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021539See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021540 { (exit 77); exit 77; }; }
21541 else
21542 ac_cv_sizeof_wchar_t=0
21543 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021545rm -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 +000021546fi
21547rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021549{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21550echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21551
21552
21553
Martin v. Löwis11437992002-04-12 09:54:03 +000021554cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021555#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021556_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021557
Michael W. Hudson54241132001-12-07 15:38:26 +000021558
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021559fi
21560
Martin v. Löwiseba40652007-08-30 20:10:57 +000021561{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21562echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021563have_ucs4_tcl=no
21564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021565/* confdefs.h. */
21566_ACEOF
21567cat confdefs.h >>conftest.$ac_ext
21568cat >>conftest.$ac_ext <<_ACEOF
21569/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021570
21571#include <tcl.h>
21572#if TCL_UTF_MAX != 6
21573# error "NOT UCS4_TCL"
21574#endif
21575int
21576main ()
21577{
21578
21579 ;
21580 return 0;
21581}
21582_ACEOF
21583rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021584if { (ac_try="$ac_compile"
21585case "(($ac_try" in
21586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21587 *) ac_try_echo=$ac_try;;
21588esac
21589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021592 grep -v '^ *+' conftest.er1 >conftest.err
21593 rm -f conftest.er1
21594 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021596 (exit $ac_status); } && {
21597 test -z "$ac_c_werror_flag" ||
21598 test ! -s conftest.err
21599 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021600
21601
21602cat >>confdefs.h <<\_ACEOF
21603#define HAVE_UCS4_TCL 1
21604_ACEOF
21605
21606 have_ucs4_tcl=yes
21607
21608else
21609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021610sed 's/^/| /' conftest.$ac_ext >&5
21611
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021614
21615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21616{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21617echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021618
Skip Montanaro6dead952003-09-25 14:50:04 +000021619# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021620if test "$wchar_h" = yes
21621then
21622 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021623 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21624echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021625 if test "${ac_cv_wchar_t_signed+set}" = set; then
21626 echo $ECHO_N "(cached) $ECHO_C" >&6
21627else
21628
21629 if test "$cross_compiling" = yes; then
21630 ac_cv_wchar_t_signed=yes
21631else
21632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021633/* confdefs.h. */
21634_ACEOF
21635cat confdefs.h >>conftest.$ac_ext
21636cat >>conftest.$ac_ext <<_ACEOF
21637/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021638
21639 #include <wchar.h>
21640 int main()
21641 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021642 /* Success: exit code 0 */
21643 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021644 }
21645
21646_ACEOF
21647rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021648if { (ac_try="$ac_link"
21649case "(($ac_try" in
21650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21651 *) ac_try_echo=$ac_try;;
21652esac
21653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21654 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021655 ac_status=$?
21656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21657 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021658 { (case "(($ac_try" in
21659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21660 *) ac_try_echo=$ac_try;;
21661esac
21662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21663 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021664 ac_status=$?
21665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21666 (exit $ac_status); }; }; then
21667 ac_cv_wchar_t_signed=yes
21668else
21669 echo "$as_me: program exited with status $ac_status" >&5
21670echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021671sed 's/^/| /' conftest.$ac_ext >&5
21672
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021673( exit $ac_status )
21674ac_cv_wchar_t_signed=no
21675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021676rm -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 +000021677fi
21678
Martin v. Löwiseba40652007-08-30 20:10:57 +000021679
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021680fi
21681
Martin v. Löwiseba40652007-08-30 20:10:57 +000021682 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21683echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21684fi
21685
21686{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21687echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21688# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021689if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021690 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021691else
21692 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021693fi
21694
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021695
21696if test $enable_unicode = yes
21697then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021698 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021699 case "$have_ucs4_tcl" in
21700 yes) enable_unicode="ucs4"
21701 ;;
21702 *) enable_unicode="ucs2"
21703 ;;
21704 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021705fi
21706
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021707
21708
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021709case "$enable_unicode" in
21710ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021711 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021712#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021713_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021714
21715 ;;
21716ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021717 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021718#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021719_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021720
21721 ;;
21722esac
21723
Michael W. Hudson54241132001-12-07 15:38:26 +000021724
Martin v. Löwis11437992002-04-12 09:54:03 +000021725
21726
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021727
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021728if test "$enable_unicode" = "no"
21729then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021730 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021731 { echo "$as_me:$LINENO: result: not used" >&5
21732echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021733else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021734 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021735
21736cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021737#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021738_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021739
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021740
21741 # wchar_t is only usable if it maps to an unsigned type
21742 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021743 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021744 then
21745 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021746
Martin v. Löwis11437992002-04-12 09:54:03 +000021747cat >>confdefs.h <<\_ACEOF
21748#define HAVE_USABLE_WCHAR_T 1
21749_ACEOF
21750
21751 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021752#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021753_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021754
21755 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21756 then
21757 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021758 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021759#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021760_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021761
21762 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21763 then
21764 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021765 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021766#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021767_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021768
21769 else
21770 PY_UNICODE_TYPE="no type found"
21771 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021772 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21773echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021774fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021775
21776# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021777{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21778echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021779if test "${ac_cv_c_bigendian+set}" = set; then
21780 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021781else
Martin v. Löwis11437992002-04-12 09:54:03 +000021782 # See if sys/param.h defines the BYTE_ORDER macro.
21783cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021784/* confdefs.h. */
21785_ACEOF
21786cat confdefs.h >>conftest.$ac_ext
21787cat >>conftest.$ac_ext <<_ACEOF
21788/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021789#include <sys/types.h>
21790#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021791
Martin v. Löwis11437992002-04-12 09:54:03 +000021792int
21793main ()
21794{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021795#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21796 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021797 bogus endian macros
21798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021799
21800 ;
21801 return 0;
21802}
21803_ACEOF
21804rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021805if { (ac_try="$ac_compile"
21806case "(($ac_try" in
21807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21808 *) ac_try_echo=$ac_try;;
21809esac
21810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021813 grep -v '^ *+' conftest.er1 >conftest.err
21814 rm -f conftest.er1
21815 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021817 (exit $ac_status); } && {
21818 test -z "$ac_c_werror_flag" ||
21819 test ! -s conftest.err
21820 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021821 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000021822cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021823/* confdefs.h. */
21824_ACEOF
21825cat confdefs.h >>conftest.$ac_ext
21826cat >>conftest.$ac_ext <<_ACEOF
21827/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021828#include <sys/types.h>
21829#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021830
Martin v. Löwis11437992002-04-12 09:54:03 +000021831int
21832main ()
21833{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021834#if BYTE_ORDER != BIG_ENDIAN
21835 not big endian
21836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021837
21838 ;
21839 return 0;
21840}
21841_ACEOF
21842rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021843if { (ac_try="$ac_compile"
21844case "(($ac_try" in
21845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21846 *) ac_try_echo=$ac_try;;
21847esac
21848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021851 grep -v '^ *+' conftest.er1 >conftest.err
21852 rm -f conftest.er1
21853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021855 (exit $ac_status); } && {
21856 test -z "$ac_c_werror_flag" ||
21857 test ! -s conftest.err
21858 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021859 ac_cv_c_bigendian=yes
21860else
Martin v. Löwis11437992002-04-12 09:54:03 +000021861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021862sed 's/^/| /' conftest.$ac_ext >&5
21863
Martin v. Löwiseba40652007-08-30 20:10:57 +000021864 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021866
21867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000021868else
Martin v. Löwis11437992002-04-12 09:54:03 +000021869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021870sed 's/^/| /' conftest.$ac_ext >&5
21871
Martin v. Löwiseba40652007-08-30 20:10:57 +000021872 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000021873if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021874 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000021875 ac_cv_c_bigendian=unknown
21876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021877/* confdefs.h. */
21878_ACEOF
21879cat confdefs.h >>conftest.$ac_ext
21880cat >>conftest.$ac_ext <<_ACEOF
21881/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021882short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
21883short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021884void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021885short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
21886short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021887void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021888int
21889main ()
21890{
21891 _ascii (); _ebcdic ();
21892 ;
21893 return 0;
21894}
21895_ACEOF
21896rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021897if { (ac_try="$ac_compile"
21898case "(($ac_try" in
21899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21900 *) ac_try_echo=$ac_try;;
21901esac
21902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021905 grep -v '^ *+' conftest.er1 >conftest.err
21906 rm -f conftest.er1
21907 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021909 (exit $ac_status); } && {
21910 test -z "$ac_c_werror_flag" ||
21911 test ! -s conftest.err
21912 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021913 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021914 ac_cv_c_bigendian=yes
21915fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021916if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021917 if test "$ac_cv_c_bigendian" = unknown; then
21918 ac_cv_c_bigendian=no
21919 else
21920 # finding both strings is unlikely to happen, but who knows?
21921 ac_cv_c_bigendian=unknown
21922 fi
21923fi
21924else
21925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021926sed 's/^/| /' conftest.$ac_ext >&5
21927
Martin v. Löwiseba40652007-08-30 20:10:57 +000021928
Martin v. Löwis11437992002-04-12 09:54:03 +000021929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021930
21931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021932else
21933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021934/* confdefs.h. */
21935_ACEOF
21936cat confdefs.h >>conftest.$ac_ext
21937cat >>conftest.$ac_ext <<_ACEOF
21938/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021939$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021940int
21941main ()
21942{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021943
Guido van Rossumef2255b2000-03-10 22:30:29 +000021944 /* Are we little or big endian? From Harbison&Steele. */
21945 union
21946 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021947 long int l;
21948 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000021949 } u;
21950 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021951 return u.c[sizeof (long int) - 1] == 1;
21952
21953 ;
21954 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021955}
Martin v. Löwis11437992002-04-12 09:54:03 +000021956_ACEOF
21957rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021958if { (ac_try="$ac_link"
21959case "(($ac_try" in
21960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21961 *) ac_try_echo=$ac_try;;
21962esac
21963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21964 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021965 ac_status=$?
21966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21967 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021968 { (case "(($ac_try" in
21969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21970 *) ac_try_echo=$ac_try;;
21971esac
21972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21973 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021974 ac_status=$?
21975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21976 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021977 ac_cv_c_bigendian=no
21978else
Martin v. Löwis11437992002-04-12 09:54:03 +000021979 echo "$as_me: program exited with status $ac_status" >&5
21980echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021981sed 's/^/| /' conftest.$ac_ext >&5
21982
Martin v. Löwis11437992002-04-12 09:54:03 +000021983( exit $ac_status )
21984ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000021985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021986rm -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 +000021987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021988
21989
Martin v. Löwis11437992002-04-12 09:54:03 +000021990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021991
21992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021994{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
21995echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021996case $ac_cv_c_bigendian in
21997 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000021998
Martin v. Löwis11437992002-04-12 09:54:03 +000021999cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022000#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022001_ACEOF
22002 ;;
22003 no)
22004 ;;
22005 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022006 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022007presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022008echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022009presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22010 { (exit 1); exit 1; }; } ;;
22011esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022012
Michael W. Hudson54241132001-12-07 15:38:26 +000022013
Ronald Oussoren988117f2006-04-29 11:31:35 +000022014
22015
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022016# Check whether right shifting a negative integer extends the sign bit
22017# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022018{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22019echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022020if test "${ac_cv_rshift_extends_sign+set}" = set; then
22021 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022022else
Martin v. Löwis11437992002-04-12 09:54:03 +000022023
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022024if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022025 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022026else
Martin v. Löwis11437992002-04-12 09:54:03 +000022027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022028/* confdefs.h. */
22029_ACEOF
22030cat confdefs.h >>conftest.$ac_ext
22031cat >>conftest.$ac_ext <<_ACEOF
22032/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022033
22034int main()
22035{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022036 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022037}
22038
Martin v. Löwis11437992002-04-12 09:54:03 +000022039_ACEOF
22040rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022041if { (ac_try="$ac_link"
22042case "(($ac_try" in
22043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22044 *) ac_try_echo=$ac_try;;
22045esac
22046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22047 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022048 ac_status=$?
22049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22050 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022051 { (case "(($ac_try" in
22052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22053 *) ac_try_echo=$ac_try;;
22054esac
22055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22056 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022057 ac_status=$?
22058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22059 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022060 ac_cv_rshift_extends_sign=yes
22061else
Martin v. Löwis11437992002-04-12 09:54:03 +000022062 echo "$as_me: program exited with status $ac_status" >&5
22063echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022064sed 's/^/| /' conftest.$ac_ext >&5
22065
Martin v. Löwis11437992002-04-12 09:54:03 +000022066( exit $ac_status )
22067ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022069rm -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 +000022070fi
22071
Martin v. Löwiseba40652007-08-30 20:10:57 +000022072
22073fi
22074
22075{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22076echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022077if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022078then
Martin v. Löwis11437992002-04-12 09:54:03 +000022079
22080cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022081#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022082_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022083
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022084fi
22085
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022086# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022087{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22088echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022089if test "${ac_cv_have_getc_unlocked+set}" = set; then
22090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022091else
Martin v. Löwis11437992002-04-12 09:54:03 +000022092
22093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022094/* confdefs.h. */
22095_ACEOF
22096cat confdefs.h >>conftest.$ac_ext
22097cat >>conftest.$ac_ext <<_ACEOF
22098/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022099#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022100int
22101main ()
22102{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022103
22104 FILE *f = fopen("/dev/null", "r");
22105 flockfile(f);
22106 getc_unlocked(f);
22107 funlockfile(f);
22108
Martin v. Löwis11437992002-04-12 09:54:03 +000022109 ;
22110 return 0;
22111}
22112_ACEOF
22113rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022114if { (ac_try="$ac_link"
22115case "(($ac_try" in
22116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22117 *) ac_try_echo=$ac_try;;
22118esac
22119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22120 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022122 grep -v '^ *+' conftest.er1 >conftest.err
22123 rm -f conftest.er1
22124 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022126 (exit $ac_status); } && {
22127 test -z "$ac_c_werror_flag" ||
22128 test ! -s conftest.err
22129 } && test -s conftest$ac_exeext &&
22130 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022131 ac_cv_have_getc_unlocked=yes
22132else
Martin v. Löwis11437992002-04-12 09:54:03 +000022133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022134sed 's/^/| /' conftest.$ac_ext >&5
22135
Martin v. Löwiseba40652007-08-30 20:10:57 +000022136 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022138
22139rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022140 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022141fi
22142
Martin v. Löwiseba40652007-08-30 20:10:57 +000022143{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22144echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022145if test "$ac_cv_have_getc_unlocked" = yes
22146then
Martin v. Löwis11437992002-04-12 09:54:03 +000022147
22148cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022149#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022150_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022151
22152fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022153
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022154# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022155# save the value of LIBS so we don't actually link Python with readline
22156LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022157
Martin v. Löwiseba40652007-08-30 20:10:57 +000022158{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22159echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022160if test "${ac_cv_lib_readline_readline+set}" = set; then
22161 echo $ECHO_N "(cached) $ECHO_C" >&6
22162else
22163 ac_check_lib_save_LIBS=$LIBS
22164LIBS="-lreadline $LIBS"
22165cat >conftest.$ac_ext <<_ACEOF
22166/* confdefs.h. */
22167_ACEOF
22168cat confdefs.h >>conftest.$ac_ext
22169cat >>conftest.$ac_ext <<_ACEOF
22170/* end confdefs.h. */
22171
Martin v. Löwiseba40652007-08-30 20:10:57 +000022172/* Override any GCC internal prototype to avoid an error.
22173 Use char because int might match the return type of a GCC
22174 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022175#ifdef __cplusplus
22176extern "C"
22177#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022178char readline ();
22179int
22180main ()
22181{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022182return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022183 ;
22184 return 0;
22185}
22186_ACEOF
22187rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022188if { (ac_try="$ac_link"
22189case "(($ac_try" in
22190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22191 *) ac_try_echo=$ac_try;;
22192esac
22193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22194 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022195 ac_status=$?
22196 grep -v '^ *+' conftest.er1 >conftest.err
22197 rm -f conftest.er1
22198 cat conftest.err >&5
22199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022200 (exit $ac_status); } && {
22201 test -z "$ac_c_werror_flag" ||
22202 test ! -s conftest.err
22203 } && test -s conftest$ac_exeext &&
22204 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022205 ac_cv_lib_readline_readline=yes
22206else
22207 echo "$as_me: failed program was:" >&5
22208sed 's/^/| /' conftest.$ac_ext >&5
22209
Martin v. Löwiseba40652007-08-30 20:10:57 +000022210 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022212
22213rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022214 conftest$ac_exeext conftest.$ac_ext
22215LIBS=$ac_check_lib_save_LIBS
22216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022217{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22218echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022219if test $ac_cv_lib_readline_readline = yes; then
22220 cat >>confdefs.h <<_ACEOF
22221#define HAVE_LIBREADLINE 1
22222_ACEOF
22223
22224 LIBS="-lreadline $LIBS"
22225
22226fi
22227
22228if test "$ac_cv_have_readline_readline" = no
22229then
22230
Martin v. Löwiseba40652007-08-30 20:10:57 +000022231{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22232echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022233if test "${ac_cv_lib_termcap_readline+set}" = set; then
22234 echo $ECHO_N "(cached) $ECHO_C" >&6
22235else
22236 ac_check_lib_save_LIBS=$LIBS
22237LIBS="-ltermcap $LIBS"
22238cat >conftest.$ac_ext <<_ACEOF
22239/* confdefs.h. */
22240_ACEOF
22241cat confdefs.h >>conftest.$ac_ext
22242cat >>conftest.$ac_ext <<_ACEOF
22243/* end confdefs.h. */
22244
Martin v. Löwiseba40652007-08-30 20:10:57 +000022245/* Override any GCC internal prototype to avoid an error.
22246 Use char because int might match the return type of a GCC
22247 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022248#ifdef __cplusplus
22249extern "C"
22250#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022251char readline ();
22252int
22253main ()
22254{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022255return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022256 ;
22257 return 0;
22258}
22259_ACEOF
22260rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022261if { (ac_try="$ac_link"
22262case "(($ac_try" in
22263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22264 *) ac_try_echo=$ac_try;;
22265esac
22266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22267 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022268 ac_status=$?
22269 grep -v '^ *+' conftest.er1 >conftest.err
22270 rm -f conftest.er1
22271 cat conftest.err >&5
22272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022273 (exit $ac_status); } && {
22274 test -z "$ac_c_werror_flag" ||
22275 test ! -s conftest.err
22276 } && test -s conftest$ac_exeext &&
22277 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022278 ac_cv_lib_termcap_readline=yes
22279else
22280 echo "$as_me: failed program was:" >&5
22281sed 's/^/| /' conftest.$ac_ext >&5
22282
Martin v. Löwiseba40652007-08-30 20:10:57 +000022283 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022285
22286rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022287 conftest$ac_exeext conftest.$ac_ext
22288LIBS=$ac_check_lib_save_LIBS
22289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022290{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22291echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022292if test $ac_cv_lib_termcap_readline = yes; then
22293 cat >>confdefs.h <<_ACEOF
22294#define HAVE_LIBTERMCAP 1
22295_ACEOF
22296
22297 LIBS="-ltermcap $LIBS"
22298
22299fi
22300
22301fi
22302
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022303# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022304{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22305echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022306if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22307 echo $ECHO_N "(cached) $ECHO_C" >&6
22308else
22309 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022310LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022311cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022312/* confdefs.h. */
22313_ACEOF
22314cat confdefs.h >>conftest.$ac_ext
22315cat >>conftest.$ac_ext <<_ACEOF
22316/* end confdefs.h. */
22317
Martin v. Löwiseba40652007-08-30 20:10:57 +000022318/* Override any GCC internal prototype to avoid an error.
22319 Use char because int might match the return type of a GCC
22320 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022321#ifdef __cplusplus
22322extern "C"
22323#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022324char rl_callback_handler_install ();
22325int
22326main ()
22327{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022328return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022329 ;
22330 return 0;
22331}
22332_ACEOF
22333rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022334if { (ac_try="$ac_link"
22335case "(($ac_try" in
22336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22337 *) ac_try_echo=$ac_try;;
22338esac
22339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22340 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022342 grep -v '^ *+' conftest.er1 >conftest.err
22343 rm -f conftest.er1
22344 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022346 (exit $ac_status); } && {
22347 test -z "$ac_c_werror_flag" ||
22348 test ! -s conftest.err
22349 } && test -s conftest$ac_exeext &&
22350 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022351 ac_cv_lib_readline_rl_callback_handler_install=yes
22352else
22353 echo "$as_me: failed program was:" >&5
22354sed 's/^/| /' conftest.$ac_ext >&5
22355
Martin v. Löwiseba40652007-08-30 20:10:57 +000022356 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022358
22359rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022360 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022361LIBS=$ac_check_lib_save_LIBS
22362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022363{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22364echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022365if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22366
22367cat >>confdefs.h <<\_ACEOF
22368#define HAVE_RL_CALLBACK 1
22369_ACEOF
22370
22371fi
22372
22373
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022374# check for readline 2.2
22375cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022376/* confdefs.h. */
22377_ACEOF
22378cat confdefs.h >>conftest.$ac_ext
22379cat >>conftest.$ac_ext <<_ACEOF
22380/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022381#include <readline/readline.h>
22382_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022383if { (ac_try="$ac_cpp conftest.$ac_ext"
22384case "(($ac_try" in
22385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22386 *) ac_try_echo=$ac_try;;
22387esac
22388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22389 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022390 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022391 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022392 rm -f conftest.er1
22393 cat conftest.err >&5
22394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022395 (exit $ac_status); } >/dev/null && {
22396 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22397 test ! -s conftest.err
22398 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022399 have_readline=yes
22400else
22401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022402sed 's/^/| /' conftest.$ac_ext >&5
22403
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022404 have_readline=no
22405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022406
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022407rm -f conftest.err conftest.$ac_ext
22408if test $have_readline = yes
22409then
22410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022411/* confdefs.h. */
22412_ACEOF
22413cat confdefs.h >>conftest.$ac_ext
22414cat >>conftest.$ac_ext <<_ACEOF
22415/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022416#include <readline/readline.h>
22417
22418_ACEOF
22419if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022420 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022421
22422cat >>confdefs.h <<\_ACEOF
22423#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22424_ACEOF
22425
22426fi
22427rm -f conftest*
22428
22429fi
22430
Martin v. Löwis0daad592001-09-30 21:09:59 +000022431# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022432{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22433echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022434if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22435 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022436else
Martin v. Löwis11437992002-04-12 09:54:03 +000022437 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022438LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022439cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022440/* confdefs.h. */
22441_ACEOF
22442cat confdefs.h >>conftest.$ac_ext
22443cat >>conftest.$ac_ext <<_ACEOF
22444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022445
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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022449#ifdef __cplusplus
22450extern "C"
22451#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022452char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022453int
22454main ()
22455{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022456return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +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
Martin v. Löwis11437992002-04-12 09:54:03 +000022469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022470 grep -v '^ *+' conftest.er1 >conftest.err
22471 rm -f conftest.er1
22472 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022473 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
Martin v. Löwis11437992002-04-12 09:54:03 +000022479 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022480else
Martin v. Löwis11437992002-04-12 09:54:03 +000022481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022482sed 's/^/| /' conftest.$ac_ext >&5
22483
Martin v. Löwiseba40652007-08-30 20:10:57 +000022484 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022486
22487rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022488 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022489LIBS=$ac_check_lib_save_LIBS
22490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022491{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22492echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022493if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022494
Martin v. Löwis11437992002-04-12 09:54:03 +000022495cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022496#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022497_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022498
Martin v. Löwis0daad592001-09-30 21:09:59 +000022499fi
22500
Michael W. Hudson54241132001-12-07 15:38:26 +000022501
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022502# also in 4.0
22503{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22504echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22505if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22506 echo $ECHO_N "(cached) $ECHO_C" >&6
22507else
22508 ac_check_lib_save_LIBS=$LIBS
22509LIBS="-lreadline $LIBS"
22510cat >conftest.$ac_ext <<_ACEOF
22511/* confdefs.h. */
22512_ACEOF
22513cat confdefs.h >>conftest.$ac_ext
22514cat >>conftest.$ac_ext <<_ACEOF
22515/* end confdefs.h. */
22516
22517/* Override any GCC internal prototype to avoid an error.
22518 Use char because int might match the return type of a GCC
22519 builtin and then its argument prototype would still apply. */
22520#ifdef __cplusplus
22521extern "C"
22522#endif
22523char rl_completion_display_matches_hook ();
22524int
22525main ()
22526{
22527return rl_completion_display_matches_hook ();
22528 ;
22529 return 0;
22530}
22531_ACEOF
22532rm -f conftest.$ac_objext conftest$ac_exeext
22533if { (ac_try="$ac_link"
22534case "(($ac_try" in
22535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22536 *) ac_try_echo=$ac_try;;
22537esac
22538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22539 (eval "$ac_link") 2>conftest.er1
22540 ac_status=$?
22541 grep -v '^ *+' conftest.er1 >conftest.err
22542 rm -f conftest.er1
22543 cat conftest.err >&5
22544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22545 (exit $ac_status); } && {
22546 test -z "$ac_c_werror_flag" ||
22547 test ! -s conftest.err
22548 } && test -s conftest$ac_exeext &&
22549 $as_test_x conftest$ac_exeext; then
22550 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22551else
22552 echo "$as_me: failed program was:" >&5
22553sed 's/^/| /' conftest.$ac_ext >&5
22554
22555 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22556fi
22557
22558rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22559 conftest$ac_exeext conftest.$ac_ext
22560LIBS=$ac_check_lib_save_LIBS
22561fi
22562{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22563echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22564if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22565
22566cat >>confdefs.h <<\_ACEOF
22567#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22568_ACEOF
22569
22570fi
22571
22572
Martin v. Löwis0daad592001-09-30 21:09:59 +000022573# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022574{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22575echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022576if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22577 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022578else
Martin v. Löwis11437992002-04-12 09:54:03 +000022579 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022580LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022581cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022582/* confdefs.h. */
22583_ACEOF
22584cat confdefs.h >>conftest.$ac_ext
22585cat >>conftest.$ac_ext <<_ACEOF
22586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022587
Martin v. Löwiseba40652007-08-30 20:10:57 +000022588/* Override any GCC internal prototype to avoid an error.
22589 Use char because int might match the return type of a GCC
22590 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022591#ifdef __cplusplus
22592extern "C"
22593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022594char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022595int
22596main ()
22597{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022598return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022599 ;
22600 return 0;
22601}
22602_ACEOF
22603rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022604if { (ac_try="$ac_link"
22605case "(($ac_try" in
22606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22607 *) ac_try_echo=$ac_try;;
22608esac
22609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22610 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022612 grep -v '^ *+' conftest.er1 >conftest.err
22613 rm -f conftest.er1
22614 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022616 (exit $ac_status); } && {
22617 test -z "$ac_c_werror_flag" ||
22618 test ! -s conftest.err
22619 } && test -s conftest$ac_exeext &&
22620 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022621 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022622else
Martin v. Löwis11437992002-04-12 09:54:03 +000022623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022624sed 's/^/| /' conftest.$ac_ext >&5
22625
Martin v. Löwiseba40652007-08-30 20:10:57 +000022626 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022628
22629rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022630 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022631LIBS=$ac_check_lib_save_LIBS
22632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022633{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22634echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022635if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022636
Martin v. Löwis11437992002-04-12 09:54:03 +000022637cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022638#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022639_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022640
Guido van Rossum353ae582001-07-10 16:45:32 +000022641fi
22642
Jack Jansendd19cf82001-12-06 22:36:17 +000022643
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022644# also in readline 4.2
22645cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022646/* confdefs.h. */
22647_ACEOF
22648cat confdefs.h >>conftest.$ac_ext
22649cat >>conftest.$ac_ext <<_ACEOF
22650/* end confdefs.h. */
22651#include <readline/readline.h>
22652_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022653if { (ac_try="$ac_cpp conftest.$ac_ext"
22654case "(($ac_try" in
22655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22656 *) ac_try_echo=$ac_try;;
22657esac
22658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22659 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022660 ac_status=$?
22661 grep -v '^ *+' conftest.er1 >conftest.err
22662 rm -f conftest.er1
22663 cat conftest.err >&5
22664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022665 (exit $ac_status); } >/dev/null && {
22666 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22667 test ! -s conftest.err
22668 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022669 have_readline=yes
22670else
22671 echo "$as_me: failed program was:" >&5
22672sed 's/^/| /' conftest.$ac_ext >&5
22673
22674 have_readline=no
22675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022676
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022677rm -f conftest.err conftest.$ac_ext
22678if test $have_readline = yes
22679then
22680 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022681/* confdefs.h. */
22682_ACEOF
22683cat confdefs.h >>conftest.$ac_ext
22684cat >>conftest.$ac_ext <<_ACEOF
22685/* end confdefs.h. */
22686#include <readline/readline.h>
22687
22688_ACEOF
22689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22690 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22691
22692cat >>confdefs.h <<\_ACEOF
22693#define HAVE_RL_CATCH_SIGNAL 1
22694_ACEOF
22695
22696fi
22697rm -f conftest*
22698
22699fi
22700
Martin v. Löwis82bca632006-02-10 20:49:30 +000022701# End of readline checks: restore LIBS
22702LIBS=$LIBS_no_readline
22703
Martin v. Löwiseba40652007-08-30 20:10:57 +000022704{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22705echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022706if test "${ac_cv_broken_nice+set}" = set; then
22707 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022708else
Martin v. Löwis11437992002-04-12 09:54:03 +000022709
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022710if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022711 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022712else
Martin v. Löwis11437992002-04-12 09:54:03 +000022713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022714/* confdefs.h. */
22715_ACEOF
22716cat confdefs.h >>conftest.$ac_ext
22717cat >>conftest.$ac_ext <<_ACEOF
22718/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022719
22720int main()
22721{
22722 int val1 = nice(1);
22723 if (val1 != -1 && val1 == nice(2))
22724 exit(0);
22725 exit(1);
22726}
22727
Martin v. Löwis11437992002-04-12 09:54:03 +000022728_ACEOF
22729rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022730if { (ac_try="$ac_link"
22731case "(($ac_try" in
22732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22733 *) ac_try_echo=$ac_try;;
22734esac
22735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22736 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022737 ac_status=$?
22738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22739 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022740 { (case "(($ac_try" in
22741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22742 *) ac_try_echo=$ac_try;;
22743esac
22744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22745 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022746 ac_status=$?
22747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22748 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022749 ac_cv_broken_nice=yes
22750else
Martin v. Löwis11437992002-04-12 09:54:03 +000022751 echo "$as_me: program exited with status $ac_status" >&5
22752echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022753sed 's/^/| /' conftest.$ac_ext >&5
22754
Martin v. Löwis11437992002-04-12 09:54:03 +000022755( exit $ac_status )
22756ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022758rm -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 +000022759fi
22760
Martin v. Löwiseba40652007-08-30 20:10:57 +000022761
22762fi
22763
22764{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22765echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022766if test "$ac_cv_broken_nice" = yes
22767then
Martin v. Löwis11437992002-04-12 09:54:03 +000022768
22769cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022770#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022771_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022772
22773fi
22774
Martin v. Löwiseba40652007-08-30 20:10:57 +000022775{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22776echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022777if test "$cross_compiling" = yes; then
22778 ac_cv_broken_poll=no
22779else
22780 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022781/* confdefs.h. */
22782_ACEOF
22783cat confdefs.h >>conftest.$ac_ext
22784cat >>conftest.$ac_ext <<_ACEOF
22785/* end confdefs.h. */
22786
22787#include <poll.h>
22788
22789int main (void)
22790 {
22791 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22792
22793 close (42);
22794
22795 int poll_test = poll (&poll_struct, 1, 0);
22796
22797 if (poll_test < 0)
22798 {
22799 exit(0);
22800 }
22801 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22802 {
22803 exit(0);
22804 }
22805 else
22806 {
22807 exit(1);
22808 }
22809 }
22810
22811_ACEOF
22812rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022813if { (ac_try="$ac_link"
22814case "(($ac_try" in
22815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22816 *) ac_try_echo=$ac_try;;
22817esac
22818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22819 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022820 ac_status=$?
22821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22822 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022823 { (case "(($ac_try" in
22824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22825 *) ac_try_echo=$ac_try;;
22826esac
22827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22828 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022829 ac_status=$?
22830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22831 (exit $ac_status); }; }; then
22832 ac_cv_broken_poll=yes
22833else
22834 echo "$as_me: program exited with status $ac_status" >&5
22835echo "$as_me: failed program was:" >&5
22836sed 's/^/| /' conftest.$ac_ext >&5
22837
22838( exit $ac_status )
22839ac_cv_broken_poll=no
22840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022841rm -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 +000022842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022843
22844
22845{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
22846echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022847if test "$ac_cv_broken_poll" = yes
22848then
22849
22850cat >>confdefs.h <<\_ACEOF
22851#define HAVE_BROKEN_POLL 1
22852_ACEOF
22853
22854fi
22855
Brett Cannon43802422005-02-10 20:48:03 +000022856# 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 +000022857# (which is not required by ISO C or UNIX spec) and/or if we support
22858# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000022859{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
22860echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022861if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
22862 echo $ECHO_N "(cached) $ECHO_C" >&6
22863else
22864 cat >conftest.$ac_ext <<_ACEOF
22865/* confdefs.h. */
22866_ACEOF
22867cat confdefs.h >>conftest.$ac_ext
22868cat >>conftest.$ac_ext <<_ACEOF
22869/* end confdefs.h. */
22870#include <sys/types.h>
22871#include <$ac_cv_struct_tm>
22872
22873
22874int
22875main ()
22876{
22877static struct tm ac_aggr;
22878if (ac_aggr.tm_zone)
22879return 0;
22880 ;
22881 return 0;
22882}
22883_ACEOF
22884rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022885if { (ac_try="$ac_compile"
22886case "(($ac_try" in
22887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22888 *) ac_try_echo=$ac_try;;
22889esac
22890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22891 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022892 ac_status=$?
22893 grep -v '^ *+' conftest.er1 >conftest.err
22894 rm -f conftest.er1
22895 cat conftest.err >&5
22896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022897 (exit $ac_status); } && {
22898 test -z "$ac_c_werror_flag" ||
22899 test ! -s conftest.err
22900 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022901 ac_cv_member_struct_tm_tm_zone=yes
22902else
22903 echo "$as_me: failed program was:" >&5
22904sed 's/^/| /' conftest.$ac_ext >&5
22905
Martin v. Löwiseba40652007-08-30 20:10:57 +000022906 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000022907/* confdefs.h. */
22908_ACEOF
22909cat confdefs.h >>conftest.$ac_ext
22910cat >>conftest.$ac_ext <<_ACEOF
22911/* end confdefs.h. */
22912#include <sys/types.h>
22913#include <$ac_cv_struct_tm>
22914
22915
22916int
22917main ()
22918{
22919static struct tm ac_aggr;
22920if (sizeof ac_aggr.tm_zone)
22921return 0;
22922 ;
22923 return 0;
22924}
22925_ACEOF
22926rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022927if { (ac_try="$ac_compile"
22928case "(($ac_try" in
22929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22930 *) ac_try_echo=$ac_try;;
22931esac
22932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22933 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022934 ac_status=$?
22935 grep -v '^ *+' conftest.er1 >conftest.err
22936 rm -f conftest.er1
22937 cat conftest.err >&5
22938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022939 (exit $ac_status); } && {
22940 test -z "$ac_c_werror_flag" ||
22941 test ! -s conftest.err
22942 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022943 ac_cv_member_struct_tm_tm_zone=yes
22944else
22945 echo "$as_me: failed program was:" >&5
22946sed 's/^/| /' conftest.$ac_ext >&5
22947
Martin v. Löwiseba40652007-08-30 20:10:57 +000022948 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000022949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022950
22951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022953
22954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022956{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
22957echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022958if test $ac_cv_member_struct_tm_tm_zone = yes; then
22959
22960cat >>confdefs.h <<_ACEOF
22961#define HAVE_STRUCT_TM_TM_ZONE 1
22962_ACEOF
22963
22964
22965fi
22966
22967if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
22968
22969cat >>confdefs.h <<\_ACEOF
22970#define HAVE_TM_ZONE 1
22971_ACEOF
22972
22973else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022974 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
22975echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
22976if test "${ac_cv_have_decl_tzname+set}" = set; then
22977 echo $ECHO_N "(cached) $ECHO_C" >&6
22978else
22979 cat >conftest.$ac_ext <<_ACEOF
22980/* confdefs.h. */
22981_ACEOF
22982cat confdefs.h >>conftest.$ac_ext
22983cat >>conftest.$ac_ext <<_ACEOF
22984/* end confdefs.h. */
22985#include <time.h>
22986
22987int
22988main ()
22989{
22990#ifndef tzname
22991 (void) tzname;
22992#endif
22993
22994 ;
22995 return 0;
22996}
22997_ACEOF
22998rm -f conftest.$ac_objext
22999if { (ac_try="$ac_compile"
23000case "(($ac_try" in
23001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23002 *) ac_try_echo=$ac_try;;
23003esac
23004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23005 (eval "$ac_compile") 2>conftest.er1
23006 ac_status=$?
23007 grep -v '^ *+' conftest.er1 >conftest.err
23008 rm -f conftest.er1
23009 cat conftest.err >&5
23010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23011 (exit $ac_status); } && {
23012 test -z "$ac_c_werror_flag" ||
23013 test ! -s conftest.err
23014 } && test -s conftest.$ac_objext; then
23015 ac_cv_have_decl_tzname=yes
23016else
23017 echo "$as_me: failed program was:" >&5
23018sed 's/^/| /' conftest.$ac_ext >&5
23019
23020 ac_cv_have_decl_tzname=no
23021fi
23022
23023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23024fi
23025{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23026echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23027if test $ac_cv_have_decl_tzname = yes; then
23028
23029cat >>confdefs.h <<_ACEOF
23030#define HAVE_DECL_TZNAME 1
23031_ACEOF
23032
23033
23034else
23035 cat >>confdefs.h <<_ACEOF
23036#define HAVE_DECL_TZNAME 0
23037_ACEOF
23038
23039
23040fi
23041
23042
23043 { echo "$as_me:$LINENO: checking for tzname" >&5
23044echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023045if test "${ac_cv_var_tzname+set}" = set; then
23046 echo $ECHO_N "(cached) $ECHO_C" >&6
23047else
23048 cat >conftest.$ac_ext <<_ACEOF
23049/* confdefs.h. */
23050_ACEOF
23051cat confdefs.h >>conftest.$ac_ext
23052cat >>conftest.$ac_ext <<_ACEOF
23053/* end confdefs.h. */
23054#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023055#if !HAVE_DECL_TZNAME
23056extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023057#endif
23058
23059int
23060main ()
23061{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023062return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023063 ;
23064 return 0;
23065}
23066_ACEOF
23067rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023068if { (ac_try="$ac_link"
23069case "(($ac_try" in
23070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23071 *) ac_try_echo=$ac_try;;
23072esac
23073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23074 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023075 ac_status=$?
23076 grep -v '^ *+' conftest.er1 >conftest.err
23077 rm -f conftest.er1
23078 cat conftest.err >&5
23079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023080 (exit $ac_status); } && {
23081 test -z "$ac_c_werror_flag" ||
23082 test ! -s conftest.err
23083 } && test -s conftest$ac_exeext &&
23084 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023085 ac_cv_var_tzname=yes
23086else
23087 echo "$as_me: failed program was:" >&5
23088sed 's/^/| /' conftest.$ac_ext >&5
23089
Martin v. Löwiseba40652007-08-30 20:10:57 +000023090 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023092
23093rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023094 conftest$ac_exeext conftest.$ac_ext
23095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023096{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23097echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023098 if test $ac_cv_var_tzname = yes; then
23099
23100cat >>confdefs.h <<\_ACEOF
23101#define HAVE_TZNAME 1
23102_ACEOF
23103
23104 fi
23105fi
23106
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023107
Martin v. Löwis1d459062005-03-14 21:23:33 +000023108# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023109{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23110echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023111if test "${ac_cv_working_tzset+set}" = set; then
23112 echo $ECHO_N "(cached) $ECHO_C" >&6
23113else
23114
23115if test "$cross_compiling" = yes; then
23116 ac_cv_working_tzset=no
23117else
23118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023119/* confdefs.h. */
23120_ACEOF
23121cat confdefs.h >>conftest.$ac_ext
23122cat >>conftest.$ac_ext <<_ACEOF
23123/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023124
23125#include <stdlib.h>
23126#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023127#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023128
23129#if HAVE_TZNAME
23130extern char *tzname[];
23131#endif
23132
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023133int main()
23134{
Brett Cannon18367812003-09-19 00:59:16 +000023135 /* Note that we need to ensure that not only does tzset(3)
23136 do 'something' with localtime, but it works as documented
23137 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023138 This includes making sure that tzname is set properly if
23139 tm->tm_zone does not exist since it is the alternative way
23140 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023141
23142 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023143 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023144 */
23145
Martin v. Löwis1d459062005-03-14 21:23:33 +000023146 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023147 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23148
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023149 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023150 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023151 if (localtime(&groundhogday)->tm_hour != 0)
23152 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023153#if HAVE_TZNAME
23154 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23155 if (strcmp(tzname[0], "UTC") ||
23156 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23157 exit(1);
23158#endif
Brett Cannon18367812003-09-19 00:59:16 +000023159
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023160 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023161 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023162 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023163 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023164#if HAVE_TZNAME
23165 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23166 exit(1);
23167#endif
Brett Cannon18367812003-09-19 00:59:16 +000023168
23169 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23170 tzset();
23171 if (localtime(&groundhogday)->tm_hour != 11)
23172 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023173#if HAVE_TZNAME
23174 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23175 exit(1);
23176#endif
23177
23178#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023179 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23180 exit(1);
23181 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23182 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023183#endif
Brett Cannon18367812003-09-19 00:59:16 +000023184
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023185 exit(0);
23186}
23187
23188_ACEOF
23189rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023190if { (ac_try="$ac_link"
23191case "(($ac_try" in
23192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23193 *) ac_try_echo=$ac_try;;
23194esac
23195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23196 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023197 ac_status=$?
23198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23199 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023200 { (case "(($ac_try" in
23201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23202 *) ac_try_echo=$ac_try;;
23203esac
23204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23205 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023206 ac_status=$?
23207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23208 (exit $ac_status); }; }; then
23209 ac_cv_working_tzset=yes
23210else
23211 echo "$as_me: program exited with status $ac_status" >&5
23212echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023213sed 's/^/| /' conftest.$ac_ext >&5
23214
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023215( exit $ac_status )
23216ac_cv_working_tzset=no
23217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023218rm -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 +000023219fi
23220
Martin v. Löwiseba40652007-08-30 20:10:57 +000023221
23222fi
23223
23224{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23225echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023226if test "$ac_cv_working_tzset" = yes
23227then
23228
23229cat >>confdefs.h <<\_ACEOF
23230#define HAVE_WORKING_TZSET 1
23231_ACEOF
23232
23233fi
23234
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023235# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023236{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23237echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023238if test "${ac_cv_stat_tv_nsec+set}" = set; then
23239 echo $ECHO_N "(cached) $ECHO_C" >&6
23240else
23241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023242/* confdefs.h. */
23243_ACEOF
23244cat confdefs.h >>conftest.$ac_ext
23245cat >>conftest.$ac_ext <<_ACEOF
23246/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023247#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023248int
23249main ()
23250{
23251
23252struct stat st;
23253st.st_mtim.tv_nsec = 1;
23254
23255 ;
23256 return 0;
23257}
23258_ACEOF
23259rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023260if { (ac_try="$ac_compile"
23261case "(($ac_try" in
23262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23263 *) ac_try_echo=$ac_try;;
23264esac
23265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023268 grep -v '^ *+' conftest.er1 >conftest.err
23269 rm -f conftest.er1
23270 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023272 (exit $ac_status); } && {
23273 test -z "$ac_c_werror_flag" ||
23274 test ! -s conftest.err
23275 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023276 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023277else
23278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023279sed 's/^/| /' conftest.$ac_ext >&5
23280
Martin v. Löwiseba40652007-08-30 20:10:57 +000023281 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023282fi
23283
Martin v. Löwiseba40652007-08-30 20:10:57 +000023284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23285fi
23286
23287{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23288echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023289if test "$ac_cv_stat_tv_nsec" = yes
23290then
23291
23292cat >>confdefs.h <<\_ACEOF
23293#define HAVE_STAT_TV_NSEC 1
23294_ACEOF
23295
23296fi
23297
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023298# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023299{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23300echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023301if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23302 echo $ECHO_N "(cached) $ECHO_C" >&6
23303else
23304 cat >conftest.$ac_ext <<_ACEOF
23305/* confdefs.h. */
23306_ACEOF
23307cat confdefs.h >>conftest.$ac_ext
23308cat >>conftest.$ac_ext <<_ACEOF
23309/* end confdefs.h. */
23310#include <sys/stat.h>
23311int
23312main ()
23313{
23314
23315struct stat st;
23316st.st_mtimespec.tv_nsec = 1;
23317
23318 ;
23319 return 0;
23320}
23321_ACEOF
23322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023323if { (ac_try="$ac_compile"
23324case "(($ac_try" in
23325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23326 *) ac_try_echo=$ac_try;;
23327esac
23328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023330 ac_status=$?
23331 grep -v '^ *+' conftest.er1 >conftest.err
23332 rm -f conftest.er1
23333 cat conftest.err >&5
23334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023335 (exit $ac_status); } && {
23336 test -z "$ac_c_werror_flag" ||
23337 test ! -s conftest.err
23338 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023339 ac_cv_stat_tv_nsec2=yes
23340else
23341 echo "$as_me: failed program was:" >&5
23342sed 's/^/| /' conftest.$ac_ext >&5
23343
Martin v. Löwiseba40652007-08-30 20:10:57 +000023344 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023345fi
23346
Martin v. Löwiseba40652007-08-30 20:10:57 +000023347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23348fi
23349
23350{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23351echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023352if test "$ac_cv_stat_tv_nsec2" = yes
23353then
23354
23355cat >>confdefs.h <<\_ACEOF
23356#define HAVE_STAT_TV_NSEC2 1
23357_ACEOF
23358
23359fi
23360
Jack Jansen666b1e72001-10-31 12:11:48 +000023361# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023362{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23363echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023364if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23365 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023366else
Martin v. Löwis11437992002-04-12 09:54:03 +000023367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023368/* confdefs.h. */
23369_ACEOF
23370cat confdefs.h >>conftest.$ac_ext
23371cat >>conftest.$ac_ext <<_ACEOF
23372/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023373#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023374int
23375main ()
23376{
Jack Jansen666b1e72001-10-31 12:11:48 +000023377
23378 int rtn;
23379 rtn = mvwdelch(0,0,0);
23380
Martin v. Löwis11437992002-04-12 09:54:03 +000023381 ;
23382 return 0;
23383}
23384_ACEOF
23385rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023386if { (ac_try="$ac_compile"
23387case "(($ac_try" in
23388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23389 *) ac_try_echo=$ac_try;;
23390esac
23391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023394 grep -v '^ *+' conftest.er1 >conftest.err
23395 rm -f conftest.er1
23396 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023398 (exit $ac_status); } && {
23399 test -z "$ac_c_werror_flag" ||
23400 test ! -s conftest.err
23401 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023402 ac_cv_mvwdelch_is_expression=yes
23403else
Martin v. Löwis11437992002-04-12 09:54:03 +000023404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023405sed 's/^/| /' conftest.$ac_ext >&5
23406
Martin v. Löwiseba40652007-08-30 20:10:57 +000023407 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023408fi
23409
Martin v. Löwiseba40652007-08-30 20:10:57 +000023410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23411fi
23412
23413{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23414echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023415
23416if test "$ac_cv_mvwdelch_is_expression" = yes
23417then
Martin v. Löwis11437992002-04-12 09:54:03 +000023418
23419cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023420#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023421_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023422
23423fi
23424
Martin v. Löwiseba40652007-08-30 20:10:57 +000023425{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23426echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023427if test "${ac_cv_window_has_flags+set}" = set; then
23428 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023429else
Martin v. Löwis11437992002-04-12 09:54:03 +000023430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023431/* confdefs.h. */
23432_ACEOF
23433cat confdefs.h >>conftest.$ac_ext
23434cat >>conftest.$ac_ext <<_ACEOF
23435/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023436#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023437int
23438main ()
23439{
Jack Jansen666b1e72001-10-31 12:11:48 +000023440
23441 WINDOW *w;
23442 w->_flags = 0;
23443
Martin v. Löwis11437992002-04-12 09:54:03 +000023444 ;
23445 return 0;
23446}
23447_ACEOF
23448rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023449if { (ac_try="$ac_compile"
23450case "(($ac_try" in
23451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23452 *) ac_try_echo=$ac_try;;
23453esac
23454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023457 grep -v '^ *+' conftest.er1 >conftest.err
23458 rm -f conftest.er1
23459 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023461 (exit $ac_status); } && {
23462 test -z "$ac_c_werror_flag" ||
23463 test ! -s conftest.err
23464 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023465 ac_cv_window_has_flags=yes
23466else
Martin v. Löwis11437992002-04-12 09:54:03 +000023467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023468sed 's/^/| /' conftest.$ac_ext >&5
23469
Martin v. Löwiseba40652007-08-30 20:10:57 +000023470 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023471fi
23472
Martin v. Löwiseba40652007-08-30 20:10:57 +000023473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23474fi
23475
23476{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23477echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023478
Jack Jansen666b1e72001-10-31 12:11:48 +000023479
23480if test "$ac_cv_window_has_flags" = yes
23481then
Martin v. Löwis11437992002-04-12 09:54:03 +000023482
23483cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023484#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023485_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023486
23487fi
23488
Martin v. Löwiseba40652007-08-30 20:10:57 +000023489{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23490echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023491cat >conftest.$ac_ext <<_ACEOF
23492/* confdefs.h. */
23493_ACEOF
23494cat confdefs.h >>conftest.$ac_ext
23495cat >>conftest.$ac_ext <<_ACEOF
23496/* end confdefs.h. */
23497#include <curses.h>
23498int
23499main ()
23500{
23501void *x=is_term_resized
23502 ;
23503 return 0;
23504}
23505_ACEOF
23506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023507if { (ac_try="$ac_compile"
23508case "(($ac_try" in
23509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23510 *) ac_try_echo=$ac_try;;
23511esac
23512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23513 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023514 ac_status=$?
23515 grep -v '^ *+' conftest.er1 >conftest.err
23516 rm -f conftest.er1
23517 cat conftest.err >&5
23518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023519 (exit $ac_status); } && {
23520 test -z "$ac_c_werror_flag" ||
23521 test ! -s conftest.err
23522 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023523
23524cat >>confdefs.h <<\_ACEOF
23525#define HAVE_CURSES_IS_TERM_RESIZED 1
23526_ACEOF
23527
Martin v. Löwiseba40652007-08-30 20:10:57 +000023528 { echo "$as_me:$LINENO: result: yes" >&5
23529echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023530else
23531 echo "$as_me: failed program was:" >&5
23532sed 's/^/| /' conftest.$ac_ext >&5
23533
Martin v. Löwiseba40652007-08-30 20:10:57 +000023534 { echo "$as_me:$LINENO: result: no" >&5
23535echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023536
23537fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023538
Martin v. Löwiseba40652007-08-30 20:10:57 +000023539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23540
23541{ echo "$as_me:$LINENO: checking for resize_term" >&5
23542echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023543cat >conftest.$ac_ext <<_ACEOF
23544/* confdefs.h. */
23545_ACEOF
23546cat confdefs.h >>conftest.$ac_ext
23547cat >>conftest.$ac_ext <<_ACEOF
23548/* end confdefs.h. */
23549#include <curses.h>
23550int
23551main ()
23552{
23553void *x=resize_term
23554 ;
23555 return 0;
23556}
23557_ACEOF
23558rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023559if { (ac_try="$ac_compile"
23560case "(($ac_try" in
23561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23562 *) ac_try_echo=$ac_try;;
23563esac
23564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23565 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023566 ac_status=$?
23567 grep -v '^ *+' conftest.er1 >conftest.err
23568 rm -f conftest.er1
23569 cat conftest.err >&5
23570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023571 (exit $ac_status); } && {
23572 test -z "$ac_c_werror_flag" ||
23573 test ! -s conftest.err
23574 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023575
23576cat >>confdefs.h <<\_ACEOF
23577#define HAVE_CURSES_RESIZE_TERM 1
23578_ACEOF
23579
Martin v. Löwiseba40652007-08-30 20:10:57 +000023580 { echo "$as_me:$LINENO: result: yes" >&5
23581echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023582else
23583 echo "$as_me: failed program was:" >&5
23584sed 's/^/| /' conftest.$ac_ext >&5
23585
Martin v. Löwiseba40652007-08-30 20:10:57 +000023586 { echo "$as_me:$LINENO: result: no" >&5
23587echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023588
23589fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023590
Martin v. Löwiseba40652007-08-30 20:10:57 +000023591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23592
23593{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23594echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023595cat >conftest.$ac_ext <<_ACEOF
23596/* confdefs.h. */
23597_ACEOF
23598cat confdefs.h >>conftest.$ac_ext
23599cat >>conftest.$ac_ext <<_ACEOF
23600/* end confdefs.h. */
23601#include <curses.h>
23602int
23603main ()
23604{
23605void *x=resizeterm
23606 ;
23607 return 0;
23608}
23609_ACEOF
23610rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023611if { (ac_try="$ac_compile"
23612case "(($ac_try" in
23613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23614 *) ac_try_echo=$ac_try;;
23615esac
23616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23617 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023618 ac_status=$?
23619 grep -v '^ *+' conftest.er1 >conftest.err
23620 rm -f conftest.er1
23621 cat conftest.err >&5
23622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023623 (exit $ac_status); } && {
23624 test -z "$ac_c_werror_flag" ||
23625 test ! -s conftest.err
23626 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023627
23628cat >>confdefs.h <<\_ACEOF
23629#define HAVE_CURSES_RESIZETERM 1
23630_ACEOF
23631
Martin v. Löwiseba40652007-08-30 20:10:57 +000023632 { echo "$as_me:$LINENO: result: yes" >&5
23633echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023634else
23635 echo "$as_me: failed program was:" >&5
23636sed 's/^/| /' conftest.$ac_ext >&5
23637
Martin v. Löwiseba40652007-08-30 20:10:57 +000023638 { echo "$as_me:$LINENO: result: no" >&5
23639echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023640
23641fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023642
Martin v. Löwiseba40652007-08-30 20:10:57 +000023643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23644
23645{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23646echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023647
23648if test -r /dev/ptmx
23649then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023650 { echo "$as_me:$LINENO: result: yes" >&5
23651echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023652
23653cat >>confdefs.h <<\_ACEOF
23654#define HAVE_DEV_PTMX 1
23655_ACEOF
23656
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023657else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023658 { echo "$as_me:$LINENO: result: no" >&5
23659echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023660fi
23661
Martin v. Löwiseba40652007-08-30 20:10:57 +000023662{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23663echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023664
23665if test -r /dev/ptc
23666then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023667 { echo "$as_me:$LINENO: result: yes" >&5
23668echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023669
23670cat >>confdefs.h <<\_ACEOF
23671#define HAVE_DEV_PTC 1
23672_ACEOF
23673
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023674else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023675 { echo "$as_me:$LINENO: result: no" >&5
23676echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023677fi
23678
Martin v. Löwiseba40652007-08-30 20:10:57 +000023679{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23680echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023681if test "$cross_compiling" = yes; then
23682 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23683See \`config.log' for more details." >&5
23684echo "$as_me: error: cannot run test program while cross compiling
23685See \`config.log' for more details." >&2;}
23686 { (exit 1); exit 1; }; }
23687else
23688 cat >conftest.$ac_ext <<_ACEOF
23689/* confdefs.h. */
23690_ACEOF
23691cat confdefs.h >>conftest.$ac_ext
23692cat >>conftest.$ac_ext <<_ACEOF
23693/* end confdefs.h. */
23694#include <stdio.h>
23695#include <stddef.h>
23696#include <string.h>
23697
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023698#ifdef HAVE_SYS_TYPES_H
23699#include <sys/types.h>
23700#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023701
23702#ifdef HAVE_SSIZE_T
23703typedef ssize_t Py_ssize_t;
23704#elif SIZEOF_VOID_P == SIZEOF_LONG
23705typedef long Py_ssize_t;
23706#else
23707typedef int Py_ssize_t;
23708#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023709
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023710int main()
23711{
23712 char buffer[256];
23713
Brett Cannon09d12362006-05-11 05:11:33 +000023714 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23715 return 1;
23716
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023717 if (strcmp(buffer, "123"))
23718 return 1;
23719
23720 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23721 return 1;
23722
23723 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023724 return 1;
23725
23726 return 0;
23727}
23728_ACEOF
23729rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023730if { (ac_try="$ac_link"
23731case "(($ac_try" in
23732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23733 *) ac_try_echo=$ac_try;;
23734esac
23735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23736 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023737 ac_status=$?
23738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23739 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023740 { (case "(($ac_try" in
23741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23742 *) ac_try_echo=$ac_try;;
23743esac
23744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23745 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023746 ac_status=$?
23747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23748 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023749 { echo "$as_me:$LINENO: result: yes" >&5
23750echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023751
23752cat >>confdefs.h <<\_ACEOF
23753#define PY_FORMAT_SIZE_T "z"
23754_ACEOF
23755
23756else
23757 echo "$as_me: program exited with status $ac_status" >&5
23758echo "$as_me: failed program was:" >&5
23759sed 's/^/| /' conftest.$ac_ext >&5
23760
23761( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023762{ echo "$as_me:$LINENO: result: no" >&5
23763echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023765rm -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 +000023766fi
23767
Martin v. Löwiseba40652007-08-30 20:10:57 +000023768
23769
23770{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23771echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023772if test "${ac_cv_type_socklen_t+set}" = set; then
23773 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023774else
Martin v. Löwis11437992002-04-12 09:54:03 +000023775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023776/* confdefs.h. */
23777_ACEOF
23778cat confdefs.h >>conftest.$ac_ext
23779cat >>conftest.$ac_ext <<_ACEOF
23780/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023781
23782#ifdef HAVE_SYS_TYPES_H
23783#include <sys/types.h>
23784#endif
23785#ifdef HAVE_SYS_SOCKET_H
23786#include <sys/socket.h>
23787#endif
23788
23789
Martin v. Löwiseba40652007-08-30 20:10:57 +000023790typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023791int
23792main ()
23793{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023794if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023795 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023796if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023797 return 0;
23798 ;
23799 return 0;
23800}
23801_ACEOF
23802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023803if { (ac_try="$ac_compile"
23804case "(($ac_try" in
23805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23806 *) ac_try_echo=$ac_try;;
23807esac
23808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023811 grep -v '^ *+' conftest.er1 >conftest.err
23812 rm -f conftest.er1
23813 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023815 (exit $ac_status); } && {
23816 test -z "$ac_c_werror_flag" ||
23817 test ! -s conftest.err
23818 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000023819 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000023820else
Martin v. Löwis11437992002-04-12 09:54:03 +000023821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023822sed 's/^/| /' conftest.$ac_ext >&5
23823
Martin v. Löwiseba40652007-08-30 20:10:57 +000023824 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000023825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023826
23827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023829{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
23830echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023831if test $ac_cv_type_socklen_t = yes; then
23832 :
23833else
Guido van Rossum95713eb2000-05-18 20:53:31 +000023834
Martin v. Löwis01c04012002-11-11 14:58:44 +000023835cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023836#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000023837_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023838
23839fi
23840
Michael W. Hudson54241132001-12-07 15:38:26 +000023841
Michael W. Hudson54241132001-12-07 15:38:26 +000023842
23843
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000023844for h in `(cd $srcdir;echo Python/thread_*.h)`
23845do
23846 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
23847done
23848
Michael W. Hudson54241132001-12-07 15:38:26 +000023849
Neal Norwitzd24499d2005-12-18 21:36:39 +000023850SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023851{ echo "$as_me:$LINENO: checking for build directories" >&5
23852echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023853for dir in $SRCDIRS; do
23854 if test ! -d $dir; then
23855 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000023856 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023857done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023858{ echo "$as_me:$LINENO: result: done" >&5
23859echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000023860
Guido van Rossum627b2d71993-12-24 10:39:16 +000023861# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000023862ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000023863
Martin v. Löwis11437992002-04-12 09:54:03 +000023864cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023865# This file is a shell script that caches the results of configure
23866# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000023867# scripts and configure runs, see configure's option --config-cache.
23868# It is not useful on other systems. If it contains results you don't
23869# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023870#
Martin v. Löwis11437992002-04-12 09:54:03 +000023871# config.status only pays attention to the cache file if you give it
23872# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023873#
Skip Montanaro6dead952003-09-25 14:50:04 +000023874# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000023875# loading this file, other *unset* `ac_cv_foo' will be assigned the
23876# following values.
23877
23878_ACEOF
23879
Guido van Rossumf78abae1997-01-21 22:02:36 +000023880# The following way of writing the cache mishandles newlines in values,
23881# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023882# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023883# Ultrix sh set writes to stderr and can't be redirected directly,
23884# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023885(
23886 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23887 eval ac_val=\$$ac_var
23888 case $ac_val in #(
23889 *${as_nl}*)
23890 case $ac_var in #(
23891 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23892echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23893 esac
23894 case $ac_var in #(
23895 _ | IFS | as_nl) ;; #(
23896 *) $as_unset $ac_var ;;
23897 esac ;;
23898 esac
23899 done
23900
Martin v. Löwis11437992002-04-12 09:54:03 +000023901 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000023902 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23903 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000023904 # `set' does not quote correctly, so add quotes (double-quote
23905 # substitution turns \\\\ into \\, and sed turns \\ into \).
23906 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023907 "s/'/'\\\\''/g;
23908 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023909 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000023910 *)
23911 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023912 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000023913 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023914 esac |
23915 sort
23916) |
Martin v. Löwis11437992002-04-12 09:54:03 +000023917 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023918 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000023919 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000023920 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000023921 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23922 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000023923 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23924 :end' >>confcache
23925if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23926 if test -w "$cache_file"; then
23927 test "x$cache_file" != "x/dev/null" &&
23928 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23929echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023930 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023931 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023932 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23933echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023934 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023935fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023936rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000023937
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023938test "x$prefix" = xNONE && prefix=$ac_default_prefix
23939# Let make expand exec_prefix.
23940test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000023941
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023942DEFS=-DHAVE_CONFIG_H
23943
Skip Montanaro6dead952003-09-25 14:50:04 +000023944ac_libobjs=
23945ac_ltlibobjs=
23946for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23947 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023948 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23949 ac_i=`echo "$ac_i" | sed "$ac_script"`
23950 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23951 # will be set to the directory where LIBOBJS objects are built.
23952 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23953 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000023954done
23955LIBOBJS=$ac_libobjs
23956
23957LTLIBOBJS=$ac_ltlibobjs
23958
23959
Martin v. Löwis11437992002-04-12 09:54:03 +000023960
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023961: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000023962ac_clean_files_save=$ac_clean_files
23963ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23964{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23965echo "$as_me: creating $CONFIG_STATUS" >&6;}
23966cat >$CONFIG_STATUS <<_ACEOF
23967#! $SHELL
23968# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023969# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023970# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000023971# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023972
Martin v. Löwis11437992002-04-12 09:54:03 +000023973debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000023974ac_cs_recheck=false
23975ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000023976SHELL=\${CONFIG_SHELL-$SHELL}
23977_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000023978
Martin v. Löwis11437992002-04-12 09:54:03 +000023979cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023980## --------------------- ##
23981## M4sh Initialization. ##
23982## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000023983
Martin v. Löwiseba40652007-08-30 20:10:57 +000023984# Be more Bourne compatible
23985DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023986if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23987 emulate sh
23988 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000023989 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23990 # is contrary to our usage. Disable this feature.
23991 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023992 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000023993else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023994 case `(set -o) 2>/dev/null` in
23995 *posix*) set -o posix ;;
23996esac
23997
Martin v. Löwis11437992002-04-12 09:54:03 +000023998fi
Michael W. Hudson54241132001-12-07 15:38:26 +000023999
Skip Montanaro6dead952003-09-25 14:50:04 +000024000
Martin v. Löwis11437992002-04-12 09:54:03 +000024001
24002
Martin v. Löwiseba40652007-08-30 20:10:57 +000024003# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024004# Avoid depending upon Character Ranges.
24005as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24006as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24007as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24008as_cr_digits='0123456789'
24009as_cr_alnum=$as_cr_Letters$as_cr_digits
24010
24011# The user is always right.
24012if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024013 echo "#! /bin/sh" >conf$$.sh
24014 echo "exit 0" >>conf$$.sh
24015 chmod +x conf$$.sh
24016 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024017 PATH_SEPARATOR=';'
24018 else
24019 PATH_SEPARATOR=:
24020 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024021 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024022fi
24023
Martin v. Löwiseba40652007-08-30 20:10:57 +000024024# Support unset when possible.
24025if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24026 as_unset=unset
24027else
24028 as_unset=false
24029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024030
Martin v. Löwiseba40652007-08-30 20:10:57 +000024031
24032# IFS
24033# We need space, tab and new line, in precisely that order. Quoting is
24034# there to prevent editors from complaining about space-tab.
24035# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24036# splitting by setting IFS to empty value.)
24037as_nl='
24038'
24039IFS=" "" $as_nl"
24040
24041# Find who we are. Look in the path if we contain no directory separator.
24042case $0 in
24043 *[\\/]* ) as_myself=$0 ;;
24044 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024045for as_dir in $PATH
24046do
24047 IFS=$as_save_IFS
24048 test -z "$as_dir" && as_dir=.
24049 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24050done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024051IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024052
Martin v. Löwiseba40652007-08-30 20:10:57 +000024053 ;;
24054esac
24055# We did not find ourselves, most probably we were run as `sh COMMAND'
24056# in which case we are not to be found in the path.
24057if test "x$as_myself" = x; then
24058 as_myself=$0
24059fi
24060if test ! -f "$as_myself"; then
24061 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24062 { (exit 1); exit 1; }
24063fi
24064
24065# Work around bugs in pre-3.0 UWIN ksh.
24066for as_var in ENV MAIL MAILPATH
24067do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24068done
24069PS1='$ '
24070PS2='> '
24071PS4='+ '
24072
24073# NLS nuisances.
24074for as_var in \
24075 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24076 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24077 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024078do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024079 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24080 eval $as_var=C; export $as_var
24081 else
24082 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24083 fi
24084done
24085
24086# Required to use basename.
24087if expr a : '\(a\)' >/dev/null 2>&1 &&
24088 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24089 as_expr=expr
24090else
24091 as_expr=false
24092fi
24093
24094if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24095 as_basename=basename
24096else
24097 as_basename=false
24098fi
24099
24100
24101# Name of the executable.
24102as_me=`$as_basename -- "$0" ||
24103$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24104 X"$0" : 'X\(//\)$' \| \
24105 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24106echo X/"$0" |
24107 sed '/^.*\/\([^/][^/]*\)\/*$/{
24108 s//\1/
24109 q
24110 }
24111 /^X\/\(\/\/\)$/{
24112 s//\1/
24113 q
24114 }
24115 /^X\/\(\/\).*/{
24116 s//\1/
24117 q
24118 }
24119 s/.*/./; q'`
24120
24121# CDPATH.
24122$as_unset CDPATH
24123
24124
24125
Martin v. Löwis11437992002-04-12 09:54:03 +000024126 as_lineno_1=$LINENO
24127 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024128 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024129 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024130
Martin v. Löwis11437992002-04-12 09:54:03 +000024131 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24132 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024133 # line-number line after each line using $LINENO; the second 'sed'
24134 # does the real work. The second script uses 'N' to pair each
24135 # line-number line with the line containing $LINENO, and appends
24136 # trailing '-' during substitution so that $LINENO is not a special
24137 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024138 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024139 # scripts with optimization help from Paolo Bonzini. Blame Lee
24140 # E. McMahon (1931-1989) for sed's syntax. :-)
24141 sed -n '
24142 p
24143 /[$]LINENO/=
24144 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024145 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024146 s/[$]LINENO.*/&-/
24147 t lineno
24148 b
24149 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024150 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024151 :loop
24152 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024153 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024154 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024155 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024156 chmod +x "$as_me.lineno" ||
24157 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024158 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024159
Martin v. Löwis11437992002-04-12 09:54:03 +000024160 # Don't try to exec as it changes $[0], causing all sort of problems
24161 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024162 # original and so on. Autoconf is especially sensitive to this).
24163 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024164 # Exit status is that of the last command.
24165 exit
24166}
24167
24168
Martin v. Löwiseba40652007-08-30 20:10:57 +000024169if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24170 as_dirname=dirname
24171else
24172 as_dirname=false
24173fi
24174
24175ECHO_C= ECHO_N= ECHO_T=
24176case `echo -n x` in
24177-n*)
24178 case `echo 'x\c'` in
24179 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24180 *) ECHO_C='\c';;
24181 esac;;
24182*)
24183 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024184esac
24185
Martin v. Löwiseba40652007-08-30 20:10:57 +000024186if expr a : '\(a\)' >/dev/null 2>&1 &&
24187 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024188 as_expr=expr
24189else
24190 as_expr=false
24191fi
24192
24193rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024194if test -d conf$$.dir; then
24195 rm -f conf$$.dir/conf$$.file
24196else
24197 rm -f conf$$.dir
24198 mkdir conf$$.dir
24199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024200echo >conf$$.file
24201if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024202 as_ln_s='ln -s'
24203 # ... but there are two gotchas:
24204 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24205 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24206 # In both cases, we have to default to `cp -p'.
24207 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024208 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024209elif ln conf$$.file conf$$ 2>/dev/null; then
24210 as_ln_s=ln
24211else
24212 as_ln_s='cp -p'
24213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024214rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24215rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024216
Skip Montanaro6dead952003-09-25 14:50:04 +000024217if mkdir -p . 2>/dev/null; then
24218 as_mkdir_p=:
24219else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024220 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024221 as_mkdir_p=false
24222fi
24223
Martin v. Löwiseba40652007-08-30 20:10:57 +000024224if test -x / >/dev/null 2>&1; then
24225 as_test_x='test -x'
24226else
24227 if ls -dL / >/dev/null 2>&1; then
24228 as_ls_L_option=L
24229 else
24230 as_ls_L_option=
24231 fi
24232 as_test_x='
24233 eval sh -c '\''
24234 if test -d "$1"; then
24235 test -d "$1/.";
24236 else
24237 case $1 in
24238 -*)set "./$1";;
24239 esac;
24240 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24241 ???[sx]*):;;*)false;;esac;fi
24242 '\'' sh
24243 '
24244fi
24245as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024246
24247# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024248as_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 +000024249
24250# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024251as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024252
24253
Martin v. Löwis11437992002-04-12 09:54:03 +000024254exec 6>&1
24255
Martin v. Löwiseba40652007-08-30 20:10:57 +000024256# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024257# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024258# values after options handling.
24259ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024260This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024261generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024262
24263 CONFIG_FILES = $CONFIG_FILES
24264 CONFIG_HEADERS = $CONFIG_HEADERS
24265 CONFIG_LINKS = $CONFIG_LINKS
24266 CONFIG_COMMANDS = $CONFIG_COMMANDS
24267 $ $0 $@
24268
Martin v. Löwiseba40652007-08-30 20:10:57 +000024269on `(hostname || uname -n) 2>/dev/null | sed 1q`
24270"
24271
Martin v. Löwis11437992002-04-12 09:54:03 +000024272_ACEOF
24273
Martin v. Löwiseba40652007-08-30 20:10:57 +000024274cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024275# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024276config_files="$ac_config_files"
24277config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024278
Martin v. Löwiseba40652007-08-30 20:10:57 +000024279_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024280
24281cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024282ac_cs_usage="\
24283\`$as_me' instantiates files from templates according to the
24284current configuration.
24285
24286Usage: $0 [OPTIONS] [FILE]...
24287
24288 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024289 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024290 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024291 -d, --debug don't remove temporary files
24292 --recheck update $as_me by reconfiguring in the same conditions
24293 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024294 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024295 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024296 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024297
24298Configuration files:
24299$config_files
24300
24301Configuration headers:
24302$config_headers
24303
24304Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024305
Martin v. Löwiseba40652007-08-30 20:10:57 +000024306_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024307cat >>$CONFIG_STATUS <<_ACEOF
24308ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024309python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024310configured by $0, generated by GNU Autoconf 2.61,
24311 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024312
Martin v. Löwiseba40652007-08-30 20:10:57 +000024313Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024314This config.status script is free software; the Free Software Foundation
24315gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024316
24317ac_pwd='$ac_pwd'
24318srcdir='$srcdir'
24319INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024320_ACEOF
24321
24322cat >>$CONFIG_STATUS <<\_ACEOF
24323# If no file are specified by the user, then we need to provide default
24324# value. By we need to know if files were specified by the user.
24325ac_need_defaults=:
24326while test $# != 0
24327do
24328 case $1 in
24329 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024330 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24331 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024332 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024333 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024334 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024335 ac_option=$1
24336 ac_optarg=$2
24337 ac_shift=shift
24338 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024339 esac
24340
Skip Montanaro6dead952003-09-25 14:50:04 +000024341 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024342 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024343 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24344 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024345 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24346 echo "$ac_cs_version"; exit ;;
24347 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024348 debug=: ;;
24349 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024350 $ac_shift
24351 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024352 ac_need_defaults=false;;
24353 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024354 $ac_shift
24355 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024356 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024357 --he | --h)
24358 # Conflict between --help and --header
24359 { echo "$as_me: error: ambiguous option: $1
24360Try \`$0 --help' for more information." >&2
24361 { (exit 1); exit 1; }; };;
24362 --help | --hel | -h )
24363 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024364 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24365 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24366 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024367
24368 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024369 -*) { echo "$as_me: error: unrecognized option: $1
24370Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024371 { (exit 1); exit 1; }; } ;;
24372
Martin v. Löwiseba40652007-08-30 20:10:57 +000024373 *) ac_config_targets="$ac_config_targets $1"
24374 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024375
24376 esac
24377 shift
24378done
24379
Skip Montanaro6dead952003-09-25 14:50:04 +000024380ac_configure_extra_args=
24381
24382if $ac_cs_silent; then
24383 exec 6>/dev/null
24384 ac_configure_extra_args="$ac_configure_extra_args --silent"
24385fi
24386
24387_ACEOF
24388cat >>$CONFIG_STATUS <<_ACEOF
24389if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024390 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24391 CONFIG_SHELL=$SHELL
24392 export CONFIG_SHELL
24393 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024394fi
24395
Martin v. Löwis11437992002-04-12 09:54:03 +000024396_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024397cat >>$CONFIG_STATUS <<\_ACEOF
24398exec 5>>config.log
24399{
24400 echo
24401 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24402## Running $as_me. ##
24403_ASBOX
24404 echo "$ac_log"
24405} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024406
Martin v. Löwiseba40652007-08-30 20:10:57 +000024407_ACEOF
24408cat >>$CONFIG_STATUS <<_ACEOF
24409_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024410
24411cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024412
24413# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024414for ac_config_target in $ac_config_targets
24415do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024416 case $ac_config_target in
24417 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24418 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24419 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24420 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
24421 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24422 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24423
Martin v. Löwis11437992002-04-12 09:54:03 +000024424 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24425echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24426 { (exit 1); exit 1; }; };;
24427 esac
24428done
24429
Martin v. Löwiseba40652007-08-30 20:10:57 +000024430
Martin v. Löwis11437992002-04-12 09:54:03 +000024431# If the user did not use the arguments to specify the items to instantiate,
24432# then the envvar interface is used. Set only those that are not.
24433# We use the long form for the default assignment because of an extremely
24434# bizarre bug on SunOS 4.1.3.
24435if $ac_need_defaults; then
24436 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24437 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24438fi
24439
Skip Montanaro6dead952003-09-25 14:50:04 +000024440# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024441# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024442# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024443# Hook for its removal unless debugging.
24444# Note that there is a small window in which the directory will not be cleaned:
24445# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024446$debug ||
24447{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024448 tmp=
24449 trap 'exit_status=$?
24450 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24451' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024452 trap '{ (exit 1); exit 1; }' 1 2 13 15
24453}
Martin v. Löwis11437992002-04-12 09:54:03 +000024454# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024455
Martin v. Löwis11437992002-04-12 09:54:03 +000024456{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024457 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024458 test -n "$tmp" && test -d "$tmp"
24459} ||
24460{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024461 tmp=./conf$$-$RANDOM
24462 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024463} ||
24464{
Skip Montanaro6dead952003-09-25 14:50:04 +000024465 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024466 { (exit 1); exit 1; }
24467}
24468
Martin v. Löwis11437992002-04-12 09:54:03 +000024469#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024470# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024471#
24472
24473# No need to generate the scripts if there are no CONFIG_FILES.
24474# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024475if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024476
24477_ACEOF
24478
Martin v. Löwiseba40652007-08-30 20:10:57 +000024479
24480
24481ac_delim='%!_!# '
24482for ac_last_try in false false false false false :; do
24483 cat >conf$$subs.sed <<_ACEOF
24484SHELL!$SHELL$ac_delim
24485PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24486PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24487PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24488PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24489PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24490PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24491exec_prefix!$exec_prefix$ac_delim
24492prefix!$prefix$ac_delim
24493program_transform_name!$program_transform_name$ac_delim
24494bindir!$bindir$ac_delim
24495sbindir!$sbindir$ac_delim
24496libexecdir!$libexecdir$ac_delim
24497datarootdir!$datarootdir$ac_delim
24498datadir!$datadir$ac_delim
24499sysconfdir!$sysconfdir$ac_delim
24500sharedstatedir!$sharedstatedir$ac_delim
24501localstatedir!$localstatedir$ac_delim
24502includedir!$includedir$ac_delim
24503oldincludedir!$oldincludedir$ac_delim
24504docdir!$docdir$ac_delim
24505infodir!$infodir$ac_delim
24506htmldir!$htmldir$ac_delim
24507dvidir!$dvidir$ac_delim
24508pdfdir!$pdfdir$ac_delim
24509psdir!$psdir$ac_delim
24510libdir!$libdir$ac_delim
24511localedir!$localedir$ac_delim
24512mandir!$mandir$ac_delim
24513DEFS!$DEFS$ac_delim
24514ECHO_C!$ECHO_C$ac_delim
24515ECHO_N!$ECHO_N$ac_delim
24516ECHO_T!$ECHO_T$ac_delim
24517LIBS!$LIBS$ac_delim
24518build_alias!$build_alias$ac_delim
24519host_alias!$host_alias$ac_delim
24520target_alias!$target_alias$ac_delim
24521VERSION!$VERSION$ac_delim
24522SOVERSION!$SOVERSION$ac_delim
24523CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24524UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24525PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
24526PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24527PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24528PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24529FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24530FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24531FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24532FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24533FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24534MACHDEP!$MACHDEP$ac_delim
24535SGI_ABI!$SGI_ABI$ac_delim
24536EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24537EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24538CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24539EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24540CC!$CC$ac_delim
24541CFLAGS!$CFLAGS$ac_delim
24542LDFLAGS!$LDFLAGS$ac_delim
24543CPPFLAGS!$CPPFLAGS$ac_delim
24544ac_ct_CC!$ac_ct_CC$ac_delim
24545EXEEXT!$EXEEXT$ac_delim
24546OBJEXT!$OBJEXT$ac_delim
24547CXX!$CXX$ac_delim
24548MAINCC!$MAINCC$ac_delim
24549CPP!$CPP$ac_delim
24550GREP!$GREP$ac_delim
24551EGREP!$EGREP$ac_delim
24552BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24553LIBRARY!$LIBRARY$ac_delim
24554LDLIBRARY!$LDLIBRARY$ac_delim
24555DLLLIBRARY!$DLLLIBRARY$ac_delim
24556BLDLIBRARY!$BLDLIBRARY$ac_delim
24557LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24558INSTSONAME!$INSTSONAME$ac_delim
24559RUNSHARED!$RUNSHARED$ac_delim
24560LINKCC!$LINKCC$ac_delim
24561RANLIB!$RANLIB$ac_delim
24562AR!$AR$ac_delim
24563SVNVERSION!$SVNVERSION$ac_delim
24564INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24565INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24566INSTALL_DATA!$INSTALL_DATA$ac_delim
24567LN!$LN$ac_delim
24568OPT!$OPT$ac_delim
24569BASECFLAGS!$BASECFLAGS$ac_delim
24570OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24571LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24572SO!$SO$ac_delim
24573LDSHARED!$LDSHARED$ac_delim
24574BLDSHARED!$BLDSHARED$ac_delim
24575CCSHARED!$CCSHARED$ac_delim
24576LINKFORSHARED!$LINKFORSHARED$ac_delim
24577CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24578SHLIBS!$SHLIBS$ac_delim
24579USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
24580SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
24581_ACEOF
24582
24583 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24584 break
24585 elif $ac_last_try; then
24586 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24587echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24588 { (exit 1); exit 1; }; }
24589 else
24590 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024591 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024592done
24593
24594ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24595if test -n "$ac_eof"; then
24596 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24597 ac_eof=`expr $ac_eof + 1`
24598fi
24599
24600cat >>$CONFIG_STATUS <<_ACEOF
24601cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24602/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24603_ACEOF
24604sed '
24605s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24606s/^/s,@/; s/!/@,|#_!!_#|/
24607:n
24608t n
24609s/'"$ac_delim"'$/,g/; t
24610s/$/\\/; p
24611N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24612' >>$CONFIG_STATUS <conf$$subs.sed
24613rm -f conf$$subs.sed
24614cat >>$CONFIG_STATUS <<_ACEOF
24615CEOF$ac_eof
24616_ACEOF
24617
24618
24619ac_delim='%!_!# '
24620for ac_last_try in false false false false false :; do
24621 cat >conf$$subs.sed <<_ACEOF
24622USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24623LDLAST!$LDLAST$ac_delim
24624THREADOBJ!$THREADOBJ$ac_delim
24625DLINCLDIR!$DLINCLDIR$ac_delim
24626DYNLOADFILE!$DYNLOADFILE$ac_delim
24627MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24628TRUE!$TRUE$ac_delim
24629LIBOBJS!$LIBOBJS$ac_delim
24630HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24631HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24632HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24633HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24634HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24635LIBM!$LIBM$ac_delim
24636LIBC!$LIBC$ac_delim
24637UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24638THREADHEADERS!$THREADHEADERS$ac_delim
24639SRCDIRS!$SRCDIRS$ac_delim
24640LTLIBOBJS!$LTLIBOBJS$ac_delim
24641_ACEOF
24642
24643 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
24644 break
24645 elif $ac_last_try; then
24646 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24647echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24648 { (exit 1); exit 1; }; }
24649 else
24650 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24651 fi
24652done
24653
24654ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24655if test -n "$ac_eof"; then
24656 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24657 ac_eof=`expr $ac_eof + 1`
24658fi
24659
24660cat >>$CONFIG_STATUS <<_ACEOF
24661cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24662/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24663_ACEOF
24664sed '
24665s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24666s/^/s,@/; s/!/@,|#_!!_#|/
24667:n
24668t n
24669s/'"$ac_delim"'$/,g/; t
24670s/$/\\/; p
24671N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24672' >>$CONFIG_STATUS <conf$$subs.sed
24673rm -f conf$$subs.sed
24674cat >>$CONFIG_STATUS <<_ACEOF
24675:end
24676s/|#_!!_#|//g
24677CEOF$ac_eof
24678_ACEOF
24679
24680
24681# VPATH may cause trouble with some makes, so we remove $(srcdir),
24682# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24683# trailing colons and then remove the whole line if VPATH becomes empty
24684# (actually we leave an empty line to preserve line numbers).
24685if test "x$srcdir" = x.; then
24686 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24687s/:*\$(srcdir):*/:/
24688s/:*\${srcdir}:*/:/
24689s/:*@srcdir@:*/:/
24690s/^\([^=]*=[ ]*\):*/\1/
24691s/:*$//
24692s/^[^=]*=[ ]*$//
24693}'
24694fi
24695
24696cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024697fi # test -n "$CONFIG_FILES"
24698
Martin v. Löwiseba40652007-08-30 20:10:57 +000024699
24700for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24701do
24702 case $ac_tag in
24703 :[FHLC]) ac_mode=$ac_tag; continue;;
24704 esac
24705 case $ac_mode$ac_tag in
24706 :[FHL]*:*);;
24707 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24708echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24709 { (exit 1); exit 1; }; };;
24710 :[FH]-) ac_tag=-:-;;
24711 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24712 esac
24713 ac_save_IFS=$IFS
24714 IFS=:
24715 set x $ac_tag
24716 IFS=$ac_save_IFS
24717 shift
24718 ac_file=$1
24719 shift
24720
24721 case $ac_mode in
24722 :L) ac_source=$1;;
24723 :[FH])
24724 ac_file_inputs=
24725 for ac_f
24726 do
24727 case $ac_f in
24728 -) ac_f="$tmp/stdin";;
24729 *) # Look for the file first in the build tree, then in the source tree
24730 # (if the path is not absolute). The absolute path cannot be DOS-style,
24731 # because $ac_f cannot contain `:'.
24732 test -f "$ac_f" ||
24733 case $ac_f in
24734 [\\/$]*) false;;
24735 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24736 esac ||
24737 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24738echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24739 { (exit 1); exit 1; }; };;
24740 esac
24741 ac_file_inputs="$ac_file_inputs $ac_f"
24742 done
24743
24744 # Let's still pretend it is `configure' which instantiates (i.e., don't
24745 # use $as_me), people would be surprised to read:
24746 # /* config.h. Generated by config.status. */
24747 configure_input="Generated from "`IFS=:
24748 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24749 if test x"$ac_file" != x-; then
24750 configure_input="$ac_file. $configure_input"
24751 { echo "$as_me:$LINENO: creating $ac_file" >&5
24752echo "$as_me: creating $ac_file" >&6;}
24753 fi
24754
24755 case $ac_tag in
24756 *:-:* | *:-) cat >"$tmp/stdin";;
24757 esac
24758 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024759 esac
24760
Martin v. Löwiseba40652007-08-30 20:10:57 +000024761 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024762$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024763 X"$ac_file" : 'X\(//\)[^/]' \| \
24764 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024765 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024766echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024767 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24768 s//\1/
24769 q
24770 }
24771 /^X\(\/\/\)[^/].*/{
24772 s//\1/
24773 q
24774 }
24775 /^X\(\/\/\)$/{
24776 s//\1/
24777 q
24778 }
24779 /^X\(\/\).*/{
24780 s//\1/
24781 q
24782 }
24783 s/.*/./; q'`
24784 { as_dir="$ac_dir"
24785 case $as_dir in #(
24786 -*) as_dir=./$as_dir;;
24787 esac
24788 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024789 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024790 while :; do
24791 case $as_dir in #(
24792 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24793 *) as_qdir=$as_dir;;
24794 esac
24795 as_dirs="'$as_qdir' $as_dirs"
24796 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024797$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024798 X"$as_dir" : 'X\(//\)[^/]' \| \
24799 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024800 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024801echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024802 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24803 s//\1/
24804 q
24805 }
24806 /^X\(\/\/\)[^/].*/{
24807 s//\1/
24808 q
24809 }
24810 /^X\(\/\/\)$/{
24811 s//\1/
24812 q
24813 }
24814 /^X\(\/\).*/{
24815 s//\1/
24816 q
24817 }
24818 s/.*/./; q'`
24819 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000024820 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024821 test -z "$as_dirs" || eval "mkdir $as_dirs"
24822 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24823echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000024824 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024825 ac_builddir=.
24826
Martin v. Löwiseba40652007-08-30 20:10:57 +000024827case "$ac_dir" in
24828.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24829*)
Martin v. Löwis11437992002-04-12 09:54:03 +000024830 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000024831 # A ".." for each directory in $ac_dir_suffix.
24832 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24833 case $ac_top_builddir_sub in
24834 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24835 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24836 esac ;;
24837esac
24838ac_abs_top_builddir=$ac_pwd
24839ac_abs_builddir=$ac_pwd$ac_dir_suffix
24840# for backward compatibility:
24841ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000024842
24843case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024844 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000024845 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024846 ac_top_srcdir=$ac_top_builddir_sub
24847 ac_abs_top_srcdir=$ac_pwd ;;
24848 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000024849 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024850 ac_top_srcdir=$srcdir
24851 ac_abs_top_srcdir=$srcdir ;;
24852 *) # Relative name.
24853 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24854 ac_top_srcdir=$ac_top_build_prefix$srcdir
24855 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024856esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024857ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000024858
Martin v. Löwis11437992002-04-12 09:54:03 +000024859
Martin v. Löwiseba40652007-08-30 20:10:57 +000024860 case $ac_mode in
24861 :F)
24862 #
24863 # CONFIG_FILE
24864 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024865
24866 case $INSTALL in
24867 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024868 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024869 esac
Brett Cannon19fab762007-06-02 03:02:29 +000024870_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024871
24872cat >>$CONFIG_STATUS <<\_ACEOF
24873# If the template does not know about datarootdir, expand it.
24874# FIXME: This hack should be removed a few years after 2.60.
24875ac_datarootdir_hack=; ac_datarootdir_seen=
24876
24877case `sed -n '/datarootdir/ {
24878 p
24879 q
24880}
24881/@datadir@/p
24882/@docdir@/p
24883/@infodir@/p
24884/@localedir@/p
24885/@mandir@/p
24886' $ac_file_inputs` in
24887*datarootdir*) ac_datarootdir_seen=yes;;
24888*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24889 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24890echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24891_ACEOF
24892cat >>$CONFIG_STATUS <<_ACEOF
24893 ac_datarootdir_hack='
24894 s&@datadir@&$datadir&g
24895 s&@docdir@&$docdir&g
24896 s&@infodir@&$infodir&g
24897 s&@localedir@&$localedir&g
24898 s&@mandir@&$mandir&g
24899 s&\\\${datarootdir}&$datarootdir&g' ;;
24900esac
24901_ACEOF
24902
24903# Neutralize VPATH when `$srcdir' = `.'.
24904# Shell code in configure.ac might set extrasub.
24905# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000024906cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024907 sed "$ac_vpsub
24908$extrasub
24909_ACEOF
24910cat >>$CONFIG_STATUS <<\_ACEOF
24911:t
24912/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000024913s&@configure_input@&$configure_input&;t t
24914s&@top_builddir@&$ac_top_builddir_sub&;t t
24915s&@srcdir@&$ac_srcdir&;t t
24916s&@abs_srcdir@&$ac_abs_srcdir&;t t
24917s&@top_srcdir@&$ac_top_srcdir&;t t
24918s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24919s&@builddir@&$ac_builddir&;t t
24920s&@abs_builddir@&$ac_abs_builddir&;t t
24921s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24922s&@INSTALL@&$ac_INSTALL&;t t
24923$ac_datarootdir_hack
24924" $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 +000024925
Martin v. Löwiseba40652007-08-30 20:10:57 +000024926test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24927 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24928 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24929 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24930which seems to be undefined. Please make sure it is defined." >&5
24931echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24932which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024933
Martin v. Löwiseba40652007-08-30 20:10:57 +000024934 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000024935 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024936 -) cat "$tmp/out"; rm -f "$tmp/out";;
24937 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024938 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024939 ;;
24940 :H)
24941 #
24942 # CONFIG_HEADER
24943 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024944_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024945
Martin v. Löwiseba40652007-08-30 20:10:57 +000024946# Transform confdefs.h into a sed script `conftest.defines', that
24947# substitutes the proper values into config.h.in to produce config.h.
24948rm -f conftest.defines conftest.tail
24949# First, append a space to every undef/define line, to ease matching.
24950echo 's/$/ /' >conftest.defines
24951# Then, protect against being on the right side of a sed subst, or in
24952# an unquoted here document, in config.status. If some macros were
24953# called several times there might be several #defines for the same
24954# symbol, which is useless. But do not sort them, since the last
24955# AC_DEFINE must be honored.
24956ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24957# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24958# NAME is the cpp macro being defined, VALUE is the value it is being given.
24959# PARAMS is the parameter list in the macro definition--in most cases, it's
24960# just an empty string.
24961ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24962ac_dB='\\)[ (].*,\\1define\\2'
24963ac_dC=' '
24964ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024965
Martin v. Löwiseba40652007-08-30 20:10:57 +000024966uniq confdefs.h |
24967 sed -n '
24968 t rset
24969 :rset
24970 s/^[ ]*#[ ]*define[ ][ ]*//
24971 t ok
24972 d
24973 :ok
24974 s/[\\&,]/\\&/g
24975 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24976 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
24977 ' >>conftest.defines
24978
24979# Remove the space that was appended to ease matching.
24980# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024981# example, in the case of _POSIX_SOURCE, which is predefined and required
24982# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024983# (The regexp can be short, since the line contains either #define or #undef.)
24984echo 's/ $//
24985s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000024986
Martin v. Löwiseba40652007-08-30 20:10:57 +000024987# Break up conftest.defines:
24988ac_max_sed_lines=50
24989
24990# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24991# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24992# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24993# et cetera.
24994ac_in='$ac_file_inputs'
24995ac_out='"$tmp/out1"'
24996ac_nxt='"$tmp/out2"'
24997
24998while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000024999do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025000 # Write a here document:
25001 cat >>$CONFIG_STATUS <<_ACEOF
25002 # First, check the format of the line:
25003 cat >"\$tmp/defines.sed" <<\\CEOF
25004/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25005/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25006b
25007:def
25008_ACEOF
25009 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025010 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025011 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25012 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25013 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25014 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025015 rm -f conftest.defines
25016 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025017done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025018rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025019
Martin v. Löwiseba40652007-08-30 20:10:57 +000025020echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025021cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025022 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025023 echo "/* $configure_input */" >"$tmp/config.h"
25024 cat "$ac_result" >>"$tmp/config.h"
25025 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025026 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25027echo "$as_me: $ac_file is unchanged" >&6;}
25028 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025029 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025030 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025031 fi
25032 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025033 echo "/* $configure_input */"
25034 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025035 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025036 rm -f "$tmp/out12"
25037 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025038
Martin v. Löwiseba40652007-08-30 20:10:57 +000025039
25040 esac
25041
25042done # for ac_tag
25043
Guido van Rossum627b2d71993-12-24 10:39:16 +000025044
Martin v. Löwis11437992002-04-12 09:54:03 +000025045{ (exit 0); exit 0; }
25046_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025047chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025048ac_clean_files=$ac_clean_files_save
25049
25050
25051# configure is writing to config.log, and then calls config.status.
25052# config.status does its own redirection, appending to config.log.
25053# Unfortunately, on DOS this fails, as config.log is still kept open
25054# by configure, so config.status won't be able to write to it; its
25055# output is simply discarded. So we exec the FD to /dev/null,
25056# effectively closing config.log, so it can be properly (re)opened and
25057# appended to by config.status. When coming back to configure, we
25058# need to make the FD available again.
25059if test "$no_create" != yes; then
25060 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025061 ac_config_status_args=
25062 test "$silent" = yes &&
25063 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025064 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025065 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025066 exec 5>>config.log
25067 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25068 # would make configure fail if this is the last instruction.
25069 $ac_cs_success || { (exit 1); exit 1; }
25070fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025071
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025072
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025073echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025074if test ! -f Modules/Setup
25075then
25076 cp $srcdir/Modules/Setup.dist Modules/Setup
25077fi
25078
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025079echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025080if test ! -f Modules/Setup.local
25081then
25082 echo "# Edit this file for local setup changes" >Modules/Setup.local
25083fi
25084
25085echo "creating Makefile"
25086$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25087 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025088 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025089
25090case $ac_sys_system in
25091BeOS)
25092 { echo "$as_me:$LINENO: WARNING:
25093
25094 Support for BeOS is deprecated as of Python 2.6.
25095 See PEP 11 for the gory details.
25096 " >&5
25097echo "$as_me: WARNING:
25098
25099 Support for BeOS is deprecated as of Python 2.6.
25100 See PEP 11 for the gory details.
25101 " >&2;}
25102 ;;
25103*) ;;
25104esac
25105
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025106mv config.c Modules