blob: 6009d8884900ab6baadeee8c3d82b41461fd66fb [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinson65134662008-04-25 16:11:04 +00002# From configure.in Revision: 62451 .
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
Mark Dickinson65134662008-04-25 16:11:04 +00002158{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2159echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2160ac_sys_machine=`uname -m`
2161{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2162echo "${ECHO_T}$ac_sys_machine" >&6; }
2163
Guido van Rossum627b2d71993-12-24 10:39:16 +00002164# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002165
2166# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2167# for debug/optimization stuff. BASECFLAGS is for flags that are required
2168# just to get things to compile and link. Users are free to override OPT
2169# when running configure or make. The build should not break if they do.
2170# BASECFLAGS should generally not be messed with, however.
2171
2172# XXX shouldn't some/most/all of this code be merged with the stuff later
2173# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002174{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2175echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002176
Martin v. Löwiseba40652007-08-30 20:10:57 +00002177# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002178if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002179 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002180 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002181 no) CC=cc
2182 without_gcc=yes;;
2183 yes) CC=gcc
2184 without_gcc=no;;
2185 *) CC=$withval
2186 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002187 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002188else
Martin v. Löwis11437992002-04-12 09:54:03 +00002189
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002190 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002191 AIX*) CC=cc_r
2192 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002193 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002194 case $BE_HOST_CPU in
2195 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002196 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002197 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002198 BASECFLAGS="$BASECFLAGS -export pragma"
2199 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002200 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002201 ;;
2202 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002203 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002204 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002205 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002206 ;;
2207 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002208 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2209echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2210 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002211 ;;
2212 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002213 AR="\$(srcdir)/Modules/ar_beos"
2214 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002215 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002216 Monterey*)
2217 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002218 without_gcc=;;
2219 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002220 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002221fi
2222
2223{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2224echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002225
Guido van Rossum8b131c51995-03-09 14:10:13 +00002226# If the user switches compilers, we can't believe the cache
2227if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2228then
Martin v. Löwis11437992002-04-12 09:54:03 +00002229 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2230(it is also a good idea to do 'make clean' before compiling)" >&5
2231echo "$as_me: error: cached CC is different -- throw away $cache_file
2232(it is also a good idea to do 'make clean' before compiling)" >&2;}
2233 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002234fi
2235
Martin v. Löwis11437992002-04-12 09:54:03 +00002236ac_ext=c
2237ac_cpp='$CPP $CPPFLAGS'
2238ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2239ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2240ac_compiler_gnu=$ac_cv_c_compiler_gnu
2241if test -n "$ac_tool_prefix"; then
2242 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2243set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002244{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2245echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002246if test "${ac_cv_prog_CC+set}" = set; then
2247 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002248else
2249 if test -n "$CC"; then
2250 ac_cv_prog_CC="$CC" # Let the user override the test.
2251else
Martin v. Löwis11437992002-04-12 09:54:03 +00002252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2253for as_dir in $PATH
2254do
2255 IFS=$as_save_IFS
2256 test -z "$as_dir" && as_dir=.
2257 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002258 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 +00002259 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2260 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2261 break 2
2262 fi
2263done
2264done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002265IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002266
Jack Jansendd19cf82001-12-06 22:36:17 +00002267fi
2268fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002269CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002270if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002271 { echo "$as_me:$LINENO: result: $CC" >&5
2272echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002273else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002274 { echo "$as_me:$LINENO: result: no" >&5
2275echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002276fi
2277
Martin v. Löwiseba40652007-08-30 20:10:57 +00002278
Martin v. Löwis11437992002-04-12 09:54:03 +00002279fi
2280if test -z "$ac_cv_prog_CC"; then
2281 ac_ct_CC=$CC
2282 # Extract the first word of "gcc", so it can be a program name with args.
2283set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002284{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2285echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002286if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2287 echo $ECHO_N "(cached) $ECHO_C" >&6
2288else
2289 if test -n "$ac_ct_CC"; then
2290 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2291else
2292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2293for as_dir in $PATH
2294do
2295 IFS=$as_save_IFS
2296 test -z "$as_dir" && as_dir=.
2297 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002298 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 +00002299 ac_cv_prog_ac_ct_CC="gcc"
2300 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2301 break 2
2302 fi
2303done
2304done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002305IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002306
2307fi
2308fi
2309ac_ct_CC=$ac_cv_prog_ac_ct_CC
2310if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002311 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2312echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002313else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002314 { echo "$as_me:$LINENO: result: no" >&5
2315echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002316fi
2317
Martin v. Löwiseba40652007-08-30 20:10:57 +00002318 if test "x$ac_ct_CC" = x; then
2319 CC=""
2320 else
2321 case $cross_compiling:$ac_tool_warned in
2322yes:)
2323{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2324whose name does not start with the host triplet. If you think this
2325configuration is useful to you, please write to autoconf@gnu.org." >&5
2326echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2327whose name does not start with the host triplet. If you think this
2328configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2329ac_tool_warned=yes ;;
2330esac
2331 CC=$ac_ct_CC
2332 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002333else
2334 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002335fi
2336
Jack Jansendd19cf82001-12-06 22:36:17 +00002337if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002338 if test -n "$ac_tool_prefix"; then
2339 # 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 +00002340set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002341{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2342echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002343if test "${ac_cv_prog_CC+set}" = set; then
2344 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002345else
2346 if test -n "$CC"; then
2347 ac_cv_prog_CC="$CC" # Let the user override the test.
2348else
Martin v. Löwis11437992002-04-12 09:54:03 +00002349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2350for as_dir in $PATH
2351do
2352 IFS=$as_save_IFS
2353 test -z "$as_dir" && as_dir=.
2354 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002355 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 +00002356 ac_cv_prog_CC="${ac_tool_prefix}cc"
2357 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2358 break 2
2359 fi
2360done
2361done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002363
2364fi
2365fi
2366CC=$ac_cv_prog_CC
2367if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002368 { echo "$as_me:$LINENO: result: $CC" >&5
2369echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002370else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002371 { echo "$as_me:$LINENO: result: no" >&5
2372echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002373fi
2374
Martin v. Löwiseba40652007-08-30 20:10:57 +00002375
Martin v. Löwis11437992002-04-12 09:54:03 +00002376 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002377fi
2378if test -z "$CC"; then
2379 # Extract the first word of "cc", so it can be a program name with args.
2380set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002381{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2382echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002383if test "${ac_cv_prog_CC+set}" = set; then
2384 echo $ECHO_N "(cached) $ECHO_C" >&6
2385else
2386 if test -n "$CC"; then
2387 ac_cv_prog_CC="$CC" # Let the user override the test.
2388else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002389 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2391for as_dir in $PATH
2392do
2393 IFS=$as_save_IFS
2394 test -z "$as_dir" && as_dir=.
2395 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002396 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 +00002397 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2398 ac_prog_rejected=yes
2399 continue
2400 fi
2401 ac_cv_prog_CC="cc"
2402 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2403 break 2
2404 fi
2405done
2406done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002407IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002408
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002409if test $ac_prog_rejected = yes; then
2410 # We found a bogon in the path, so make sure we never use it.
2411 set dummy $ac_cv_prog_CC
2412 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002413 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002414 # We chose a different compiler from the bogus one.
2415 # However, it has the same basename, so the bogon will be chosen
2416 # first if we set CC to just the basename; use the full file name.
2417 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002419 fi
2420fi
2421fi
2422fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002423CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002424if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002425 { echo "$as_me:$LINENO: result: $CC" >&5
2426echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002427else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002428 { echo "$as_me:$LINENO: result: no" >&5
2429echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002430fi
2431
Martin v. Löwiseba40652007-08-30 20:10:57 +00002432
Martin v. Löwis11437992002-04-12 09:54:03 +00002433fi
2434if test -z "$CC"; then
2435 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002436 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 do
2438 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2439set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002440{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2441echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002442if test "${ac_cv_prog_CC+set}" = set; then
2443 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002444else
2445 if test -n "$CC"; then
2446 ac_cv_prog_CC="$CC" # Let the user override the test.
2447else
Martin v. Löwis11437992002-04-12 09:54:03 +00002448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2449for as_dir in $PATH
2450do
2451 IFS=$as_save_IFS
2452 test -z "$as_dir" && as_dir=.
2453 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002454 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 +00002455 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2456 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2457 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002458 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002459done
2460done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002462
2463fi
2464fi
2465CC=$ac_cv_prog_CC
2466if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002467 { echo "$as_me:$LINENO: result: $CC" >&5
2468echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002469else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002470 { echo "$as_me:$LINENO: result: no" >&5
2471echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002472fi
2473
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 test -n "$CC" && break
2476 done
2477fi
2478if test -z "$CC"; then
2479 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002480 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002481do
2482 # Extract the first word of "$ac_prog", so it can be a program name with args.
2483set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002484{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002486if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2487 echo $ECHO_N "(cached) $ECHO_C" >&6
2488else
2489 if test -n "$ac_ct_CC"; then
2490 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2491else
2492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2493for as_dir in $PATH
2494do
2495 IFS=$as_save_IFS
2496 test -z "$as_dir" && as_dir=.
2497 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002498 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 +00002499 ac_cv_prog_ac_ct_CC="$ac_prog"
2500 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2501 break 2
2502 fi
2503done
2504done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002506
Martin v. Löwis11437992002-04-12 09:54:03 +00002507fi
2508fi
2509ac_ct_CC=$ac_cv_prog_ac_ct_CC
2510if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002511 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2512echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002513else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002514 { echo "$as_me:$LINENO: result: no" >&5
2515echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002516fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002517
Martin v. Löwiseba40652007-08-30 20:10:57 +00002518
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 test -n "$ac_ct_CC" && break
2520done
Michael W. Hudson54241132001-12-07 15:38:26 +00002521
Martin v. Löwiseba40652007-08-30 20:10:57 +00002522 if test "x$ac_ct_CC" = x; then
2523 CC=""
2524 else
2525 case $cross_compiling:$ac_tool_warned in
2526yes:)
2527{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2528whose name does not start with the host triplet. If you think this
2529configuration is useful to you, please write to autoconf@gnu.org." >&5
2530echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2531whose name does not start with the host triplet. If you think this
2532configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2533ac_tool_warned=yes ;;
2534esac
2535 CC=$ac_ct_CC
2536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002537fi
2538
2539fi
2540
2541
Skip Montanaro6dead952003-09-25 14:50:04 +00002542test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2543See \`config.log' for more details." >&5
2544echo "$as_me: error: no acceptable C compiler found in \$PATH
2545See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 { (exit 1); exit 1; }; }
2547
2548# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002549echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002550ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002551{ (ac_try="$ac_compiler --version >&5"
2552case "(($ac_try" in
2553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2554 *) ac_try_echo=$ac_try;;
2555esac
2556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2557 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 ac_status=$?
2559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2560 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002561{ (ac_try="$ac_compiler -v >&5"
2562case "(($ac_try" in
2563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2564 *) ac_try_echo=$ac_try;;
2565esac
2566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2567 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 ac_status=$?
2569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571{ (ac_try="$ac_compiler -V >&5"
2572case "(($ac_try" in
2573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2574 *) ac_try_echo=$ac_try;;
2575esac
2576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2577 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 ac_status=$?
2579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2580 (exit $ac_status); }
2581
2582cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002583/* confdefs.h. */
2584_ACEOF
2585cat confdefs.h >>conftest.$ac_ext
2586cat >>conftest.$ac_ext <<_ACEOF
2587/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589int
2590main ()
2591{
2592
2593 ;
2594 return 0;
2595}
2596_ACEOF
2597ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002598ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002599# Try to create an executable without -o first, disregard a.out.
2600# It will help us diagnose broken compilers, and finding out an intuition
2601# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2603echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002604ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002605#
2606# List of possible output files, starting from the most likely.
2607# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2608# only as a last resort. b.out is created by i960 compilers.
2609ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2610#
2611# The IRIX 6 linker writes into existing files which may not be
2612# executable, retaining their permissions. Remove them first so a
2613# subsequent execution test works.
2614ac_rmfiles=
2615for ac_file in $ac_files
2616do
2617 case $ac_file in
2618 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2619 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2620 esac
2621done
2622rm -f $ac_rmfiles
2623
2624if { (ac_try="$ac_link_default"
2625case "(($ac_try" in
2626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2627 *) ac_try_echo=$ac_try;;
2628esac
2629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2630 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 ac_status=$?
2632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2633 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002634 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2635# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2636# in a Makefile. We should not override ac_cv_exeext if it was cached,
2637# so that the user can short-circuit this test for compilers unknown to
2638# Autoconf.
2639for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002640do
2641 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002643 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002644 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002645 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002646 # We found the default executable, but exeext='' is most
2647 # certainly right.
2648 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002649 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002650 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2651 then :; else
2652 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2653 fi
2654 # We set ac_cv_exeext here because the later test for it is not
2655 # safe: cross compilers may not add the suffix if given an `-o'
2656 # argument, so we may need to know it at that point already.
2657 # Even if this section looks crufty: it has the advantage of
2658 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002659 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002660 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002661 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 esac
2663done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002664test "$ac_cv_exeext" = no && ac_cv_exeext=
2665
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002666else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002667 ac_file=''
2668fi
2669
2670{ echo "$as_me:$LINENO: result: $ac_file" >&5
2671echo "${ECHO_T}$ac_file" >&6; }
2672if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002674sed 's/^/| /' conftest.$ac_ext >&5
2675
2676{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2677See \`config.log' for more details." >&5
2678echo "$as_me: error: C compiler cannot create executables
2679See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002681fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002682
Martin v. Löwis11437992002-04-12 09:54:03 +00002683ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002684
Martin v. Löwiseba40652007-08-30 20:10:57 +00002685# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002686# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2688echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002689# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2690# If not cross compiling, check that we can run a simple program.
2691if test "$cross_compiling" != yes; then
2692 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002693 { (case "(($ac_try" in
2694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2695 *) ac_try_echo=$ac_try;;
2696esac
2697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2698 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002699 ac_status=$?
2700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2701 (exit $ac_status); }; }; then
2702 cross_compiling=no
2703 else
2704 if test "$cross_compiling" = maybe; then
2705 cross_compiling=yes
2706 else
2707 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002708If you meant to cross compile, use \`--host'.
2709See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002710echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002711If you meant to cross compile, use \`--host'.
2712See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 { (exit 1); exit 1; }; }
2714 fi
2715 fi
2716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717{ echo "$as_me:$LINENO: result: yes" >&5
2718echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002719
Skip Montanaro6dead952003-09-25 14:50:04 +00002720rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002721ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002722# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002723# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002724{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2725echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2726{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2727echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002728
Martin v. Löwiseba40652007-08-30 20:10:57 +00002729{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2730echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2731if { (ac_try="$ac_link"
2732case "(($ac_try" in
2733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2734 *) ac_try_echo=$ac_try;;
2735esac
2736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2737 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 ac_status=$?
2739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2740 (exit $ac_status); }; then
2741 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2742# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2743# work properly (i.e., refer to `conftest.exe'), while it won't with
2744# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002745for ac_file in conftest.exe conftest conftest.*; do
2746 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002748 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002750 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 * ) break;;
2752 esac
2753done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002754else
Skip Montanaro6dead952003-09-25 14:50:04 +00002755 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2756See \`config.log' for more details." >&5
2757echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2758See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002759 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002760fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002761
Martin v. Löwis11437992002-04-12 09:54:03 +00002762rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002763{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2764echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002765
2766rm -f conftest.$ac_ext
2767EXEEXT=$ac_cv_exeext
2768ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002769{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2770echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002771if test "${ac_cv_objext+set}" = set; then
2772 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002773else
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002775/* confdefs.h. */
2776_ACEOF
2777cat confdefs.h >>conftest.$ac_ext
2778cat >>conftest.$ac_ext <<_ACEOF
2779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002780
Martin v. Löwis11437992002-04-12 09:54:03 +00002781int
2782main ()
2783{
2784
2785 ;
2786 return 0;
2787}
2788_ACEOF
2789rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002790if { (ac_try="$ac_compile"
2791case "(($ac_try" in
2792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2793 *) ac_try_echo=$ac_try;;
2794esac
2795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2796 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002797 ac_status=$?
2798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2799 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002800 for ac_file in conftest.o conftest.obj conftest.*; do
2801 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002803 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002804 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2805 break;;
2806 esac
2807done
2808else
2809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002810sed 's/^/| /' conftest.$ac_ext >&5
2811
2812{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2813See \`config.log' for more details." >&5
2814echo "$as_me: error: cannot compute suffix of object files: cannot compile
2815See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002816 { (exit 1); exit 1; }; }
2817fi
2818
2819rm -f conftest.$ac_cv_objext conftest.$ac_ext
2820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002821{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2822echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002823OBJEXT=$ac_cv_objext
2824ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002825{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2826echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002827if test "${ac_cv_c_compiler_gnu+set}" = set; then
2828 echo $ECHO_N "(cached) $ECHO_C" >&6
2829else
2830 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002831/* confdefs.h. */
2832_ACEOF
2833cat confdefs.h >>conftest.$ac_ext
2834cat >>conftest.$ac_ext <<_ACEOF
2835/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002836
Martin v. Löwis11437992002-04-12 09:54:03 +00002837int
2838main ()
2839{
2840#ifndef __GNUC__
2841 choke me
2842#endif
2843
2844 ;
2845 return 0;
2846}
2847_ACEOF
2848rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002849if { (ac_try="$ac_compile"
2850case "(($ac_try" in
2851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2852 *) ac_try_echo=$ac_try;;
2853esac
2854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002857 grep -v '^ *+' conftest.er1 >conftest.err
2858 rm -f conftest.er1
2859 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002861 (exit $ac_status); } && {
2862 test -z "$ac_c_werror_flag" ||
2863 test ! -s conftest.err
2864 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002865 ac_compiler_gnu=yes
2866else
2867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002868sed 's/^/| /' conftest.$ac_ext >&5
2869
Martin v. Löwiseba40652007-08-30 20:10:57 +00002870 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002872
2873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002874ac_cv_c_compiler_gnu=$ac_compiler_gnu
2875
2876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002877{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2878echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002879GCC=`test $ac_compiler_gnu = yes && echo yes`
2880ac_test_CFLAGS=${CFLAGS+set}
2881ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002882{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2883echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002884if test "${ac_cv_prog_cc_g+set}" = set; then
2885 echo $ECHO_N "(cached) $ECHO_C" >&6
2886else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002887 ac_save_c_werror_flag=$ac_c_werror_flag
2888 ac_c_werror_flag=yes
2889 ac_cv_prog_cc_g=no
2890 CFLAGS="-g"
2891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002892/* confdefs.h. */
2893_ACEOF
2894cat confdefs.h >>conftest.$ac_ext
2895cat >>conftest.$ac_ext <<_ACEOF
2896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002897
Martin v. Löwis11437992002-04-12 09:54:03 +00002898int
2899main ()
2900{
2901
2902 ;
2903 return 0;
2904}
2905_ACEOF
2906rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002907if { (ac_try="$ac_compile"
2908case "(($ac_try" in
2909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2910 *) ac_try_echo=$ac_try;;
2911esac
2912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002915 grep -v '^ *+' conftest.er1 >conftest.err
2916 rm -f conftest.er1
2917 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002919 (exit $ac_status); } && {
2920 test -z "$ac_c_werror_flag" ||
2921 test ! -s conftest.err
2922 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002923 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002924else
Martin v. Löwis11437992002-04-12 09:54:03 +00002925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002926sed 's/^/| /' conftest.$ac_ext >&5
2927
Martin v. Löwiseba40652007-08-30 20:10:57 +00002928 CFLAGS=""
2929 cat >conftest.$ac_ext <<_ACEOF
2930/* confdefs.h. */
2931_ACEOF
2932cat confdefs.h >>conftest.$ac_ext
2933cat >>conftest.$ac_ext <<_ACEOF
2934/* end confdefs.h. */
2935
2936int
2937main ()
2938{
2939
2940 ;
2941 return 0;
2942}
2943_ACEOF
2944rm -f conftest.$ac_objext
2945if { (ac_try="$ac_compile"
2946case "(($ac_try" in
2947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2948 *) ac_try_echo=$ac_try;;
2949esac
2950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2951 (eval "$ac_compile") 2>conftest.er1
2952 ac_status=$?
2953 grep -v '^ *+' conftest.er1 >conftest.err
2954 rm -f conftest.er1
2955 cat conftest.err >&5
2956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2957 (exit $ac_status); } && {
2958 test -z "$ac_c_werror_flag" ||
2959 test ! -s conftest.err
2960 } && test -s conftest.$ac_objext; then
2961 :
2962else
2963 echo "$as_me: failed program was:" >&5
2964sed 's/^/| /' conftest.$ac_ext >&5
2965
2966 ac_c_werror_flag=$ac_save_c_werror_flag
2967 CFLAGS="-g"
2968 cat >conftest.$ac_ext <<_ACEOF
2969/* confdefs.h. */
2970_ACEOF
2971cat confdefs.h >>conftest.$ac_ext
2972cat >>conftest.$ac_ext <<_ACEOF
2973/* end confdefs.h. */
2974
2975int
2976main ()
2977{
2978
2979 ;
2980 return 0;
2981}
2982_ACEOF
2983rm -f conftest.$ac_objext
2984if { (ac_try="$ac_compile"
2985case "(($ac_try" in
2986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2987 *) ac_try_echo=$ac_try;;
2988esac
2989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2990 (eval "$ac_compile") 2>conftest.er1
2991 ac_status=$?
2992 grep -v '^ *+' conftest.er1 >conftest.err
2993 rm -f conftest.er1
2994 cat conftest.err >&5
2995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2996 (exit $ac_status); } && {
2997 test -z "$ac_c_werror_flag" ||
2998 test ! -s conftest.err
2999 } && test -s conftest.$ac_objext; then
3000 ac_cv_prog_cc_g=yes
3001else
3002 echo "$as_me: failed program was:" >&5
3003sed 's/^/| /' conftest.$ac_ext >&5
3004
3005
Guido van Rossum627b2d71993-12-24 10:39:16 +00003006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003007
3008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003010
3011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3012fi
3013
3014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3015 ac_c_werror_flag=$ac_save_c_werror_flag
3016fi
3017{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3018echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003019if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003020 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003021elif test $ac_cv_prog_cc_g = yes; then
3022 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003023 CFLAGS="-g -O2"
3024 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003025 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003026 fi
3027else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003028 if test "$GCC" = yes; then
3029 CFLAGS="-O2"
3030 else
3031 CFLAGS=
3032 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003034{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3035echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3036if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003037 echo $ECHO_N "(cached) $ECHO_C" >&6
3038else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003039 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003040ac_save_CC=$CC
3041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003042/* confdefs.h. */
3043_ACEOF
3044cat confdefs.h >>conftest.$ac_ext
3045cat >>conftest.$ac_ext <<_ACEOF
3046/* end confdefs.h. */
3047#include <stdarg.h>
3048#include <stdio.h>
3049#include <sys/types.h>
3050#include <sys/stat.h>
3051/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3052struct buf { int x; };
3053FILE * (*rcsopen) (struct buf *, struct stat *, int);
3054static char *e (p, i)
3055 char **p;
3056 int i;
3057{
3058 return p[i];
3059}
3060static char *f (char * (*g) (char **, int), char **p, ...)
3061{
3062 char *s;
3063 va_list v;
3064 va_start (v,p);
3065 s = g (p, va_arg (v,int));
3066 va_end (v);
3067 return s;
3068}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003069
3070/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3071 function prototypes and stuff, but not '\xHH' hex character constants.
3072 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003073 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003074 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3075 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003076 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003077int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3078
Martin v. Löwiseba40652007-08-30 20:10:57 +00003079/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3080 inside strings and character constants. */
3081#define FOO(x) 'x'
3082int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3083
Skip Montanaro6dead952003-09-25 14:50:04 +00003084int test (int i, double x);
3085struct s1 {int (*f) (int a);};
3086struct s2 {int (*f) (double a);};
3087int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3088int argc;
3089char **argv;
3090int
3091main ()
3092{
3093return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3094 ;
3095 return 0;
3096}
3097_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003098for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3099 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003100do
3101 CC="$ac_save_CC $ac_arg"
3102 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003103if { (ac_try="$ac_compile"
3104case "(($ac_try" in
3105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3106 *) ac_try_echo=$ac_try;;
3107esac
3108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3109 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003111 grep -v '^ *+' conftest.er1 >conftest.err
3112 rm -f conftest.er1
3113 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003115 (exit $ac_status); } && {
3116 test -z "$ac_c_werror_flag" ||
3117 test ! -s conftest.err
3118 } && test -s conftest.$ac_objext; then
3119 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003120else
3121 echo "$as_me: failed program was:" >&5
3122sed 's/^/| /' conftest.$ac_ext >&5
3123
Martin v. Löwiseba40652007-08-30 20:10:57 +00003124
Skip Montanaro6dead952003-09-25 14:50:04 +00003125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003126
3127rm -f core conftest.err conftest.$ac_objext
3128 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003129done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003130rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003131CC=$ac_save_CC
3132
3133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003134# AC_CACHE_VAL
3135case "x$ac_cv_prog_cc_c89" in
3136 x)
3137 { echo "$as_me:$LINENO: result: none needed" >&5
3138echo "${ECHO_T}none needed" >&6; } ;;
3139 xno)
3140 { echo "$as_me:$LINENO: result: unsupported" >&5
3141echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003142 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003143 CC="$CC $ac_cv_prog_cc_c89"
3144 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3145echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003146esac
3147
Skip Montanaro6dead952003-09-25 14:50:04 +00003148
Martin v. Löwis11437992002-04-12 09:54:03 +00003149ac_ext=c
3150ac_cpp='$CPP $CPPFLAGS'
3151ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3152ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3153ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003154
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003155
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003156
3157
Martin v. Löwiseba40652007-08-30 20:10:57 +00003158{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3159echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003160
Martin v. Löwiseba40652007-08-30 20:10:57 +00003161# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003162if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003163 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003164
3165 case $withval in
3166 no) with_cxx_main=no
3167 MAINCC='$(CC)';;
3168 yes) with_cxx_main=yes
3169 MAINCC='$(CXX)';;
3170 *) with_cxx_main=yes
3171 MAINCC=$withval
3172 if test -z "$CXX"
3173 then
3174 CXX=$withval
3175 fi;;
3176 esac
3177else
3178
3179 with_cxx_main=no
3180 MAINCC='$(CC)'
3181
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182fi
3183
3184{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3185echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003186
3187preset_cxx="$CXX"
3188if test -z "$CXX"
3189then
3190 case "$CC" in
3191 gcc) # Extract the first word of "g++", so it can be a program name with args.
3192set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003193{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3194echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003195if test "${ac_cv_path_CXX+set}" = set; then
3196 echo $ECHO_N "(cached) $ECHO_C" >&6
3197else
3198 case $CXX in
3199 [\\/]* | ?:[\\/]*)
3200 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3201 ;;
3202 *)
3203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3204for as_dir in notfound
3205do
3206 IFS=$as_save_IFS
3207 test -z "$as_dir" && as_dir=.
3208 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003209 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 +00003210 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3211 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3212 break 2
3213 fi
3214done
3215done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003216IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003217
3218 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3219 ;;
3220esac
3221fi
3222CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003223if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003224 { echo "$as_me:$LINENO: result: $CXX" >&5
3225echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003226else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227 { echo "$as_me:$LINENO: result: no" >&5
3228echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003230
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003231 ;;
3232 cc) # Extract the first word of "c++", so it can be a program name with args.
3233set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003234{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3235echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003236if test "${ac_cv_path_CXX+set}" = set; then
3237 echo $ECHO_N "(cached) $ECHO_C" >&6
3238else
3239 case $CXX in
3240 [\\/]* | ?:[\\/]*)
3241 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3242 ;;
3243 *)
3244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3245for as_dir in notfound
3246do
3247 IFS=$as_save_IFS
3248 test -z "$as_dir" && as_dir=.
3249 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003250 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 +00003251 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3252 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3253 break 2
3254 fi
3255done
3256done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003257IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003258
3259 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3260 ;;
3261esac
3262fi
3263CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003264if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003265 { echo "$as_me:$LINENO: result: $CXX" >&5
3266echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003267else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003268 { echo "$as_me:$LINENO: result: no" >&5
3269echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003271
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003272 ;;
3273 esac
3274 if test "$CXX" = "notfound"
3275 then
3276 CXX=""
3277 fi
3278fi
3279if test -z "$CXX"
3280then
3281 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3282do
3283 # Extract the first word of "$ac_prog", so it can be a program name with args.
3284set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003285{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3286echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003287if test "${ac_cv_prog_CXX+set}" = set; then
3288 echo $ECHO_N "(cached) $ECHO_C" >&6
3289else
3290 if test -n "$CXX"; then
3291 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3292else
3293as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3294for as_dir in $PATH
3295do
3296 IFS=$as_save_IFS
3297 test -z "$as_dir" && as_dir=.
3298 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003299 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 +00003300 ac_cv_prog_CXX="$ac_prog"
3301 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3302 break 2
3303 fi
3304done
3305done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003307
3308fi
3309fi
3310CXX=$ac_cv_prog_CXX
3311if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003312 { echo "$as_me:$LINENO: result: $CXX" >&5
3313echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003314else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003315 { echo "$as_me:$LINENO: result: no" >&5
3316echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003317fi
3318
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003320 test -n "$CXX" && break
3321done
3322test -n "$CXX" || CXX="notfound"
3323
3324 if test "$CXX" = "notfound"
3325 then
3326 CXX=""
3327 fi
3328fi
3329if test "$preset_cxx" != "$CXX"
3330then
3331 { echo "$as_me:$LINENO: WARNING:
3332
3333 By default, distutils will build C++ extension modules with \"$CXX\".
3334 If this is not intended, then set CXX on the configure command line.
3335 " >&5
3336echo "$as_me: WARNING:
3337
3338 By default, distutils will build C++ extension modules with \"$CXX\".
3339 If this is not intended, then set CXX on the configure command line.
3340 " >&2;}
3341fi
3342
3343
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003344# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003345
3346ac_ext=c
3347ac_cpp='$CPP $CPPFLAGS'
3348ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3349ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3350ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003351{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3352echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003353# On Suns, sometimes $CPP names a directory.
3354if test -n "$CPP" && test -d "$CPP"; then
3355 CPP=
3356fi
3357if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003358 if test "${ac_cv_prog_CPP+set}" = set; then
3359 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003360else
Martin v. Löwis11437992002-04-12 09:54:03 +00003361 # Double quotes because CPP needs to be expanded
3362 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3363 do
3364 ac_preproc_ok=false
3365for ac_c_preproc_warn_flag in '' yes
3366do
3367 # Use a header file that comes with gcc, so configuring glibc
3368 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003369 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3370 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003371 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003372 # not just through cpp. "Syntax error" is here to catch this case.
3373 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003374/* confdefs.h. */
3375_ACEOF
3376cat confdefs.h >>conftest.$ac_ext
3377cat >>conftest.$ac_ext <<_ACEOF
3378/* end confdefs.h. */
3379#ifdef __STDC__
3380# include <limits.h>
3381#else
3382# include <assert.h>
3383#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003384 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003385_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003386if { (ac_try="$ac_cpp conftest.$ac_ext"
3387case "(($ac_try" in
3388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3389 *) ac_try_echo=$ac_try;;
3390esac
3391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3392 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003393 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003394 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003395 rm -f conftest.er1
3396 cat conftest.err >&5
3397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003398 (exit $ac_status); } >/dev/null && {
3399 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3400 test ! -s conftest.err
3401 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003402 :
3403else
Martin v. Löwis11437992002-04-12 09:54:03 +00003404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003405sed 's/^/| /' conftest.$ac_ext >&5
3406
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 # Broken: fails on valid input.
3408continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003410
Martin v. Löwis11437992002-04-12 09:54:03 +00003411rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003412
Martin v. Löwiseba40652007-08-30 20:10:57 +00003413 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003414 # can be detected and how.
3415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003416/* confdefs.h. */
3417_ACEOF
3418cat confdefs.h >>conftest.$ac_ext
3419cat >>conftest.$ac_ext <<_ACEOF
3420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003421#include <ac_nonexistent.h>
3422_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003423if { (ac_try="$ac_cpp conftest.$ac_ext"
3424case "(($ac_try" in
3425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3426 *) ac_try_echo=$ac_try;;
3427esac
3428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3429 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003431 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 rm -f conftest.er1
3433 cat conftest.err >&5
3434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003435 (exit $ac_status); } >/dev/null && {
3436 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3437 test ! -s conftest.err
3438 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 # Broken: success on invalid input.
3440continue
3441else
3442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003443sed 's/^/| /' conftest.$ac_ext >&5
3444
Martin v. Löwis11437992002-04-12 09:54:03 +00003445 # Passes both tests.
3446ac_preproc_ok=:
3447break
3448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003449
Martin v. Löwis11437992002-04-12 09:54:03 +00003450rm -f conftest.err conftest.$ac_ext
3451
3452done
3453# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3454rm -f conftest.err conftest.$ac_ext
3455if $ac_preproc_ok; then
3456 break
3457fi
3458
3459 done
3460 ac_cv_prog_CPP=$CPP
3461
3462fi
3463 CPP=$ac_cv_prog_CPP
3464else
3465 ac_cv_prog_CPP=$CPP
3466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003467{ echo "$as_me:$LINENO: result: $CPP" >&5
3468echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003469ac_preproc_ok=false
3470for ac_c_preproc_warn_flag in '' yes
3471do
3472 # Use a header file that comes with gcc, so configuring glibc
3473 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003474 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3475 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 # On the NeXT, cc -E runs the code through the compiler's parser,
3477 # not just through cpp. "Syntax error" is here to catch this case.
3478 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003479/* confdefs.h. */
3480_ACEOF
3481cat confdefs.h >>conftest.$ac_ext
3482cat >>conftest.$ac_ext <<_ACEOF
3483/* end confdefs.h. */
3484#ifdef __STDC__
3485# include <limits.h>
3486#else
3487# include <assert.h>
3488#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003489 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003490_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003491if { (ac_try="$ac_cpp conftest.$ac_ext"
3492case "(($ac_try" in
3493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3494 *) ac_try_echo=$ac_try;;
3495esac
3496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3497 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003499 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 rm -f conftest.er1
3501 cat conftest.err >&5
3502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003503 (exit $ac_status); } >/dev/null && {
3504 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3505 test ! -s conftest.err
3506 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003507 :
3508else
3509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003510sed 's/^/| /' conftest.$ac_ext >&5
3511
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 # Broken: fails on valid input.
3513continue
3514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003515
Martin v. Löwis11437992002-04-12 09:54:03 +00003516rm -f conftest.err conftest.$ac_ext
3517
Martin v. Löwiseba40652007-08-30 20:10:57 +00003518 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 # can be detected and how.
3520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003521/* confdefs.h. */
3522_ACEOF
3523cat confdefs.h >>conftest.$ac_ext
3524cat >>conftest.$ac_ext <<_ACEOF
3525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003526#include <ac_nonexistent.h>
3527_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003528if { (ac_try="$ac_cpp conftest.$ac_ext"
3529case "(($ac_try" in
3530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3531 *) ac_try_echo=$ac_try;;
3532esac
3533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3534 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003536 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 rm -f conftest.er1
3538 cat conftest.err >&5
3539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003540 (exit $ac_status); } >/dev/null && {
3541 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3542 test ! -s conftest.err
3543 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Broken: success on invalid input.
3545continue
3546else
3547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003548sed 's/^/| /' conftest.$ac_ext >&5
3549
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 # Passes both tests.
3551ac_preproc_ok=:
3552break
3553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555rm -f conftest.err conftest.$ac_ext
3556
3557done
3558# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3559rm -f conftest.err conftest.$ac_ext
3560if $ac_preproc_ok; then
3561 :
3562else
Skip Montanaro6dead952003-09-25 14:50:04 +00003563 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3564See \`config.log' for more details." >&5
3565echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3566See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 { (exit 1); exit 1; }; }
3568fi
3569
3570ac_ext=c
3571ac_cpp='$CPP $CPPFLAGS'
3572ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3573ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3574ac_compiler_gnu=$ac_cv_c_compiler_gnu
3575
3576
Martin v. Löwiseba40652007-08-30 20:10:57 +00003577{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3578echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3579if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003580 echo $ECHO_N "(cached) $ECHO_C" >&6
3581else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003582 # Extract the first word of "grep ggrep" to use in msg output
3583if test -z "$GREP"; then
3584set dummy grep ggrep; ac_prog_name=$2
3585if test "${ac_cv_path_GREP+set}" = set; then
3586 echo $ECHO_N "(cached) $ECHO_C" >&6
3587else
3588 ac_path_GREP_found=false
3589# Loop through the user's path and test for each of PROGNAME-LIST
3590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3591for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3592do
3593 IFS=$as_save_IFS
3594 test -z "$as_dir" && as_dir=.
3595 for ac_prog in grep ggrep; do
3596 for ac_exec_ext in '' $ac_executable_extensions; do
3597 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3598 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3599 # Check for GNU ac_path_GREP and select it if it is found.
3600 # Check for GNU $ac_path_GREP
3601case `"$ac_path_GREP" --version 2>&1` in
3602*GNU*)
3603 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3604*)
3605 ac_count=0
3606 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3607 while :
3608 do
3609 cat "conftest.in" "conftest.in" >"conftest.tmp"
3610 mv "conftest.tmp" "conftest.in"
3611 cp "conftest.in" "conftest.nl"
3612 echo 'GREP' >> "conftest.nl"
3613 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3614 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3615 ac_count=`expr $ac_count + 1`
3616 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3617 # Best one so far, save it but keep looking for a better one
3618 ac_cv_path_GREP="$ac_path_GREP"
3619 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003620 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003621 # 10*(2^10) chars as input seems more than enough
3622 test $ac_count -gt 10 && break
3623 done
3624 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3625esac
3626
3627
3628 $ac_path_GREP_found && break 3
3629 done
3630done
3631
3632done
3633IFS=$as_save_IFS
3634
3635
Skip Montanaro6dead952003-09-25 14:50:04 +00003636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003637
3638GREP="$ac_cv_path_GREP"
3639if test -z "$GREP"; then
3640 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3641echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3642 { (exit 1); exit 1; }; }
3643fi
3644
3645else
3646 ac_cv_path_GREP=$GREP
3647fi
3648
3649
3650fi
3651{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3652echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3653 GREP="$ac_cv_path_GREP"
3654
3655
3656{ echo "$as_me:$LINENO: checking for egrep" >&5
3657echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3658if test "${ac_cv_path_EGREP+set}" = set; then
3659 echo $ECHO_N "(cached) $ECHO_C" >&6
3660else
3661 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3662 then ac_cv_path_EGREP="$GREP -E"
3663 else
3664 # Extract the first word of "egrep" to use in msg output
3665if test -z "$EGREP"; then
3666set dummy egrep; ac_prog_name=$2
3667if test "${ac_cv_path_EGREP+set}" = set; then
3668 echo $ECHO_N "(cached) $ECHO_C" >&6
3669else
3670 ac_path_EGREP_found=false
3671# Loop through the user's path and test for each of PROGNAME-LIST
3672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3673for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3674do
3675 IFS=$as_save_IFS
3676 test -z "$as_dir" && as_dir=.
3677 for ac_prog in egrep; do
3678 for ac_exec_ext in '' $ac_executable_extensions; do
3679 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3680 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3681 # Check for GNU ac_path_EGREP and select it if it is found.
3682 # Check for GNU $ac_path_EGREP
3683case `"$ac_path_EGREP" --version 2>&1` in
3684*GNU*)
3685 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3686*)
3687 ac_count=0
3688 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3689 while :
3690 do
3691 cat "conftest.in" "conftest.in" >"conftest.tmp"
3692 mv "conftest.tmp" "conftest.in"
3693 cp "conftest.in" "conftest.nl"
3694 echo 'EGREP' >> "conftest.nl"
3695 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3696 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3697 ac_count=`expr $ac_count + 1`
3698 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3699 # Best one so far, save it but keep looking for a better one
3700 ac_cv_path_EGREP="$ac_path_EGREP"
3701 ac_path_EGREP_max=$ac_count
3702 fi
3703 # 10*(2^10) chars as input seems more than enough
3704 test $ac_count -gt 10 && break
3705 done
3706 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3707esac
3708
3709
3710 $ac_path_EGREP_found && break 3
3711 done
3712done
3713
3714done
3715IFS=$as_save_IFS
3716
3717
3718fi
3719
3720EGREP="$ac_cv_path_EGREP"
3721if test -z "$EGREP"; then
3722 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3723echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3724 { (exit 1); exit 1; }; }
3725fi
3726
3727else
3728 ac_cv_path_EGREP=$EGREP
3729fi
3730
3731
3732 fi
3733fi
3734{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3735echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3736 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003737
3738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739
Martin v. Löwiseba40652007-08-30 20:10:57 +00003740{ echo "$as_me:$LINENO: checking for AIX" >&5
3741echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003743/* confdefs.h. */
3744_ACEOF
3745cat confdefs.h >>conftest.$ac_ext
3746cat >>conftest.$ac_ext <<_ACEOF
3747/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003748#ifdef _AIX
3749 yes
3750#endif
3751
Martin v. Löwis11437992002-04-12 09:54:03 +00003752_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003753if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003754 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003755 { echo "$as_me:$LINENO: result: yes" >&5
3756echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003757cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003758#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003759_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003760
3761else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003762 { echo "$as_me:$LINENO: result: no" >&5
3763echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003764fi
3765rm -f conftest*
3766
Michael W. Hudson54241132001-12-07 15:38:26 +00003767
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003768
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003769# Check for unsupported systems
3770case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003771atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003772 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3773 echo See README for details.
3774 exit 1;;
3775esac
3776
Michael W. Hudson54241132001-12-07 15:38:26 +00003777
Martin v. Löwiseba40652007-08-30 20:10:57 +00003778{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3779echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003780
Martin v. Löwiseba40652007-08-30 20:10:57 +00003781# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003782if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003783 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003784 case $withval in
3785 no) EXEEXT=;;
3786 yes) EXEEXT=.exe;;
3787 *) EXEEXT=$withval;;
3788 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003789fi
3790
3791{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3792echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003793
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003794# Test whether we're running on a non-case-sensitive system, in which
3795# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003796
Martin v. Löwiseba40652007-08-30 20:10:57 +00003797{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3798echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003799if test ! -d CaseSensitiveTestDir; then
3800mkdir CaseSensitiveTestDir
3801fi
3802
3803if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003804then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003805 { echo "$as_me:$LINENO: result: yes" >&5
3806echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003807 BUILDEXEEXT=.exe
3808else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003809 { echo "$as_me:$LINENO: result: no" >&5
3810echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003811 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003812fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003813rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003814
Guido van Rossumdd997f71998-10-07 19:58:26 +00003815case $MACHDEP in
3816bsdos*)
3817 case $CC in
3818 gcc) CC="$CC -D_HAVE_BSDI";;
3819 esac;;
3820esac
3821
Guido van Rossum24b1e751997-08-21 02:29:16 +00003822case $ac_sys_system in
3823hp*|HP*)
3824 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003825 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003826 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003827Monterey*)
3828 case $CC in
3829 cc) CC="$CC -Wl,-Bexport";;
3830 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003831SunOS*)
3832 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003833
3834cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003835#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003836_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003837
3838 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003839esac
3840
Michael W. Hudson54241132001-12-07 15:38:26 +00003841
3842
Martin v. Löwiseba40652007-08-30 20:10:57 +00003843{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3844echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003845if test -z "$LIBRARY"
3846then
3847 LIBRARY='libpython$(VERSION).a'
3848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003849{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3850echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003851
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003852# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003853# name of the library into which to insert object files). BLDLIBRARY is also
3854# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3855# is blank as the main program is not linked directly against LDLIBRARY.
3856# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3857# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3858# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3859# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003860#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003861# RUNSHARED is used to run shared python without installed libraries
3862#
3863# INSTSONAME is the name of the shared library that will be use to install
3864# on the system - some systems like version suffix, others don't
3865
3866
Michael W. Hudson54241132001-12-07 15:38:26 +00003867
3868
3869
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003870
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003871LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003872BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003873INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003874DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003875LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003876RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003877
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003878# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003879# If CXX is set, and if it is needed to link a main function that was
3880# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3881# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003882# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003883# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003884
Martin v. Löwiseba40652007-08-30 20:10:57 +00003885{ echo "$as_me:$LINENO: checking LINKCC" >&5
3886echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003887if test -z "$LINKCC"
3888then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003889 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003890 case $ac_sys_system in
3891 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003892 exp_extra="\"\""
3893 if test $ac_sys_release -ge 5 -o \
3894 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3895 exp_extra="."
3896 fi
3897 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003898 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003899 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003900 esac
3901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003902{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3903echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003904
Martin v. Löwiseba40652007-08-30 20:10:57 +00003905{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3906echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3907# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003908if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003909 enableval=$enable_shared;
3910fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003911
Martin v. Löwis1142de32002-03-29 16:28:31 +00003912
3913if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003914then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003915 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003916 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003917 enable_shared="yes";;
3918 *)
3919 enable_shared="no";;
3920 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003922{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3923echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003924
Martin v. Löwiseba40652007-08-30 20:10:57 +00003925{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3926echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3927# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003928if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003929 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003930 CC="$CC -pg"
3931 if test "$cross_compiling" = yes; then
3932 ac_enable_profiling="no"
3933else
3934 cat >conftest.$ac_ext <<_ACEOF
3935/* confdefs.h. */
3936_ACEOF
3937cat confdefs.h >>conftest.$ac_ext
3938cat >>conftest.$ac_ext <<_ACEOF
3939/* end confdefs.h. */
3940int main() { return 0; }
3941_ACEOF
3942rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003943if { (ac_try="$ac_link"
3944case "(($ac_try" in
3945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3946 *) ac_try_echo=$ac_try;;
3947esac
3948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3949 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003950 ac_status=$?
3951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3952 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00003953 { (case "(($ac_try" in
3954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3955 *) ac_try_echo=$ac_try;;
3956esac
3957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3958 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003959 ac_status=$?
3960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3961 (exit $ac_status); }; }; then
3962 ac_enable_profiling="yes"
3963else
3964 echo "$as_me: program exited with status $ac_status" >&5
3965echo "$as_me: failed program was:" >&5
3966sed 's/^/| /' conftest.$ac_ext >&5
3967
3968( exit $ac_status )
3969ac_enable_profiling="no"
3970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003971rm -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 +00003972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003973
3974
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003975 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003976fi
3977
3978{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3979echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003980
3981case "$ac_enable_profiling" in
3982 "yes")
3983 BASECFLAGS="-pg $BASECFLAGS"
3984 LDFLAGS="-pg $LDFLAGS"
3985 ;;
3986esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003987
Martin v. Löwiseba40652007-08-30 20:10:57 +00003988{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3989echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00003990
Guido van Rossumb8552162001-09-05 14:58:11 +00003991# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3992# library that we build, but we do not want to link against it (we
3993# will find it with a -framework option). For this reason there is an
3994# extra variable BLDLIBRARY against which Python and the extension
3995# modules are linked, BLDLIBRARY. This is normally the same as
3996# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003997if test "$enable_framework"
3998then
3999 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004000 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004001 BLDLIBRARY=''
4002else
4003 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004004fi
Jack Jansene578a632001-08-15 01:27:14 +00004005
Martin v. Löwis1142de32002-03-29 16:28:31 +00004006# Other platforms follow
4007if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004008
4009cat >>confdefs.h <<\_ACEOF
4010#define Py_ENABLE_SHARED 1
4011_ACEOF
4012
Martin v. Löwis1142de32002-03-29 16:28:31 +00004013 case $ac_sys_system in
4014 BeOS*)
4015 LDLIBRARY='libpython$(VERSION).so'
4016 ;;
4017 CYGWIN*)
4018 LDLIBRARY='libpython$(VERSION).dll.a'
4019 DLLLIBRARY='libpython$(VERSION).dll'
4020 ;;
4021 SunOS*)
4022 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004023 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004024 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004025 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004026 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004027 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004028 LDLIBRARY='libpython$(VERSION).so'
4029 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004030 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004031 case $ac_sys_system in
4032 FreeBSD*)
4033 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4034 ;;
4035 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004036 INSTSONAME="$LDLIBRARY".$SOVERSION
4037 ;;
4038 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004039 case `uname -m` in
4040 ia64)
4041 LDLIBRARY='libpython$(VERSION).so'
4042 ;;
4043 *)
4044 LDLIBRARY='libpython$(VERSION).sl'
4045 ;;
4046 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004047 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004048 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004049 ;;
4050 OSF*)
4051 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004052 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004053 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004054 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004055 atheos*)
4056 LDLIBRARY='libpython$(VERSION).so'
4057 BLDLIBRARY='-L. -lpython$(VERSION)'
4058 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4059 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004060 esac
Jason Tishler30765592003-09-04 11:04:06 +00004061else # shared is disabled
4062 case $ac_sys_system in
4063 CYGWIN*)
4064 BLDLIBRARY='$(LIBRARY)'
4065 LDLIBRARY='libpython$(VERSION).dll.a'
4066 ;;
4067 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004068fi
4069
Martin v. Löwiseba40652007-08-30 20:10:57 +00004070{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4071echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004072
Martin v. Löwis11437992002-04-12 09:54:03 +00004073if test -n "$ac_tool_prefix"; then
4074 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4075set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004076{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4077echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004078if test "${ac_cv_prog_RANLIB+set}" = set; then
4079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004080else
4081 if test -n "$RANLIB"; then
4082 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4083else
Martin v. Löwis11437992002-04-12 09:54:03 +00004084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4085for as_dir in $PATH
4086do
4087 IFS=$as_save_IFS
4088 test -z "$as_dir" && as_dir=.
4089 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004090 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 +00004091 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4092 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4093 break 2
4094 fi
4095done
4096done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004097IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004098
Guido van Rossum627b2d71993-12-24 10:39:16 +00004099fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004100fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004101RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004102if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004103 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4104echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004105else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004106 { echo "$as_me:$LINENO: result: no" >&5
4107echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004108fi
4109
Martin v. Löwiseba40652007-08-30 20:10:57 +00004110
Martin v. Löwis11437992002-04-12 09:54:03 +00004111fi
4112if test -z "$ac_cv_prog_RANLIB"; then
4113 ac_ct_RANLIB=$RANLIB
4114 # Extract the first word of "ranlib", so it can be a program name with args.
4115set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004116{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4117echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004118if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4119 echo $ECHO_N "(cached) $ECHO_C" >&6
4120else
4121 if test -n "$ac_ct_RANLIB"; then
4122 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4123else
4124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4125for as_dir in $PATH
4126do
4127 IFS=$as_save_IFS
4128 test -z "$as_dir" && as_dir=.
4129 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004130 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 +00004131 ac_cv_prog_ac_ct_RANLIB="ranlib"
4132 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4133 break 2
4134 fi
4135done
4136done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004138
Martin v. Löwis11437992002-04-12 09:54:03 +00004139fi
4140fi
4141ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4142if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004143 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4144echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004145else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004146 { echo "$as_me:$LINENO: result: no" >&5
4147echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004148fi
4149
Martin v. Löwiseba40652007-08-30 20:10:57 +00004150 if test "x$ac_ct_RANLIB" = x; then
4151 RANLIB=":"
4152 else
4153 case $cross_compiling:$ac_tool_warned in
4154yes:)
4155{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4156whose name does not start with the host triplet. If you think this
4157configuration is useful to you, please write to autoconf@gnu.org." >&5
4158echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4159whose name does not start with the host triplet. If you think this
4160configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4161ac_tool_warned=yes ;;
4162esac
4163 RANLIB=$ac_ct_RANLIB
4164 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004165else
4166 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004168
4169
Guido van Rossum7f43da71994-08-01 12:15:30 +00004170for ac_prog in ar aal
4171do
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004173set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004174{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4175echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004176if test "${ac_cv_prog_AR+set}" = set; then
4177 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004178else
4179 if test -n "$AR"; then
4180 ac_cv_prog_AR="$AR" # Let the user override the test.
4181else
Martin v. Löwis11437992002-04-12 09:54:03 +00004182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4183for as_dir in $PATH
4184do
4185 IFS=$as_save_IFS
4186 test -z "$as_dir" && as_dir=.
4187 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004188 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 +00004189 ac_cv_prog_AR="$ac_prog"
4190 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4191 break 2
4192 fi
4193done
4194done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004196
Guido van Rossum7f43da71994-08-01 12:15:30 +00004197fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004198fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004199AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004201 { echo "$as_me:$LINENO: result: $AR" >&5
4202echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004204 { echo "$as_me:$LINENO: result: no" >&5
4205echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004207
Martin v. Löwiseba40652007-08-30 20:10:57 +00004208
Martin v. Löwis11437992002-04-12 09:54:03 +00004209 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004210done
4211test -n "$AR" || AR="ar"
4212
Michael W. Hudson54241132001-12-07 15:38:26 +00004213
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004214
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004215# Extract the first word of "svnversion", so it can be a program name with args.
4216set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004217{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4218echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004219if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4220 echo $ECHO_N "(cached) $ECHO_C" >&6
4221else
4222 if test -n "$SVNVERSION"; then
4223 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4224else
4225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4226for as_dir in $PATH
4227do
4228 IFS=$as_save_IFS
4229 test -z "$as_dir" && as_dir=.
4230 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004231 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004232 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004233 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4234 break 2
4235 fi
4236done
4237done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004239
Martin v. Löwisff600232006-04-03 19:12:32 +00004240 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004241fi
4242fi
4243SVNVERSION=$ac_cv_prog_SVNVERSION
4244if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004245 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4246echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004247else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004248 { echo "$as_me:$LINENO: result: no" >&5
4249echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004250fi
4251
Martin v. Löwiseba40652007-08-30 20:10:57 +00004252
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004253if test $SVNVERSION = found
4254then
4255 SVNVERSION="svnversion \$(srcdir)"
4256else
4257 SVNVERSION="echo exported"
4258fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004259
Neil Schemenauera42c8272001-03-31 00:01:55 +00004260case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004261bsdos*|hp*|HP*)
4262 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004263 if test -z "$INSTALL"
4264 then
4265 INSTALL="${srcdir}/install-sh -c"
4266 fi
4267esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004268ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004269for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4270 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004271 ac_aux_dir=$ac_dir
4272 ac_install_sh="$ac_aux_dir/install-sh -c"
4273 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004274 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004275 ac_aux_dir=$ac_dir
4276 ac_install_sh="$ac_aux_dir/install.sh -c"
4277 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004278 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 ac_aux_dir=$ac_dir
4280 ac_install_sh="$ac_aux_dir/shtool install -c"
4281 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004282 fi
4283done
4284if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004285 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4286echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004287 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004288fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004289
4290# These three variables are undocumented and unsupported,
4291# and are intended to be withdrawn in a future Autoconf release.
4292# They can cause serious problems if a builder's source tree is in a directory
4293# whose full name contains unusual characters.
4294ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4295ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4296ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4297
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004298
4299# Find a good install program. We prefer a C program (faster),
4300# so one script is as good as another. But avoid the broken or
4301# incompatible versions:
4302# SysV /etc/install, /usr/sbin/install
4303# SunOS /usr/etc/install
4304# IRIX /sbin/install
4305# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004306# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004307# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4308# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4309# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004310# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004311# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004312{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4313echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004314if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004315if test "${ac_cv_path_install+set}" = set; then
4316 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004317else
Martin v. Löwis11437992002-04-12 09:54:03 +00004318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4319for as_dir in $PATH
4320do
4321 IFS=$as_save_IFS
4322 test -z "$as_dir" && as_dir=.
4323 # Account for people who put trailing slashes in PATH elements.
4324case $as_dir/ in
4325 ./ | .// | /cC/* | \
4326 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004327 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004328 /usr/ucb/* ) ;;
4329 *)
4330 # OSF1 and SCO ODT 3.0 have their own names for install.
4331 # Don't use installbsd from OSF since it installs stuff as root
4332 # by default.
4333 for ac_prog in ginstall scoinst install; do
4334 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004335 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 +00004336 if test $ac_prog = install &&
4337 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4338 # AIX install. It has an incompatible calling convention.
4339 :
4340 elif test $ac_prog = install &&
4341 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4342 # program-specific install script used by HP pwplus--don't use.
4343 :
4344 else
4345 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4346 break 3
4347 fi
4348 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004349 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004350 done
4351 ;;
4352esac
4353done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004354IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004355
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004356
4357fi
4358 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004360 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004361 # As a last resort, use the slow shell script. Don't cache a
4362 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004363 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004364 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004366 fi
4367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004368{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4369echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004370
4371# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4372# It thinks the first close brace ends the variable substitution.
4373test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4374
Martin v. Löwis11437992002-04-12 09:54:03 +00004375test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004376
4377test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4378
Michael W. Hudson54241132001-12-07 15:38:26 +00004379
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004380# Not every filesystem supports hard links
4381
4382if test -z "$LN" ; then
4383 case $ac_sys_system in
4384 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004385 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004386 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004387 *) LN=ln;;
4388 esac
4389fi
4390
Fred Drake109d9862001-07-11 06:27:56 +00004391# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004392{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4393echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004394
Martin v. Löwiseba40652007-08-30 20:10:57 +00004395# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004396if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004397 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004398if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004399then
4400
4401cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004402#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004403_ACEOF
4404
Martin v. Löwiseba40652007-08-30 20:10:57 +00004405 { echo "$as_me:$LINENO: result: yes" >&5
4406echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004407 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004408else { echo "$as_me:$LINENO: result: no" >&5
4409echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004410fi
4411else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004412 { echo "$as_me:$LINENO: result: no" >&5
4413echo "${ECHO_T}no" >&6; }
4414fi
4415
Fred Drake109d9862001-07-11 06:27:56 +00004416
Skip Montanarodecc6a42003-01-01 20:07:49 +00004417# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4418# merged with this chunk of code?
4419
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004420# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004421# ------------------------
4422# (The following bit of code is complicated enough - please keep things
4423# indented properly. Just pretend you're editing Python code. ;-)
4424
4425# There are two parallel sets of case statements below, one that checks to
4426# see if OPT was set and one that does BASECFLAGS setting based upon
4427# compiler and platform. BASECFLAGS tweaks need to be made even if the
4428# user set OPT.
4429
4430# tweak OPT based on compiler and platform, only if the user didn't set
4431# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004432
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004433if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004434then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004435 case $GCC in
4436 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004437 if test "$CC" != 'g++' ; then
4438 STRICT_PROTO="-Wstrict-prototypes"
4439 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004440 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4441 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4442 WRAP="-fwrapv"
4443 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004444 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004445 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004446 if test "$Py_DEBUG" = 'true' ; then
4447 # Optimization messes up debuggers, so turn it off for
4448 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004449 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004450 else
Thomas Hellere5529592007-12-13 21:20:29 +00004451 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004452 fi
4453 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004454 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004455 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004456 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004457 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004458 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004459 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4460 ;;
4461 esac
Fred Drake109d9862001-07-11 06:27:56 +00004462 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004463
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004464 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004465 OPT="-O"
4466 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004467 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004468
4469 # The current (beta) Monterey compiler dies with optimizations
4470 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004471 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004472 Monterey*)
4473 OPT=""
4474 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004475 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004476
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004477fi
4478
Skip Montanarodecc6a42003-01-01 20:07:49 +00004479
4480# tweak BASECFLAGS based on compiler and platform
4481case $GCC in
4482yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004483 # Python violates C99 rules, by casting between incompatible
4484 # pointer types. GCC may generate bad code as a result of that,
4485 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004486 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4487echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004488 ac_save_cc="$CC"
4489 CC="$CC -fno-strict-aliasing"
4490 if test "$cross_compiling" = yes; then
4491 ac_cv_no_strict_aliasing_ok=no
4492else
4493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004494/* confdefs.h. */
4495_ACEOF
4496cat confdefs.h >>conftest.$ac_ext
4497cat >>conftest.$ac_ext <<_ACEOF
4498/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004499int main() { return 0; }
4500_ACEOF
4501rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004502if { (ac_try="$ac_link"
4503case "(($ac_try" in
4504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4505 *) ac_try_echo=$ac_try;;
4506esac
4507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4508 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004509 ac_status=$?
4510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4511 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004512 { (case "(($ac_try" in
4513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4514 *) ac_try_echo=$ac_try;;
4515esac
4516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4517 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004518 ac_status=$?
4519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4520 (exit $ac_status); }; }; then
4521 ac_cv_no_strict_aliasing_ok=yes
4522else
4523 echo "$as_me: program exited with status $ac_status" >&5
4524echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004525sed 's/^/| /' conftest.$ac_ext >&5
4526
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004527( exit $ac_status )
4528ac_cv_no_strict_aliasing_ok=no
4529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004530rm -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 +00004531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004532
4533
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004534 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004535 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4536echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004537 if test $ac_cv_no_strict_aliasing_ok = yes
4538 then
4539 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4540 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004541
4542 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4543 # support. Without this, treatment of subnormals doesn't follow
4544 # the standard.
4545 case $ac_sys_machine in
4546 alpha*)
4547 BASECFLAGS="$BASECFLAGS -mieee"
4548 ;;
4549 esac
4550
Skip Montanarodecc6a42003-01-01 20:07:49 +00004551 case $ac_sys_system in
4552 SCO_SV*)
4553 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4554 ;;
4555 # is there any other compiler on Darwin besides gcc?
4556 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004557 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4558 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren988117f2006-04-29 11:31:35 +00004559 if test "${enable_universalsdk}"; then
4560 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4561 fi
4562
Skip Montanarodecc6a42003-01-01 20:07:49 +00004563 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004564 OSF*)
4565 BASECFLAGS="$BASECFLAGS -mieee"
4566 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004567 esac
4568 ;;
4569
4570*)
4571 case $ac_sys_system in
4572 OpenUNIX*|UnixWare*)
4573 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4574 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004575 OSF*)
4576 BASECFLAGS="$BASECFLAGS -ieee -std"
4577 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004578 SCO_SV*)
4579 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4580 ;;
4581 esac
4582 ;;
4583esac
4584
Fred Drakee1ceaa02001-12-04 20:55:47 +00004585if test "$Py_DEBUG" = 'true'; then
4586 :
4587else
4588 OPT="-DNDEBUG $OPT"
4589fi
4590
Guido van Rossum563e7081996-09-10 18:20:48 +00004591if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004592then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004593 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004594fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004595
Neal Norwitz020c46a2006-01-07 21:39:28 +00004596# disable check for icc since it seems to pass, but generates a warning
4597if test "$CC" = icc
4598then
4599 ac_cv_opt_olimit_ok=no
4600fi
4601
Martin v. Löwiseba40652007-08-30 20:10:57 +00004602{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4603echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004604if test "${ac_cv_opt_olimit_ok+set}" = set; then
4605 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004606else
4607 ac_save_cc="$CC"
4608CC="$CC -OPT:Olimit=0"
4609if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004610 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004611else
Martin v. Löwis11437992002-04-12 09:54:03 +00004612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004613/* confdefs.h. */
4614_ACEOF
4615cat confdefs.h >>conftest.$ac_ext
4616cat >>conftest.$ac_ext <<_ACEOF
4617/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004618int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004619_ACEOF
4620rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004621if { (ac_try="$ac_link"
4622case "(($ac_try" in
4623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4624 *) ac_try_echo=$ac_try;;
4625esac
4626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4627 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004628 ac_status=$?
4629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4630 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004631 { (case "(($ac_try" in
4632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4633 *) ac_try_echo=$ac_try;;
4634esac
4635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4636 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004637 ac_status=$?
4638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4639 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004640 ac_cv_opt_olimit_ok=yes
4641else
Martin v. Löwis11437992002-04-12 09:54:03 +00004642 echo "$as_me: program exited with status $ac_status" >&5
4643echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004644sed 's/^/| /' conftest.$ac_ext >&5
4645
Martin v. Löwis11437992002-04-12 09:54:03 +00004646( exit $ac_status )
4647ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004649rm -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 +00004650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004651
4652
Guido van Rossum91922671997-10-09 20:24:13 +00004653CC="$ac_save_cc"
4654fi
4655
Martin v. Löwiseba40652007-08-30 20:10:57 +00004656{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4657echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004658if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004659 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004660 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4661 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4662 # environment?
4663 Darwin*)
4664 ;;
4665 *)
4666 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4667 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004668 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004669else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004670 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4671echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004672 if test "${ac_cv_olimit_ok+set}" = set; then
4673 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004674else
4675 ac_save_cc="$CC"
4676 CC="$CC -Olimit 1500"
4677 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004678 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004679else
Martin v. Löwis11437992002-04-12 09:54:03 +00004680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004681/* confdefs.h. */
4682_ACEOF
4683cat confdefs.h >>conftest.$ac_ext
4684cat >>conftest.$ac_ext <<_ACEOF
4685/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004686int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004687_ACEOF
4688rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004689if { (ac_try="$ac_link"
4690case "(($ac_try" in
4691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4692 *) ac_try_echo=$ac_try;;
4693esac
4694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4695 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004696 ac_status=$?
4697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4698 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004699 { (case "(($ac_try" in
4700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4701 *) ac_try_echo=$ac_try;;
4702esac
4703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4704 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004705 ac_status=$?
4706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4707 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004708 ac_cv_olimit_ok=yes
4709else
Martin v. Löwis11437992002-04-12 09:54:03 +00004710 echo "$as_me: program exited with status $ac_status" >&5
4711echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004712sed 's/^/| /' conftest.$ac_ext >&5
4713
Martin v. Löwis11437992002-04-12 09:54:03 +00004714( exit $ac_status )
4715ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004717rm -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 +00004718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004719
4720
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004721 CC="$ac_save_cc"
4722fi
4723
Martin v. Löwiseba40652007-08-30 20:10:57 +00004724 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4725echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004726 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004727 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004728 fi
4729fi
4730
Martin v. Löwisaac13162006-10-19 10:58:46 +00004731# Check whether GCC supports PyArg_ParseTuple format
4732if test "$GCC" = "yes"
4733then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004734 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4735echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004736 save_CFLAGS=$CFLAGS
4737 CFLAGS="$CFLAGS -Werror"
4738 cat >conftest.$ac_ext <<_ACEOF
4739/* confdefs.h. */
4740_ACEOF
4741cat confdefs.h >>conftest.$ac_ext
4742cat >>conftest.$ac_ext <<_ACEOF
4743/* end confdefs.h. */
4744
4745 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4746
4747int
4748main ()
4749{
4750
4751 ;
4752 return 0;
4753}
4754_ACEOF
4755rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004756if { (ac_try="$ac_compile"
4757case "(($ac_try" in
4758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4759 *) ac_try_echo=$ac_try;;
4760esac
4761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004763 ac_status=$?
4764 grep -v '^ *+' conftest.er1 >conftest.err
4765 rm -f conftest.er1
4766 cat conftest.err >&5
4767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004768 (exit $ac_status); } && {
4769 test -z "$ac_c_werror_flag" ||
4770 test ! -s conftest.err
4771 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004772
4773cat >>confdefs.h <<\_ACEOF
4774#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4775_ACEOF
4776
Martin v. Löwiseba40652007-08-30 20:10:57 +00004777 { echo "$as_me:$LINENO: result: yes" >&5
4778echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004779else
4780 echo "$as_me: failed program was:" >&5
4781sed 's/^/| /' conftest.$ac_ext >&5
4782
Martin v. Löwiseba40652007-08-30 20:10:57 +00004783 { echo "$as_me:$LINENO: result: no" >&5
4784echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004785
4786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004787
4788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004789 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004790fi
4791
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004792# On some compilers, pthreads are available without further options
4793# (e.g. MacOS X). On some of these systems, the compiler will not
4794# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4795# So we have to see first whether pthreads are available without
4796# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004797{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4798echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004799if test "${ac_cv_pthread_is_default+set}" = set; then
4800 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004801else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004802 if test "$cross_compiling" = yes; then
4803 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004804else
Martin v. Löwis11437992002-04-12 09:54:03 +00004805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004806/* confdefs.h. */
4807_ACEOF
4808cat confdefs.h >>conftest.$ac_ext
4809cat >>conftest.$ac_ext <<_ACEOF
4810/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004811
Martin v. Löwis130fb172001-07-19 11:00:41 +00004812#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004813
4814void* routine(void* p){return NULL;}
4815
4816int main(){
4817 pthread_t p;
4818 if(pthread_create(&p,NULL,routine,NULL)!=0)
4819 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004820 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004821 return 0;
4822}
4823
Martin v. Löwis11437992002-04-12 09:54:03 +00004824_ACEOF
4825rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004826if { (ac_try="$ac_link"
4827case "(($ac_try" in
4828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4829 *) ac_try_echo=$ac_try;;
4830esac
4831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4832 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004833 ac_status=$?
4834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004836 { (case "(($ac_try" in
4837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4838 *) ac_try_echo=$ac_try;;
4839esac
4840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4841 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004842 ac_status=$?
4843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4844 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004845
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004846 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004847 ac_cv_kthread=no
4848 ac_cv_pthread=no
4849
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004850else
Martin v. Löwis11437992002-04-12 09:54:03 +00004851 echo "$as_me: program exited with status $ac_status" >&5
4852echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004853sed 's/^/| /' conftest.$ac_ext >&5
4854
Martin v. Löwis11437992002-04-12 09:54:03 +00004855( exit $ac_status )
4856ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004858rm -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 +00004859fi
4860
Martin v. Löwiseba40652007-08-30 20:10:57 +00004861
4862
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004863fi
4864
Martin v. Löwiseba40652007-08-30 20:10:57 +00004865{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4866echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004867
Michael W. Hudson54241132001-12-07 15:38:26 +00004868
Martin v. Löwis11437992002-04-12 09:54:03 +00004869if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004870then
4871 ac_cv_kpthread=no
4872else
4873# -Kpthread, if available, provides the right #defines
4874# and linker options to make pthread_create available
4875# Some compilers won't report that they do not support -Kpthread,
4876# so we need to run a program to see whether it really made the
4877# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004878{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4879echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004880if test "${ac_cv_kpthread+set}" = set; then
4881 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004882else
4883 ac_save_cc="$CC"
4884CC="$CC -Kpthread"
4885if test "$cross_compiling" = yes; then
4886 ac_cv_kpthread=no
4887else
Martin v. Löwis11437992002-04-12 09:54:03 +00004888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004889/* confdefs.h. */
4890_ACEOF
4891cat confdefs.h >>conftest.$ac_ext
4892cat >>conftest.$ac_ext <<_ACEOF
4893/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004894
4895#include <pthread.h>
4896
4897void* routine(void* p){return NULL;}
4898
4899int main(){
4900 pthread_t p;
4901 if(pthread_create(&p,NULL,routine,NULL)!=0)
4902 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004903 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004904 return 0;
4905}
4906
Martin v. Löwis11437992002-04-12 09:54:03 +00004907_ACEOF
4908rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004909if { (ac_try="$ac_link"
4910case "(($ac_try" in
4911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4912 *) ac_try_echo=$ac_try;;
4913esac
4914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4915 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004916 ac_status=$?
4917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4918 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004919 { (case "(($ac_try" in
4920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4921 *) ac_try_echo=$ac_try;;
4922esac
4923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4924 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004925 ac_status=$?
4926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4927 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004928 ac_cv_kpthread=yes
4929else
Martin v. Löwis11437992002-04-12 09:54:03 +00004930 echo "$as_me: program exited with status $ac_status" >&5
4931echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004932sed 's/^/| /' conftest.$ac_ext >&5
4933
Martin v. Löwis11437992002-04-12 09:54:03 +00004934( exit $ac_status )
4935ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004937rm -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 +00004938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004939
4940
Martin v. Löwis130fb172001-07-19 11:00:41 +00004941CC="$ac_save_cc"
4942fi
4943
Martin v. Löwiseba40652007-08-30 20:10:57 +00004944{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4945echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004946fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004947
Skip Montanarod8d39a02003-07-10 20:44:10 +00004948if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004949then
4950# -Kthread, if available, provides the right #defines
4951# and linker options to make pthread_create available
4952# Some compilers won't report that they do not support -Kthread,
4953# so we need to run a program to see whether it really made the
4954# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004955{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4956echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004957if test "${ac_cv_kthread+set}" = set; then
4958 echo $ECHO_N "(cached) $ECHO_C" >&6
4959else
4960 ac_save_cc="$CC"
4961CC="$CC -Kthread"
4962if test "$cross_compiling" = yes; then
4963 ac_cv_kthread=no
4964else
4965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004966/* confdefs.h. */
4967_ACEOF
4968cat confdefs.h >>conftest.$ac_ext
4969cat >>conftest.$ac_ext <<_ACEOF
4970/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004971
4972#include <pthread.h>
4973
4974void* routine(void* p){return NULL;}
4975
4976int main(){
4977 pthread_t p;
4978 if(pthread_create(&p,NULL,routine,NULL)!=0)
4979 return 1;
4980 (void)pthread_detach(p);
4981 return 0;
4982}
4983
4984_ACEOF
4985rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004986if { (ac_try="$ac_link"
4987case "(($ac_try" in
4988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4989 *) ac_try_echo=$ac_try;;
4990esac
4991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4992 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004993 ac_status=$?
4994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004996 { (case "(($ac_try" in
4997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4998 *) ac_try_echo=$ac_try;;
4999esac
5000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5001 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005002 ac_status=$?
5003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5004 (exit $ac_status); }; }; then
5005 ac_cv_kthread=yes
5006else
5007 echo "$as_me: program exited with status $ac_status" >&5
5008echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005009sed 's/^/| /' conftest.$ac_ext >&5
5010
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005011( exit $ac_status )
5012ac_cv_kthread=no
5013fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005014rm -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 +00005015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005016
5017
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005018CC="$ac_save_cc"
5019fi
5020
Martin v. Löwiseba40652007-08-30 20:10:57 +00005021{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5022echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005023fi
5024
Skip Montanarod8d39a02003-07-10 20:44:10 +00005025if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005026then
5027# -pthread, if available, provides the right #defines
5028# and linker options to make pthread_create available
5029# Some compilers won't report that they do not support -pthread,
5030# so we need to run a program to see whether it really made the
5031# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005032{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5033echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005034if test "${ac_cv_thread+set}" = set; then
5035 echo $ECHO_N "(cached) $ECHO_C" >&6
5036else
5037 ac_save_cc="$CC"
5038CC="$CC -pthread"
5039if test "$cross_compiling" = yes; then
5040 ac_cv_pthread=no
5041else
5042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005043/* confdefs.h. */
5044_ACEOF
5045cat confdefs.h >>conftest.$ac_ext
5046cat >>conftest.$ac_ext <<_ACEOF
5047/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005048
5049#include <pthread.h>
5050
5051void* routine(void* p){return NULL;}
5052
5053int main(){
5054 pthread_t p;
5055 if(pthread_create(&p,NULL,routine,NULL)!=0)
5056 return 1;
5057 (void)pthread_detach(p);
5058 return 0;
5059}
5060
5061_ACEOF
5062rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005063if { (ac_try="$ac_link"
5064case "(($ac_try" in
5065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5066 *) ac_try_echo=$ac_try;;
5067esac
5068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5069 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005070 ac_status=$?
5071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005073 { (case "(($ac_try" in
5074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5075 *) ac_try_echo=$ac_try;;
5076esac
5077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5078 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005079 ac_status=$?
5080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5081 (exit $ac_status); }; }; then
5082 ac_cv_pthread=yes
5083else
5084 echo "$as_me: program exited with status $ac_status" >&5
5085echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005086sed 's/^/| /' conftest.$ac_ext >&5
5087
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005088( exit $ac_status )
5089ac_cv_pthread=no
5090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005093
5094
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005095CC="$ac_save_cc"
5096fi
5097
Martin v. Löwiseba40652007-08-30 20:10:57 +00005098{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5099echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005100fi
5101
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005102# If we have set a CC compiler flag for thread support then
5103# check if it works for CXX, too.
5104ac_cv_cxx_thread=no
5105if test ! -z "$CXX"
5106then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005107{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5108echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005109ac_save_cxx="$CXX"
5110
5111if test "$ac_cv_kpthread" = "yes"
5112then
5113 CXX="$CXX -Kpthread"
5114 ac_cv_cxx_thread=yes
5115elif test "$ac_cv_kthread" = "yes"
5116then
5117 CXX="$CXX -Kthread"
5118 ac_cv_cxx_thread=yes
5119elif test "$ac_cv_pthread" = "yes"
5120then
5121 CXX="$CXX -pthread"
5122 ac_cv_cxx_thread=yes
5123fi
5124
5125if test $ac_cv_cxx_thread = yes
5126then
5127 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5128 $CXX -c conftest.$ac_ext 2>&5
5129 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5130 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5131 then
5132 ac_cv_cxx_thread=yes
5133 else
5134 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005135 fi
5136 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005138{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5139echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005140fi
5141CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005142
Michael W. Hudson54241132001-12-07 15:38:26 +00005143
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005144# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005145{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5146echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005147if test "${ac_cv_header_stdc+set}" = set; then
5148 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005149else
Martin v. Löwis11437992002-04-12 09:54:03 +00005150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005151/* confdefs.h. */
5152_ACEOF
5153cat confdefs.h >>conftest.$ac_ext
5154cat >>conftest.$ac_ext <<_ACEOF
5155/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005156#include <stdlib.h>
5157#include <stdarg.h>
5158#include <string.h>
5159#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005160
Skip Montanaro6dead952003-09-25 14:50:04 +00005161int
5162main ()
5163{
5164
5165 ;
5166 return 0;
5167}
Martin v. Löwis11437992002-04-12 09:54:03 +00005168_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005169rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005170if { (ac_try="$ac_compile"
5171case "(($ac_try" in
5172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5173 *) ac_try_echo=$ac_try;;
5174esac
5175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005178 grep -v '^ *+' conftest.er1 >conftest.err
5179 rm -f conftest.er1
5180 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005182 (exit $ac_status); } && {
5183 test -z "$ac_c_werror_flag" ||
5184 test ! -s conftest.err
5185 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005186 ac_cv_header_stdc=yes
5187else
Martin v. Löwis11437992002-04-12 09:54:03 +00005188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005189sed 's/^/| /' conftest.$ac_ext >&5
5190
Martin v. Löwiseba40652007-08-30 20:10:57 +00005191 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005193
5194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005195
5196if test $ac_cv_header_stdc = yes; then
5197 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005199/* confdefs.h. */
5200_ACEOF
5201cat confdefs.h >>conftest.$ac_ext
5202cat >>conftest.$ac_ext <<_ACEOF
5203/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005204#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005205
5206_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005208 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005209 :
5210else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005211 ac_cv_header_stdc=no
5212fi
5213rm -f conftest*
5214
5215fi
5216
5217if test $ac_cv_header_stdc = yes; then
5218 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005220/* confdefs.h. */
5221_ACEOF
5222cat confdefs.h >>conftest.$ac_ext
5223cat >>conftest.$ac_ext <<_ACEOF
5224/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005225#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005226
5227_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005228if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005229 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005230 :
5231else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005232 ac_cv_header_stdc=no
5233fi
5234rm -f conftest*
5235
5236fi
5237
5238if test $ac_cv_header_stdc = yes; then
5239 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005240 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005241 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005242else
Martin v. Löwis11437992002-04-12 09:54:03 +00005243 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005244/* confdefs.h. */
5245_ACEOF
5246cat confdefs.h >>conftest.$ac_ext
5247cat >>conftest.$ac_ext <<_ACEOF
5248/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005249#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005250#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005251#if ((' ' & 0x0FF) == 0x020)
5252# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5253# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5254#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005255# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005256 (('a' <= (c) && (c) <= 'i') \
5257 || ('j' <= (c) && (c) <= 'r') \
5258 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005259# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5260#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005261
Martin v. Löwis11437992002-04-12 09:54:03 +00005262#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5263int
5264main ()
5265{
5266 int i;
5267 for (i = 0; i < 256; i++)
5268 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005269 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005270 return 2;
5271 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005272}
5273_ACEOF
5274rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005275if { (ac_try="$ac_link"
5276case "(($ac_try" in
5277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5278 *) ac_try_echo=$ac_try;;
5279esac
5280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5281 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005282 ac_status=$?
5283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5284 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005285 { (case "(($ac_try" in
5286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5287 *) ac_try_echo=$ac_try;;
5288esac
5289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5290 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005291 ac_status=$?
5292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5293 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005294 :
5295else
Martin v. Löwis11437992002-04-12 09:54:03 +00005296 echo "$as_me: program exited with status $ac_status" >&5
5297echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005298sed 's/^/| /' conftest.$ac_ext >&5
5299
Martin v. Löwis11437992002-04-12 09:54:03 +00005300( exit $ac_status )
5301ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5304fi
5305
5306
Michael W. Hudson54241132001-12-07 15:38:26 +00005307fi
5308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005309{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5310echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005311if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005312
5313cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005314#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005315_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005316
5317fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005318
Skip Montanarob9820a32004-01-17 00:16:12 +00005319# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005330 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005331do
5332as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005333{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5334echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5335if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005336 echo $ECHO_N "(cached) $ECHO_C" >&6
5337else
5338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005339/* confdefs.h. */
5340_ACEOF
5341cat confdefs.h >>conftest.$ac_ext
5342cat >>conftest.$ac_ext <<_ACEOF
5343/* end confdefs.h. */
5344$ac_includes_default
5345
5346#include <$ac_header>
5347_ACEOF
5348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005349if { (ac_try="$ac_compile"
5350case "(($ac_try" in
5351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5352 *) ac_try_echo=$ac_try;;
5353esac
5354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5355 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005357 grep -v '^ *+' conftest.er1 >conftest.err
5358 rm -f conftest.er1
5359 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005361 (exit $ac_status); } && {
5362 test -z "$ac_c_werror_flag" ||
5363 test ! -s conftest.err
5364 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005365 eval "$as_ac_Header=yes"
5366else
5367 echo "$as_me: failed program was:" >&5
5368sed 's/^/| /' conftest.$ac_ext >&5
5369
Martin v. Löwiseba40652007-08-30 20:10:57 +00005370 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005372
5373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005375ac_res=`eval echo '${'$as_ac_Header'}'`
5376 { echo "$as_me:$LINENO: result: $ac_res" >&5
5377echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005378if test `eval echo '${'$as_ac_Header'}'` = yes; then
5379 cat >>confdefs.h <<_ACEOF
5380#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5381_ACEOF
5382
5383fi
5384
5385done
5386
5387
Martin v. Löwis11437992002-04-12 09:54:03 +00005388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
Anthony Baxter8a560de2004-10-13 15:30:56 +00005424
Martin v. Löwisc3001752005-01-23 09:27:24 +00005425
Martin v. Löwis11017b12006-01-14 18:12:57 +00005426
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005427
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005428
5429
5430
5431
5432
5433
5434
5435
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005436
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005437
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005438
5439
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005440
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005441for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5442fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005443ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005444shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005445unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005446sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5447sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005448sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5449sys/time.h \
5450sys/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 +00005451sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005452bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005453do
Martin v. Löwis11437992002-04-12 09:54:03 +00005454as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005455if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5456 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5457echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5458if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005459 echo $ECHO_N "(cached) $ECHO_C" >&6
5460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005461ac_res=`eval echo '${'$as_ac_Header'}'`
5462 { echo "$as_me:$LINENO: result: $ac_res" >&5
5463echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005464else
Martin v. Löwis11437992002-04-12 09:54:03 +00005465 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005466{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5467echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005469/* confdefs.h. */
5470_ACEOF
5471cat confdefs.h >>conftest.$ac_ext
5472cat >>conftest.$ac_ext <<_ACEOF
5473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005474$ac_includes_default
5475#include <$ac_header>
5476_ACEOF
5477rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005478if { (ac_try="$ac_compile"
5479case "(($ac_try" in
5480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5481 *) ac_try_echo=$ac_try;;
5482esac
5483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005486 grep -v '^ *+' conftest.er1 >conftest.err
5487 rm -f conftest.er1
5488 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005490 (exit $ac_status); } && {
5491 test -z "$ac_c_werror_flag" ||
5492 test ! -s conftest.err
5493 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005494 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005495else
Martin v. Löwis11437992002-04-12 09:54:03 +00005496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005497sed 's/^/| /' conftest.$ac_ext >&5
5498
Martin v. Löwiseba40652007-08-30 20:10:57 +00005499 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005501
5502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5503{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5504echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005505
5506# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005507{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5508echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005510/* confdefs.h. */
5511_ACEOF
5512cat confdefs.h >>conftest.$ac_ext
5513cat >>conftest.$ac_ext <<_ACEOF
5514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005515#include <$ac_header>
5516_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005517if { (ac_try="$ac_cpp conftest.$ac_ext"
5518case "(($ac_try" in
5519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5520 *) ac_try_echo=$ac_try;;
5521esac
5522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5523 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005524 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005525 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005526 rm -f conftest.er1
5527 cat conftest.err >&5
5528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005529 (exit $ac_status); } >/dev/null && {
5530 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5531 test ! -s conftest.err
5532 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005533 ac_header_preproc=yes
5534else
5535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005536sed 's/^/| /' conftest.$ac_ext >&5
5537
Martin v. Löwis11437992002-04-12 09:54:03 +00005538 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005540
Martin v. Löwis11437992002-04-12 09:54:03 +00005541rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005542{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5543echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005544
5545# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005546case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5547 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005548 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5549echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005550 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5551echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5552 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005553 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005554 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005555 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5556echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005557 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5558echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5559 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5560echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5561 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5562echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005563 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5564echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005565 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5566echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005567 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005568## ------------------------------------------------ ##
5569## Report this to http://www.python.org/python-bugs ##
5570## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005571_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005572 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005573 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005574esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005575{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5576echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5577if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005578 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005579else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005580 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005582ac_res=`eval echo '${'$as_ac_Header'}'`
5583 { echo "$as_me:$LINENO: result: $ac_res" >&5
5584echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005585
5586fi
5587if test `eval echo '${'$as_ac_Header'}'` = yes; then
5588 cat >>confdefs.h <<_ACEOF
5589#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5590_ACEOF
5591
5592fi
5593
Guido van Rossum627b2d71993-12-24 10:39:16 +00005594done
5595
Martin v. Löwis11437992002-04-12 09:54:03 +00005596
5597
5598
5599
5600
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005601ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005602for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5603 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005604{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5605echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5606if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005607 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005608else
Martin v. Löwis11437992002-04-12 09:54:03 +00005609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005610/* confdefs.h. */
5611_ACEOF
5612cat confdefs.h >>conftest.$ac_ext
5613cat >>conftest.$ac_ext <<_ACEOF
5614/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005615#include <sys/types.h>
5616#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005617
Martin v. Löwis11437992002-04-12 09:54:03 +00005618int
5619main ()
5620{
5621if ((DIR *) 0)
5622return 0;
5623 ;
5624 return 0;
5625}
5626_ACEOF
5627rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005628if { (ac_try="$ac_compile"
5629case "(($ac_try" in
5630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5631 *) ac_try_echo=$ac_try;;
5632esac
5633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005636 grep -v '^ *+' conftest.er1 >conftest.err
5637 rm -f conftest.er1
5638 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005640 (exit $ac_status); } && {
5641 test -z "$ac_c_werror_flag" ||
5642 test ! -s conftest.err
5643 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005644 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005645else
Martin v. Löwis11437992002-04-12 09:54:03 +00005646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005647sed 's/^/| /' conftest.$ac_ext >&5
5648
Martin v. Löwiseba40652007-08-30 20:10:57 +00005649 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005651
5652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005654ac_res=`eval echo '${'$as_ac_Header'}'`
5655 { echo "$as_me:$LINENO: result: $ac_res" >&5
5656echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005657if test `eval echo '${'$as_ac_Header'}'` = yes; then
5658 cat >>confdefs.h <<_ACEOF
5659#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5660_ACEOF
5661
5662ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005663fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005664
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005665done
5666# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5667if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005668 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5669echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005670if test "${ac_cv_search_opendir+set}" = set; then
5671 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005672else
Martin v. Löwis11437992002-04-12 09:54:03 +00005673 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005674cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005675/* confdefs.h. */
5676_ACEOF
5677cat confdefs.h >>conftest.$ac_ext
5678cat >>conftest.$ac_ext <<_ACEOF
5679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005680
Martin v. Löwiseba40652007-08-30 20:10:57 +00005681/* Override any GCC internal prototype to avoid an error.
5682 Use char because int might match the return type of a GCC
5683 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005684#ifdef __cplusplus
5685extern "C"
5686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005687char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005688int
5689main ()
5690{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005691return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005692 ;
5693 return 0;
5694}
5695_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005696for ac_lib in '' dir; do
5697 if test -z "$ac_lib"; then
5698 ac_res="none required"
5699 else
5700 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005701 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005702 fi
5703 rm -f conftest.$ac_objext conftest$ac_exeext
5704if { (ac_try="$ac_link"
5705case "(($ac_try" in
5706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5707 *) ac_try_echo=$ac_try;;
5708esac
5709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5710 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005711 ac_status=$?
5712 grep -v '^ *+' conftest.er1 >conftest.err
5713 rm -f conftest.er1
5714 cat conftest.err >&5
5715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005716 (exit $ac_status); } && {
5717 test -z "$ac_c_werror_flag" ||
5718 test ! -s conftest.err
5719 } && test -s conftest$ac_exeext &&
5720 $as_test_x conftest$ac_exeext; then
5721 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005722else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005723 echo "$as_me: failed program was:" >&5
5724sed 's/^/| /' conftest.$ac_ext >&5
5725
Martin v. Löwiseba40652007-08-30 20:10:57 +00005726
Brett Cannon19fab762007-06-02 03:02:29 +00005727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005728
5729rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5730 conftest$ac_exeext
5731 if test "${ac_cv_search_opendir+set}" = set; then
5732 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005734done
5735if test "${ac_cv_search_opendir+set}" = set; then
5736 :
5737else
5738 ac_cv_search_opendir=no
5739fi
5740rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005741LIBS=$ac_func_search_save_LIBS
5742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005743{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5744echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5745ac_res=$ac_cv_search_opendir
5746if test "$ac_res" != no; then
5747 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005748
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005749fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005750
Michael W. Hudson54241132001-12-07 15:38:26 +00005751else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005752 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5753echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005754if test "${ac_cv_search_opendir+set}" = set; then
5755 echo $ECHO_N "(cached) $ECHO_C" >&6
5756else
5757 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005759/* confdefs.h. */
5760_ACEOF
5761cat confdefs.h >>conftest.$ac_ext
5762cat >>conftest.$ac_ext <<_ACEOF
5763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005764
Martin v. Löwiseba40652007-08-30 20:10:57 +00005765/* Override any GCC internal prototype to avoid an error.
5766 Use char because int might match the return type of a GCC
5767 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005768#ifdef __cplusplus
5769extern "C"
5770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005771char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005772int
5773main ()
5774{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005775return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005776 ;
5777 return 0;
5778}
5779_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005780for ac_lib in '' x; do
5781 if test -z "$ac_lib"; then
5782 ac_res="none required"
5783 else
5784 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005785 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005786 fi
5787 rm -f conftest.$ac_objext conftest$ac_exeext
5788if { (ac_try="$ac_link"
5789case "(($ac_try" in
5790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5791 *) ac_try_echo=$ac_try;;
5792esac
5793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5794 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005795 ac_status=$?
5796 grep -v '^ *+' conftest.er1 >conftest.err
5797 rm -f conftest.er1
5798 cat conftest.err >&5
5799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005800 (exit $ac_status); } && {
5801 test -z "$ac_c_werror_flag" ||
5802 test ! -s conftest.err
5803 } && test -s conftest$ac_exeext &&
5804 $as_test_x conftest$ac_exeext; then
5805 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005806else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005807 echo "$as_me: failed program was:" >&5
5808sed 's/^/| /' conftest.$ac_ext >&5
5809
Martin v. Löwiseba40652007-08-30 20:10:57 +00005810
Brett Cannon19fab762007-06-02 03:02:29 +00005811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005812
5813rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5814 conftest$ac_exeext
5815 if test "${ac_cv_search_opendir+set}" = set; then
5816 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005818done
5819if test "${ac_cv_search_opendir+set}" = set; then
5820 :
5821else
5822 ac_cv_search_opendir=no
5823fi
5824rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005825LIBS=$ac_func_search_save_LIBS
5826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005827{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5828echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5829ac_res=$ac_cv_search_opendir
5830if test "$ac_res" != no; then
5831 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005832
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005833fi
5834
5835fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005836
Martin v. Löwiseba40652007-08-30 20:10:57 +00005837{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5838echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005839if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5840 echo $ECHO_N "(cached) $ECHO_C" >&6
5841else
5842 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005843/* confdefs.h. */
5844_ACEOF
5845cat confdefs.h >>conftest.$ac_ext
5846cat >>conftest.$ac_ext <<_ACEOF
5847/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005848#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005849int
5850main ()
5851{
5852return makedev(0, 0);
5853 ;
5854 return 0;
5855}
5856_ACEOF
5857rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005858if { (ac_try="$ac_link"
5859case "(($ac_try" in
5860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5861 *) ac_try_echo=$ac_try;;
5862esac
5863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5864 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005866 grep -v '^ *+' conftest.er1 >conftest.err
5867 rm -f conftest.er1
5868 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005870 (exit $ac_status); } && {
5871 test -z "$ac_c_werror_flag" ||
5872 test ! -s conftest.err
5873 } && test -s conftest$ac_exeext &&
5874 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005875 ac_cv_header_sys_types_h_makedev=yes
5876else
5877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005878sed 's/^/| /' conftest.$ac_ext >&5
5879
Martin v. Löwiseba40652007-08-30 20:10:57 +00005880 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005882
5883rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005884 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005885
5886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005887{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5888echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005889
5890if test $ac_cv_header_sys_types_h_makedev = no; then
5891if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005892 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5893echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005894if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5895 echo $ECHO_N "(cached) $ECHO_C" >&6
5896fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005897{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5898echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005899else
5900 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005901{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5902echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005904/* confdefs.h. */
5905_ACEOF
5906cat confdefs.h >>conftest.$ac_ext
5907cat >>conftest.$ac_ext <<_ACEOF
5908/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005909$ac_includes_default
5910#include <sys/mkdev.h>
5911_ACEOF
5912rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005913if { (ac_try="$ac_compile"
5914case "(($ac_try" in
5915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5916 *) ac_try_echo=$ac_try;;
5917esac
5918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5919 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005921 grep -v '^ *+' conftest.er1 >conftest.err
5922 rm -f conftest.er1
5923 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005925 (exit $ac_status); } && {
5926 test -z "$ac_c_werror_flag" ||
5927 test ! -s conftest.err
5928 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005929 ac_header_compiler=yes
5930else
5931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005932sed 's/^/| /' conftest.$ac_ext >&5
5933
Martin v. Löwiseba40652007-08-30 20:10:57 +00005934 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005936
5937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5938{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5939echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005940
5941# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005942{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5943echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005945/* confdefs.h. */
5946_ACEOF
5947cat confdefs.h >>conftest.$ac_ext
5948cat >>conftest.$ac_ext <<_ACEOF
5949/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005950#include <sys/mkdev.h>
5951_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005952if { (ac_try="$ac_cpp conftest.$ac_ext"
5953case "(($ac_try" in
5954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5955 *) ac_try_echo=$ac_try;;
5956esac
5957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5958 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005959 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005960 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005961 rm -f conftest.er1
5962 cat conftest.err >&5
5963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005964 (exit $ac_status); } >/dev/null && {
5965 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5966 test ! -s conftest.err
5967 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005968 ac_header_preproc=yes
5969else
5970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005971sed 's/^/| /' conftest.$ac_ext >&5
5972
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005973 ac_header_preproc=no
5974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005975
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005976rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005977{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5978echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005979
5980# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005981case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5982 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005983 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5984echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005985 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5986echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5987 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005988 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005989 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005990 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5991echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005992 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5993echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5994 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5995echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5996 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5997echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005998 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5999echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006000 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6001echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006002 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006003## ------------------------------------------------ ##
6004## Report this to http://www.python.org/python-bugs ##
6005## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006006_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006007 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006008 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006009esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006010{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6011echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006012if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6013 echo $ECHO_N "(cached) $ECHO_C" >&6
6014else
6015 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006017{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6018echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006019
6020fi
6021if test $ac_cv_header_sys_mkdev_h = yes; then
6022
6023cat >>confdefs.h <<\_ACEOF
6024#define MAJOR_IN_MKDEV 1
6025_ACEOF
6026
6027fi
6028
6029
6030
6031 if test $ac_cv_header_sys_mkdev_h = no; then
6032 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006033 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6034echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006035if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6036 echo $ECHO_N "(cached) $ECHO_C" >&6
6037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006038{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6039echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040else
6041 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006042{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6043echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006045/* confdefs.h. */
6046_ACEOF
6047cat confdefs.h >>conftest.$ac_ext
6048cat >>conftest.$ac_ext <<_ACEOF
6049/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050$ac_includes_default
6051#include <sys/sysmacros.h>
6052_ACEOF
6053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006054if { (ac_try="$ac_compile"
6055case "(($ac_try" in
6056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6057 *) ac_try_echo=$ac_try;;
6058esac
6059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006062 grep -v '^ *+' conftest.er1 >conftest.err
6063 rm -f conftest.er1
6064 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006066 (exit $ac_status); } && {
6067 test -z "$ac_c_werror_flag" ||
6068 test ! -s conftest.err
6069 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070 ac_header_compiler=yes
6071else
6072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006073sed 's/^/| /' conftest.$ac_ext >&5
6074
Martin v. Löwiseba40652007-08-30 20:10:57 +00006075 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006077
6078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6079{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6080echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081
6082# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006083{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6084echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006086/* confdefs.h. */
6087_ACEOF
6088cat confdefs.h >>conftest.$ac_ext
6089cat >>conftest.$ac_ext <<_ACEOF
6090/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091#include <sys/sysmacros.h>
6092_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006093if { (ac_try="$ac_cpp conftest.$ac_ext"
6094case "(($ac_try" in
6095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6096 *) ac_try_echo=$ac_try;;
6097esac
6098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6099 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006101 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102 rm -f conftest.er1
6103 cat conftest.err >&5
6104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006105 (exit $ac_status); } >/dev/null && {
6106 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6107 test ! -s conftest.err
6108 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109 ac_header_preproc=yes
6110else
6111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006112sed 's/^/| /' conftest.$ac_ext >&5
6113
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114 ac_header_preproc=no
6115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006116
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006117rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006118{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6119echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006120
6121# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006122case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6123 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006124 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6125echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006126 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6127echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6128 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006129 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006130 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006131 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6132echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006133 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6134echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6135 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6136echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6137 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6138echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006139 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6140echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006141 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6142echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006143 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006144## ------------------------------------------------ ##
6145## Report this to http://www.python.org/python-bugs ##
6146## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006147_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006148 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006149 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006151{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6152echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6154 echo $ECHO_N "(cached) $ECHO_C" >&6
6155else
6156 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006158{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6159echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160
6161fi
6162if test $ac_cv_header_sys_sysmacros_h = yes; then
6163
6164cat >>confdefs.h <<\_ACEOF
6165#define MAJOR_IN_SYSMACROS 1
6166_ACEOF
6167
6168fi
6169
6170
6171 fi
6172fi
6173
Michael W. Hudson54241132001-12-07 15:38:26 +00006174
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006175# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006176
6177for ac_header in term.h
6178do
6179as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006180{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6181echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6182if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006183 echo $ECHO_N "(cached) $ECHO_C" >&6
6184else
6185 cat >conftest.$ac_ext <<_ACEOF
6186/* confdefs.h. */
6187_ACEOF
6188cat confdefs.h >>conftest.$ac_ext
6189cat >>conftest.$ac_ext <<_ACEOF
6190/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006191
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006192#ifdef HAVE_CURSES_H
6193#include <curses.h>
6194#endif
6195
6196
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006197#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006198_ACEOF
6199rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006200if { (ac_try="$ac_compile"
6201case "(($ac_try" in
6202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6203 *) ac_try_echo=$ac_try;;
6204esac
6205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006207 ac_status=$?
6208 grep -v '^ *+' conftest.er1 >conftest.err
6209 rm -f conftest.er1
6210 cat conftest.err >&5
6211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006212 (exit $ac_status); } && {
6213 test -z "$ac_c_werror_flag" ||
6214 test ! -s conftest.err
6215 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006216 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006217else
6218 echo "$as_me: failed program was:" >&5
6219sed 's/^/| /' conftest.$ac_ext >&5
6220
Martin v. Löwiseba40652007-08-30 20:10:57 +00006221 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006223
6224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006226ac_res=`eval echo '${'$as_ac_Header'}'`
6227 { echo "$as_me:$LINENO: result: $ac_res" >&5
6228echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006229if test `eval echo '${'$as_ac_Header'}'` = yes; then
6230 cat >>confdefs.h <<_ACEOF
6231#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6232_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006233
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006234fi
6235
6236done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006237
6238
Martin v. Löwis11017b12006-01-14 18:12:57 +00006239# On Linux, netlink.h requires asm/types.h
6240
6241for ac_header in linux/netlink.h
6242do
6243as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006244{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6245echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6246if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006247 echo $ECHO_N "(cached) $ECHO_C" >&6
6248else
6249 cat >conftest.$ac_ext <<_ACEOF
6250/* confdefs.h. */
6251_ACEOF
6252cat confdefs.h >>conftest.$ac_ext
6253cat >>conftest.$ac_ext <<_ACEOF
6254/* end confdefs.h. */
6255
6256#ifdef HAVE_ASM_TYPES_H
6257#include <asm/types.h>
6258#endif
6259#ifdef HAVE_SYS_SOCKET_H
6260#include <sys/socket.h>
6261#endif
6262
6263
6264#include <$ac_header>
6265_ACEOF
6266rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267if { (ac_try="$ac_compile"
6268case "(($ac_try" in
6269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6270 *) ac_try_echo=$ac_try;;
6271esac
6272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006274 ac_status=$?
6275 grep -v '^ *+' conftest.er1 >conftest.err
6276 rm -f conftest.er1
6277 cat conftest.err >&5
6278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006279 (exit $ac_status); } && {
6280 test -z "$ac_c_werror_flag" ||
6281 test ! -s conftest.err
6282 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006283 eval "$as_ac_Header=yes"
6284else
6285 echo "$as_me: failed program was:" >&5
6286sed 's/^/| /' conftest.$ac_ext >&5
6287
Martin v. Löwiseba40652007-08-30 20:10:57 +00006288 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006290
6291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006293ac_res=`eval echo '${'$as_ac_Header'}'`
6294 { echo "$as_me:$LINENO: result: $ac_res" >&5
6295echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006296if test `eval echo '${'$as_ac_Header'}'` = yes; then
6297 cat >>confdefs.h <<_ACEOF
6298#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6299_ACEOF
6300
6301fi
6302
6303done
6304
6305
Guido van Rossum627b2d71993-12-24 10:39:16 +00006306# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006307was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006308{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6309echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006310cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006311/* confdefs.h. */
6312_ACEOF
6313cat confdefs.h >>conftest.$ac_ext
6314cat >>conftest.$ac_ext <<_ACEOF
6315/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006316#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006317
6318_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006319if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006320 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006321 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006322else
Martin v. Löwis11437992002-04-12 09:54:03 +00006323
6324
6325cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006326#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006327_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006328
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006329
Guido van Rossum627b2d71993-12-24 10:39:16 +00006330fi
6331rm -f conftest*
6332
Martin v. Löwiseba40652007-08-30 20:10:57 +00006333{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6334echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006335
Neal Norwitz11690112002-07-30 01:08:28 +00006336# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006337{ echo "$as_me:$LINENO: checking for makedev" >&5
6338echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006340/* confdefs.h. */
6341_ACEOF
6342cat confdefs.h >>conftest.$ac_ext
6343cat >>conftest.$ac_ext <<_ACEOF
6344/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006345#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006346int
6347main ()
6348{
6349 makedev(0, 0)
6350 ;
6351 return 0;
6352}
6353_ACEOF
6354rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006355if { (ac_try="$ac_link"
6356case "(($ac_try" in
6357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6358 *) ac_try_echo=$ac_try;;
6359esac
6360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6361 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006363 grep -v '^ *+' conftest.er1 >conftest.err
6364 rm -f conftest.er1
6365 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006367 (exit $ac_status); } && {
6368 test -z "$ac_c_werror_flag" ||
6369 test ! -s conftest.err
6370 } && test -s conftest$ac_exeext &&
6371 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006372 ac_cv_has_makedev=yes
6373else
6374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006375sed 's/^/| /' conftest.$ac_ext >&5
6376
Martin v. Löwiseba40652007-08-30 20:10:57 +00006377 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006379
6380rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006381 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006382if test "$ac_cv_has_makedev" = "no"; then
6383 # we didn't link, try if _OSF_SOURCE will allow us to link
6384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006385/* confdefs.h. */
6386_ACEOF
6387cat confdefs.h >>conftest.$ac_ext
6388cat >>conftest.$ac_ext <<_ACEOF
6389/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006390
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006391#define _OSF_SOURCE 1
6392#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006393
Neal Norwitz11690112002-07-30 01:08:28 +00006394int
6395main ()
6396{
6397 makedev(0, 0)
6398 ;
6399 return 0;
6400}
6401_ACEOF
6402rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006403if { (ac_try="$ac_link"
6404case "(($ac_try" in
6405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6406 *) ac_try_echo=$ac_try;;
6407esac
6408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6409 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006411 grep -v '^ *+' conftest.er1 >conftest.err
6412 rm -f conftest.er1
6413 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006415 (exit $ac_status); } && {
6416 test -z "$ac_c_werror_flag" ||
6417 test ! -s conftest.err
6418 } && test -s conftest$ac_exeext &&
6419 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006420 ac_cv_has_makedev=yes
6421else
6422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006423sed 's/^/| /' conftest.$ac_ext >&5
6424
Martin v. Löwiseba40652007-08-30 20:10:57 +00006425 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006427
6428rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006429 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006430 if test "$ac_cv_has_makedev" = "yes"; then
6431
6432cat >>confdefs.h <<\_ACEOF
6433#define _OSF_SOURCE 1
6434_ACEOF
6435
6436 fi
6437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006438{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6439echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006440if test "$ac_cv_has_makedev" = "yes"; then
6441
6442cat >>confdefs.h <<\_ACEOF
6443#define HAVE_MAKEDEV 1
6444_ACEOF
6445
6446fi
6447
Martin v. Löwis399a6892002-10-04 10:22:02 +00006448# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6449# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6450# defined, but the compiler does not support pragma redefine_extname,
6451# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6452# structures (such as rlimit64) without declaring them. As a
6453# work-around, disable LFS on such configurations
6454
6455use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006456{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6457echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006458cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006459/* confdefs.h. */
6460_ACEOF
6461cat confdefs.h >>conftest.$ac_ext
6462cat >>conftest.$ac_ext <<_ACEOF
6463/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006464
6465#define _LARGEFILE_SOURCE 1
6466#define _FILE_OFFSET_BITS 64
6467#include <sys/resource.h>
6468
Martin v. Löwis399a6892002-10-04 10:22:02 +00006469int
6470main ()
6471{
6472struct rlimit foo;
6473 ;
6474 return 0;
6475}
6476_ACEOF
6477rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006478if { (ac_try="$ac_compile"
6479case "(($ac_try" in
6480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6481 *) ac_try_echo=$ac_try;;
6482esac
6483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006486 grep -v '^ *+' conftest.er1 >conftest.err
6487 rm -f conftest.er1
6488 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006490 (exit $ac_status); } && {
6491 test -z "$ac_c_werror_flag" ||
6492 test ! -s conftest.err
6493 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006494 sol_lfs_bug=no
6495else
6496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006497sed 's/^/| /' conftest.$ac_ext >&5
6498
Martin v. Löwiseba40652007-08-30 20:10:57 +00006499 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006501
6502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6503{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6504echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006505if test "$sol_lfs_bug" = "yes"; then
6506 use_lfs=no
6507fi
6508
6509if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006510# Two defines needed to enable largefile support on various platforms
6511# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006512
Martin v. Löwis11437992002-04-12 09:54:03 +00006513cat >>confdefs.h <<\_ACEOF
6514#define _LARGEFILE_SOURCE 1
6515_ACEOF
6516
6517
6518cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006519#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006520_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006521
Martin v. Löwis399a6892002-10-04 10:22:02 +00006522fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006523
Guido van Rossum84e7b241996-08-19 21:59:00 +00006524# Add some code to confdefs.h so that the test for off_t works on SCO
6525cat >> confdefs.h <<\EOF
6526#if defined(SCO_DS)
6527#undef _OFF_T
6528#endif
6529EOF
6530
Guido van Rossumef2255b2000-03-10 22:30:29 +00006531# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006532{ echo "$as_me:$LINENO: checking for mode_t" >&5
6533echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006534if test "${ac_cv_type_mode_t+set}" = set; then
6535 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006536else
Martin v. Löwis11437992002-04-12 09:54:03 +00006537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006538/* confdefs.h. */
6539_ACEOF
6540cat confdefs.h >>conftest.$ac_ext
6541cat >>conftest.$ac_ext <<_ACEOF
6542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006543$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006544typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006545int
6546main ()
6547{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006548if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006549 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006550if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006551 return 0;
6552 ;
6553 return 0;
6554}
6555_ACEOF
6556rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006557if { (ac_try="$ac_compile"
6558case "(($ac_try" in
6559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6560 *) ac_try_echo=$ac_try;;
6561esac
6562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006565 grep -v '^ *+' conftest.er1 >conftest.err
6566 rm -f conftest.er1
6567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006569 (exit $ac_status); } && {
6570 test -z "$ac_c_werror_flag" ||
6571 test ! -s conftest.err
6572 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006573 ac_cv_type_mode_t=yes
6574else
Martin v. Löwis11437992002-04-12 09:54:03 +00006575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006576sed 's/^/| /' conftest.$ac_ext >&5
6577
Martin v. Löwiseba40652007-08-30 20:10:57 +00006578 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006580
6581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006583{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6584echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006585if test $ac_cv_type_mode_t = yes; then
6586 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006587else
Martin v. Löwis11437992002-04-12 09:54:03 +00006588
6589cat >>confdefs.h <<_ACEOF
6590#define mode_t int
6591_ACEOF
6592
6593fi
6594
Martin v. Löwiseba40652007-08-30 20:10:57 +00006595{ echo "$as_me:$LINENO: checking for off_t" >&5
6596echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006597if test "${ac_cv_type_off_t+set}" = set; then
6598 echo $ECHO_N "(cached) $ECHO_C" >&6
6599else
6600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006601/* confdefs.h. */
6602_ACEOF
6603cat confdefs.h >>conftest.$ac_ext
6604cat >>conftest.$ac_ext <<_ACEOF
6605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006606$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006607typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006608int
6609main ()
6610{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006611if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006612 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006613if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006614 return 0;
6615 ;
6616 return 0;
6617}
6618_ACEOF
6619rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006620if { (ac_try="$ac_compile"
6621case "(($ac_try" in
6622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6623 *) ac_try_echo=$ac_try;;
6624esac
6625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6626 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006628 grep -v '^ *+' conftest.er1 >conftest.err
6629 rm -f conftest.er1
6630 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006632 (exit $ac_status); } && {
6633 test -z "$ac_c_werror_flag" ||
6634 test ! -s conftest.err
6635 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006636 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006637else
Martin v. Löwis11437992002-04-12 09:54:03 +00006638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006639sed 's/^/| /' conftest.$ac_ext >&5
6640
Martin v. Löwiseba40652007-08-30 20:10:57 +00006641 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006643
6644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006646{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6647echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006648if test $ac_cv_type_off_t = yes; then
6649 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006650else
Martin v. Löwis11437992002-04-12 09:54:03 +00006651
6652cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006653#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006654_ACEOF
6655
6656fi
6657
Martin v. Löwiseba40652007-08-30 20:10:57 +00006658{ echo "$as_me:$LINENO: checking for pid_t" >&5
6659echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006660if test "${ac_cv_type_pid_t+set}" = set; then
6661 echo $ECHO_N "(cached) $ECHO_C" >&6
6662else
6663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006664/* confdefs.h. */
6665_ACEOF
6666cat confdefs.h >>conftest.$ac_ext
6667cat >>conftest.$ac_ext <<_ACEOF
6668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006669$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006670typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006671int
6672main ()
6673{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006674if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006675 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006676if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006677 return 0;
6678 ;
6679 return 0;
6680}
6681_ACEOF
6682rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683if { (ac_try="$ac_compile"
6684case "(($ac_try" in
6685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6686 *) ac_try_echo=$ac_try;;
6687esac
6688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006691 grep -v '^ *+' conftest.er1 >conftest.err
6692 rm -f conftest.er1
6693 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006695 (exit $ac_status); } && {
6696 test -z "$ac_c_werror_flag" ||
6697 test ! -s conftest.err
6698 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006699 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006700else
Martin v. Löwis11437992002-04-12 09:54:03 +00006701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006702sed 's/^/| /' conftest.$ac_ext >&5
6703
Martin v. Löwiseba40652007-08-30 20:10:57 +00006704 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006706
6707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006709{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6710echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006711if test $ac_cv_type_pid_t = yes; then
6712 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006713else
Martin v. Löwis11437992002-04-12 09:54:03 +00006714
6715cat >>confdefs.h <<_ACEOF
6716#define pid_t int
6717_ACEOF
6718
6719fi
6720
Martin v. Löwiseba40652007-08-30 20:10:57 +00006721{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6722echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006723if test "${ac_cv_type_signal+set}" = set; then
6724 echo $ECHO_N "(cached) $ECHO_C" >&6
6725else
6726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006727/* confdefs.h. */
6728_ACEOF
6729cat confdefs.h >>conftest.$ac_ext
6730cat >>conftest.$ac_ext <<_ACEOF
6731/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006732#include <sys/types.h>
6733#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006734
Martin v. Löwis11437992002-04-12 09:54:03 +00006735int
6736main ()
6737{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006738return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006739 ;
6740 return 0;
6741}
6742_ACEOF
6743rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006744if { (ac_try="$ac_compile"
6745case "(($ac_try" in
6746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6747 *) ac_try_echo=$ac_try;;
6748esac
6749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6750 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006752 grep -v '^ *+' conftest.er1 >conftest.err
6753 rm -f conftest.er1
6754 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006756 (exit $ac_status); } && {
6757 test -z "$ac_c_werror_flag" ||
6758 test ! -s conftest.err
6759 } && test -s conftest.$ac_objext; then
6760 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006761else
Martin v. Löwis11437992002-04-12 09:54:03 +00006762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006763sed 's/^/| /' conftest.$ac_ext >&5
6764
Martin v. Löwiseba40652007-08-30 20:10:57 +00006765 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006767
6768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006770{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6771echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006772
Martin v. Löwis11437992002-04-12 09:54:03 +00006773cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006774#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006775_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006776
Michael W. Hudson54241132001-12-07 15:38:26 +00006777
Martin v. Löwiseba40652007-08-30 20:10:57 +00006778{ echo "$as_me:$LINENO: checking for size_t" >&5
6779echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006780if test "${ac_cv_type_size_t+set}" = set; then
6781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006782else
Martin v. Löwis11437992002-04-12 09:54:03 +00006783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006784/* confdefs.h. */
6785_ACEOF
6786cat confdefs.h >>conftest.$ac_ext
6787cat >>conftest.$ac_ext <<_ACEOF
6788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006789$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006790typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006791int
6792main ()
6793{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006794if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006795 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006796if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006797 return 0;
6798 ;
6799 return 0;
6800}
6801_ACEOF
6802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006803if { (ac_try="$ac_compile"
6804case "(($ac_try" in
6805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6806 *) ac_try_echo=$ac_try;;
6807esac
6808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006811 grep -v '^ *+' conftest.er1 >conftest.err
6812 rm -f conftest.er1
6813 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006815 (exit $ac_status); } && {
6816 test -z "$ac_c_werror_flag" ||
6817 test ! -s conftest.err
6818 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006819 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006820else
Martin v. Löwis11437992002-04-12 09:54:03 +00006821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006822sed 's/^/| /' conftest.$ac_ext >&5
6823
Martin v. Löwiseba40652007-08-30 20:10:57 +00006824 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006826
6827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006829{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6830echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006831if test $ac_cv_type_size_t = yes; then
6832 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006833else
Martin v. Löwis11437992002-04-12 09:54:03 +00006834
6835cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006836#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006837_ACEOF
6838
6839fi
6840
Martin v. Löwiseba40652007-08-30 20:10:57 +00006841{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6842echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006843if test "${ac_cv_type_uid_t+set}" = set; then
6844 echo $ECHO_N "(cached) $ECHO_C" >&6
6845else
6846 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006847/* confdefs.h. */
6848_ACEOF
6849cat confdefs.h >>conftest.$ac_ext
6850cat >>conftest.$ac_ext <<_ACEOF
6851/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006852#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006853
6854_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006856 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006857 ac_cv_type_uid_t=yes
6858else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006859 ac_cv_type_uid_t=no
6860fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006861rm -f conftest*
6862
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006864{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6865echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006866if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006867
Martin v. Löwis11437992002-04-12 09:54:03 +00006868cat >>confdefs.h <<\_ACEOF
6869#define uid_t int
6870_ACEOF
6871
6872
6873cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006874#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006875_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006876
6877fi
6878
Martin v. Löwiseba40652007-08-30 20:10:57 +00006879{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6880echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006881if test "${ac_cv_type_ssize_t+set}" = set; then
6882 echo $ECHO_N "(cached) $ECHO_C" >&6
6883else
6884 cat >conftest.$ac_ext <<_ACEOF
6885/* confdefs.h. */
6886_ACEOF
6887cat confdefs.h >>conftest.$ac_ext
6888cat >>conftest.$ac_ext <<_ACEOF
6889/* end confdefs.h. */
6890$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006891typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006892int
6893main ()
6894{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006895if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006896 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006897if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006898 return 0;
6899 ;
6900 return 0;
6901}
6902_ACEOF
6903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006904if { (ac_try="$ac_compile"
6905case "(($ac_try" in
6906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6907 *) ac_try_echo=$ac_try;;
6908esac
6909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006911 ac_status=$?
6912 grep -v '^ *+' conftest.er1 >conftest.err
6913 rm -f conftest.er1
6914 cat conftest.err >&5
6915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006916 (exit $ac_status); } && {
6917 test -z "$ac_c_werror_flag" ||
6918 test ! -s conftest.err
6919 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006920 ac_cv_type_ssize_t=yes
6921else
6922 echo "$as_me: failed program was:" >&5
6923sed 's/^/| /' conftest.$ac_ext >&5
6924
Martin v. Löwiseba40652007-08-30 20:10:57 +00006925 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006927
6928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006930{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6931echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006932if test $ac_cv_type_ssize_t = yes; then
6933
6934cat >>confdefs.h <<\_ACEOF
6935#define HAVE_SSIZE_T 1
6936_ACEOF
6937
6938fi
6939
Jack Jansendd19cf82001-12-06 22:36:17 +00006940
Michael W. Hudson54241132001-12-07 15:38:26 +00006941# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006942# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006943{ echo "$as_me:$LINENO: checking for int" >&5
6944echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006945if test "${ac_cv_type_int+set}" = set; then
6946 echo $ECHO_N "(cached) $ECHO_C" >&6
6947else
6948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006949/* confdefs.h. */
6950_ACEOF
6951cat confdefs.h >>conftest.$ac_ext
6952cat >>conftest.$ac_ext <<_ACEOF
6953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006954$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006955typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006956int
6957main ()
6958{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006959if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006960 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006961if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006962 return 0;
6963 ;
6964 return 0;
6965}
6966_ACEOF
6967rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006968if { (ac_try="$ac_compile"
6969case "(($ac_try" in
6970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6971 *) ac_try_echo=$ac_try;;
6972esac
6973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6974 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006976 grep -v '^ *+' conftest.er1 >conftest.err
6977 rm -f conftest.er1
6978 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006980 (exit $ac_status); } && {
6981 test -z "$ac_c_werror_flag" ||
6982 test ! -s conftest.err
6983 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006984 ac_cv_type_int=yes
6985else
6986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006987sed 's/^/| /' conftest.$ac_ext >&5
6988
Martin v. Löwiseba40652007-08-30 20:10:57 +00006989 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006990fi
Brett Cannon19fab762007-06-02 03:02:29 +00006991
Martin v. Löwiseba40652007-08-30 20:10:57 +00006992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6993fi
6994{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6995echo "${ECHO_T}$ac_cv_type_int" >&6; }
6996
6997# The cast to long int works around a bug in the HP C Compiler
6998# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6999# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7000# This bug is HP SR number 8606223364.
7001{ echo "$as_me:$LINENO: checking size of int" >&5
7002echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007003if test "${ac_cv_sizeof_int+set}" = set; then
7004 echo $ECHO_N "(cached) $ECHO_C" >&6
7005else
Martin v. Löwis11437992002-04-12 09:54:03 +00007006 if test "$cross_compiling" = yes; then
7007 # Depending upon the size, compute the lo and hi bounds.
7008cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007009/* confdefs.h. */
7010_ACEOF
7011cat confdefs.h >>conftest.$ac_ext
7012cat >>conftest.$ac_ext <<_ACEOF
7013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007014$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007015 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007016int
7017main ()
7018{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007019static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007020test_array [0] = 0
7021
7022 ;
7023 return 0;
7024}
7025_ACEOF
7026rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007027if { (ac_try="$ac_compile"
7028case "(($ac_try" in
7029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7030 *) ac_try_echo=$ac_try;;
7031esac
7032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7033 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007035 grep -v '^ *+' conftest.er1 >conftest.err
7036 rm -f conftest.er1
7037 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039 (exit $ac_status); } && {
7040 test -z "$ac_c_werror_flag" ||
7041 test ! -s conftest.err
7042 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007043 ac_lo=0 ac_mid=0
7044 while :; do
7045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007046/* confdefs.h. */
7047_ACEOF
7048cat confdefs.h >>conftest.$ac_ext
7049cat >>conftest.$ac_ext <<_ACEOF
7050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007051$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007052 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007053int
7054main ()
7055{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007056static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007057test_array [0] = 0
7058
7059 ;
7060 return 0;
7061}
7062_ACEOF
7063rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007064if { (ac_try="$ac_compile"
7065case "(($ac_try" in
7066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7067 *) ac_try_echo=$ac_try;;
7068esac
7069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7070 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007072 grep -v '^ *+' conftest.er1 >conftest.err
7073 rm -f conftest.er1
7074 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007076 (exit $ac_status); } && {
7077 test -z "$ac_c_werror_flag" ||
7078 test ! -s conftest.err
7079 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007080 ac_hi=$ac_mid; break
7081else
7082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007083sed 's/^/| /' conftest.$ac_ext >&5
7084
Martin v. Löwiseba40652007-08-30 20:10:57 +00007085 ac_lo=`expr $ac_mid + 1`
7086 if test $ac_lo -le $ac_mid; then
7087 ac_lo= ac_hi=
7088 break
7089 fi
7090 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007092
7093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007094 done
7095else
7096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007097sed 's/^/| /' conftest.$ac_ext >&5
7098
Martin v. Löwiseba40652007-08-30 20:10:57 +00007099 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007100/* confdefs.h. */
7101_ACEOF
7102cat confdefs.h >>conftest.$ac_ext
7103cat >>conftest.$ac_ext <<_ACEOF
7104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007105$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007106 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007107int
7108main ()
7109{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007110static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007111test_array [0] = 0
7112
7113 ;
7114 return 0;
7115}
7116_ACEOF
7117rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007118if { (ac_try="$ac_compile"
7119case "(($ac_try" in
7120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7121 *) ac_try_echo=$ac_try;;
7122esac
7123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007126 grep -v '^ *+' conftest.er1 >conftest.err
7127 rm -f conftest.er1
7128 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007130 (exit $ac_status); } && {
7131 test -z "$ac_c_werror_flag" ||
7132 test ! -s conftest.err
7133 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007134 ac_hi=-1 ac_mid=-1
7135 while :; do
7136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007137/* confdefs.h. */
7138_ACEOF
7139cat confdefs.h >>conftest.$ac_ext
7140cat >>conftest.$ac_ext <<_ACEOF
7141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007142$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007143 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007144int
7145main ()
7146{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007148test_array [0] = 0
7149
7150 ;
7151 return 0;
7152}
7153_ACEOF
7154rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155if { (ac_try="$ac_compile"
7156case "(($ac_try" in
7157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7158 *) ac_try_echo=$ac_try;;
7159esac
7160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007163 grep -v '^ *+' conftest.er1 >conftest.err
7164 rm -f conftest.er1
7165 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007167 (exit $ac_status); } && {
7168 test -z "$ac_c_werror_flag" ||
7169 test ! -s conftest.err
7170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007171 ac_lo=$ac_mid; break
7172else
7173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007174sed 's/^/| /' conftest.$ac_ext >&5
7175
Martin v. Löwiseba40652007-08-30 20:10:57 +00007176 ac_hi=`expr '(' $ac_mid ')' - 1`
7177 if test $ac_mid -le $ac_hi; then
7178 ac_lo= ac_hi=
7179 break
7180 fi
7181 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007183
7184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007185 done
7186else
7187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007188sed 's/^/| /' conftest.$ac_ext >&5
7189
Martin v. Löwiseba40652007-08-30 20:10:57 +00007190 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007192
7193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007195
7196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007197# Binary search between lo and hi bounds.
7198while test "x$ac_lo" != "x$ac_hi"; do
7199 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007201/* confdefs.h. */
7202_ACEOF
7203cat confdefs.h >>conftest.$ac_ext
7204cat >>conftest.$ac_ext <<_ACEOF
7205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007206$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007207 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007208int
7209main ()
7210{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007211static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007212test_array [0] = 0
7213
7214 ;
7215 return 0;
7216}
7217_ACEOF
7218rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007219if { (ac_try="$ac_compile"
7220case "(($ac_try" in
7221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7222 *) ac_try_echo=$ac_try;;
7223esac
7224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007227 grep -v '^ *+' conftest.er1 >conftest.err
7228 rm -f conftest.er1
7229 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007231 (exit $ac_status); } && {
7232 test -z "$ac_c_werror_flag" ||
7233 test ! -s conftest.err
7234 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007235 ac_hi=$ac_mid
7236else
7237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007238sed 's/^/| /' conftest.$ac_ext >&5
7239
Martin v. Löwiseba40652007-08-30 20:10:57 +00007240 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007242
7243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007244done
7245case $ac_lo in
7246?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007247'') if test "$ac_cv_type_int" = yes; then
7248 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007249See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007250echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007251See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007252 { (exit 77); exit 77; }; }
7253 else
7254 ac_cv_sizeof_int=0
7255 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007256esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007257else
Martin v. Löwis11437992002-04-12 09:54:03 +00007258 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007259/* confdefs.h. */
7260_ACEOF
7261cat confdefs.h >>conftest.$ac_ext
7262cat >>conftest.$ac_ext <<_ACEOF
7263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007264$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007265 typedef int ac__type_sizeof_;
7266static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7267static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007268#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007269#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007270int
7271main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007272{
Martin v. Löwis11437992002-04-12 09:54:03 +00007273
7274 FILE *f = fopen ("conftest.val", "w");
7275 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007276 return 1;
7277 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007278 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007279 long int i = longval ();
7280 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7281 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007282 fprintf (f, "%ld\n", i);
7283 }
7284 else
7285 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007286 unsigned long int i = ulongval ();
7287 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7288 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007289 fprintf (f, "%lu\n", i);
7290 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007291 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007292
7293 ;
7294 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007295}
Martin v. Löwis11437992002-04-12 09:54:03 +00007296_ACEOF
7297rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007298if { (ac_try="$ac_link"
7299case "(($ac_try" in
7300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7301 *) ac_try_echo=$ac_try;;
7302esac
7303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7304 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007305 ac_status=$?
7306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7307 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007308 { (case "(($ac_try" in
7309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7310 *) ac_try_echo=$ac_try;;
7311esac
7312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7313 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007314 ac_status=$?
7315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7316 (exit $ac_status); }; }; then
7317 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007318else
Martin v. Löwis11437992002-04-12 09:54:03 +00007319 echo "$as_me: program exited with status $ac_status" >&5
7320echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007321sed 's/^/| /' conftest.$ac_ext >&5
7322
Martin v. Löwis11437992002-04-12 09:54:03 +00007323( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007324if test "$ac_cv_type_int" = yes; then
7325 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007326See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007327echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007328See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007329 { (exit 77); exit 77; }; }
7330 else
7331 ac_cv_sizeof_int=0
7332 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007334rm -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 +00007335fi
7336rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007338{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7339echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7340
7341
7342
Martin v. Löwis11437992002-04-12 09:54:03 +00007343cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007344#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007345_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007346
7347
Martin v. Löwiseba40652007-08-30 20:10:57 +00007348{ echo "$as_me:$LINENO: checking for long" >&5
7349echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007350if test "${ac_cv_type_long+set}" = set; then
7351 echo $ECHO_N "(cached) $ECHO_C" >&6
7352else
7353 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007354/* confdefs.h. */
7355_ACEOF
7356cat confdefs.h >>conftest.$ac_ext
7357cat >>conftest.$ac_ext <<_ACEOF
7358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007359$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007360typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007361int
7362main ()
7363{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007364if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007365 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007366if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007367 return 0;
7368 ;
7369 return 0;
7370}
7371_ACEOF
7372rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007373if { (ac_try="$ac_compile"
7374case "(($ac_try" in
7375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7376 *) ac_try_echo=$ac_try;;
7377esac
7378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7379 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007381 grep -v '^ *+' conftest.er1 >conftest.err
7382 rm -f conftest.er1
7383 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007385 (exit $ac_status); } && {
7386 test -z "$ac_c_werror_flag" ||
7387 test ! -s conftest.err
7388 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007389 ac_cv_type_long=yes
7390else
7391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007392sed 's/^/| /' conftest.$ac_ext >&5
7393
Martin v. Löwiseba40652007-08-30 20:10:57 +00007394 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007395fi
Brett Cannon19fab762007-06-02 03:02:29 +00007396
Martin v. Löwiseba40652007-08-30 20:10:57 +00007397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7398fi
7399{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7400echo "${ECHO_T}$ac_cv_type_long" >&6; }
7401
7402# The cast to long int works around a bug in the HP C Compiler
7403# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7404# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7405# This bug is HP SR number 8606223364.
7406{ echo "$as_me:$LINENO: checking size of long" >&5
7407echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007408if test "${ac_cv_sizeof_long+set}" = set; then
7409 echo $ECHO_N "(cached) $ECHO_C" >&6
7410else
Martin v. Löwis11437992002-04-12 09:54:03 +00007411 if test "$cross_compiling" = yes; then
7412 # Depending upon the size, compute the lo and hi bounds.
7413cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007414/* confdefs.h. */
7415_ACEOF
7416cat confdefs.h >>conftest.$ac_ext
7417cat >>conftest.$ac_ext <<_ACEOF
7418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007419$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007420 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007421int
7422main ()
7423{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007424static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007425test_array [0] = 0
7426
7427 ;
7428 return 0;
7429}
7430_ACEOF
7431rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007432if { (ac_try="$ac_compile"
7433case "(($ac_try" in
7434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7435 *) ac_try_echo=$ac_try;;
7436esac
7437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007440 grep -v '^ *+' conftest.er1 >conftest.err
7441 rm -f conftest.er1
7442 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007444 (exit $ac_status); } && {
7445 test -z "$ac_c_werror_flag" ||
7446 test ! -s conftest.err
7447 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007448 ac_lo=0 ac_mid=0
7449 while :; do
7450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007451/* confdefs.h. */
7452_ACEOF
7453cat confdefs.h >>conftest.$ac_ext
7454cat >>conftest.$ac_ext <<_ACEOF
7455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007456$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007457 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007458int
7459main ()
7460{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007461static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007462test_array [0] = 0
7463
7464 ;
7465 return 0;
7466}
7467_ACEOF
7468rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007469if { (ac_try="$ac_compile"
7470case "(($ac_try" in
7471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7472 *) ac_try_echo=$ac_try;;
7473esac
7474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007477 grep -v '^ *+' conftest.er1 >conftest.err
7478 rm -f conftest.er1
7479 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007481 (exit $ac_status); } && {
7482 test -z "$ac_c_werror_flag" ||
7483 test ! -s conftest.err
7484 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007485 ac_hi=$ac_mid; break
7486else
7487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007488sed 's/^/| /' conftest.$ac_ext >&5
7489
Martin v. Löwiseba40652007-08-30 20:10:57 +00007490 ac_lo=`expr $ac_mid + 1`
7491 if test $ac_lo -le $ac_mid; then
7492 ac_lo= ac_hi=
7493 break
7494 fi
7495 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007497
7498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007499 done
7500else
7501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007502sed 's/^/| /' conftest.$ac_ext >&5
7503
Martin v. Löwiseba40652007-08-30 20:10:57 +00007504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007505/* confdefs.h. */
7506_ACEOF
7507cat confdefs.h >>conftest.$ac_ext
7508cat >>conftest.$ac_ext <<_ACEOF
7509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007510$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007511 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007512int
7513main ()
7514{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007515static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007516test_array [0] = 0
7517
7518 ;
7519 return 0;
7520}
7521_ACEOF
7522rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007523if { (ac_try="$ac_compile"
7524case "(($ac_try" in
7525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7526 *) ac_try_echo=$ac_try;;
7527esac
7528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7529 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007531 grep -v '^ *+' conftest.er1 >conftest.err
7532 rm -f conftest.er1
7533 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007535 (exit $ac_status); } && {
7536 test -z "$ac_c_werror_flag" ||
7537 test ! -s conftest.err
7538 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007539 ac_hi=-1 ac_mid=-1
7540 while :; do
7541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007542/* confdefs.h. */
7543_ACEOF
7544cat confdefs.h >>conftest.$ac_ext
7545cat >>conftest.$ac_ext <<_ACEOF
7546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007547$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007548 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007549int
7550main ()
7551{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007552static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007553test_array [0] = 0
7554
7555 ;
7556 return 0;
7557}
7558_ACEOF
7559rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007560if { (ac_try="$ac_compile"
7561case "(($ac_try" in
7562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7563 *) ac_try_echo=$ac_try;;
7564esac
7565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007568 grep -v '^ *+' conftest.er1 >conftest.err
7569 rm -f conftest.er1
7570 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007572 (exit $ac_status); } && {
7573 test -z "$ac_c_werror_flag" ||
7574 test ! -s conftest.err
7575 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007576 ac_lo=$ac_mid; break
7577else
7578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007579sed 's/^/| /' conftest.$ac_ext >&5
7580
Martin v. Löwiseba40652007-08-30 20:10:57 +00007581 ac_hi=`expr '(' $ac_mid ')' - 1`
7582 if test $ac_mid -le $ac_hi; then
7583 ac_lo= ac_hi=
7584 break
7585 fi
7586 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007588
7589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 done
7591else
7592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007593sed 's/^/| /' conftest.$ac_ext >&5
7594
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007597
7598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007600
7601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007602# Binary search between lo and hi bounds.
7603while test "x$ac_lo" != "x$ac_hi"; do
7604 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007606/* confdefs.h. */
7607_ACEOF
7608cat confdefs.h >>conftest.$ac_ext
7609cat >>conftest.$ac_ext <<_ACEOF
7610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007611$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007612 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007613int
7614main ()
7615{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007617test_array [0] = 0
7618
7619 ;
7620 return 0;
7621}
7622_ACEOF
7623rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007624if { (ac_try="$ac_compile"
7625case "(($ac_try" in
7626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7627 *) ac_try_echo=$ac_try;;
7628esac
7629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007632 grep -v '^ *+' conftest.er1 >conftest.err
7633 rm -f conftest.er1
7634 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007636 (exit $ac_status); } && {
7637 test -z "$ac_c_werror_flag" ||
7638 test ! -s conftest.err
7639 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007640 ac_hi=$ac_mid
7641else
7642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007643sed 's/^/| /' conftest.$ac_ext >&5
7644
Martin v. Löwiseba40652007-08-30 20:10:57 +00007645 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007647
7648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007649done
7650case $ac_lo in
7651?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007652'') if test "$ac_cv_type_long" = yes; then
7653 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007654See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007655echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007656See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007657 { (exit 77); exit 77; }; }
7658 else
7659 ac_cv_sizeof_long=0
7660 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007661esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007662else
Martin v. Löwis11437992002-04-12 09:54:03 +00007663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007664/* confdefs.h. */
7665_ACEOF
7666cat confdefs.h >>conftest.$ac_ext
7667cat >>conftest.$ac_ext <<_ACEOF
7668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007669$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007670 typedef long ac__type_sizeof_;
7671static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7672static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007673#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007674#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007675int
7676main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007677{
Martin v. Löwis11437992002-04-12 09:54:03 +00007678
7679 FILE *f = fopen ("conftest.val", "w");
7680 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007681 return 1;
7682 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007683 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007684 long int i = longval ();
7685 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7686 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007687 fprintf (f, "%ld\n", i);
7688 }
7689 else
7690 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007691 unsigned long int i = ulongval ();
7692 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7693 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007694 fprintf (f, "%lu\n", i);
7695 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007696 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007697
7698 ;
7699 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007700}
Martin v. Löwis11437992002-04-12 09:54:03 +00007701_ACEOF
7702rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007703if { (ac_try="$ac_link"
7704case "(($ac_try" in
7705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7706 *) ac_try_echo=$ac_try;;
7707esac
7708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7709 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007710 ac_status=$?
7711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7712 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007713 { (case "(($ac_try" in
7714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7715 *) ac_try_echo=$ac_try;;
7716esac
7717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7718 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007719 ac_status=$?
7720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7721 (exit $ac_status); }; }; then
7722 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007723else
Martin v. Löwis11437992002-04-12 09:54:03 +00007724 echo "$as_me: program exited with status $ac_status" >&5
7725echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007726sed 's/^/| /' conftest.$ac_ext >&5
7727
Martin v. Löwis11437992002-04-12 09:54:03 +00007728( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007729if test "$ac_cv_type_long" = yes; then
7730 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007731See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007732echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007733See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007734 { (exit 77); exit 77; }; }
7735 else
7736 ac_cv_sizeof_long=0
7737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739rm -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 +00007740fi
7741rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007743{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7744echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7745
7746
7747
Martin v. Löwis11437992002-04-12 09:54:03 +00007748cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007749#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007750_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007751
7752
Martin v. Löwiseba40652007-08-30 20:10:57 +00007753{ echo "$as_me:$LINENO: checking for void *" >&5
7754echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007755if test "${ac_cv_type_void_p+set}" = set; then
7756 echo $ECHO_N "(cached) $ECHO_C" >&6
7757else
7758 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007759/* confdefs.h. */
7760_ACEOF
7761cat confdefs.h >>conftest.$ac_ext
7762cat >>conftest.$ac_ext <<_ACEOF
7763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007764$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007765typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007766int
7767main ()
7768{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007769if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007771if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 return 0;
7773 ;
7774 return 0;
7775}
7776_ACEOF
7777rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007778if { (ac_try="$ac_compile"
7779case "(($ac_try" in
7780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7781 *) ac_try_echo=$ac_try;;
7782esac
7783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7784 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007785 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007786 grep -v '^ *+' conftest.er1 >conftest.err
7787 rm -f conftest.er1
7788 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007790 (exit $ac_status); } && {
7791 test -z "$ac_c_werror_flag" ||
7792 test ! -s conftest.err
7793 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007794 ac_cv_type_void_p=yes
7795else
7796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007797sed 's/^/| /' conftest.$ac_ext >&5
7798
Martin v. Löwiseba40652007-08-30 20:10:57 +00007799 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007800fi
Brett Cannon19fab762007-06-02 03:02:29 +00007801
Martin v. Löwiseba40652007-08-30 20:10:57 +00007802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7803fi
7804{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7805echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7806
7807# The cast to long int works around a bug in the HP C Compiler
7808# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7809# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7810# This bug is HP SR number 8606223364.
7811{ echo "$as_me:$LINENO: checking size of void *" >&5
7812echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007813if test "${ac_cv_sizeof_void_p+set}" = set; then
7814 echo $ECHO_N "(cached) $ECHO_C" >&6
7815else
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 if test "$cross_compiling" = yes; then
7817 # Depending upon the size, compute the lo and hi bounds.
7818cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007819/* confdefs.h. */
7820_ACEOF
7821cat confdefs.h >>conftest.$ac_ext
7822cat >>conftest.$ac_ext <<_ACEOF
7823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007824$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007825 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007826int
7827main ()
7828{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007829static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007830test_array [0] = 0
7831
7832 ;
7833 return 0;
7834}
7835_ACEOF
7836rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007837if { (ac_try="$ac_compile"
7838case "(($ac_try" in
7839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7840 *) ac_try_echo=$ac_try;;
7841esac
7842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007845 grep -v '^ *+' conftest.er1 >conftest.err
7846 rm -f conftest.er1
7847 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007849 (exit $ac_status); } && {
7850 test -z "$ac_c_werror_flag" ||
7851 test ! -s conftest.err
7852 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007853 ac_lo=0 ac_mid=0
7854 while :; do
7855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007856/* confdefs.h. */
7857_ACEOF
7858cat confdefs.h >>conftest.$ac_ext
7859cat >>conftest.$ac_ext <<_ACEOF
7860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007861$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007862 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007863int
7864main ()
7865{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007866static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007867test_array [0] = 0
7868
7869 ;
7870 return 0;
7871}
7872_ACEOF
7873rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007874if { (ac_try="$ac_compile"
7875case "(($ac_try" in
7876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7877 *) ac_try_echo=$ac_try;;
7878esac
7879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007882 grep -v '^ *+' conftest.er1 >conftest.err
7883 rm -f conftest.er1
7884 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007886 (exit $ac_status); } && {
7887 test -z "$ac_c_werror_flag" ||
7888 test ! -s conftest.err
7889 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 ac_hi=$ac_mid; break
7891else
7892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007893sed 's/^/| /' conftest.$ac_ext >&5
7894
Martin v. Löwiseba40652007-08-30 20:10:57 +00007895 ac_lo=`expr $ac_mid + 1`
7896 if test $ac_lo -le $ac_mid; then
7897 ac_lo= ac_hi=
7898 break
7899 fi
7900 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007902
7903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 done
7905else
7906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007907sed 's/^/| /' conftest.$ac_ext >&5
7908
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007910/* confdefs.h. */
7911_ACEOF
7912cat confdefs.h >>conftest.$ac_ext
7913cat >>conftest.$ac_ext <<_ACEOF
7914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007915$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007916 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007917int
7918main ()
7919{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007920static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007921test_array [0] = 0
7922
7923 ;
7924 return 0;
7925}
7926_ACEOF
7927rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007928if { (ac_try="$ac_compile"
7929case "(($ac_try" in
7930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7931 *) ac_try_echo=$ac_try;;
7932esac
7933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7934 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007935 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007936 grep -v '^ *+' conftest.er1 >conftest.err
7937 rm -f conftest.er1
7938 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007940 (exit $ac_status); } && {
7941 test -z "$ac_c_werror_flag" ||
7942 test ! -s conftest.err
7943 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007944 ac_hi=-1 ac_mid=-1
7945 while :; do
7946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007947/* confdefs.h. */
7948_ACEOF
7949cat confdefs.h >>conftest.$ac_ext
7950cat >>conftest.$ac_ext <<_ACEOF
7951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007952$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007953 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007954int
7955main ()
7956{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007958test_array [0] = 0
7959
7960 ;
7961 return 0;
7962}
7963_ACEOF
7964rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007965if { (ac_try="$ac_compile"
7966case "(($ac_try" in
7967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7968 *) ac_try_echo=$ac_try;;
7969esac
7970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007973 grep -v '^ *+' conftest.er1 >conftest.err
7974 rm -f conftest.er1
7975 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007977 (exit $ac_status); } && {
7978 test -z "$ac_c_werror_flag" ||
7979 test ! -s conftest.err
7980 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007981 ac_lo=$ac_mid; break
7982else
7983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007984sed 's/^/| /' conftest.$ac_ext >&5
7985
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986 ac_hi=`expr '(' $ac_mid ')' - 1`
7987 if test $ac_mid -le $ac_hi; then
7988 ac_lo= ac_hi=
7989 break
7990 fi
7991 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007993
7994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 done
7996else
7997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007998sed 's/^/| /' conftest.$ac_ext >&5
7999
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008002
8003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008005
8006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008007# Binary search between lo and hi bounds.
8008while test "x$ac_lo" != "x$ac_hi"; do
8009 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008011/* confdefs.h. */
8012_ACEOF
8013cat confdefs.h >>conftest.$ac_ext
8014cat >>conftest.$ac_ext <<_ACEOF
8015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008016$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008017 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008018int
8019main ()
8020{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008021static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008022test_array [0] = 0
8023
8024 ;
8025 return 0;
8026}
8027_ACEOF
8028rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008029if { (ac_try="$ac_compile"
8030case "(($ac_try" in
8031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8032 *) ac_try_echo=$ac_try;;
8033esac
8034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8035 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008037 grep -v '^ *+' conftest.er1 >conftest.err
8038 rm -f conftest.er1
8039 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008041 (exit $ac_status); } && {
8042 test -z "$ac_c_werror_flag" ||
8043 test ! -s conftest.err
8044 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008045 ac_hi=$ac_mid
8046else
8047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008048sed 's/^/| /' conftest.$ac_ext >&5
8049
Martin v. Löwiseba40652007-08-30 20:10:57 +00008050 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008052
8053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008054done
8055case $ac_lo in
8056?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008057'') if test "$ac_cv_type_void_p" = yes; then
8058 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008059See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008061See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008062 { (exit 77); exit 77; }; }
8063 else
8064 ac_cv_sizeof_void_p=0
8065 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008066esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008067else
Martin v. Löwis11437992002-04-12 09:54:03 +00008068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008069/* confdefs.h. */
8070_ACEOF
8071cat confdefs.h >>conftest.$ac_ext
8072cat >>conftest.$ac_ext <<_ACEOF
8073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008074$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008075 typedef void * ac__type_sizeof_;
8076static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8077static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008078#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008079#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008080int
8081main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008082{
Martin v. Löwis11437992002-04-12 09:54:03 +00008083
8084 FILE *f = fopen ("conftest.val", "w");
8085 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008086 return 1;
8087 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008089 long int i = longval ();
8090 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8091 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 fprintf (f, "%ld\n", i);
8093 }
8094 else
8095 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008096 unsigned long int i = ulongval ();
8097 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8098 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 fprintf (f, "%lu\n", i);
8100 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008101 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008102
8103 ;
8104 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008105}
Martin v. Löwis11437992002-04-12 09:54:03 +00008106_ACEOF
8107rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008108if { (ac_try="$ac_link"
8109case "(($ac_try" in
8110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8111 *) ac_try_echo=$ac_try;;
8112esac
8113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8114 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 ac_status=$?
8116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8117 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118 { (case "(($ac_try" in
8119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8120 *) ac_try_echo=$ac_try;;
8121esac
8122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8123 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008124 ac_status=$?
8125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8126 (exit $ac_status); }; }; then
8127 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008128else
Martin v. Löwis11437992002-04-12 09:54:03 +00008129 echo "$as_me: program exited with status $ac_status" >&5
8130echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008131sed 's/^/| /' conftest.$ac_ext >&5
8132
Martin v. Löwis11437992002-04-12 09:54:03 +00008133( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008134if test "$ac_cv_type_void_p" = yes; then
8135 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008136See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008137echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008138See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008139 { (exit 77); exit 77; }; }
8140 else
8141 ac_cv_sizeof_void_p=0
8142 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008144rm -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 +00008145fi
8146rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008148{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8149echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8150
8151
8152
Martin v. Löwis11437992002-04-12 09:54:03 +00008153cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008154#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008155_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008156
8157
Martin v. Löwiseba40652007-08-30 20:10:57 +00008158{ echo "$as_me:$LINENO: checking for short" >&5
8159echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008160if test "${ac_cv_type_short+set}" = set; then
8161 echo $ECHO_N "(cached) $ECHO_C" >&6
8162else
8163 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008164/* confdefs.h. */
8165_ACEOF
8166cat confdefs.h >>conftest.$ac_ext
8167cat >>conftest.$ac_ext <<_ACEOF
8168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008169$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008170typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008171int
8172main ()
8173{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008174if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008175 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008176if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008177 return 0;
8178 ;
8179 return 0;
8180}
8181_ACEOF
8182rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008183if { (ac_try="$ac_compile"
8184case "(($ac_try" in
8185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8186 *) ac_try_echo=$ac_try;;
8187esac
8188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8189 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008191 grep -v '^ *+' conftest.er1 >conftest.err
8192 rm -f conftest.er1
8193 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008195 (exit $ac_status); } && {
8196 test -z "$ac_c_werror_flag" ||
8197 test ! -s conftest.err
8198 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008199 ac_cv_type_short=yes
8200else
8201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008202sed 's/^/| /' conftest.$ac_ext >&5
8203
Martin v. Löwiseba40652007-08-30 20:10:57 +00008204 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008205fi
Brett Cannon19fab762007-06-02 03:02:29 +00008206
Martin v. Löwiseba40652007-08-30 20:10:57 +00008207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8208fi
8209{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8210echo "${ECHO_T}$ac_cv_type_short" >&6; }
8211
8212# The cast to long int works around a bug in the HP C Compiler
8213# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8214# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8215# This bug is HP SR number 8606223364.
8216{ echo "$as_me:$LINENO: checking size of short" >&5
8217echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008218if test "${ac_cv_sizeof_short+set}" = set; then
8219 echo $ECHO_N "(cached) $ECHO_C" >&6
8220else
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 if test "$cross_compiling" = yes; then
8222 # Depending upon the size, compute the lo and hi bounds.
8223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008224/* confdefs.h. */
8225_ACEOF
8226cat confdefs.h >>conftest.$ac_ext
8227cat >>conftest.$ac_ext <<_ACEOF
8228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008229$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008230 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008231int
8232main ()
8233{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008234static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008235test_array [0] = 0
8236
8237 ;
8238 return 0;
8239}
8240_ACEOF
8241rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008242if { (ac_try="$ac_compile"
8243case "(($ac_try" in
8244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8245 *) ac_try_echo=$ac_try;;
8246esac
8247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8248 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008250 grep -v '^ *+' conftest.er1 >conftest.err
8251 rm -f conftest.er1
8252 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008254 (exit $ac_status); } && {
8255 test -z "$ac_c_werror_flag" ||
8256 test ! -s conftest.err
8257 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008258 ac_lo=0 ac_mid=0
8259 while :; do
8260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008261/* confdefs.h. */
8262_ACEOF
8263cat confdefs.h >>conftest.$ac_ext
8264cat >>conftest.$ac_ext <<_ACEOF
8265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008266$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008267 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008268int
8269main ()
8270{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008271static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008272test_array [0] = 0
8273
8274 ;
8275 return 0;
8276}
8277_ACEOF
8278rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008279if { (ac_try="$ac_compile"
8280case "(($ac_try" in
8281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8282 *) ac_try_echo=$ac_try;;
8283esac
8284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008287 grep -v '^ *+' conftest.er1 >conftest.err
8288 rm -f conftest.er1
8289 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008291 (exit $ac_status); } && {
8292 test -z "$ac_c_werror_flag" ||
8293 test ! -s conftest.err
8294 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 ac_hi=$ac_mid; break
8296else
8297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008298sed 's/^/| /' conftest.$ac_ext >&5
8299
Martin v. Löwiseba40652007-08-30 20:10:57 +00008300 ac_lo=`expr $ac_mid + 1`
8301 if test $ac_lo -le $ac_mid; then
8302 ac_lo= ac_hi=
8303 break
8304 fi
8305 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008307
8308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008309 done
8310else
8311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008312sed 's/^/| /' conftest.$ac_ext >&5
8313
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008315/* confdefs.h. */
8316_ACEOF
8317cat confdefs.h >>conftest.$ac_ext
8318cat >>conftest.$ac_ext <<_ACEOF
8319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008320$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008321 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008322int
8323main ()
8324{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008325static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008326test_array [0] = 0
8327
8328 ;
8329 return 0;
8330}
8331_ACEOF
8332rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008333if { (ac_try="$ac_compile"
8334case "(($ac_try" in
8335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8336 *) ac_try_echo=$ac_try;;
8337esac
8338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8339 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008341 grep -v '^ *+' conftest.er1 >conftest.err
8342 rm -f conftest.er1
8343 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008345 (exit $ac_status); } && {
8346 test -z "$ac_c_werror_flag" ||
8347 test ! -s conftest.err
8348 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008349 ac_hi=-1 ac_mid=-1
8350 while :; do
8351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008352/* confdefs.h. */
8353_ACEOF
8354cat confdefs.h >>conftest.$ac_ext
8355cat >>conftest.$ac_ext <<_ACEOF
8356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008357$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008358 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008359int
8360main ()
8361{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008362static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008363test_array [0] = 0
8364
8365 ;
8366 return 0;
8367}
8368_ACEOF
8369rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008370if { (ac_try="$ac_compile"
8371case "(($ac_try" in
8372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8373 *) ac_try_echo=$ac_try;;
8374esac
8375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008378 grep -v '^ *+' conftest.er1 >conftest.err
8379 rm -f conftest.er1
8380 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008382 (exit $ac_status); } && {
8383 test -z "$ac_c_werror_flag" ||
8384 test ! -s conftest.err
8385 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008386 ac_lo=$ac_mid; break
8387else
8388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008389sed 's/^/| /' conftest.$ac_ext >&5
8390
Martin v. Löwiseba40652007-08-30 20:10:57 +00008391 ac_hi=`expr '(' $ac_mid ')' - 1`
8392 if test $ac_mid -le $ac_hi; then
8393 ac_lo= ac_hi=
8394 break
8395 fi
8396 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008398
8399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 done
8401else
8402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008403sed 's/^/| /' conftest.$ac_ext >&5
8404
Martin v. Löwiseba40652007-08-30 20:10:57 +00008405 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008407
8408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008410
8411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008412# Binary search between lo and hi bounds.
8413while test "x$ac_lo" != "x$ac_hi"; do
8414 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008416/* confdefs.h. */
8417_ACEOF
8418cat confdefs.h >>conftest.$ac_ext
8419cat >>conftest.$ac_ext <<_ACEOF
8420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008421$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008422 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008423int
8424main ()
8425{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008426static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008427test_array [0] = 0
8428
8429 ;
8430 return 0;
8431}
8432_ACEOF
8433rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008434if { (ac_try="$ac_compile"
8435case "(($ac_try" in
8436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8437 *) ac_try_echo=$ac_try;;
8438esac
8439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008442 grep -v '^ *+' conftest.er1 >conftest.err
8443 rm -f conftest.er1
8444 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008446 (exit $ac_status); } && {
8447 test -z "$ac_c_werror_flag" ||
8448 test ! -s conftest.err
8449 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008450 ac_hi=$ac_mid
8451else
8452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008453sed 's/^/| /' conftest.$ac_ext >&5
8454
Martin v. Löwiseba40652007-08-30 20:10:57 +00008455 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008457
8458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008459done
8460case $ac_lo in
8461?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008462'') if test "$ac_cv_type_short" = yes; then
8463 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008464See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008465echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008466See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008467 { (exit 77); exit 77; }; }
8468 else
8469 ac_cv_sizeof_short=0
8470 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008471esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008472else
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008474/* confdefs.h. */
8475_ACEOF
8476cat confdefs.h >>conftest.$ac_ext
8477cat >>conftest.$ac_ext <<_ACEOF
8478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008479$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480 typedef short ac__type_sizeof_;
8481static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8482static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008483#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008484#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008485int
8486main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008487{
Martin v. Löwis11437992002-04-12 09:54:03 +00008488
8489 FILE *f = fopen ("conftest.val", "w");
8490 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008491 return 1;
8492 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008494 long int i = longval ();
8495 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8496 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008497 fprintf (f, "%ld\n", i);
8498 }
8499 else
8500 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008501 unsigned long int i = ulongval ();
8502 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8503 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 fprintf (f, "%lu\n", i);
8505 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008506 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008507
8508 ;
8509 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008510}
Martin v. Löwis11437992002-04-12 09:54:03 +00008511_ACEOF
8512rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008513if { (ac_try="$ac_link"
8514case "(($ac_try" in
8515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8516 *) ac_try_echo=$ac_try;;
8517esac
8518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8519 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ac_status=$?
8521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8522 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008523 { (case "(($ac_try" in
8524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8525 *) ac_try_echo=$ac_try;;
8526esac
8527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8528 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 ac_status=$?
8530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8531 (exit $ac_status); }; }; then
8532 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008533else
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 echo "$as_me: program exited with status $ac_status" >&5
8535echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008536sed 's/^/| /' conftest.$ac_ext >&5
8537
Martin v. Löwis11437992002-04-12 09:54:03 +00008538( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008539if test "$ac_cv_type_short" = yes; then
8540 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008541See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008542echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008543See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008544 { (exit 77); exit 77; }; }
8545 else
8546 ac_cv_sizeof_short=0
8547 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008549rm -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 +00008550fi
8551rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008553{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8554echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8555
8556
8557
Martin v. Löwis11437992002-04-12 09:54:03 +00008558cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008559#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008560_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008561
8562
Martin v. Löwiseba40652007-08-30 20:10:57 +00008563{ echo "$as_me:$LINENO: checking for float" >&5
8564echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008565if test "${ac_cv_type_float+set}" = set; then
8566 echo $ECHO_N "(cached) $ECHO_C" >&6
8567else
8568 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008569/* confdefs.h. */
8570_ACEOF
8571cat confdefs.h >>conftest.$ac_ext
8572cat >>conftest.$ac_ext <<_ACEOF
8573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008574$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008575typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008576int
8577main ()
8578{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008579if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 return 0;
8583 ;
8584 return 0;
8585}
8586_ACEOF
8587rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008588if { (ac_try="$ac_compile"
8589case "(($ac_try" in
8590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8591 *) ac_try_echo=$ac_try;;
8592esac
8593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8594 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008596 grep -v '^ *+' conftest.er1 >conftest.err
8597 rm -f conftest.er1
8598 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008600 (exit $ac_status); } && {
8601 test -z "$ac_c_werror_flag" ||
8602 test ! -s conftest.err
8603 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008604 ac_cv_type_float=yes
8605else
8606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008607sed 's/^/| /' conftest.$ac_ext >&5
8608
Martin v. Löwiseba40652007-08-30 20:10:57 +00008609 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008610fi
Brett Cannon19fab762007-06-02 03:02:29 +00008611
Martin v. Löwiseba40652007-08-30 20:10:57 +00008612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8613fi
8614{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8615echo "${ECHO_T}$ac_cv_type_float" >&6; }
8616
8617# The cast to long int works around a bug in the HP C Compiler
8618# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8619# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8620# This bug is HP SR number 8606223364.
8621{ echo "$as_me:$LINENO: checking size of float" >&5
8622echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008623if test "${ac_cv_sizeof_float+set}" = set; then
8624 echo $ECHO_N "(cached) $ECHO_C" >&6
8625else
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 if test "$cross_compiling" = yes; then
8627 # Depending upon the size, compute the lo and hi bounds.
8628cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008629/* confdefs.h. */
8630_ACEOF
8631cat confdefs.h >>conftest.$ac_ext
8632cat >>conftest.$ac_ext <<_ACEOF
8633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008634$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008635 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008636int
8637main ()
8638{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008639static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008640test_array [0] = 0
8641
8642 ;
8643 return 0;
8644}
8645_ACEOF
8646rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008647if { (ac_try="$ac_compile"
8648case "(($ac_try" in
8649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8650 *) ac_try_echo=$ac_try;;
8651esac
8652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008655 grep -v '^ *+' conftest.er1 >conftest.err
8656 rm -f conftest.er1
8657 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008659 (exit $ac_status); } && {
8660 test -z "$ac_c_werror_flag" ||
8661 test ! -s conftest.err
8662 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 ac_lo=0 ac_mid=0
8664 while :; do
8665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008666/* confdefs.h. */
8667_ACEOF
8668cat confdefs.h >>conftest.$ac_ext
8669cat >>conftest.$ac_ext <<_ACEOF
8670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008671$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008672 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008673int
8674main ()
8675{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008676static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008677test_array [0] = 0
8678
8679 ;
8680 return 0;
8681}
8682_ACEOF
8683rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684if { (ac_try="$ac_compile"
8685case "(($ac_try" in
8686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8687 *) ac_try_echo=$ac_try;;
8688esac
8689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008692 grep -v '^ *+' conftest.er1 >conftest.err
8693 rm -f conftest.er1
8694 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008696 (exit $ac_status); } && {
8697 test -z "$ac_c_werror_flag" ||
8698 test ! -s conftest.err
8699 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 ac_hi=$ac_mid; break
8701else
8702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008703sed 's/^/| /' conftest.$ac_ext >&5
8704
Martin v. Löwiseba40652007-08-30 20:10:57 +00008705 ac_lo=`expr $ac_mid + 1`
8706 if test $ac_lo -le $ac_mid; then
8707 ac_lo= ac_hi=
8708 break
8709 fi
8710 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008712
8713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 done
8715else
8716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008717sed 's/^/| /' conftest.$ac_ext >&5
8718
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008720/* confdefs.h. */
8721_ACEOF
8722cat confdefs.h >>conftest.$ac_ext
8723cat >>conftest.$ac_ext <<_ACEOF
8724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008725$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008726 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008727int
8728main ()
8729{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008730static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008731test_array [0] = 0
8732
8733 ;
8734 return 0;
8735}
8736_ACEOF
8737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008738if { (ac_try="$ac_compile"
8739case "(($ac_try" in
8740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8741 *) ac_try_echo=$ac_try;;
8742esac
8743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008746 grep -v '^ *+' conftest.er1 >conftest.err
8747 rm -f conftest.er1
8748 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008750 (exit $ac_status); } && {
8751 test -z "$ac_c_werror_flag" ||
8752 test ! -s conftest.err
8753 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 ac_hi=-1 ac_mid=-1
8755 while :; do
8756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008757/* confdefs.h. */
8758_ACEOF
8759cat confdefs.h >>conftest.$ac_ext
8760cat >>conftest.$ac_ext <<_ACEOF
8761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008762$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008763 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008764int
8765main ()
8766{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008767static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008768test_array [0] = 0
8769
8770 ;
8771 return 0;
8772}
8773_ACEOF
8774rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008775if { (ac_try="$ac_compile"
8776case "(($ac_try" in
8777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8778 *) ac_try_echo=$ac_try;;
8779esac
8780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008783 grep -v '^ *+' conftest.er1 >conftest.err
8784 rm -f conftest.er1
8785 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008787 (exit $ac_status); } && {
8788 test -z "$ac_c_werror_flag" ||
8789 test ! -s conftest.err
8790 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008791 ac_lo=$ac_mid; break
8792else
8793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008794sed 's/^/| /' conftest.$ac_ext >&5
8795
Martin v. Löwiseba40652007-08-30 20:10:57 +00008796 ac_hi=`expr '(' $ac_mid ')' - 1`
8797 if test $ac_mid -le $ac_hi; then
8798 ac_lo= ac_hi=
8799 break
8800 fi
8801 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008803
8804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 done
8806else
8807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008808sed 's/^/| /' conftest.$ac_ext >&5
8809
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008812
8813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008815
8816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008817# Binary search between lo and hi bounds.
8818while test "x$ac_lo" != "x$ac_hi"; do
8819 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008821/* confdefs.h. */
8822_ACEOF
8823cat confdefs.h >>conftest.$ac_ext
8824cat >>conftest.$ac_ext <<_ACEOF
8825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008826$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008827 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008828int
8829main ()
8830{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008832test_array [0] = 0
8833
8834 ;
8835 return 0;
8836}
8837_ACEOF
8838rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008839if { (ac_try="$ac_compile"
8840case "(($ac_try" in
8841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8842 *) ac_try_echo=$ac_try;;
8843esac
8844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008847 grep -v '^ *+' conftest.er1 >conftest.err
8848 rm -f conftest.er1
8849 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008851 (exit $ac_status); } && {
8852 test -z "$ac_c_werror_flag" ||
8853 test ! -s conftest.err
8854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008855 ac_hi=$ac_mid
8856else
8857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008858sed 's/^/| /' conftest.$ac_ext >&5
8859
Martin v. Löwiseba40652007-08-30 20:10:57 +00008860 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008862
8863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008864done
8865case $ac_lo in
8866?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008867'') if test "$ac_cv_type_float" = yes; then
8868 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008869See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008871See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008872 { (exit 77); exit 77; }; }
8873 else
8874 ac_cv_sizeof_float=0
8875 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008876esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008877else
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008879/* confdefs.h. */
8880_ACEOF
8881cat confdefs.h >>conftest.$ac_ext
8882cat >>conftest.$ac_ext <<_ACEOF
8883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008884$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008885 typedef float ac__type_sizeof_;
8886static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8887static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008888#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008889#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008890int
8891main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008892{
Martin v. Löwis11437992002-04-12 09:54:03 +00008893
8894 FILE *f = fopen ("conftest.val", "w");
8895 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008896 return 1;
8897 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008899 long int i = longval ();
8900 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8901 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 fprintf (f, "%ld\n", i);
8903 }
8904 else
8905 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008906 unsigned long int i = ulongval ();
8907 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8908 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 fprintf (f, "%lu\n", i);
8910 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008911 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008912
8913 ;
8914 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008915}
Martin v. Löwis11437992002-04-12 09:54:03 +00008916_ACEOF
8917rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008918if { (ac_try="$ac_link"
8919case "(($ac_try" in
8920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8921 *) ac_try_echo=$ac_try;;
8922esac
8923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8924 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 ac_status=$?
8926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8927 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008928 { (case "(($ac_try" in
8929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8930 *) ac_try_echo=$ac_try;;
8931esac
8932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8933 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 ac_status=$?
8935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8936 (exit $ac_status); }; }; then
8937 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008938else
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 echo "$as_me: program exited with status $ac_status" >&5
8940echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008941sed 's/^/| /' conftest.$ac_ext >&5
8942
Martin v. Löwis11437992002-04-12 09:54:03 +00008943( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008944if test "$ac_cv_type_float" = yes; then
8945 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008946See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008947echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008948See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008949 { (exit 77); exit 77; }; }
8950 else
8951 ac_cv_sizeof_float=0
8952 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954rm -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 +00008955fi
8956rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008958{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8959echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
8960
8961
8962
Martin v. Löwis11437992002-04-12 09:54:03 +00008963cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008964#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008965_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008966
8967
Martin v. Löwiseba40652007-08-30 20:10:57 +00008968{ echo "$as_me:$LINENO: checking for double" >&5
8969echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008970if test "${ac_cv_type_double+set}" = set; then
8971 echo $ECHO_N "(cached) $ECHO_C" >&6
8972else
8973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008974/* confdefs.h. */
8975_ACEOF
8976cat confdefs.h >>conftest.$ac_ext
8977cat >>conftest.$ac_ext <<_ACEOF
8978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008979$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008980typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008981int
8982main ()
8983{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008984if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008987 return 0;
8988 ;
8989 return 0;
8990}
8991_ACEOF
8992rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008993if { (ac_try="$ac_compile"
8994case "(($ac_try" in
8995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8996 *) ac_try_echo=$ac_try;;
8997esac
8998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8999 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009001 grep -v '^ *+' conftest.er1 >conftest.err
9002 rm -f conftest.er1
9003 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009005 (exit $ac_status); } && {
9006 test -z "$ac_c_werror_flag" ||
9007 test ! -s conftest.err
9008 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 ac_cv_type_double=yes
9010else
9011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009012sed 's/^/| /' conftest.$ac_ext >&5
9013
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009015fi
Brett Cannon19fab762007-06-02 03:02:29 +00009016
Martin v. Löwiseba40652007-08-30 20:10:57 +00009017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9018fi
9019{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9020echo "${ECHO_T}$ac_cv_type_double" >&6; }
9021
9022# The cast to long int works around a bug in the HP C Compiler
9023# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9024# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9025# This bug is HP SR number 8606223364.
9026{ echo "$as_me:$LINENO: checking size of double" >&5
9027echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009028if test "${ac_cv_sizeof_double+set}" = set; then
9029 echo $ECHO_N "(cached) $ECHO_C" >&6
9030else
Martin v. Löwis11437992002-04-12 09:54:03 +00009031 if test "$cross_compiling" = yes; then
9032 # Depending upon the size, compute the lo and hi bounds.
9033cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009034/* confdefs.h. */
9035_ACEOF
9036cat confdefs.h >>conftest.$ac_ext
9037cat >>conftest.$ac_ext <<_ACEOF
9038/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009039$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009040 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009041int
9042main ()
9043{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009044static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009045test_array [0] = 0
9046
9047 ;
9048 return 0;
9049}
9050_ACEOF
9051rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009052if { (ac_try="$ac_compile"
9053case "(($ac_try" in
9054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9055 *) ac_try_echo=$ac_try;;
9056esac
9057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9058 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009060 grep -v '^ *+' conftest.er1 >conftest.err
9061 rm -f conftest.er1
9062 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009064 (exit $ac_status); } && {
9065 test -z "$ac_c_werror_flag" ||
9066 test ! -s conftest.err
9067 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009068 ac_lo=0 ac_mid=0
9069 while :; do
9070 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009071/* confdefs.h. */
9072_ACEOF
9073cat confdefs.h >>conftest.$ac_ext
9074cat >>conftest.$ac_ext <<_ACEOF
9075/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009076$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009077 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009078int
9079main ()
9080{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009081static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009082test_array [0] = 0
9083
9084 ;
9085 return 0;
9086}
9087_ACEOF
9088rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009089if { (ac_try="$ac_compile"
9090case "(($ac_try" in
9091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9092 *) ac_try_echo=$ac_try;;
9093esac
9094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9095 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009097 grep -v '^ *+' conftest.er1 >conftest.err
9098 rm -f conftest.er1
9099 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009101 (exit $ac_status); } && {
9102 test -z "$ac_c_werror_flag" ||
9103 test ! -s conftest.err
9104 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009105 ac_hi=$ac_mid; break
9106else
9107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009108sed 's/^/| /' conftest.$ac_ext >&5
9109
Martin v. Löwiseba40652007-08-30 20:10:57 +00009110 ac_lo=`expr $ac_mid + 1`
9111 if test $ac_lo -le $ac_mid; then
9112 ac_lo= ac_hi=
9113 break
9114 fi
9115 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009117
9118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 done
9120else
9121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009122sed 's/^/| /' conftest.$ac_ext >&5
9123
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009125/* confdefs.h. */
9126_ACEOF
9127cat confdefs.h >>conftest.$ac_ext
9128cat >>conftest.$ac_ext <<_ACEOF
9129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009130$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009131 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009132int
9133main ()
9134{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009135static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009136test_array [0] = 0
9137
9138 ;
9139 return 0;
9140}
9141_ACEOF
9142rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009143if { (ac_try="$ac_compile"
9144case "(($ac_try" in
9145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9146 *) ac_try_echo=$ac_try;;
9147esac
9148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9149 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009151 grep -v '^ *+' conftest.er1 >conftest.err
9152 rm -f conftest.er1
9153 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009155 (exit $ac_status); } && {
9156 test -z "$ac_c_werror_flag" ||
9157 test ! -s conftest.err
9158 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009159 ac_hi=-1 ac_mid=-1
9160 while :; do
9161 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009162/* confdefs.h. */
9163_ACEOF
9164cat confdefs.h >>conftest.$ac_ext
9165cat >>conftest.$ac_ext <<_ACEOF
9166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009167$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009168 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009169int
9170main ()
9171{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009172static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009173test_array [0] = 0
9174
9175 ;
9176 return 0;
9177}
9178_ACEOF
9179rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009180if { (ac_try="$ac_compile"
9181case "(($ac_try" in
9182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9183 *) ac_try_echo=$ac_try;;
9184esac
9185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009188 grep -v '^ *+' conftest.er1 >conftest.err
9189 rm -f conftest.er1
9190 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009192 (exit $ac_status); } && {
9193 test -z "$ac_c_werror_flag" ||
9194 test ! -s conftest.err
9195 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 ac_lo=$ac_mid; break
9197else
9198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009199sed 's/^/| /' conftest.$ac_ext >&5
9200
Martin v. Löwiseba40652007-08-30 20:10:57 +00009201 ac_hi=`expr '(' $ac_mid ')' - 1`
9202 if test $ac_mid -le $ac_hi; then
9203 ac_lo= ac_hi=
9204 break
9205 fi
9206 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009208
9209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 done
9211else
9212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009213sed 's/^/| /' conftest.$ac_ext >&5
9214
Martin v. Löwiseba40652007-08-30 20:10:57 +00009215 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009217
9218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009220
9221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009222# Binary search between lo and hi bounds.
9223while test "x$ac_lo" != "x$ac_hi"; do
9224 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9225 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009226/* confdefs.h. */
9227_ACEOF
9228cat confdefs.h >>conftest.$ac_ext
9229cat >>conftest.$ac_ext <<_ACEOF
9230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009231$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009232 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009233int
9234main ()
9235{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009236static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009237test_array [0] = 0
9238
9239 ;
9240 return 0;
9241}
9242_ACEOF
9243rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009244if { (ac_try="$ac_compile"
9245case "(($ac_try" in
9246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9247 *) ac_try_echo=$ac_try;;
9248esac
9249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9250 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009252 grep -v '^ *+' conftest.er1 >conftest.err
9253 rm -f conftest.er1
9254 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009256 (exit $ac_status); } && {
9257 test -z "$ac_c_werror_flag" ||
9258 test ! -s conftest.err
9259 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 ac_hi=$ac_mid
9261else
9262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009263sed 's/^/| /' conftest.$ac_ext >&5
9264
Martin v. Löwiseba40652007-08-30 20:10:57 +00009265 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009267
9268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009269done
9270case $ac_lo in
9271?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009272'') if test "$ac_cv_type_double" = yes; then
9273 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009274See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009275echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009276See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009277 { (exit 77); exit 77; }; }
9278 else
9279 ac_cv_sizeof_double=0
9280 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009281esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009282else
Martin v. Löwis11437992002-04-12 09:54:03 +00009283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009284/* confdefs.h. */
9285_ACEOF
9286cat confdefs.h >>conftest.$ac_ext
9287cat >>conftest.$ac_ext <<_ACEOF
9288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009289$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009290 typedef double ac__type_sizeof_;
9291static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9292static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009293#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009294#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009295int
9296main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009297{
Martin v. Löwis11437992002-04-12 09:54:03 +00009298
9299 FILE *f = fopen ("conftest.val", "w");
9300 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009301 return 1;
9302 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009304 long int i = longval ();
9305 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9306 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 fprintf (f, "%ld\n", i);
9308 }
9309 else
9310 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009311 unsigned long int i = ulongval ();
9312 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9313 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 fprintf (f, "%lu\n", i);
9315 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009316 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009317
9318 ;
9319 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009320}
Martin v. Löwis11437992002-04-12 09:54:03 +00009321_ACEOF
9322rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009323if { (ac_try="$ac_link"
9324case "(($ac_try" in
9325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9326 *) ac_try_echo=$ac_try;;
9327esac
9328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9329 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 ac_status=$?
9331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009333 { (case "(($ac_try" in
9334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9335 *) ac_try_echo=$ac_try;;
9336esac
9337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9338 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009339 ac_status=$?
9340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9341 (exit $ac_status); }; }; then
9342 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009343else
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 echo "$as_me: program exited with status $ac_status" >&5
9345echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009346sed 's/^/| /' conftest.$ac_ext >&5
9347
Martin v. Löwis11437992002-04-12 09:54:03 +00009348( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009349if test "$ac_cv_type_double" = yes; then
9350 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009351See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009352echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009353See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009354 { (exit 77); exit 77; }; }
9355 else
9356 ac_cv_sizeof_double=0
9357 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009359rm -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 +00009360fi
9361rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009363{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9364echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9365
9366
9367
Martin v. Löwis11437992002-04-12 09:54:03 +00009368cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009369#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009370_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009371
9372
Martin v. Löwiseba40652007-08-30 20:10:57 +00009373{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9374echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009375if test "${ac_cv_type_fpos_t+set}" = set; then
9376 echo $ECHO_N "(cached) $ECHO_C" >&6
9377else
9378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009379/* confdefs.h. */
9380_ACEOF
9381cat confdefs.h >>conftest.$ac_ext
9382cat >>conftest.$ac_ext <<_ACEOF
9383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009384$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009385typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009386int
9387main ()
9388{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009389if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009390 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009392 return 0;
9393 ;
9394 return 0;
9395}
9396_ACEOF
9397rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009398if { (ac_try="$ac_compile"
9399case "(($ac_try" in
9400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9401 *) ac_try_echo=$ac_try;;
9402esac
9403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9404 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009406 grep -v '^ *+' conftest.er1 >conftest.err
9407 rm -f conftest.er1
9408 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009410 (exit $ac_status); } && {
9411 test -z "$ac_c_werror_flag" ||
9412 test ! -s conftest.err
9413 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 ac_cv_type_fpos_t=yes
9415else
9416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009417sed 's/^/| /' conftest.$ac_ext >&5
9418
Martin v. Löwiseba40652007-08-30 20:10:57 +00009419 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009420fi
Brett Cannon19fab762007-06-02 03:02:29 +00009421
Martin v. Löwiseba40652007-08-30 20:10:57 +00009422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9423fi
9424{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9425echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9426
9427# The cast to long int works around a bug in the HP C Compiler
9428# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9429# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9430# This bug is HP SR number 8606223364.
9431{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9432echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009433if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9434 echo $ECHO_N "(cached) $ECHO_C" >&6
9435else
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 if test "$cross_compiling" = yes; then
9437 # Depending upon the size, compute the lo and hi bounds.
9438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009439/* confdefs.h. */
9440_ACEOF
9441cat confdefs.h >>conftest.$ac_ext
9442cat >>conftest.$ac_ext <<_ACEOF
9443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009444$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009445 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009446int
9447main ()
9448{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009449static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009450test_array [0] = 0
9451
9452 ;
9453 return 0;
9454}
9455_ACEOF
9456rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457if { (ac_try="$ac_compile"
9458case "(($ac_try" in
9459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9460 *) ac_try_echo=$ac_try;;
9461esac
9462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9463 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009465 grep -v '^ *+' conftest.er1 >conftest.err
9466 rm -f conftest.er1
9467 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009469 (exit $ac_status); } && {
9470 test -z "$ac_c_werror_flag" ||
9471 test ! -s conftest.err
9472 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 ac_lo=0 ac_mid=0
9474 while :; do
9475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009476/* confdefs.h. */
9477_ACEOF
9478cat confdefs.h >>conftest.$ac_ext
9479cat >>conftest.$ac_ext <<_ACEOF
9480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009481$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009483int
9484main ()
9485{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009487test_array [0] = 0
9488
9489 ;
9490 return 0;
9491}
9492_ACEOF
9493rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494if { (ac_try="$ac_compile"
9495case "(($ac_try" in
9496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9497 *) ac_try_echo=$ac_try;;
9498esac
9499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9500 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009502 grep -v '^ *+' conftest.er1 >conftest.err
9503 rm -f conftest.er1
9504 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009506 (exit $ac_status); } && {
9507 test -z "$ac_c_werror_flag" ||
9508 test ! -s conftest.err
9509 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 ac_hi=$ac_mid; break
9511else
9512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009513sed 's/^/| /' conftest.$ac_ext >&5
9514
Martin v. Löwiseba40652007-08-30 20:10:57 +00009515 ac_lo=`expr $ac_mid + 1`
9516 if test $ac_lo -le $ac_mid; then
9517 ac_lo= ac_hi=
9518 break
9519 fi
9520 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009522
9523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 done
9525else
9526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009527sed 's/^/| /' conftest.$ac_ext >&5
9528
Martin v. Löwiseba40652007-08-30 20:10:57 +00009529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009530/* confdefs.h. */
9531_ACEOF
9532cat confdefs.h >>conftest.$ac_ext
9533cat >>conftest.$ac_ext <<_ACEOF
9534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009535$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009536 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009537int
9538main ()
9539{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009540static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009541test_array [0] = 0
9542
9543 ;
9544 return 0;
9545}
9546_ACEOF
9547rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009548if { (ac_try="$ac_compile"
9549case "(($ac_try" in
9550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9551 *) ac_try_echo=$ac_try;;
9552esac
9553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9554 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009556 grep -v '^ *+' conftest.er1 >conftest.err
9557 rm -f conftest.er1
9558 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009560 (exit $ac_status); } && {
9561 test -z "$ac_c_werror_flag" ||
9562 test ! -s conftest.err
9563 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 ac_hi=-1 ac_mid=-1
9565 while :; do
9566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009567/* confdefs.h. */
9568_ACEOF
9569cat confdefs.h >>conftest.$ac_ext
9570cat >>conftest.$ac_ext <<_ACEOF
9571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009572$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009573 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009574int
9575main ()
9576{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009577static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009578test_array [0] = 0
9579
9580 ;
9581 return 0;
9582}
9583_ACEOF
9584rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009585if { (ac_try="$ac_compile"
9586case "(($ac_try" in
9587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9588 *) ac_try_echo=$ac_try;;
9589esac
9590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009593 grep -v '^ *+' conftest.er1 >conftest.err
9594 rm -f conftest.er1
9595 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009597 (exit $ac_status); } && {
9598 test -z "$ac_c_werror_flag" ||
9599 test ! -s conftest.err
9600 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 ac_lo=$ac_mid; break
9602else
9603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009604sed 's/^/| /' conftest.$ac_ext >&5
9605
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606 ac_hi=`expr '(' $ac_mid ')' - 1`
9607 if test $ac_mid -le $ac_hi; then
9608 ac_lo= ac_hi=
9609 break
9610 fi
9611 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009613
9614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 done
9616else
9617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009618sed 's/^/| /' conftest.$ac_ext >&5
9619
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009622
9623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009625
9626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009627# Binary search between lo and hi bounds.
9628while test "x$ac_lo" != "x$ac_hi"; do
9629 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009631/* confdefs.h. */
9632_ACEOF
9633cat confdefs.h >>conftest.$ac_ext
9634cat >>conftest.$ac_ext <<_ACEOF
9635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009636$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009637 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009638int
9639main ()
9640{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009641static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009642test_array [0] = 0
9643
9644 ;
9645 return 0;
9646}
9647_ACEOF
9648rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009649if { (ac_try="$ac_compile"
9650case "(($ac_try" in
9651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9652 *) ac_try_echo=$ac_try;;
9653esac
9654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009657 grep -v '^ *+' conftest.er1 >conftest.err
9658 rm -f conftest.er1
9659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009661 (exit $ac_status); } && {
9662 test -z "$ac_c_werror_flag" ||
9663 test ! -s conftest.err
9664 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009665 ac_hi=$ac_mid
9666else
9667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009668sed 's/^/| /' conftest.$ac_ext >&5
9669
Martin v. Löwiseba40652007-08-30 20:10:57 +00009670 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009672
9673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009674done
9675case $ac_lo in
9676?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009677'') if test "$ac_cv_type_fpos_t" = yes; then
9678 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009679See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009680echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009681See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009682 { (exit 77); exit 77; }; }
9683 else
9684 ac_cv_sizeof_fpos_t=0
9685 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009686esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009689/* confdefs.h. */
9690_ACEOF
9691cat confdefs.h >>conftest.$ac_ext
9692cat >>conftest.$ac_ext <<_ACEOF
9693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009694$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009695 typedef fpos_t ac__type_sizeof_;
9696static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9697static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009698#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009699#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009702{
Martin v. Löwis11437992002-04-12 09:54:03 +00009703
9704 FILE *f = fopen ("conftest.val", "w");
9705 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009706 return 1;
9707 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009709 long int i = longval ();
9710 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9711 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 fprintf (f, "%ld\n", i);
9713 }
9714 else
9715 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009716 unsigned long int i = ulongval ();
9717 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9718 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 fprintf (f, "%lu\n", i);
9720 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009721 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009722
9723 ;
9724 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009725}
Martin v. Löwis11437992002-04-12 09:54:03 +00009726_ACEOF
9727rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009728if { (ac_try="$ac_link"
9729case "(($ac_try" in
9730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9731 *) ac_try_echo=$ac_try;;
9732esac
9733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9734 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 ac_status=$?
9736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9737 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009738 { (case "(($ac_try" in
9739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9740 *) ac_try_echo=$ac_try;;
9741esac
9742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9743 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ac_status=$?
9745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9746 (exit $ac_status); }; }; then
9747 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009748else
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 echo "$as_me: program exited with status $ac_status" >&5
9750echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009751sed 's/^/| /' conftest.$ac_ext >&5
9752
Martin v. Löwis11437992002-04-12 09:54:03 +00009753( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009754if test "$ac_cv_type_fpos_t" = yes; then
9755 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009756See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009757echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009758See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009759 { (exit 77); exit 77; }; }
9760 else
9761 ac_cv_sizeof_fpos_t=0
9762 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764rm -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 +00009765fi
9766rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009768{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9769echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9770
9771
9772
Martin v. Löwis11437992002-04-12 09:54:03 +00009773cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009774#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009775_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009776
Michael W. Hudson54241132001-12-07 15:38:26 +00009777
Martin v. Löwiseba40652007-08-30 20:10:57 +00009778{ echo "$as_me:$LINENO: checking for size_t" >&5
9779echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009780if test "${ac_cv_type_size_t+set}" = set; then
9781 echo $ECHO_N "(cached) $ECHO_C" >&6
9782else
9783 cat >conftest.$ac_ext <<_ACEOF
9784/* confdefs.h. */
9785_ACEOF
9786cat confdefs.h >>conftest.$ac_ext
9787cat >>conftest.$ac_ext <<_ACEOF
9788/* end confdefs.h. */
9789$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009790typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009791int
9792main ()
9793{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009794if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009795 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009796if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009797 return 0;
9798 ;
9799 return 0;
9800}
9801_ACEOF
9802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009803if { (ac_try="$ac_compile"
9804case "(($ac_try" in
9805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9806 *) ac_try_echo=$ac_try;;
9807esac
9808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009810 ac_status=$?
9811 grep -v '^ *+' conftest.er1 >conftest.err
9812 rm -f conftest.er1
9813 cat conftest.err >&5
9814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009815 (exit $ac_status); } && {
9816 test -z "$ac_c_werror_flag" ||
9817 test ! -s conftest.err
9818 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009819 ac_cv_type_size_t=yes
9820else
9821 echo "$as_me: failed program was:" >&5
9822sed 's/^/| /' conftest.$ac_ext >&5
9823
Martin v. Löwiseba40652007-08-30 20:10:57 +00009824 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009825fi
Brett Cannon19fab762007-06-02 03:02:29 +00009826
Martin v. Löwiseba40652007-08-30 20:10:57 +00009827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9828fi
9829{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9830echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9831
9832# The cast to long int works around a bug in the HP C Compiler
9833# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9834# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9835# This bug is HP SR number 8606223364.
9836{ echo "$as_me:$LINENO: checking size of size_t" >&5
9837echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009838if test "${ac_cv_sizeof_size_t+set}" = set; then
9839 echo $ECHO_N "(cached) $ECHO_C" >&6
9840else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009841 if test "$cross_compiling" = yes; then
9842 # Depending upon the size, compute the lo and hi bounds.
9843cat >conftest.$ac_ext <<_ACEOF
9844/* confdefs.h. */
9845_ACEOF
9846cat confdefs.h >>conftest.$ac_ext
9847cat >>conftest.$ac_ext <<_ACEOF
9848/* end confdefs.h. */
9849$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009850 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009851int
9852main ()
9853{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009854static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009855test_array [0] = 0
9856
9857 ;
9858 return 0;
9859}
9860_ACEOF
9861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009862if { (ac_try="$ac_compile"
9863case "(($ac_try" in
9864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9865 *) ac_try_echo=$ac_try;;
9866esac
9867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009869 ac_status=$?
9870 grep -v '^ *+' conftest.er1 >conftest.err
9871 rm -f conftest.er1
9872 cat conftest.err >&5
9873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009874 (exit $ac_status); } && {
9875 test -z "$ac_c_werror_flag" ||
9876 test ! -s conftest.err
9877 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009878 ac_lo=0 ac_mid=0
9879 while :; do
9880 cat >conftest.$ac_ext <<_ACEOF
9881/* confdefs.h. */
9882_ACEOF
9883cat confdefs.h >>conftest.$ac_ext
9884cat >>conftest.$ac_ext <<_ACEOF
9885/* end confdefs.h. */
9886$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009888int
9889main ()
9890{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009891static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009892test_array [0] = 0
9893
9894 ;
9895 return 0;
9896}
9897_ACEOF
9898rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899if { (ac_try="$ac_compile"
9900case "(($ac_try" in
9901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9902 *) ac_try_echo=$ac_try;;
9903esac
9904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009906 ac_status=$?
9907 grep -v '^ *+' conftest.er1 >conftest.err
9908 rm -f conftest.er1
9909 cat conftest.err >&5
9910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009911 (exit $ac_status); } && {
9912 test -z "$ac_c_werror_flag" ||
9913 test ! -s conftest.err
9914 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009915 ac_hi=$ac_mid; break
9916else
9917 echo "$as_me: failed program was:" >&5
9918sed 's/^/| /' conftest.$ac_ext >&5
9919
Martin v. Löwiseba40652007-08-30 20:10:57 +00009920 ac_lo=`expr $ac_mid + 1`
9921 if test $ac_lo -le $ac_mid; then
9922 ac_lo= ac_hi=
9923 break
9924 fi
9925 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009927
9928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009929 done
9930else
9931 echo "$as_me: failed program was:" >&5
9932sed 's/^/| /' conftest.$ac_ext >&5
9933
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009935/* confdefs.h. */
9936_ACEOF
9937cat confdefs.h >>conftest.$ac_ext
9938cat >>conftest.$ac_ext <<_ACEOF
9939/* end confdefs.h. */
9940$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009941 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009942int
9943main ()
9944{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009946test_array [0] = 0
9947
9948 ;
9949 return 0;
9950}
9951_ACEOF
9952rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953if { (ac_try="$ac_compile"
9954case "(($ac_try" in
9955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9956 *) ac_try_echo=$ac_try;;
9957esac
9958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009960 ac_status=$?
9961 grep -v '^ *+' conftest.er1 >conftest.err
9962 rm -f conftest.er1
9963 cat conftest.err >&5
9964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009965 (exit $ac_status); } && {
9966 test -z "$ac_c_werror_flag" ||
9967 test ! -s conftest.err
9968 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009969 ac_hi=-1 ac_mid=-1
9970 while :; do
9971 cat >conftest.$ac_ext <<_ACEOF
9972/* confdefs.h. */
9973_ACEOF
9974cat confdefs.h >>conftest.$ac_ext
9975cat >>conftest.$ac_ext <<_ACEOF
9976/* end confdefs.h. */
9977$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009978 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009979int
9980main ()
9981{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009982static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009983test_array [0] = 0
9984
9985 ;
9986 return 0;
9987}
9988_ACEOF
9989rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009990if { (ac_try="$ac_compile"
9991case "(($ac_try" in
9992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9993 *) ac_try_echo=$ac_try;;
9994esac
9995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9996 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009997 ac_status=$?
9998 grep -v '^ *+' conftest.er1 >conftest.err
9999 rm -f conftest.er1
10000 cat conftest.err >&5
10001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010002 (exit $ac_status); } && {
10003 test -z "$ac_c_werror_flag" ||
10004 test ! -s conftest.err
10005 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010006 ac_lo=$ac_mid; break
10007else
10008 echo "$as_me: failed program was:" >&5
10009sed 's/^/| /' conftest.$ac_ext >&5
10010
Martin v. Löwiseba40652007-08-30 20:10:57 +000010011 ac_hi=`expr '(' $ac_mid ')' - 1`
10012 if test $ac_mid -le $ac_hi; then
10013 ac_lo= ac_hi=
10014 break
10015 fi
10016 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010018
10019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010020 done
10021else
10022 echo "$as_me: failed program was:" >&5
10023sed 's/^/| /' conftest.$ac_ext >&5
10024
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010027
10028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010030
10031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010032# Binary search between lo and hi bounds.
10033while test "x$ac_lo" != "x$ac_hi"; do
10034 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10035 cat >conftest.$ac_ext <<_ACEOF
10036/* confdefs.h. */
10037_ACEOF
10038cat confdefs.h >>conftest.$ac_ext
10039cat >>conftest.$ac_ext <<_ACEOF
10040/* end confdefs.h. */
10041$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010042 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010043int
10044main ()
10045{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010046static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010047test_array [0] = 0
10048
10049 ;
10050 return 0;
10051}
10052_ACEOF
10053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010054if { (ac_try="$ac_compile"
10055case "(($ac_try" in
10056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10057 *) ac_try_echo=$ac_try;;
10058esac
10059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010061 ac_status=$?
10062 grep -v '^ *+' conftest.er1 >conftest.err
10063 rm -f conftest.er1
10064 cat conftest.err >&5
10065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010066 (exit $ac_status); } && {
10067 test -z "$ac_c_werror_flag" ||
10068 test ! -s conftest.err
10069 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010070 ac_hi=$ac_mid
10071else
10072 echo "$as_me: failed program was:" >&5
10073sed 's/^/| /' conftest.$ac_ext >&5
10074
Martin v. Löwiseba40652007-08-30 20:10:57 +000010075 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010077
10078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010079done
10080case $ac_lo in
10081?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010082'') if test "$ac_cv_type_size_t" = yes; then
10083 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010084See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010085echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010086See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010087 { (exit 77); exit 77; }; }
10088 else
10089 ac_cv_sizeof_size_t=0
10090 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010091esac
10092else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010093 cat >conftest.$ac_ext <<_ACEOF
10094/* confdefs.h. */
10095_ACEOF
10096cat confdefs.h >>conftest.$ac_ext
10097cat >>conftest.$ac_ext <<_ACEOF
10098/* end confdefs.h. */
10099$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100 typedef size_t ac__type_sizeof_;
10101static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10102static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010103#include <stdio.h>
10104#include <stdlib.h>
10105int
10106main ()
10107{
10108
10109 FILE *f = fopen ("conftest.val", "w");
10110 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010111 return 1;
10112 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010113 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010114 long int i = longval ();
10115 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10116 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010117 fprintf (f, "%ld\n", i);
10118 }
10119 else
10120 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010121 unsigned long int i = ulongval ();
10122 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10123 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010124 fprintf (f, "%lu\n", i);
10125 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010126 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010127
10128 ;
10129 return 0;
10130}
10131_ACEOF
10132rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010133if { (ac_try="$ac_link"
10134case "(($ac_try" in
10135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10136 *) ac_try_echo=$ac_try;;
10137esac
10138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10139 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010140 ac_status=$?
10141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010143 { (case "(($ac_try" in
10144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10145 *) ac_try_echo=$ac_try;;
10146esac
10147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10148 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010149 ac_status=$?
10150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10151 (exit $ac_status); }; }; then
10152 ac_cv_sizeof_size_t=`cat conftest.val`
10153else
10154 echo "$as_me: program exited with status $ac_status" >&5
10155echo "$as_me: failed program was:" >&5
10156sed 's/^/| /' conftest.$ac_ext >&5
10157
10158( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010159if test "$ac_cv_type_size_t" = yes; then
10160 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010161See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010162echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010163See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010164 { (exit 77); exit 77; }; }
10165 else
10166 ac_cv_sizeof_size_t=0
10167 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169rm -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 +000010170fi
10171rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010173{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10174echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10175
10176
10177
Martin v. Löwis18e16552006-02-15 17:27:45 +000010178cat >>confdefs.h <<_ACEOF
10179#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10180_ACEOF
10181
10182
Christian Heimes951cc0f2008-01-31 23:08:23 +000010183{ echo "$as_me:$LINENO: checking for pid_t" >&5
10184echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10185if test "${ac_cv_type_pid_t+set}" = set; then
10186 echo $ECHO_N "(cached) $ECHO_C" >&6
10187else
10188 cat >conftest.$ac_ext <<_ACEOF
10189/* confdefs.h. */
10190_ACEOF
10191cat confdefs.h >>conftest.$ac_ext
10192cat >>conftest.$ac_ext <<_ACEOF
10193/* end confdefs.h. */
10194$ac_includes_default
10195typedef pid_t ac__type_new_;
10196int
10197main ()
10198{
10199if ((ac__type_new_ *) 0)
10200 return 0;
10201if (sizeof (ac__type_new_))
10202 return 0;
10203 ;
10204 return 0;
10205}
10206_ACEOF
10207rm -f conftest.$ac_objext
10208if { (ac_try="$ac_compile"
10209case "(($ac_try" in
10210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10211 *) ac_try_echo=$ac_try;;
10212esac
10213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10214 (eval "$ac_compile") 2>conftest.er1
10215 ac_status=$?
10216 grep -v '^ *+' conftest.er1 >conftest.err
10217 rm -f conftest.er1
10218 cat conftest.err >&5
10219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10220 (exit $ac_status); } && {
10221 test -z "$ac_c_werror_flag" ||
10222 test ! -s conftest.err
10223 } && test -s conftest.$ac_objext; then
10224 ac_cv_type_pid_t=yes
10225else
10226 echo "$as_me: failed program was:" >&5
10227sed 's/^/| /' conftest.$ac_ext >&5
10228
10229 ac_cv_type_pid_t=no
10230fi
10231
10232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10233fi
10234{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10235echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10236
10237# The cast to long int works around a bug in the HP C Compiler
10238# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10239# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10240# This bug is HP SR number 8606223364.
10241{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10242echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10243if test "${ac_cv_sizeof_pid_t+set}" = set; then
10244 echo $ECHO_N "(cached) $ECHO_C" >&6
10245else
10246 if test "$cross_compiling" = yes; then
10247 # Depending upon the size, compute the lo and hi bounds.
10248cat >conftest.$ac_ext <<_ACEOF
10249/* confdefs.h. */
10250_ACEOF
10251cat confdefs.h >>conftest.$ac_ext
10252cat >>conftest.$ac_ext <<_ACEOF
10253/* end confdefs.h. */
10254$ac_includes_default
10255 typedef pid_t ac__type_sizeof_;
10256int
10257main ()
10258{
10259static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10260test_array [0] = 0
10261
10262 ;
10263 return 0;
10264}
10265_ACEOF
10266rm -f conftest.$ac_objext
10267if { (ac_try="$ac_compile"
10268case "(($ac_try" in
10269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10270 *) ac_try_echo=$ac_try;;
10271esac
10272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10273 (eval "$ac_compile") 2>conftest.er1
10274 ac_status=$?
10275 grep -v '^ *+' conftest.er1 >conftest.err
10276 rm -f conftest.er1
10277 cat conftest.err >&5
10278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10279 (exit $ac_status); } && {
10280 test -z "$ac_c_werror_flag" ||
10281 test ! -s conftest.err
10282 } && test -s conftest.$ac_objext; then
10283 ac_lo=0 ac_mid=0
10284 while :; do
10285 cat >conftest.$ac_ext <<_ACEOF
10286/* confdefs.h. */
10287_ACEOF
10288cat confdefs.h >>conftest.$ac_ext
10289cat >>conftest.$ac_ext <<_ACEOF
10290/* end confdefs.h. */
10291$ac_includes_default
10292 typedef pid_t ac__type_sizeof_;
10293int
10294main ()
10295{
10296static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10297test_array [0] = 0
10298
10299 ;
10300 return 0;
10301}
10302_ACEOF
10303rm -f conftest.$ac_objext
10304if { (ac_try="$ac_compile"
10305case "(($ac_try" in
10306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10307 *) ac_try_echo=$ac_try;;
10308esac
10309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10310 (eval "$ac_compile") 2>conftest.er1
10311 ac_status=$?
10312 grep -v '^ *+' conftest.er1 >conftest.err
10313 rm -f conftest.er1
10314 cat conftest.err >&5
10315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10316 (exit $ac_status); } && {
10317 test -z "$ac_c_werror_flag" ||
10318 test ! -s conftest.err
10319 } && test -s conftest.$ac_objext; then
10320 ac_hi=$ac_mid; break
10321else
10322 echo "$as_me: failed program was:" >&5
10323sed 's/^/| /' conftest.$ac_ext >&5
10324
10325 ac_lo=`expr $ac_mid + 1`
10326 if test $ac_lo -le $ac_mid; then
10327 ac_lo= ac_hi=
10328 break
10329 fi
10330 ac_mid=`expr 2 '*' $ac_mid + 1`
10331fi
10332
10333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10334 done
10335else
10336 echo "$as_me: failed program was:" >&5
10337sed 's/^/| /' conftest.$ac_ext >&5
10338
10339 cat >conftest.$ac_ext <<_ACEOF
10340/* confdefs.h. */
10341_ACEOF
10342cat confdefs.h >>conftest.$ac_ext
10343cat >>conftest.$ac_ext <<_ACEOF
10344/* end confdefs.h. */
10345$ac_includes_default
10346 typedef pid_t ac__type_sizeof_;
10347int
10348main ()
10349{
10350static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10351test_array [0] = 0
10352
10353 ;
10354 return 0;
10355}
10356_ACEOF
10357rm -f conftest.$ac_objext
10358if { (ac_try="$ac_compile"
10359case "(($ac_try" in
10360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10361 *) ac_try_echo=$ac_try;;
10362esac
10363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10364 (eval "$ac_compile") 2>conftest.er1
10365 ac_status=$?
10366 grep -v '^ *+' conftest.er1 >conftest.err
10367 rm -f conftest.er1
10368 cat conftest.err >&5
10369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10370 (exit $ac_status); } && {
10371 test -z "$ac_c_werror_flag" ||
10372 test ! -s conftest.err
10373 } && test -s conftest.$ac_objext; then
10374 ac_hi=-1 ac_mid=-1
10375 while :; do
10376 cat >conftest.$ac_ext <<_ACEOF
10377/* confdefs.h. */
10378_ACEOF
10379cat confdefs.h >>conftest.$ac_ext
10380cat >>conftest.$ac_ext <<_ACEOF
10381/* end confdefs.h. */
10382$ac_includes_default
10383 typedef pid_t ac__type_sizeof_;
10384int
10385main ()
10386{
10387static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10388test_array [0] = 0
10389
10390 ;
10391 return 0;
10392}
10393_ACEOF
10394rm -f conftest.$ac_objext
10395if { (ac_try="$ac_compile"
10396case "(($ac_try" in
10397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10398 *) ac_try_echo=$ac_try;;
10399esac
10400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10401 (eval "$ac_compile") 2>conftest.er1
10402 ac_status=$?
10403 grep -v '^ *+' conftest.er1 >conftest.err
10404 rm -f conftest.er1
10405 cat conftest.err >&5
10406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10407 (exit $ac_status); } && {
10408 test -z "$ac_c_werror_flag" ||
10409 test ! -s conftest.err
10410 } && test -s conftest.$ac_objext; then
10411 ac_lo=$ac_mid; break
10412else
10413 echo "$as_me: failed program was:" >&5
10414sed 's/^/| /' conftest.$ac_ext >&5
10415
10416 ac_hi=`expr '(' $ac_mid ')' - 1`
10417 if test $ac_mid -le $ac_hi; then
10418 ac_lo= ac_hi=
10419 break
10420 fi
10421 ac_mid=`expr 2 '*' $ac_mid`
10422fi
10423
10424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10425 done
10426else
10427 echo "$as_me: failed program was:" >&5
10428sed 's/^/| /' conftest.$ac_ext >&5
10429
10430 ac_lo= ac_hi=
10431fi
10432
10433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10434fi
10435
10436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10437# Binary search between lo and hi bounds.
10438while test "x$ac_lo" != "x$ac_hi"; do
10439 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10440 cat >conftest.$ac_ext <<_ACEOF
10441/* confdefs.h. */
10442_ACEOF
10443cat confdefs.h >>conftest.$ac_ext
10444cat >>conftest.$ac_ext <<_ACEOF
10445/* end confdefs.h. */
10446$ac_includes_default
10447 typedef pid_t ac__type_sizeof_;
10448int
10449main ()
10450{
10451static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10452test_array [0] = 0
10453
10454 ;
10455 return 0;
10456}
10457_ACEOF
10458rm -f conftest.$ac_objext
10459if { (ac_try="$ac_compile"
10460case "(($ac_try" in
10461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10462 *) ac_try_echo=$ac_try;;
10463esac
10464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10465 (eval "$ac_compile") 2>conftest.er1
10466 ac_status=$?
10467 grep -v '^ *+' conftest.er1 >conftest.err
10468 rm -f conftest.er1
10469 cat conftest.err >&5
10470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10471 (exit $ac_status); } && {
10472 test -z "$ac_c_werror_flag" ||
10473 test ! -s conftest.err
10474 } && test -s conftest.$ac_objext; then
10475 ac_hi=$ac_mid
10476else
10477 echo "$as_me: failed program was:" >&5
10478sed 's/^/| /' conftest.$ac_ext >&5
10479
10480 ac_lo=`expr '(' $ac_mid ')' + 1`
10481fi
10482
10483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10484done
10485case $ac_lo in
10486?*) ac_cv_sizeof_pid_t=$ac_lo;;
10487'') if test "$ac_cv_type_pid_t" = yes; then
10488 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10489See \`config.log' for more details." >&5
10490echo "$as_me: error: cannot compute sizeof (pid_t)
10491See \`config.log' for more details." >&2;}
10492 { (exit 77); exit 77; }; }
10493 else
10494 ac_cv_sizeof_pid_t=0
10495 fi ;;
10496esac
10497else
10498 cat >conftest.$ac_ext <<_ACEOF
10499/* confdefs.h. */
10500_ACEOF
10501cat confdefs.h >>conftest.$ac_ext
10502cat >>conftest.$ac_ext <<_ACEOF
10503/* end confdefs.h. */
10504$ac_includes_default
10505 typedef pid_t ac__type_sizeof_;
10506static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10507static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10508#include <stdio.h>
10509#include <stdlib.h>
10510int
10511main ()
10512{
10513
10514 FILE *f = fopen ("conftest.val", "w");
10515 if (! f)
10516 return 1;
10517 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10518 {
10519 long int i = longval ();
10520 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10521 return 1;
10522 fprintf (f, "%ld\n", i);
10523 }
10524 else
10525 {
10526 unsigned long int i = ulongval ();
10527 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10528 return 1;
10529 fprintf (f, "%lu\n", i);
10530 }
10531 return ferror (f) || fclose (f) != 0;
10532
10533 ;
10534 return 0;
10535}
10536_ACEOF
10537rm -f conftest$ac_exeext
10538if { (ac_try="$ac_link"
10539case "(($ac_try" in
10540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10541 *) ac_try_echo=$ac_try;;
10542esac
10543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10544 (eval "$ac_link") 2>&5
10545 ac_status=$?
10546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10547 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10548 { (case "(($ac_try" in
10549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10550 *) ac_try_echo=$ac_try;;
10551esac
10552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10553 (eval "$ac_try") 2>&5
10554 ac_status=$?
10555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10556 (exit $ac_status); }; }; then
10557 ac_cv_sizeof_pid_t=`cat conftest.val`
10558else
10559 echo "$as_me: program exited with status $ac_status" >&5
10560echo "$as_me: failed program was:" >&5
10561sed 's/^/| /' conftest.$ac_ext >&5
10562
10563( exit $ac_status )
10564if test "$ac_cv_type_pid_t" = yes; then
10565 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10566See \`config.log' for more details." >&5
10567echo "$as_me: error: cannot compute sizeof (pid_t)
10568See \`config.log' for more details." >&2;}
10569 { (exit 77); exit 77; }; }
10570 else
10571 ac_cv_sizeof_pid_t=0
10572 fi
10573fi
10574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10575fi
10576rm -f conftest.val
10577fi
10578{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10579echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10580
10581
10582
10583cat >>confdefs.h <<_ACEOF
10584#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10585_ACEOF
10586
10587
Michael W. Hudson54241132001-12-07 15:38:26 +000010588
Martin v. Löwiseba40652007-08-30 20:10:57 +000010589{ echo "$as_me:$LINENO: checking for long long support" >&5
10590echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010591have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010592cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010593/* confdefs.h. */
10594_ACEOF
10595cat confdefs.h >>conftest.$ac_ext
10596cat >>conftest.$ac_ext <<_ACEOF
10597/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010598
Martin v. Löwis11437992002-04-12 09:54:03 +000010599int
10600main ()
10601{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010602long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010603 ;
10604 return 0;
10605}
10606_ACEOF
10607rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010608if { (ac_try="$ac_compile"
10609case "(($ac_try" in
10610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10611 *) ac_try_echo=$ac_try;;
10612esac
10613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010616 grep -v '^ *+' conftest.er1 >conftest.err
10617 rm -f conftest.er1
10618 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010620 (exit $ac_status); } && {
10621 test -z "$ac_c_werror_flag" ||
10622 test ! -s conftest.err
10623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010624
10625
10626cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010627#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010628_ACEOF
10629
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010630 have_long_long=yes
10631
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010632else
Martin v. Löwis11437992002-04-12 09:54:03 +000010633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010634sed 's/^/| /' conftest.$ac_ext >&5
10635
Martin v. Löwiseba40652007-08-30 20:10:57 +000010636
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010638
10639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10640{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10641echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010642if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010643{ echo "$as_me:$LINENO: checking for long long" >&5
10644echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010645if test "${ac_cv_type_long_long+set}" = set; then
10646 echo $ECHO_N "(cached) $ECHO_C" >&6
10647else
10648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010649/* confdefs.h. */
10650_ACEOF
10651cat confdefs.h >>conftest.$ac_ext
10652cat >>conftest.$ac_ext <<_ACEOF
10653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010654$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010655typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010656int
10657main ()
10658{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010659if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010660 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 return 0;
10663 ;
10664 return 0;
10665}
10666_ACEOF
10667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010668if { (ac_try="$ac_compile"
10669case "(($ac_try" in
10670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10671 *) ac_try_echo=$ac_try;;
10672esac
10673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010676 grep -v '^ *+' conftest.er1 >conftest.err
10677 rm -f conftest.er1
10678 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010680 (exit $ac_status); } && {
10681 test -z "$ac_c_werror_flag" ||
10682 test ! -s conftest.err
10683 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010684 ac_cv_type_long_long=yes
10685else
10686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010687sed 's/^/| /' conftest.$ac_ext >&5
10688
Martin v. Löwiseba40652007-08-30 20:10:57 +000010689 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010690fi
Brett Cannon19fab762007-06-02 03:02:29 +000010691
Martin v. Löwiseba40652007-08-30 20:10:57 +000010692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10693fi
10694{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10695echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10696
10697# The cast to long int works around a bug in the HP C Compiler
10698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10700# This bug is HP SR number 8606223364.
10701{ echo "$as_me:$LINENO: checking size of long long" >&5
10702echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010703if test "${ac_cv_sizeof_long_long+set}" = set; then
10704 echo $ECHO_N "(cached) $ECHO_C" >&6
10705else
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 if test "$cross_compiling" = yes; then
10707 # Depending upon the size, compute the lo and hi bounds.
10708cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010709/* confdefs.h. */
10710_ACEOF
10711cat confdefs.h >>conftest.$ac_ext
10712cat >>conftest.$ac_ext <<_ACEOF
10713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010714$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010715 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010716int
10717main ()
10718{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010719static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010720test_array [0] = 0
10721
10722 ;
10723 return 0;
10724}
10725_ACEOF
10726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727if { (ac_try="$ac_compile"
10728case "(($ac_try" in
10729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10730 *) ac_try_echo=$ac_try;;
10731esac
10732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010735 grep -v '^ *+' conftest.er1 >conftest.err
10736 rm -f conftest.er1
10737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010739 (exit $ac_status); } && {
10740 test -z "$ac_c_werror_flag" ||
10741 test ! -s conftest.err
10742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010743 ac_lo=0 ac_mid=0
10744 while :; do
10745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010746/* confdefs.h. */
10747_ACEOF
10748cat confdefs.h >>conftest.$ac_ext
10749cat >>conftest.$ac_ext <<_ACEOF
10750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010751$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010752 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010753int
10754main ()
10755{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010756static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010757test_array [0] = 0
10758
10759 ;
10760 return 0;
10761}
10762_ACEOF
10763rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010764if { (ac_try="$ac_compile"
10765case "(($ac_try" in
10766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10767 *) ac_try_echo=$ac_try;;
10768esac
10769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010772 grep -v '^ *+' conftest.er1 >conftest.err
10773 rm -f conftest.er1
10774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010776 (exit $ac_status); } && {
10777 test -z "$ac_c_werror_flag" ||
10778 test ! -s conftest.err
10779 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010780 ac_hi=$ac_mid; break
10781else
10782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010783sed 's/^/| /' conftest.$ac_ext >&5
10784
Martin v. Löwiseba40652007-08-30 20:10:57 +000010785 ac_lo=`expr $ac_mid + 1`
10786 if test $ac_lo -le $ac_mid; then
10787 ac_lo= ac_hi=
10788 break
10789 fi
10790 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010792
10793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010794 done
10795else
10796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010797sed 's/^/| /' conftest.$ac_ext >&5
10798
Martin v. Löwiseba40652007-08-30 20:10:57 +000010799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010800/* confdefs.h. */
10801_ACEOF
10802cat confdefs.h >>conftest.$ac_ext
10803cat >>conftest.$ac_ext <<_ACEOF
10804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010805$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010806 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010807int
10808main ()
10809{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010810static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010811test_array [0] = 0
10812
10813 ;
10814 return 0;
10815}
10816_ACEOF
10817rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010818if { (ac_try="$ac_compile"
10819case "(($ac_try" in
10820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10821 *) ac_try_echo=$ac_try;;
10822esac
10823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010826 grep -v '^ *+' conftest.er1 >conftest.err
10827 rm -f conftest.er1
10828 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010830 (exit $ac_status); } && {
10831 test -z "$ac_c_werror_flag" ||
10832 test ! -s conftest.err
10833 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010834 ac_hi=-1 ac_mid=-1
10835 while :; do
10836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010837/* confdefs.h. */
10838_ACEOF
10839cat confdefs.h >>conftest.$ac_ext
10840cat >>conftest.$ac_ext <<_ACEOF
10841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010842$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010843 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010844int
10845main ()
10846{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010847static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010848test_array [0] = 0
10849
10850 ;
10851 return 0;
10852}
10853_ACEOF
10854rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010855if { (ac_try="$ac_compile"
10856case "(($ac_try" in
10857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10858 *) ac_try_echo=$ac_try;;
10859esac
10860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010863 grep -v '^ *+' conftest.er1 >conftest.err
10864 rm -f conftest.er1
10865 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010867 (exit $ac_status); } && {
10868 test -z "$ac_c_werror_flag" ||
10869 test ! -s conftest.err
10870 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010871 ac_lo=$ac_mid; break
10872else
10873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010874sed 's/^/| /' conftest.$ac_ext >&5
10875
Martin v. Löwiseba40652007-08-30 20:10:57 +000010876 ac_hi=`expr '(' $ac_mid ')' - 1`
10877 if test $ac_mid -le $ac_hi; then
10878 ac_lo= ac_hi=
10879 break
10880 fi
10881 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010883
10884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010885 done
10886else
10887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010888sed 's/^/| /' conftest.$ac_ext >&5
10889
Martin v. Löwiseba40652007-08-30 20:10:57 +000010890 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010892
10893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010895
10896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010897# Binary search between lo and hi bounds.
10898while test "x$ac_lo" != "x$ac_hi"; do
10899 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010901/* confdefs.h. */
10902_ACEOF
10903cat confdefs.h >>conftest.$ac_ext
10904cat >>conftest.$ac_ext <<_ACEOF
10905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010906$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010907 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010908int
10909main ()
10910{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010911static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010912test_array [0] = 0
10913
10914 ;
10915 return 0;
10916}
10917_ACEOF
10918rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010919if { (ac_try="$ac_compile"
10920case "(($ac_try" in
10921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10922 *) ac_try_echo=$ac_try;;
10923esac
10924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010927 grep -v '^ *+' conftest.er1 >conftest.err
10928 rm -f conftest.er1
10929 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010931 (exit $ac_status); } && {
10932 test -z "$ac_c_werror_flag" ||
10933 test ! -s conftest.err
10934 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010935 ac_hi=$ac_mid
10936else
10937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010938sed 's/^/| /' conftest.$ac_ext >&5
10939
Martin v. Löwiseba40652007-08-30 20:10:57 +000010940 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010942
10943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010944done
10945case $ac_lo in
10946?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010947'') if test "$ac_cv_type_long_long" = yes; then
10948 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010949See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010950echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010951See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010952 { (exit 77); exit 77; }; }
10953 else
10954 ac_cv_sizeof_long_long=0
10955 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010956esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010957else
Martin v. Löwis11437992002-04-12 09:54:03 +000010958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010959/* confdefs.h. */
10960_ACEOF
10961cat confdefs.h >>conftest.$ac_ext
10962cat >>conftest.$ac_ext <<_ACEOF
10963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010964$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010965 typedef long long ac__type_sizeof_;
10966static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10967static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010968#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010969#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010970int
10971main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010972{
Martin v. Löwis11437992002-04-12 09:54:03 +000010973
10974 FILE *f = fopen ("conftest.val", "w");
10975 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010976 return 1;
10977 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010979 long int i = longval ();
10980 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10981 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 fprintf (f, "%ld\n", i);
10983 }
10984 else
10985 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010986 unsigned long int i = ulongval ();
10987 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10988 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010989 fprintf (f, "%lu\n", i);
10990 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010991 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010992
10993 ;
10994 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010995}
Martin v. Löwis11437992002-04-12 09:54:03 +000010996_ACEOF
10997rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010998if { (ac_try="$ac_link"
10999case "(($ac_try" in
11000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11001 *) ac_try_echo=$ac_try;;
11002esac
11003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11004 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 ac_status=$?
11006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011008 { (case "(($ac_try" in
11009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11010 *) ac_try_echo=$ac_try;;
11011esac
11012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11013 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 ac_status=$?
11015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11016 (exit $ac_status); }; }; then
11017 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011018else
Martin v. Löwis11437992002-04-12 09:54:03 +000011019 echo "$as_me: program exited with status $ac_status" >&5
11020echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011021sed 's/^/| /' conftest.$ac_ext >&5
11022
Martin v. Löwis11437992002-04-12 09:54:03 +000011023( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011024if test "$ac_cv_type_long_long" = yes; then
11025 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011026See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011027echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011028See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011029 { (exit 77); exit 77; }; }
11030 else
11031 ac_cv_sizeof_long_long=0
11032 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011034rm -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 +000011035fi
11036rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011038{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11039echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11040
11041
11042
Martin v. Löwis11437992002-04-12 09:54:03 +000011043cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011044#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011045_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011046
Michael W. Hudson54241132001-12-07 15:38:26 +000011047
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011048fi
11049
Martin v. Löwiseba40652007-08-30 20:10:57 +000011050{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11051echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011052have_c99_bool=no
11053cat >conftest.$ac_ext <<_ACEOF
11054/* confdefs.h. */
11055_ACEOF
11056cat confdefs.h >>conftest.$ac_ext
11057cat >>conftest.$ac_ext <<_ACEOF
11058/* end confdefs.h. */
11059
11060int
11061main ()
11062{
11063_Bool x; x = (_Bool)0;
11064 ;
11065 return 0;
11066}
11067_ACEOF
11068rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011069if { (ac_try="$ac_compile"
11070case "(($ac_try" in
11071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11072 *) ac_try_echo=$ac_try;;
11073esac
11074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011076 ac_status=$?
11077 grep -v '^ *+' conftest.er1 >conftest.err
11078 rm -f conftest.er1
11079 cat conftest.err >&5
11080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011081 (exit $ac_status); } && {
11082 test -z "$ac_c_werror_flag" ||
11083 test ! -s conftest.err
11084 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011085
11086
11087cat >>confdefs.h <<\_ACEOF
11088#define HAVE_C99_BOOL 1
11089_ACEOF
11090
11091 have_c99_bool=yes
11092
11093else
11094 echo "$as_me: failed program was:" >&5
11095sed 's/^/| /' conftest.$ac_ext >&5
11096
Martin v. Löwiseba40652007-08-30 20:10:57 +000011097
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011099
11100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11101{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11102echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011103if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011104{ echo "$as_me:$LINENO: checking for _Bool" >&5
11105echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011106if test "${ac_cv_type__Bool+set}" = set; then
11107 echo $ECHO_N "(cached) $ECHO_C" >&6
11108else
11109 cat >conftest.$ac_ext <<_ACEOF
11110/* confdefs.h. */
11111_ACEOF
11112cat confdefs.h >>conftest.$ac_ext
11113cat >>conftest.$ac_ext <<_ACEOF
11114/* end confdefs.h. */
11115$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011116typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011117int
11118main ()
11119{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011120if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011121 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011122if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011123 return 0;
11124 ;
11125 return 0;
11126}
11127_ACEOF
11128rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011129if { (ac_try="$ac_compile"
11130case "(($ac_try" in
11131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11132 *) ac_try_echo=$ac_try;;
11133esac
11134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011136 ac_status=$?
11137 grep -v '^ *+' conftest.er1 >conftest.err
11138 rm -f conftest.er1
11139 cat conftest.err >&5
11140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011141 (exit $ac_status); } && {
11142 test -z "$ac_c_werror_flag" ||
11143 test ! -s conftest.err
11144 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011145 ac_cv_type__Bool=yes
11146else
11147 echo "$as_me: failed program was:" >&5
11148sed 's/^/| /' conftest.$ac_ext >&5
11149
Martin v. Löwiseba40652007-08-30 20:10:57 +000011150 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011151fi
Brett Cannon19fab762007-06-02 03:02:29 +000011152
Martin v. Löwiseba40652007-08-30 20:10:57 +000011153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11154fi
11155{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11156echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11157
11158# The cast to long int works around a bug in the HP C Compiler
11159# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11160# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11161# This bug is HP SR number 8606223364.
11162{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11163echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011164if test "${ac_cv_sizeof__Bool+set}" = set; then
11165 echo $ECHO_N "(cached) $ECHO_C" >&6
11166else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011167 if test "$cross_compiling" = yes; then
11168 # Depending upon the size, compute the lo and hi bounds.
11169cat >conftest.$ac_ext <<_ACEOF
11170/* confdefs.h. */
11171_ACEOF
11172cat confdefs.h >>conftest.$ac_ext
11173cat >>conftest.$ac_ext <<_ACEOF
11174/* end confdefs.h. */
11175$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011176 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011177int
11178main ()
11179{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011180static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011181test_array [0] = 0
11182
11183 ;
11184 return 0;
11185}
11186_ACEOF
11187rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011188if { (ac_try="$ac_compile"
11189case "(($ac_try" in
11190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11191 *) ac_try_echo=$ac_try;;
11192esac
11193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11194 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011195 ac_status=$?
11196 grep -v '^ *+' conftest.er1 >conftest.err
11197 rm -f conftest.er1
11198 cat conftest.err >&5
11199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011200 (exit $ac_status); } && {
11201 test -z "$ac_c_werror_flag" ||
11202 test ! -s conftest.err
11203 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011204 ac_lo=0 ac_mid=0
11205 while :; do
11206 cat >conftest.$ac_ext <<_ACEOF
11207/* confdefs.h. */
11208_ACEOF
11209cat confdefs.h >>conftest.$ac_ext
11210cat >>conftest.$ac_ext <<_ACEOF
11211/* end confdefs.h. */
11212$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011213 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011214int
11215main ()
11216{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011217static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011218test_array [0] = 0
11219
11220 ;
11221 return 0;
11222}
11223_ACEOF
11224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011225if { (ac_try="$ac_compile"
11226case "(($ac_try" in
11227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11228 *) ac_try_echo=$ac_try;;
11229esac
11230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011232 ac_status=$?
11233 grep -v '^ *+' conftest.er1 >conftest.err
11234 rm -f conftest.er1
11235 cat conftest.err >&5
11236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011237 (exit $ac_status); } && {
11238 test -z "$ac_c_werror_flag" ||
11239 test ! -s conftest.err
11240 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011241 ac_hi=$ac_mid; break
11242else
11243 echo "$as_me: failed program was:" >&5
11244sed 's/^/| /' conftest.$ac_ext >&5
11245
Martin v. Löwiseba40652007-08-30 20:10:57 +000011246 ac_lo=`expr $ac_mid + 1`
11247 if test $ac_lo -le $ac_mid; then
11248 ac_lo= ac_hi=
11249 break
11250 fi
11251 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011253
11254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011255 done
11256else
11257 echo "$as_me: failed program was:" >&5
11258sed 's/^/| /' conftest.$ac_ext >&5
11259
Martin v. Löwiseba40652007-08-30 20:10:57 +000011260 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011261/* confdefs.h. */
11262_ACEOF
11263cat confdefs.h >>conftest.$ac_ext
11264cat >>conftest.$ac_ext <<_ACEOF
11265/* end confdefs.h. */
11266$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011267 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011268int
11269main ()
11270{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011271static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011272test_array [0] = 0
11273
11274 ;
11275 return 0;
11276}
11277_ACEOF
11278rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011279if { (ac_try="$ac_compile"
11280case "(($ac_try" in
11281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11282 *) ac_try_echo=$ac_try;;
11283esac
11284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011286 ac_status=$?
11287 grep -v '^ *+' conftest.er1 >conftest.err
11288 rm -f conftest.er1
11289 cat conftest.err >&5
11290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011291 (exit $ac_status); } && {
11292 test -z "$ac_c_werror_flag" ||
11293 test ! -s conftest.err
11294 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011295 ac_hi=-1 ac_mid=-1
11296 while :; do
11297 cat >conftest.$ac_ext <<_ACEOF
11298/* confdefs.h. */
11299_ACEOF
11300cat confdefs.h >>conftest.$ac_ext
11301cat >>conftest.$ac_ext <<_ACEOF
11302/* end confdefs.h. */
11303$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011304 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011305int
11306main ()
11307{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011308static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011309test_array [0] = 0
11310
11311 ;
11312 return 0;
11313}
11314_ACEOF
11315rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011316if { (ac_try="$ac_compile"
11317case "(($ac_try" in
11318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11319 *) ac_try_echo=$ac_try;;
11320esac
11321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011323 ac_status=$?
11324 grep -v '^ *+' conftest.er1 >conftest.err
11325 rm -f conftest.er1
11326 cat conftest.err >&5
11327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011328 (exit $ac_status); } && {
11329 test -z "$ac_c_werror_flag" ||
11330 test ! -s conftest.err
11331 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011332 ac_lo=$ac_mid; break
11333else
11334 echo "$as_me: failed program was:" >&5
11335sed 's/^/| /' conftest.$ac_ext >&5
11336
Martin v. Löwiseba40652007-08-30 20:10:57 +000011337 ac_hi=`expr '(' $ac_mid ')' - 1`
11338 if test $ac_mid -le $ac_hi; then
11339 ac_lo= ac_hi=
11340 break
11341 fi
11342 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011344
11345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011346 done
11347else
11348 echo "$as_me: failed program was:" >&5
11349sed 's/^/| /' conftest.$ac_ext >&5
11350
Martin v. Löwiseba40652007-08-30 20:10:57 +000011351 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011353
11354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011356
11357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011358# Binary search between lo and hi bounds.
11359while test "x$ac_lo" != "x$ac_hi"; do
11360 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11361 cat >conftest.$ac_ext <<_ACEOF
11362/* confdefs.h. */
11363_ACEOF
11364cat confdefs.h >>conftest.$ac_ext
11365cat >>conftest.$ac_ext <<_ACEOF
11366/* end confdefs.h. */
11367$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011368 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011369int
11370main ()
11371{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011372static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011373test_array [0] = 0
11374
11375 ;
11376 return 0;
11377}
11378_ACEOF
11379rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011380if { (ac_try="$ac_compile"
11381case "(($ac_try" in
11382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11383 *) ac_try_echo=$ac_try;;
11384esac
11385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11386 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011387 ac_status=$?
11388 grep -v '^ *+' conftest.er1 >conftest.err
11389 rm -f conftest.er1
11390 cat conftest.err >&5
11391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011392 (exit $ac_status); } && {
11393 test -z "$ac_c_werror_flag" ||
11394 test ! -s conftest.err
11395 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011396 ac_hi=$ac_mid
11397else
11398 echo "$as_me: failed program was:" >&5
11399sed 's/^/| /' conftest.$ac_ext >&5
11400
Martin v. Löwiseba40652007-08-30 20:10:57 +000011401 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011403
11404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011405done
11406case $ac_lo in
11407?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011408'') if test "$ac_cv_type__Bool" = yes; then
11409 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011410See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011411echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011412See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011413 { (exit 77); exit 77; }; }
11414 else
11415 ac_cv_sizeof__Bool=0
11416 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011417esac
11418else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011419 cat >conftest.$ac_ext <<_ACEOF
11420/* confdefs.h. */
11421_ACEOF
11422cat confdefs.h >>conftest.$ac_ext
11423cat >>conftest.$ac_ext <<_ACEOF
11424/* end confdefs.h. */
11425$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011426 typedef _Bool ac__type_sizeof_;
11427static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11428static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011429#include <stdio.h>
11430#include <stdlib.h>
11431int
11432main ()
11433{
11434
11435 FILE *f = fopen ("conftest.val", "w");
11436 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011437 return 1;
11438 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011439 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011440 long int i = longval ();
11441 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11442 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011443 fprintf (f, "%ld\n", i);
11444 }
11445 else
11446 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011447 unsigned long int i = ulongval ();
11448 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11449 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011450 fprintf (f, "%lu\n", i);
11451 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011452 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011453
11454 ;
11455 return 0;
11456}
11457_ACEOF
11458rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011459if { (ac_try="$ac_link"
11460case "(($ac_try" in
11461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11462 *) ac_try_echo=$ac_try;;
11463esac
11464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11465 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011466 ac_status=$?
11467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11468 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011469 { (case "(($ac_try" in
11470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11471 *) ac_try_echo=$ac_try;;
11472esac
11473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11474 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011475 ac_status=$?
11476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11477 (exit $ac_status); }; }; then
11478 ac_cv_sizeof__Bool=`cat conftest.val`
11479else
11480 echo "$as_me: program exited with status $ac_status" >&5
11481echo "$as_me: failed program was:" >&5
11482sed 's/^/| /' conftest.$ac_ext >&5
11483
11484( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011485if test "$ac_cv_type__Bool" = yes; then
11486 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011487See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011488echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011489See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011490 { (exit 77); exit 77; }; }
11491 else
11492 ac_cv_sizeof__Bool=0
11493 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011495rm -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 +000011496fi
11497rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011499{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11500echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11501
11502
11503
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011504cat >>confdefs.h <<_ACEOF
11505#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11506_ACEOF
11507
11508
11509fi
11510
Martin v. Löwiseba40652007-08-30 20:10:57 +000011511{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11512echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011513if test "${ac_cv_type_uintptr_t+set}" = set; then
11514 echo $ECHO_N "(cached) $ECHO_C" >&6
11515else
11516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011517/* confdefs.h. */
11518_ACEOF
11519cat confdefs.h >>conftest.$ac_ext
11520cat >>conftest.$ac_ext <<_ACEOF
11521/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011522#ifdef HAVE_STDINT_H
11523 #include <stdint.h>
11524 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011525
Martin v. Löwiseba40652007-08-30 20:10:57 +000011526typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011527int
11528main ()
11529{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011530if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011531 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011533 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011534 ;
11535 return 0;
11536}
11537_ACEOF
11538rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011539if { (ac_try="$ac_compile"
11540case "(($ac_try" in
11541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11542 *) ac_try_echo=$ac_try;;
11543esac
11544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011547 grep -v '^ *+' conftest.er1 >conftest.err
11548 rm -f conftest.er1
11549 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011551 (exit $ac_status); } && {
11552 test -z "$ac_c_werror_flag" ||
11553 test ! -s conftest.err
11554 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011555 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011556else
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011558sed 's/^/| /' conftest.$ac_ext >&5
11559
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011562
11563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11566echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011567if test $ac_cv_type_uintptr_t = yes; then
11568
11569cat >>confdefs.h <<_ACEOF
11570#define HAVE_UINTPTR_T 1
11571_ACEOF
11572
Martin v. Löwiseba40652007-08-30 20:10:57 +000011573{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11574echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011575if test "${ac_cv_type_uintptr_t+set}" = set; then
11576 echo $ECHO_N "(cached) $ECHO_C" >&6
11577else
11578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011579/* confdefs.h. */
11580_ACEOF
11581cat confdefs.h >>conftest.$ac_ext
11582cat >>conftest.$ac_ext <<_ACEOF
11583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011584$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011585typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011586int
11587main ()
11588{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011589if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011591if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011592 return 0;
11593 ;
11594 return 0;
11595}
11596_ACEOF
11597rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011598if { (ac_try="$ac_compile"
11599case "(($ac_try" in
11600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11601 *) ac_try_echo=$ac_try;;
11602esac
11603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11604 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011606 grep -v '^ *+' conftest.er1 >conftest.err
11607 rm -f conftest.er1
11608 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011610 (exit $ac_status); } && {
11611 test -z "$ac_c_werror_flag" ||
11612 test ! -s conftest.err
11613 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011614 ac_cv_type_uintptr_t=yes
11615else
11616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011617sed 's/^/| /' conftest.$ac_ext >&5
11618
Martin v. Löwiseba40652007-08-30 20:10:57 +000011619 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011620fi
Brett Cannon19fab762007-06-02 03:02:29 +000011621
Martin v. Löwiseba40652007-08-30 20:10:57 +000011622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11623fi
11624{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11625echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11626
11627# The cast to long int works around a bug in the HP C Compiler
11628# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11629# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11630# This bug is HP SR number 8606223364.
11631{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11632echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011633if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11634 echo $ECHO_N "(cached) $ECHO_C" >&6
11635else
Martin v. Löwis11437992002-04-12 09:54:03 +000011636 if test "$cross_compiling" = yes; then
11637 # Depending upon the size, compute the lo and hi bounds.
11638cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011639/* confdefs.h. */
11640_ACEOF
11641cat confdefs.h >>conftest.$ac_ext
11642cat >>conftest.$ac_ext <<_ACEOF
11643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011644$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011645 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011646int
11647main ()
11648{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011649static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011650test_array [0] = 0
11651
11652 ;
11653 return 0;
11654}
11655_ACEOF
11656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011657if { (ac_try="$ac_compile"
11658case "(($ac_try" in
11659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11660 *) ac_try_echo=$ac_try;;
11661esac
11662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011665 grep -v '^ *+' conftest.er1 >conftest.err
11666 rm -f conftest.er1
11667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011669 (exit $ac_status); } && {
11670 test -z "$ac_c_werror_flag" ||
11671 test ! -s conftest.err
11672 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011673 ac_lo=0 ac_mid=0
11674 while :; do
11675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011676/* confdefs.h. */
11677_ACEOF
11678cat confdefs.h >>conftest.$ac_ext
11679cat >>conftest.$ac_ext <<_ACEOF
11680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011681$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011682 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011683int
11684main ()
11685{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011686static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011687test_array [0] = 0
11688
11689 ;
11690 return 0;
11691}
11692_ACEOF
11693rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011694if { (ac_try="$ac_compile"
11695case "(($ac_try" in
11696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11697 *) ac_try_echo=$ac_try;;
11698esac
11699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011702 grep -v '^ *+' conftest.er1 >conftest.err
11703 rm -f conftest.er1
11704 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011706 (exit $ac_status); } && {
11707 test -z "$ac_c_werror_flag" ||
11708 test ! -s conftest.err
11709 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011710 ac_hi=$ac_mid; break
11711else
11712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011713sed 's/^/| /' conftest.$ac_ext >&5
11714
Martin v. Löwiseba40652007-08-30 20:10:57 +000011715 ac_lo=`expr $ac_mid + 1`
11716 if test $ac_lo -le $ac_mid; then
11717 ac_lo= ac_hi=
11718 break
11719 fi
11720 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011722
11723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011724 done
11725else
11726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011727sed 's/^/| /' conftest.$ac_ext >&5
11728
Martin v. Löwiseba40652007-08-30 20:10:57 +000011729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011730/* confdefs.h. */
11731_ACEOF
11732cat confdefs.h >>conftest.$ac_ext
11733cat >>conftest.$ac_ext <<_ACEOF
11734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011735$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011736 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011737int
11738main ()
11739{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011740static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011741test_array [0] = 0
11742
11743 ;
11744 return 0;
11745}
11746_ACEOF
11747rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011748if { (ac_try="$ac_compile"
11749case "(($ac_try" in
11750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11751 *) ac_try_echo=$ac_try;;
11752esac
11753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11754 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011756 grep -v '^ *+' conftest.er1 >conftest.err
11757 rm -f conftest.er1
11758 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011760 (exit $ac_status); } && {
11761 test -z "$ac_c_werror_flag" ||
11762 test ! -s conftest.err
11763 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011764 ac_hi=-1 ac_mid=-1
11765 while :; do
11766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011767/* confdefs.h. */
11768_ACEOF
11769cat confdefs.h >>conftest.$ac_ext
11770cat >>conftest.$ac_ext <<_ACEOF
11771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011773 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011774int
11775main ()
11776{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011777static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011778test_array [0] = 0
11779
11780 ;
11781 return 0;
11782}
11783_ACEOF
11784rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011785if { (ac_try="$ac_compile"
11786case "(($ac_try" in
11787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11788 *) ac_try_echo=$ac_try;;
11789esac
11790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11791 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011793 grep -v '^ *+' conftest.er1 >conftest.err
11794 rm -f conftest.er1
11795 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011797 (exit $ac_status); } && {
11798 test -z "$ac_c_werror_flag" ||
11799 test ! -s conftest.err
11800 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011801 ac_lo=$ac_mid; break
11802else
11803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011804sed 's/^/| /' conftest.$ac_ext >&5
11805
Martin v. Löwiseba40652007-08-30 20:10:57 +000011806 ac_hi=`expr '(' $ac_mid ')' - 1`
11807 if test $ac_mid -le $ac_hi; then
11808 ac_lo= ac_hi=
11809 break
11810 fi
11811 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011812fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011813
11814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011815 done
11816else
11817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011818sed 's/^/| /' conftest.$ac_ext >&5
11819
Martin v. Löwiseba40652007-08-30 20:10:57 +000011820 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011822
11823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011825
11826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011827# Binary search between lo and hi bounds.
11828while test "x$ac_lo" != "x$ac_hi"; do
11829 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11830 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011831/* confdefs.h. */
11832_ACEOF
11833cat confdefs.h >>conftest.$ac_ext
11834cat >>conftest.$ac_ext <<_ACEOF
11835/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011836$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011837 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011838int
11839main ()
11840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011841static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011842test_array [0] = 0
11843
11844 ;
11845 return 0;
11846}
11847_ACEOF
11848rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011849if { (ac_try="$ac_compile"
11850case "(($ac_try" in
11851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11852 *) ac_try_echo=$ac_try;;
11853esac
11854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011857 grep -v '^ *+' conftest.er1 >conftest.err
11858 rm -f conftest.er1
11859 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011861 (exit $ac_status); } && {
11862 test -z "$ac_c_werror_flag" ||
11863 test ! -s conftest.err
11864 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011865 ac_hi=$ac_mid
11866else
11867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011868sed 's/^/| /' conftest.$ac_ext >&5
11869
Martin v. Löwiseba40652007-08-30 20:10:57 +000011870 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011872
11873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011874done
11875case $ac_lo in
11876?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011877'') if test "$ac_cv_type_uintptr_t" = yes; then
11878 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011879See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011880echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011881See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011882 { (exit 77); exit 77; }; }
11883 else
11884 ac_cv_sizeof_uintptr_t=0
11885 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011886esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011887else
Martin v. Löwis11437992002-04-12 09:54:03 +000011888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011889/* confdefs.h. */
11890_ACEOF
11891cat confdefs.h >>conftest.$ac_ext
11892cat >>conftest.$ac_ext <<_ACEOF
11893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011894$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011895 typedef uintptr_t ac__type_sizeof_;
11896static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11897static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011898#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011899#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011900int
11901main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011902{
Martin v. Löwis11437992002-04-12 09:54:03 +000011903
11904 FILE *f = fopen ("conftest.val", "w");
11905 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011906 return 1;
11907 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011908 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011909 long int i = longval ();
11910 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11911 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011912 fprintf (f, "%ld\n", i);
11913 }
11914 else
11915 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011916 unsigned long int i = ulongval ();
11917 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11918 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011919 fprintf (f, "%lu\n", i);
11920 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011921 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011922
11923 ;
11924 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011925}
Martin v. Löwis11437992002-04-12 09:54:03 +000011926_ACEOF
11927rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011928if { (ac_try="$ac_link"
11929case "(($ac_try" in
11930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11931 *) ac_try_echo=$ac_try;;
11932esac
11933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11934 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 ac_status=$?
11936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11937 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011938 { (case "(($ac_try" in
11939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11940 *) ac_try_echo=$ac_try;;
11941esac
11942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11943 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011944 ac_status=$?
11945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11946 (exit $ac_status); }; }; then
11947 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011948else
Martin v. Löwis11437992002-04-12 09:54:03 +000011949 echo "$as_me: program exited with status $ac_status" >&5
11950echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011951sed 's/^/| /' conftest.$ac_ext >&5
11952
Martin v. Löwis11437992002-04-12 09:54:03 +000011953( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011954if test "$ac_cv_type_uintptr_t" = yes; then
11955 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011956See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011957echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011958See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011959 { (exit 77); exit 77; }; }
11960 else
11961 ac_cv_sizeof_uintptr_t=0
11962 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011964rm -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 +000011965fi
11966rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011968{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11969echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
11970
11971
11972
Martin v. Löwis11437992002-04-12 09:54:03 +000011973cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011974#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011975_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011976
Michael W. Hudson54241132001-12-07 15:38:26 +000011977
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011978fi
11979
Martin v. Löwisebe26702006-10-02 14:55:51 +000011980
11981
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011982# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011983{ echo "$as_me:$LINENO: checking size of off_t" >&5
11984echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011985if test "${ac_cv_sizeof_off_t+set}" = set; then
11986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011987else
11988 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011989 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011990else
Martin v. Löwis11437992002-04-12 09:54:03 +000011991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011992/* confdefs.h. */
11993_ACEOF
11994cat confdefs.h >>conftest.$ac_ext
11995cat >>conftest.$ac_ext <<_ACEOF
11996/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011997#include <stdio.h>
11998#include <sys/types.h>
11999main()
12000{
12001 FILE *f=fopen("conftestval", "w");
12002 if (!f) exit(1);
12003 fprintf(f, "%d\n", sizeof(off_t));
12004 exit(0);
12005}
Martin v. Löwis11437992002-04-12 09:54:03 +000012006_ACEOF
12007rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012008if { (ac_try="$ac_link"
12009case "(($ac_try" in
12010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12011 *) ac_try_echo=$ac_try;;
12012esac
12013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12014 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012015 ac_status=$?
12016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12017 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012018 { (case "(($ac_try" in
12019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12020 *) ac_try_echo=$ac_try;;
12021esac
12022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12023 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012024 ac_status=$?
12025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12026 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012027 ac_cv_sizeof_off_t=`cat conftestval`
12028else
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 echo "$as_me: program exited with status $ac_status" >&5
12030echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012031sed 's/^/| /' conftest.$ac_ext >&5
12032
Martin v. Löwis11437992002-04-12 09:54:03 +000012033( exit $ac_status )
12034ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012036rm -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 +000012037fi
12038
Martin v. Löwiseba40652007-08-30 20:10:57 +000012039
12040
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012041fi
12042
Martin v. Löwiseba40652007-08-30 20:10:57 +000012043{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12044echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012045
12046cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012047#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012048_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012049
Michael W. Hudson54241132001-12-07 15:38:26 +000012050
Martin v. Löwiseba40652007-08-30 20:10:57 +000012051{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12052echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012053if test "$have_long_long" = yes -a \
12054 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12055 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012056
Martin v. Löwis11437992002-04-12 09:54:03 +000012057cat >>confdefs.h <<\_ACEOF
12058#define HAVE_LARGEFILE_SUPPORT 1
12059_ACEOF
12060
Martin v. Löwiseba40652007-08-30 20:10:57 +000012061 { echo "$as_me:$LINENO: result: yes" >&5
12062echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012063else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012064 { echo "$as_me:$LINENO: result: no" >&5
12065echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012066fi
12067
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012068# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012069{ echo "$as_me:$LINENO: checking size of time_t" >&5
12070echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012071if test "${ac_cv_sizeof_time_t+set}" = set; then
12072 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012073else
12074 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012075 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012076else
Martin v. Löwis11437992002-04-12 09:54:03 +000012077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012078/* confdefs.h. */
12079_ACEOF
12080cat confdefs.h >>conftest.$ac_ext
12081cat >>conftest.$ac_ext <<_ACEOF
12082/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012083#include <stdio.h>
12084#include <time.h>
12085main()
12086{
12087 FILE *f=fopen("conftestval", "w");
12088 if (!f) exit(1);
12089 fprintf(f, "%d\n", sizeof(time_t));
12090 exit(0);
12091}
Martin v. Löwis11437992002-04-12 09:54:03 +000012092_ACEOF
12093rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012094if { (ac_try="$ac_link"
12095case "(($ac_try" in
12096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12097 *) ac_try_echo=$ac_try;;
12098esac
12099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12100 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 ac_status=$?
12102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012104 { (case "(($ac_try" in
12105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12106 *) ac_try_echo=$ac_try;;
12107esac
12108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12109 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 ac_status=$?
12111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12112 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012113 ac_cv_sizeof_time_t=`cat conftestval`
12114else
Martin v. Löwis11437992002-04-12 09:54:03 +000012115 echo "$as_me: program exited with status $ac_status" >&5
12116echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012117sed 's/^/| /' conftest.$ac_ext >&5
12118
Martin v. Löwis11437992002-04-12 09:54:03 +000012119( exit $ac_status )
12120ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012122rm -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 +000012123fi
12124
Martin v. Löwiseba40652007-08-30 20:10:57 +000012125
12126
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012127fi
12128
Martin v. Löwiseba40652007-08-30 20:10:57 +000012129{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12130echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012131
12132cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012133#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012134_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012135
Michael W. Hudson54241132001-12-07 15:38:26 +000012136
12137
Trent Mick635f6fb2000-08-23 21:33:05 +000012138# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012139ac_save_cc="$CC"
12140if test "$ac_cv_kpthread" = "yes"
12141then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012142elif test "$ac_cv_kthread" = "yes"
12143then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012144elif test "$ac_cv_pthread" = "yes"
12145then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012147{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12148echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012149have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012150cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012151/* confdefs.h. */
12152_ACEOF
12153cat confdefs.h >>conftest.$ac_ext
12154cat >>conftest.$ac_ext <<_ACEOF
12155/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012156#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012157int
12158main ()
12159{
Guido van Rossum12580492000-09-24 16:47:19 +000012160pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 ;
12162 return 0;
12163}
12164_ACEOF
12165rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012166if { (ac_try="$ac_compile"
12167case "(($ac_try" in
12168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12169 *) ac_try_echo=$ac_try;;
12170esac
12171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012174 grep -v '^ *+' conftest.er1 >conftest.err
12175 rm -f conftest.er1
12176 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012178 (exit $ac_status); } && {
12179 test -z "$ac_c_werror_flag" ||
12180 test ! -s conftest.err
12181 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012182 have_pthread_t=yes
12183else
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012185sed 's/^/| /' conftest.$ac_ext >&5
12186
Martin v. Löwiseba40652007-08-30 20:10:57 +000012187
Trent Mick635f6fb2000-08-23 21:33:05 +000012188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012189
12190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12191{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12192echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012193if test "$have_pthread_t" = yes ; then
12194 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012195 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12196echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012197 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12198 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012199else
12200 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012201 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012202else
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012204/* confdefs.h. */
12205_ACEOF
12206cat confdefs.h >>conftest.$ac_ext
12207cat >>conftest.$ac_ext <<_ACEOF
12208/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012209#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012210#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012211 main()
12212 {
12213 FILE *f=fopen("conftestval", "w");
12214 if (!f) exit(1);
12215 fprintf(f, "%d\n", sizeof(pthread_t));
12216 exit(0);
12217 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012218_ACEOF
12219rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012220if { (ac_try="$ac_link"
12221case "(($ac_try" in
12222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12223 *) ac_try_echo=$ac_try;;
12224esac
12225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12226 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 ac_status=$?
12228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12229 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012230 { (case "(($ac_try" in
12231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12232 *) ac_try_echo=$ac_try;;
12233esac
12234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12235 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012236 ac_status=$?
12237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12238 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012239 ac_cv_sizeof_pthread_t=`cat conftestval`
12240else
Martin v. Löwis11437992002-04-12 09:54:03 +000012241 echo "$as_me: program exited with status $ac_status" >&5
12242echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012243sed 's/^/| /' conftest.$ac_ext >&5
12244
Martin v. Löwis11437992002-04-12 09:54:03 +000012245( exit $ac_status )
12246ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012248rm -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 +000012249fi
12250
Martin v. Löwiseba40652007-08-30 20:10:57 +000012251
12252
Trent Mick635f6fb2000-08-23 21:33:05 +000012253fi
12254
Martin v. Löwiseba40652007-08-30 20:10:57 +000012255 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12256echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
12258cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012259#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012260_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012261
12262fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012263CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012264
Martin v. Löwiseba40652007-08-30 20:10:57 +000012265{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12266echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12267# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012268if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012269 enableval=$enable_toolbox_glue;
12270fi
Jack Jansene578a632001-08-15 01:27:14 +000012271
12272
12273if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012274then
Jack Jansene578a632001-08-15 01:27:14 +000012275 case $ac_sys_system/$ac_sys_release in
12276 Darwin/*)
12277 enable_toolbox_glue="yes";;
12278 *)
12279 enable_toolbox_glue="no";;
12280 esac
12281fi
12282case "$enable_toolbox_glue" in
12283yes)
Jack Jansene578a632001-08-15 01:27:14 +000012284 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012285 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012286
12287cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012288#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012289_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012290
12291 ;;
12292*)
Jack Jansene578a632001-08-15 01:27:14 +000012293 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012294 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012295 ;;
12296esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012297{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12298echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012299
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012300
12301case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012302 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012303 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12304 ;;
12305 Darwin/*)
12306 OTHER_LIBTOOL_OPT=""
12307 ;;
12308esac
12309
12310
12311case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012312 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012313 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12314 if test "${enable_universalsdk}"; then
12315 :
12316 else
12317 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12318 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012319 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012320 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012321 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012322 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12323 if test ${gcc_version} '<' 4.0
12324 then
12325 LIBTOOL_CRUFT="-lcc_dynamic"
12326 else
12327 LIBTOOL_CRUFT=""
12328 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012329 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012330 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012331 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012332esac
12333
Martin v. Löwiseba40652007-08-30 20:10:57 +000012334{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12335echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012336if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012337then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012338 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012339 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012340 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012341
Martin v. Löwis11437992002-04-12 09:54:03 +000012342cat >>confdefs.h <<\_ACEOF
12343#define WITH_NEXT_FRAMEWORK 1
12344_ACEOF
12345
Martin v. Löwiseba40652007-08-30 20:10:57 +000012346 { echo "$as_me:$LINENO: result: yes" >&5
12347echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012348else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012349 { echo "$as_me:$LINENO: result: no" >&5
12350echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012351fi
12352
Martin v. Löwiseba40652007-08-30 20:10:57 +000012353{ echo "$as_me:$LINENO: checking for dyld" >&5
12354echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012355case $ac_sys_system/$ac_sys_release in
12356 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012357
Martin v. Löwis11437992002-04-12 09:54:03 +000012358cat >>confdefs.h <<\_ACEOF
12359#define WITH_DYLD 1
12360_ACEOF
12361
Martin v. Löwiseba40652007-08-30 20:10:57 +000012362 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12363echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012364 ;;
12365 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012366 { echo "$as_me:$LINENO: result: no" >&5
12367echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012368 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012369esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012370
Guido van Rossum0a516c91994-09-12 10:58:40 +000012371# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012372
Michael W. Hudson54241132001-12-07 15:38:26 +000012373
12374
12375
12376
Guido van Rossum0a516c91994-09-12 10:58:40 +000012377# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012378# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012379{ echo "$as_me:$LINENO: checking SO" >&5
12380echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012381if test -z "$SO"
12382then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012383 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012384 hp*|HP*)
12385 case `uname -m` in
12386 ia64) SO=.so;;
12387 *) SO=.sl;;
12388 esac
12389 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012390 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012391 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012392 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012393else
12394 # this might also be a termcap variable, see #610332
12395 echo
12396 echo '====================================================================='
12397 echo '+ +'
12398 echo '+ WARNING: You have set SO in your environment. +'
12399 echo '+ Do you really mean to change the extension for shared libraries? +'
12400 echo '+ Continuing in 10 seconds to let you to ponder. +'
12401 echo '+ +'
12402 echo '====================================================================='
12403 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012405{ echo "$as_me:$LINENO: result: $SO" >&5
12406echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012407
12408cat >>confdefs.h <<_ACEOF
12409#define SHLIB_EXT "$SO"
12410_ACEOF
12411
Guido van Rossum0a516c91994-09-12 10:58:40 +000012412# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012413# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012414# (Shared libraries in this instance are shared modules to be loaded into
12415# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012416{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12417echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012418if test -z "$LDSHARED"
12419then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012420 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012421 AIX*)
12422 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012423 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012424 ;;
12425 BeOS*)
12426 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012427 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012428 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012429 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012430 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012431 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012432 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012433 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012434 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012435 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000012436 hp*|HP*)
12437 if test "$GCC" = "yes"
12438 then LDSHARED='$(CC) -shared'
12439 else LDSHARED='ld -b';
12440 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012441 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012442 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012443 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12444 if test "$enable_framework" ; then
12445 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012446 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12447 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012448 else
12449 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012450 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012451 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012452 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012453 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12454 if test "$enable_framework" ; then
12455 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012456 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12457 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012458 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012459 # No framework, use the Python app as bundle-loader
12460 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012461 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012462 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012463 Darwin/*)
12464 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12465 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012466 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012467 if test ${cur_target} '>' 10.2; then
12468 cur_target=10.3
12469 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012470 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012471
12472 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12473 # environment with a value that is the same as what we'll use
12474 # in the Makefile to ensure that we'll get the same compiler
12475 # environment during configure and build time.
12476 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12477 export MACOSX_DEPLOYMENT_TARGET
12478
Ronald Oussoren988117f2006-04-29 11:31:35 +000012479 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012480 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012481 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012482 if test "${enable_universalsdk}"; then
12483 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12484 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012485 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12486 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012487 else
12488 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12489 if test "$enable_framework" ; then
12490 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012491 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12492 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012493 else
12494 # No framework, use the Python app as bundle-loader
12495 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12496 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12497 fi
12498 fi
12499 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012500 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012501 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012502 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012503 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012504 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012505 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012506 else
12507 LDSHARED="ld -Bshareable ${LDFLAGS}"
12508 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012509 OpenBSD*)
12510 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12511 then
12512 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12513 else
12514 case `uname -r` in
12515 [01].* | 2.[0-7] | 2.[0-7].*)
12516 LDSHARED="ld -Bshareable ${LDFLAGS}"
12517 ;;
12518 *)
12519 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12520 ;;
12521 esac
12522 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012523 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012524 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012525 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012526 then LDSHARED='$(CC) -shared'
12527 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012528 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012529 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012530 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012531 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012532 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012533 *) LDSHARED="ld";;
12534 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012536{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12537echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012538BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012539# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012540# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12542echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012543if test -z "$CCSHARED"
12544then
Guido van Rossum07397971997-04-29 21:49:50 +000012545 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012546 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012547 then CCSHARED="-fPIC";
12548 elif test `uname -p` = sparc;
12549 then CCSHARED="-xcode=pic32";
12550 else CCSHARED="-Kpic";
12551 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012552 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012553 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012554 else CCSHARED="+z";
12555 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012556 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012557 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012558 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012559 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012560 if test "$GCC" = "yes"
12561 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012562 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012563 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012564 SCO_SV*)
12565 if test "$GCC" = "yes"
12566 then CCSHARED="-fPIC"
12567 else CCSHARED="-Kpic -belf"
12568 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012569 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012570 IRIX*/6*) case $CC in
12571 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012572 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012573 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012574 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012575 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012577{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12578echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012579# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012580# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012581{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12582echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012583if test -z "$LINKFORSHARED"
12584then
Guido van Rossum07397971997-04-29 21:49:50 +000012585 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012586 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012587 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012588 LINKFORSHARED="-Wl,-E -Wl,+s";;
12589# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012590 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012591 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012592 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012593 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012594 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12595 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012596 # not used by the core itself but which needs to be in the core so
12597 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012598 # -prebind is no longer used, because it actually seems to give a
12599 # slowdown in stead of a speedup, maybe due to the large number of
12600 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012601
12602 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012603 if test "$enable_framework"
12604 then
Jack Jansenda49e192005-01-07 13:08:22 +000012605 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012606 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012607 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012608 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012609 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012610 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012611 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012612 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12613 then
12614 LINKFORSHARED="-Wl,--export-dynamic"
12615 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012616 SunOS/5*) case $CC in
12617 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012618 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012619 then
12620 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012621 fi;;
12622 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012623 CYGWIN*)
12624 if test $enable_shared = "no"
12625 then
12626 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12627 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012628 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012630{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12631echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012632
Michael W. Hudson54241132001-12-07 15:38:26 +000012633
Martin v. Löwiseba40652007-08-30 20:10:57 +000012634{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12635echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012636if test ! "$LIBRARY" = "$LDLIBRARY"
12637then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012638 case $ac_sys_system in
12639 CYGWIN*)
12640 # Cygwin needs CCSHARED when building extension DLLs
12641 # but not when building the interpreter DLL.
12642 CFLAGSFORSHARED='';;
12643 *)
12644 CFLAGSFORSHARED='$(CCSHARED)'
12645 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012647{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12648echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012649
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012650# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12651# library (with --enable-shared).
12652# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012653# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12654# if it is not required, since it creates a dependency of the shared library
12655# to LIBS. This, in turn, means that applications linking the shared libpython
12656# don't need to link LIBS explicitly. The default should be only changed
12657# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012658
Martin v. Löwiseba40652007-08-30 20:10:57 +000012659{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12660echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012661case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012662 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012663 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012664esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012665{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12666echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012667
12668
Guido van Rossum627b2d71993-12-24 10:39:16 +000012669# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012670
Martin v. Löwiseba40652007-08-30 20:10:57 +000012671{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12672echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012673if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012675else
Martin v. Löwis11437992002-04-12 09:54:03 +000012676 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012677LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012678cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012679/* confdefs.h. */
12680_ACEOF
12681cat confdefs.h >>conftest.$ac_ext
12682cat >>conftest.$ac_ext <<_ACEOF
12683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012684
Martin v. Löwiseba40652007-08-30 20:10:57 +000012685/* Override any GCC internal prototype to avoid an error.
12686 Use char because int might match the return type of a GCC
12687 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012688#ifdef __cplusplus
12689extern "C"
12690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012691char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012692int
12693main ()
12694{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012695return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 ;
12697 return 0;
12698}
12699_ACEOF
12700rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012701if { (ac_try="$ac_link"
12702case "(($ac_try" in
12703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12704 *) ac_try_echo=$ac_try;;
12705esac
12706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12707 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012709 grep -v '^ *+' conftest.er1 >conftest.err
12710 rm -f conftest.er1
12711 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012713 (exit $ac_status); } && {
12714 test -z "$ac_c_werror_flag" ||
12715 test ! -s conftest.err
12716 } && test -s conftest$ac_exeext &&
12717 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012718 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719else
Martin v. Löwis11437992002-04-12 09:54:03 +000012720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012721sed 's/^/| /' conftest.$ac_ext >&5
12722
Martin v. Löwiseba40652007-08-30 20:10:57 +000012723 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012725
12726rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012727 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012728LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012730{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12731echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012732if test $ac_cv_lib_dl_dlopen = yes; then
12733 cat >>confdefs.h <<_ACEOF
12734#define HAVE_LIBDL 1
12735_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012736
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012737 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012738
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012739fi
12740 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012741
Martin v. Löwiseba40652007-08-30 20:10:57 +000012742{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12743echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012744if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12745 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012746else
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012748LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012749cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012750/* confdefs.h. */
12751_ACEOF
12752cat confdefs.h >>conftest.$ac_ext
12753cat >>conftest.$ac_ext <<_ACEOF
12754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012755
Martin v. Löwiseba40652007-08-30 20:10:57 +000012756/* Override any GCC internal prototype to avoid an error.
12757 Use char because int might match the return type of a GCC
12758 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012759#ifdef __cplusplus
12760extern "C"
12761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012762char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012763int
12764main ()
12765{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012766return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012767 ;
12768 return 0;
12769}
12770_ACEOF
12771rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012772if { (ac_try="$ac_link"
12773case "(($ac_try" in
12774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12775 *) ac_try_echo=$ac_try;;
12776esac
12777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12778 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012780 grep -v '^ *+' conftest.er1 >conftest.err
12781 rm -f conftest.er1
12782 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012784 (exit $ac_status); } && {
12785 test -z "$ac_c_werror_flag" ||
12786 test ! -s conftest.err
12787 } && test -s conftest$ac_exeext &&
12788 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012789 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012790else
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012792sed 's/^/| /' conftest.$ac_ext >&5
12793
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012796
12797rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012799LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012801{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12802echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012803if test $ac_cv_lib_dld_shl_load = yes; then
12804 cat >>confdefs.h <<_ACEOF
12805#define HAVE_LIBDLD 1
12806_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012807
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012808 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012809
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012810fi
12811 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012812
12813# only check for sem_ini if thread support is requested
12814if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012815 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12816echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012817if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012818 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012819else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012820 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012821cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012822/* confdefs.h. */
12823_ACEOF
12824cat confdefs.h >>conftest.$ac_ext
12825cat >>conftest.$ac_ext <<_ACEOF
12826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
Martin v. Löwiseba40652007-08-30 20:10:57 +000012828/* Override any GCC internal prototype to avoid an error.
12829 Use char because int might match the return type of a GCC
12830 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012831#ifdef __cplusplus
12832extern "C"
12833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012834char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012835int
12836main ()
12837{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012838return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012839 ;
12840 return 0;
12841}
12842_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012843for ac_lib in '' pthread rt posix4; do
12844 if test -z "$ac_lib"; then
12845 ac_res="none required"
12846 else
12847 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012848 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012849 fi
12850 rm -f conftest.$ac_objext conftest$ac_exeext
12851if { (ac_try="$ac_link"
12852case "(($ac_try" in
12853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12854 *) ac_try_echo=$ac_try;;
12855esac
12856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12857 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012858 ac_status=$?
12859 grep -v '^ *+' conftest.er1 >conftest.err
12860 rm -f conftest.er1
12861 cat conftest.err >&5
12862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012863 (exit $ac_status); } && {
12864 test -z "$ac_c_werror_flag" ||
12865 test ! -s conftest.err
12866 } && test -s conftest$ac_exeext &&
12867 $as_test_x conftest$ac_exeext; then
12868 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012869else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012870 echo "$as_me: failed program was:" >&5
12871sed 's/^/| /' conftest.$ac_ext >&5
12872
Martin v. Löwiseba40652007-08-30 20:10:57 +000012873
Brett Cannon19fab762007-06-02 03:02:29 +000012874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012875
12876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12877 conftest$ac_exeext
12878 if test "${ac_cv_search_sem_init+set}" = set; then
12879 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012881done
12882if test "${ac_cv_search_sem_init+set}" = set; then
12883 :
12884else
12885 ac_cv_search_sem_init=no
12886fi
12887rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012888LIBS=$ac_func_search_save_LIBS
12889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012890{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12891echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12892ac_res=$ac_cv_search_sem_init
12893if test "$ac_res" != no; then
12894 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012895
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012896fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012897 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012898 # posix4 on Solaris 2.6
12899 # pthread (first!) on Linux
12900fi
12901
Martin v. Löwis19d17342003-06-14 21:03:05 +000012902# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012903{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12904echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012905if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12906 echo $ECHO_N "(cached) $ECHO_C" >&6
12907else
12908 ac_check_lib_save_LIBS=$LIBS
12909LIBS="-lintl $LIBS"
12910cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012911/* confdefs.h. */
12912_ACEOF
12913cat confdefs.h >>conftest.$ac_ext
12914cat >>conftest.$ac_ext <<_ACEOF
12915/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012916
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917/* Override any GCC internal prototype to avoid an error.
12918 Use char because int might match the return type of a GCC
12919 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012920#ifdef __cplusplus
12921extern "C"
12922#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012923char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012924int
12925main ()
12926{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012927return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012928 ;
12929 return 0;
12930}
12931_ACEOF
12932rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012933if { (ac_try="$ac_link"
12934case "(($ac_try" in
12935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12936 *) ac_try_echo=$ac_try;;
12937esac
12938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12939 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012941 grep -v '^ *+' conftest.er1 >conftest.err
12942 rm -f conftest.er1
12943 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012945 (exit $ac_status); } && {
12946 test -z "$ac_c_werror_flag" ||
12947 test ! -s conftest.err
12948 } && test -s conftest$ac_exeext &&
12949 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012950 ac_cv_lib_intl_textdomain=yes
12951else
12952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012953sed 's/^/| /' conftest.$ac_ext >&5
12954
Martin v. Löwiseba40652007-08-30 20:10:57 +000012955 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012957
12958rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012960LIBS=$ac_check_lib_save_LIBS
12961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012962{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12963echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012964if test $ac_cv_lib_intl_textdomain = yes; then
12965
12966cat >>confdefs.h <<\_ACEOF
12967#define WITH_LIBINTL 1
12968_ACEOF
12969
12970fi
12971
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012972
12973# checks for system dependent C++ extensions support
12974case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000012975 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12976echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012977 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012978/* confdefs.h. */
12979_ACEOF
12980cat confdefs.h >>conftest.$ac_ext
12981cat >>conftest.$ac_ext <<_ACEOF
12982/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012983#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012984int
12985main ()
12986{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012987loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ;
12989 return 0;
12990}
12991_ACEOF
12992rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012993if { (ac_try="$ac_link"
12994case "(($ac_try" in
12995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12996 *) ac_try_echo=$ac_try;;
12997esac
12998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12999 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013001 grep -v '^ *+' conftest.er1 >conftest.err
13002 rm -f conftest.er1
13003 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013005 (exit $ac_status); } && {
13006 test -z "$ac_c_werror_flag" ||
13007 test ! -s conftest.err
13008 } && test -s conftest$ac_exeext &&
13009 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013010
Martin v. Löwis11437992002-04-12 09:54:03 +000013011cat >>confdefs.h <<\_ACEOF
13012#define AIX_GENUINE_CPLUSPLUS 1
13013_ACEOF
13014
Martin v. Löwiseba40652007-08-30 20:10:57 +000013015 { echo "$as_me:$LINENO: result: yes" >&5
13016echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013017else
Martin v. Löwis11437992002-04-12 09:54:03 +000013018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013019sed 's/^/| /' conftest.$ac_ext >&5
13020
Martin v. Löwiseba40652007-08-30 20:10:57 +000013021 { echo "$as_me:$LINENO: result: no" >&5
13022echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013024
13025rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013026 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013027 *) ;;
13028esac
13029
Guido van Rossum70c7f481998-03-26 18:44:10 +000013030# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013031# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013032{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13033echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013034if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13035 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013036else
Martin v. Löwis11437992002-04-12 09:54:03 +000013037 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013038LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013039cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013040/* confdefs.h. */
13041_ACEOF
13042cat confdefs.h >>conftest.$ac_ext
13043cat >>conftest.$ac_ext <<_ACEOF
13044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013045
Martin v. Löwiseba40652007-08-30 20:10:57 +000013046/* Override any GCC internal prototype to avoid an error.
13047 Use char because int might match the return type of a GCC
13048 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013049#ifdef __cplusplus
13050extern "C"
13051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013052char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013053int
13054main ()
13055{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013056return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 ;
13058 return 0;
13059}
13060_ACEOF
13061rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013062if { (ac_try="$ac_link"
13063case "(($ac_try" in
13064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13065 *) ac_try_echo=$ac_try;;
13066esac
13067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13068 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013070 grep -v '^ *+' conftest.er1 >conftest.err
13071 rm -f conftest.er1
13072 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013074 (exit $ac_status); } && {
13075 test -z "$ac_c_werror_flag" ||
13076 test ! -s conftest.err
13077 } && test -s conftest$ac_exeext &&
13078 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013080else
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013082sed 's/^/| /' conftest.$ac_ext >&5
13083
Martin v. Löwiseba40652007-08-30 20:10:57 +000013084 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013086
13087rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013088 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013089LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013091{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13092echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013093if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013094 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013095fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013096 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013097{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13098echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013099if test "${ac_cv_lib_socket_socket+set}" = set; then
13100 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013101else
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013103LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013104cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013105/* confdefs.h. */
13106_ACEOF
13107cat confdefs.h >>conftest.$ac_ext
13108cat >>conftest.$ac_ext <<_ACEOF
13109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013110
Martin v. Löwiseba40652007-08-30 20:10:57 +000013111/* Override any GCC internal prototype to avoid an error.
13112 Use char because int might match the return type of a GCC
13113 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013114#ifdef __cplusplus
13115extern "C"
13116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013117char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013118int
13119main ()
13120{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013121return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 ;
13123 return 0;
13124}
13125_ACEOF
13126rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013127if { (ac_try="$ac_link"
13128case "(($ac_try" in
13129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13130 *) ac_try_echo=$ac_try;;
13131esac
13132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13133 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013135 grep -v '^ *+' conftest.er1 >conftest.err
13136 rm -f conftest.er1
13137 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013139 (exit $ac_status); } && {
13140 test -z "$ac_c_werror_flag" ||
13141 test ! -s conftest.err
13142 } && test -s conftest$ac_exeext &&
13143 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013144 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013145else
Martin v. Löwis11437992002-04-12 09:54:03 +000013146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013147sed 's/^/| /' conftest.$ac_ext >&5
13148
Martin v. Löwiseba40652007-08-30 20:10:57 +000013149 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013151
13152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013154LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013156{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13157echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013158if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013159 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013160fi
13161 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013162
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013163case "$ac_sys_system" in
13164BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013165{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13166echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013167if test "${ac_cv_lib_net_socket+set}" = set; then
13168 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013169else
Martin v. Löwis11437992002-04-12 09:54:03 +000013170 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013171LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013172cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013173/* confdefs.h. */
13174_ACEOF
13175cat confdefs.h >>conftest.$ac_ext
13176cat >>conftest.$ac_ext <<_ACEOF
13177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013178
Martin v. Löwiseba40652007-08-30 20:10:57 +000013179/* Override any GCC internal prototype to avoid an error.
13180 Use char because int might match the return type of a GCC
13181 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013182#ifdef __cplusplus
13183extern "C"
13184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013185char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013186int
13187main ()
13188{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013189return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013190 ;
13191 return 0;
13192}
13193_ACEOF
13194rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013195if { (ac_try="$ac_link"
13196case "(($ac_try" in
13197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13198 *) ac_try_echo=$ac_try;;
13199esac
13200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13201 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013203 grep -v '^ *+' conftest.er1 >conftest.err
13204 rm -f conftest.er1
13205 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013207 (exit $ac_status); } && {
13208 test -z "$ac_c_werror_flag" ||
13209 test ! -s conftest.err
13210 } && test -s conftest$ac_exeext &&
13211 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013212 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013213else
Martin v. Löwis11437992002-04-12 09:54:03 +000013214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013215sed 's/^/| /' conftest.$ac_ext >&5
13216
Martin v. Löwiseba40652007-08-30 20:10:57 +000013217 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013219
13220rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013221 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013222LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013224{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13225echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013226if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013227 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013228fi
13229 # BeOS
13230;;
13231esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013232
Martin v. Löwiseba40652007-08-30 20:10:57 +000013233{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13234echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013235
Martin v. Löwiseba40652007-08-30 20:10:57 +000013236# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013237if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013238 withval=$with_libs;
13239{ echo "$as_me:$LINENO: result: $withval" >&5
13240echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013241LIBS="$withval $LIBS"
13242
13243else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013244 { echo "$as_me:$LINENO: result: no" >&5
13245echo "${ECHO_T}no" >&6; }
13246fi
13247
Guido van Rossum7f43da71994-08-01 12:15:30 +000013248
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013249# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013250{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13251echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013252
Martin v. Löwiseba40652007-08-30 20:10:57 +000013253# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013254if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013255 withval=$with_system_ffi;
13256fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013257
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013258
Martin v. Löwiseba40652007-08-30 20:10:57 +000013259{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13260echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013261
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013262# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013263
13264
Martin v. Löwiseba40652007-08-30 20:10:57 +000013265{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13266echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013267
Martin v. Löwiseba40652007-08-30 20:10:57 +000013268# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013269if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013270 withval=$with_signal_module;
13271fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013272
13273
13274if test -z "$with_signal_module"
13275then with_signal_module="yes"
13276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013277{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13278echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013279
13280if test "${with_signal_module}" = "yes"; then
13281 USE_SIGNAL_MODULE=""
13282 SIGNAL_OBJS=""
13283else
13284 USE_SIGNAL_MODULE="#"
13285 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13286fi
13287
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013288# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013289
Barry Warsawc0d24d82000-06-29 16:12:00 +000013290USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013291
Martin v. Löwiseba40652007-08-30 20:10:57 +000013292{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13293echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013294
Guido van Rossumec2f0731997-01-22 20:54:01 +000013295
Martin v. Löwiseba40652007-08-30 20:10:57 +000013296# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013297if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013298 withval=$with_dec_threads;
13299{ echo "$as_me:$LINENO: result: $withval" >&5
13300echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013301LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013302if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013303 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013304fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013305else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013306 { echo "$as_me:$LINENO: result: no" >&5
13307echo "${ECHO_T}no" >&6; }
13308fi
13309
Martin v. Löwis11437992002-04-12 09:54:03 +000013310
13311# Templates for things AC_DEFINEd more than once.
13312# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013313
13314
Martin v. Löwis11437992002-04-12 09:54:03 +000013315
13316
13317
13318
13319
Martin v. Löwiseba40652007-08-30 20:10:57 +000013320{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13321echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013322
Martin v. Löwiseba40652007-08-30 20:10:57 +000013323# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013324if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013325 withval=$with_threads;
13326fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013327
13328
Barry Warsawc0d24d82000-06-29 16:12:00 +000013329# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013330
Martin v. Löwiseba40652007-08-30 20:10:57 +000013331# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013332if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013333 withval=$with_thread; with_threads=$with_thread
13334fi
13335
Barry Warsawc0d24d82000-06-29 16:12:00 +000013336
13337if test -z "$with_threads"
13338then with_threads="yes"
13339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013340{ echo "$as_me:$LINENO: result: $with_threads" >&5
13341echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013342
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013343
Barry Warsawc0d24d82000-06-29 16:12:00 +000013344if test "$with_threads" = "no"
13345then
13346 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013347elif test "$ac_cv_pthread_is_default" = yes
13348then
Martin v. Löwis11437992002-04-12 09:54:03 +000013349 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013350#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013351_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013352
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013353 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013354 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013355#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013356_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013357
13358 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013360elif test "$ac_cv_kpthread" = "yes"
13361then
13362 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013363 if test "$ac_cv_cxx_thread" = "yes"; then
13364 CXX="$CXX -Kpthread"
13365 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013367#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013368_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013369
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013370 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013371 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013372elif test "$ac_cv_kthread" = "yes"
13373then
13374 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013375 if test "$ac_cv_cxx_thread" = "yes"; then
13376 CXX="$CXX -Kthread"
13377 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013378 cat >>confdefs.h <<\_ACEOF
13379#define WITH_THREAD 1
13380_ACEOF
13381
13382 posix_threads=yes
13383 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013384elif test "$ac_cv_pthread" = "yes"
13385then
13386 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013387 if test "$ac_cv_cxx_thread" = "yes"; then
13388 CXX="$CXX -pthread"
13389 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013390 cat >>confdefs.h <<\_ACEOF
13391#define WITH_THREAD 1
13392_ACEOF
13393
13394 posix_threads=yes
13395 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013396else
13397 if test ! -z "$with_threads" -a -d "$with_threads"
13398 then LDFLAGS="$LDFLAGS -L$with_threads"
13399 fi
13400 if test ! -z "$withval" -a -d "$withval"
13401 then LDFLAGS="$LDFLAGS -L$withval"
13402 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013403
13404 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013405 # define _POSIX_THREADS in unistd.h. Some apparently don't
13406 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013407 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13408echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013410/* confdefs.h. */
13411_ACEOF
13412cat confdefs.h >>conftest.$ac_ext
13413cat >>conftest.$ac_ext <<_ACEOF
13414/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013415
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013416#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013417#ifdef _POSIX_THREADS
13418yes
13419#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013420
13421_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013422if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013423 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013424 unistd_defines_pthreads=yes
13425else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013426 unistd_defines_pthreads=no
13427fi
13428rm -f conftest*
13429
Martin v. Löwiseba40652007-08-30 20:10:57 +000013430 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13431echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013432
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013434#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013435_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013438 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13439echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013440if test "${ac_cv_header_cthreads_h+set}" = set; then
13441 echo $ECHO_N "(cached) $ECHO_C" >&6
13442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013443{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13444echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013445else
Martin v. Löwis11437992002-04-12 09:54:03 +000013446 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013447{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13448echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013449cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013450/* confdefs.h. */
13451_ACEOF
13452cat confdefs.h >>conftest.$ac_ext
13453cat >>conftest.$ac_ext <<_ACEOF
13454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013455$ac_includes_default
13456#include <cthreads.h>
13457_ACEOF
13458rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013459if { (ac_try="$ac_compile"
13460case "(($ac_try" in
13461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13462 *) ac_try_echo=$ac_try;;
13463esac
13464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013467 grep -v '^ *+' conftest.er1 >conftest.err
13468 rm -f conftest.er1
13469 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013471 (exit $ac_status); } && {
13472 test -z "$ac_c_werror_flag" ||
13473 test ! -s conftest.err
13474 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013475 ac_header_compiler=yes
13476else
13477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013478sed 's/^/| /' conftest.$ac_ext >&5
13479
Martin v. Löwiseba40652007-08-30 20:10:57 +000013480 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013482
13483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13484{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13485echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013486
13487# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013488{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13489echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013490cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013491/* confdefs.h. */
13492_ACEOF
13493cat confdefs.h >>conftest.$ac_ext
13494cat >>conftest.$ac_ext <<_ACEOF
13495/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013496#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013497_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013498if { (ac_try="$ac_cpp conftest.$ac_ext"
13499case "(($ac_try" in
13500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13501 *) ac_try_echo=$ac_try;;
13502esac
13503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13504 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013505 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013506 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013507 rm -f conftest.er1
13508 cat conftest.err >&5
13509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013510 (exit $ac_status); } >/dev/null && {
13511 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13512 test ! -s conftest.err
13513 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013514 ac_header_preproc=yes
13515else
13516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013517sed 's/^/| /' conftest.$ac_ext >&5
13518
Martin v. Löwis11437992002-04-12 09:54:03 +000013519 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013521
Martin v. Löwis11437992002-04-12 09:54:03 +000013522rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013523{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13524echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
13526# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013527case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13528 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13530echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013531 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13532echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13533 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013534 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013535 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013536 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13537echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013538 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13539echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13540 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13541echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13542 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13543echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013544 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13545echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013546 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13547echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013548 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013549## ------------------------------------------------ ##
13550## Report this to http://www.python.org/python-bugs ##
13551## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013552_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013553 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013554 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013555esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013556{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13557echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013558if test "${ac_cv_header_cthreads_h+set}" = set; then
13559 echo $ECHO_N "(cached) $ECHO_C" >&6
13560else
13561 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013563{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13564echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013565
13566fi
13567if test $ac_cv_header_cthreads_h = yes; then
13568 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013569#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013570_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013571
Martin v. Löwis11437992002-04-12 09:54:03 +000013572 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013573#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013574_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013575
Martin v. Löwis11437992002-04-12 09:54:03 +000013576
13577cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013578#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013579_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013580
13581 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013582 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013583else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013584
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013586 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13587echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013588if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13589 echo $ECHO_N "(cached) $ECHO_C" >&6
13590fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013591{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13592echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013593else
Martin v. Löwis11437992002-04-12 09:54:03 +000013594 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013595{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13596echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013597cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013598/* confdefs.h. */
13599_ACEOF
13600cat confdefs.h >>conftest.$ac_ext
13601cat >>conftest.$ac_ext <<_ACEOF
13602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013603$ac_includes_default
13604#include <mach/cthreads.h>
13605_ACEOF
13606rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013607if { (ac_try="$ac_compile"
13608case "(($ac_try" in
13609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13610 *) ac_try_echo=$ac_try;;
13611esac
13612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013615 grep -v '^ *+' conftest.er1 >conftest.err
13616 rm -f conftest.er1
13617 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013619 (exit $ac_status); } && {
13620 test -z "$ac_c_werror_flag" ||
13621 test ! -s conftest.err
13622 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013623 ac_header_compiler=yes
13624else
13625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013626sed 's/^/| /' conftest.$ac_ext >&5
13627
Martin v. Löwiseba40652007-08-30 20:10:57 +000013628 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013630
13631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13632{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13633echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013634
13635# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013636{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13637echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013638cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013639/* confdefs.h. */
13640_ACEOF
13641cat confdefs.h >>conftest.$ac_ext
13642cat >>conftest.$ac_ext <<_ACEOF
13643/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013644#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013645_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013646if { (ac_try="$ac_cpp conftest.$ac_ext"
13647case "(($ac_try" in
13648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13649 *) ac_try_echo=$ac_try;;
13650esac
13651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13652 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013653 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013654 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013655 rm -f conftest.er1
13656 cat conftest.err >&5
13657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013658 (exit $ac_status); } >/dev/null && {
13659 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13660 test ! -s conftest.err
13661 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013662 ac_header_preproc=yes
13663else
13664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013665sed 's/^/| /' conftest.$ac_ext >&5
13666
Martin v. Löwis11437992002-04-12 09:54:03 +000013667 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013669
Martin v. Löwis11437992002-04-12 09:54:03 +000013670rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013671{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13672echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013673
13674# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013675case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13676 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013677 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13678echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013679 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13680echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13681 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013682 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013683 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013684 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13685echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013686 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13687echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13688 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13689echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13690 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13691echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013692 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13693echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013694 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13695echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013696 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013697## ------------------------------------------------ ##
13698## Report this to http://www.python.org/python-bugs ##
13699## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013700_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013701 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013702 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013703esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013704{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13705echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013706if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13707 echo $ECHO_N "(cached) $ECHO_C" >&6
13708else
13709 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013711{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13712echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013713
13714fi
13715if test $ac_cv_header_mach_cthreads_h = yes; then
13716 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013717#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013718_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013719
Martin v. Löwis11437992002-04-12 09:54:03 +000013720 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013721#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013722_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013723
Martin v. Löwis11437992002-04-12 09:54:03 +000013724
13725cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013726#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013727_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013728
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013729 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013730else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013731
Martin v. Löwiseba40652007-08-30 20:10:57 +000013732 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13733echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013734
Martin v. Löwiseba40652007-08-30 20:10:57 +000013735# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013736if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013737 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13738echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013739 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013740#define WITH_THREAD 1
13741_ACEOF
13742
13743
13744cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013745#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013746_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013747
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013748 LIBS="-lpth $LIBS"
13749 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013750else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013751 { echo "$as_me:$LINENO: result: no" >&5
13752echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013753
13754 # Just looking for pthread_create in libpthread is not enough:
13755 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13756 # So we really have to include pthread.h, and then link.
13757 _libs=$LIBS
13758 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013759 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13760echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013762/* confdefs.h. */
13763_ACEOF
13764cat confdefs.h >>conftest.$ac_ext
13765cat >>conftest.$ac_ext <<_ACEOF
13766/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013767#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013768
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013769void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013770int
13771main ()
13772{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013773
13774pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 ;
13776 return 0;
13777}
13778_ACEOF
13779rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013780if { (ac_try="$ac_link"
13781case "(($ac_try" in
13782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13783 *) ac_try_echo=$ac_try;;
13784esac
13785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13786 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013788 grep -v '^ *+' conftest.er1 >conftest.err
13789 rm -f conftest.er1
13790 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013792 (exit $ac_status); } && {
13793 test -z "$ac_c_werror_flag" ||
13794 test ! -s conftest.err
13795 } && test -s conftest$ac_exeext &&
13796 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013797
Martin v. Löwiseba40652007-08-30 20:10:57 +000013798 { echo "$as_me:$LINENO: result: yes" >&5
13799echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013801#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013802_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013803
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013804 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013805 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013806else
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013808sed 's/^/| /' conftest.$ac_ext >&5
13809
Martin v. Löwis11437992002-04-12 09:54:03 +000013810
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013811 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013812 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13813echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013814if test "${ac_cv_func_pthread_detach+set}" = set; then
13815 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013816else
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013818/* confdefs.h. */
13819_ACEOF
13820cat confdefs.h >>conftest.$ac_ext
13821cat >>conftest.$ac_ext <<_ACEOF
13822/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013823/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13824 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13825#define pthread_detach innocuous_pthread_detach
13826
Guido van Rossumad678af1998-10-02 14:42:15 +000013827/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013828 which can conflict with char pthread_detach (); below.
13829 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013830 <limits.h> exists even on freestanding compilers. */
13831
13832#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013833# include <limits.h>
13834#else
13835# include <assert.h>
13836#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013837
13838#undef pthread_detach
13839
Martin v. Löwiseba40652007-08-30 20:10:57 +000013840/* Override any GCC internal prototype to avoid an error.
13841 Use char because int might match the return type of a GCC
13842 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013843#ifdef __cplusplus
13844extern "C"
13845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013846char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013847/* The GNU C library defines this for functions which it implements
13848 to always fail with ENOSYS. Some functions are actually named
13849 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013850#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013851choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013852#endif
13853
Skip Montanaro6dead952003-09-25 14:50:04 +000013854int
13855main ()
13856{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013857return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013858 ;
13859 return 0;
13860}
13861_ACEOF
13862rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013863if { (ac_try="$ac_link"
13864case "(($ac_try" in
13865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13866 *) ac_try_echo=$ac_try;;
13867esac
13868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13869 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013871 grep -v '^ *+' conftest.er1 >conftest.err
13872 rm -f conftest.er1
13873 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013875 (exit $ac_status); } && {
13876 test -z "$ac_c_werror_flag" ||
13877 test ! -s conftest.err
13878 } && test -s conftest$ac_exeext &&
13879 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013880 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013881else
Martin v. Löwis11437992002-04-12 09:54:03 +000013882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013883sed 's/^/| /' conftest.$ac_ext >&5
13884
Martin v. Löwiseba40652007-08-30 20:10:57 +000013885 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013887
13888rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013889 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13892echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013893if test $ac_cv_func_pthread_detach = yes; then
13894 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013895#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013896_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013897
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013898 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013899 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013900else
Guido van Rossumad678af1998-10-02 14:42:15 +000013901
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013902 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13904echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013905if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13906 echo $ECHO_N "(cached) $ECHO_C" >&6
13907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013908{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13909echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013910else
13911 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013912{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13913echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013914cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013915/* confdefs.h. */
13916_ACEOF
13917cat confdefs.h >>conftest.$ac_ext
13918cat >>conftest.$ac_ext <<_ACEOF
13919/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013920$ac_includes_default
13921#include <atheos/threads.h>
13922_ACEOF
13923rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013924if { (ac_try="$ac_compile"
13925case "(($ac_try" in
13926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13927 *) ac_try_echo=$ac_try;;
13928esac
13929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013932 grep -v '^ *+' conftest.er1 >conftest.err
13933 rm -f conftest.er1
13934 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013936 (exit $ac_status); } && {
13937 test -z "$ac_c_werror_flag" ||
13938 test ! -s conftest.err
13939 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013940 ac_header_compiler=yes
13941else
13942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013943sed 's/^/| /' conftest.$ac_ext >&5
13944
Martin v. Löwiseba40652007-08-30 20:10:57 +000013945 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013947
13948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13949{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13950echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013951
13952# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013953{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13954echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013955cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013956/* confdefs.h. */
13957_ACEOF
13958cat confdefs.h >>conftest.$ac_ext
13959cat >>conftest.$ac_ext <<_ACEOF
13960/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013961#include <atheos/threads.h>
13962_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013963if { (ac_try="$ac_cpp conftest.$ac_ext"
13964case "(($ac_try" in
13965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13966 *) ac_try_echo=$ac_try;;
13967esac
13968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13969 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013970 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013971 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013972 rm -f conftest.er1
13973 cat conftest.err >&5
13974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013975 (exit $ac_status); } >/dev/null && {
13976 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13977 test ! -s conftest.err
13978 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013979 ac_header_preproc=yes
13980else
13981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013982sed 's/^/| /' conftest.$ac_ext >&5
13983
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013984 ac_header_preproc=no
13985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013986
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013987rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013988{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13989echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013990
13991# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013992case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13993 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013994 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13995echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013996 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
13997echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
13998 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013999 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014000 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014001 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14002echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014003 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14004echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14005 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14006echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14007 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14008echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014009 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14010echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014011 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14012echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014013 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014014## ------------------------------------------------ ##
14015## Report this to http://www.python.org/python-bugs ##
14016## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014017_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014018 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014019 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014020esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014021{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14022echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014023if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14024 echo $ECHO_N "(cached) $ECHO_C" >&6
14025else
14026 ac_cv_header_atheos_threads_h=$ac_header_preproc
14027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014028{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14029echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014030
14031fi
14032if test $ac_cv_header_atheos_threads_h = yes; then
14033 cat >>confdefs.h <<\_ACEOF
14034#define WITH_THREAD 1
14035_ACEOF
14036
14037
14038cat >>confdefs.h <<\_ACEOF
14039#define ATHEOS_THREADS 1
14040_ACEOF
14041
14042 THREADOBJ="Python/thread.o"
14043else
14044
Martin v. Löwis11437992002-04-12 09:54:03 +000014045 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014046 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14047echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014048if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14049 echo $ECHO_N "(cached) $ECHO_C" >&6
14050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014051{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14052echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014053else
Martin v. Löwis11437992002-04-12 09:54:03 +000014054 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014055{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14056echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014058/* confdefs.h. */
14059_ACEOF
14060cat confdefs.h >>conftest.$ac_ext
14061cat >>conftest.$ac_ext <<_ACEOF
14062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014063$ac_includes_default
14064#include <kernel/OS.h>
14065_ACEOF
14066rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067if { (ac_try="$ac_compile"
14068case "(($ac_try" in
14069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14070 *) ac_try_echo=$ac_try;;
14071esac
14072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014075 grep -v '^ *+' conftest.er1 >conftest.err
14076 rm -f conftest.er1
14077 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014079 (exit $ac_status); } && {
14080 test -z "$ac_c_werror_flag" ||
14081 test ! -s conftest.err
14082 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014083 ac_header_compiler=yes
14084else
14085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014086sed 's/^/| /' conftest.$ac_ext >&5
14087
Martin v. Löwiseba40652007-08-30 20:10:57 +000014088 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014090
14091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14092{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14093echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014094
14095# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014096{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14097echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014099/* confdefs.h. */
14100_ACEOF
14101cat confdefs.h >>conftest.$ac_ext
14102cat >>conftest.$ac_ext <<_ACEOF
14103/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014104#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014105_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014106if { (ac_try="$ac_cpp conftest.$ac_ext"
14107case "(($ac_try" in
14108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14109 *) ac_try_echo=$ac_try;;
14110esac
14111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14112 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014114 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014115 rm -f conftest.er1
14116 cat conftest.err >&5
14117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014118 (exit $ac_status); } >/dev/null && {
14119 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14120 test ! -s conftest.err
14121 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 ac_header_preproc=yes
14123else
14124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014125sed 's/^/| /' conftest.$ac_ext >&5
14126
Martin v. Löwis11437992002-04-12 09:54:03 +000014127 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014129
Martin v. Löwis11437992002-04-12 09:54:03 +000014130rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014131{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14132echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014133
Martin v. Löwis11437992002-04-12 09:54:03 +000014134# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014135case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14136 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14138echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014139 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14140echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14141 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014142 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014143 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014144 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14145echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014146 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14147echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14148 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14149echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14150 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14151echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014152 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14153echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014154 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14155echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014156 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014157## ------------------------------------------------ ##
14158## Report this to http://www.python.org/python-bugs ##
14159## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014160_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014161 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014162 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014163esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014164{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14165echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014166if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14167 echo $ECHO_N "(cached) $ECHO_C" >&6
14168else
14169 ac_cv_header_kernel_OS_h=$ac_header_preproc
14170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014171{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14172echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014173
14174fi
14175if test $ac_cv_header_kernel_OS_h = yes; then
14176 cat >>confdefs.h <<\_ACEOF
14177#define WITH_THREAD 1
14178_ACEOF
14179
14180
14181cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014182#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014183_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014184
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014185 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014186else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014187
Martin v. Löwiseba40652007-08-30 20:10:57 +000014188 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14189echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014190if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14191 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014192else
Martin v. Löwis11437992002-04-12 09:54:03 +000014193 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014194LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014195cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014196/* confdefs.h. */
14197_ACEOF
14198cat confdefs.h >>conftest.$ac_ext
14199cat >>conftest.$ac_ext <<_ACEOF
14200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014201
Martin v. Löwiseba40652007-08-30 20:10:57 +000014202/* Override any GCC internal prototype to avoid an error.
14203 Use char because int might match the return type of a GCC
14204 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014205#ifdef __cplusplus
14206extern "C"
14207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014208char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014209int
14210main ()
14211{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014212return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014213 ;
14214 return 0;
14215}
14216_ACEOF
14217rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014218if { (ac_try="$ac_link"
14219case "(($ac_try" in
14220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14221 *) ac_try_echo=$ac_try;;
14222esac
14223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14224 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014226 grep -v '^ *+' conftest.er1 >conftest.err
14227 rm -f conftest.er1
14228 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014230 (exit $ac_status); } && {
14231 test -z "$ac_c_werror_flag" ||
14232 test ! -s conftest.err
14233 } && test -s conftest$ac_exeext &&
14234 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014235 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014236else
Martin v. Löwis11437992002-04-12 09:54:03 +000014237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014238sed 's/^/| /' conftest.$ac_ext >&5
14239
Martin v. Löwiseba40652007-08-30 20:10:57 +000014240 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014242
14243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014245LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014247{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14248echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014249if test $ac_cv_lib_pthreads_pthread_create = yes; then
14250 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014251#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014252_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014253
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014254 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014255 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014256 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014257else
Greg Steinadf63d62000-07-05 10:38:09 +000014258
Martin v. Löwiseba40652007-08-30 20:10:57 +000014259 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14260echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014261if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14262 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014263else
Martin v. Löwis11437992002-04-12 09:54:03 +000014264 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014265LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014266cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014267/* confdefs.h. */
14268_ACEOF
14269cat confdefs.h >>conftest.$ac_ext
14270cat >>conftest.$ac_ext <<_ACEOF
14271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014272
Martin v. Löwiseba40652007-08-30 20:10:57 +000014273/* Override any GCC internal prototype to avoid an error.
14274 Use char because int might match the return type of a GCC
14275 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014276#ifdef __cplusplus
14277extern "C"
14278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014279char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014280int
14281main ()
14282{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014283return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014284 ;
14285 return 0;
14286}
14287_ACEOF
14288rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014289if { (ac_try="$ac_link"
14290case "(($ac_try" in
14291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14292 *) ac_try_echo=$ac_try;;
14293esac
14294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14295 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014297 grep -v '^ *+' conftest.er1 >conftest.err
14298 rm -f conftest.er1
14299 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014301 (exit $ac_status); } && {
14302 test -z "$ac_c_werror_flag" ||
14303 test ! -s conftest.err
14304 } && test -s conftest$ac_exeext &&
14305 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014306 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014307else
Martin v. Löwis11437992002-04-12 09:54:03 +000014308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014309sed 's/^/| /' conftest.$ac_ext >&5
14310
Martin v. Löwiseba40652007-08-30 20:10:57 +000014311 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014313
14314rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014315 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014316LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014318{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14319echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014320if test $ac_cv_lib_c_r_pthread_create = yes; then
14321 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014322#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014323_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014324
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014325 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014326 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014327 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014328else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014329
Martin v. Löwiseba40652007-08-30 20:10:57 +000014330 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14331echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014332if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14333 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014334else
Martin v. Löwis11437992002-04-12 09:54:03 +000014335 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014336LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014337cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014338/* confdefs.h. */
14339_ACEOF
14340cat confdefs.h >>conftest.$ac_ext
14341cat >>conftest.$ac_ext <<_ACEOF
14342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014343
Martin v. Löwiseba40652007-08-30 20:10:57 +000014344/* Override any GCC internal prototype to avoid an error.
14345 Use char because int might match the return type of a GCC
14346 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014347#ifdef __cplusplus
14348extern "C"
14349#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014350char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014351int
14352main ()
14353{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014354return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 ;
14356 return 0;
14357}
14358_ACEOF
14359rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014360if { (ac_try="$ac_link"
14361case "(($ac_try" in
14362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14363 *) ac_try_echo=$ac_try;;
14364esac
14365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14366 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014368 grep -v '^ *+' conftest.er1 >conftest.err
14369 rm -f conftest.er1
14370 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014372 (exit $ac_status); } && {
14373 test -z "$ac_c_werror_flag" ||
14374 test ! -s conftest.err
14375 } && test -s conftest$ac_exeext &&
14376 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014378else
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014380sed 's/^/| /' conftest.$ac_ext >&5
14381
Martin v. Löwiseba40652007-08-30 20:10:57 +000014382 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014384
14385rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014386 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014387LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014389{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14390echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014391if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14392 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014393#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014394_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014395
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014396 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014397 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014398 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014399else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014400
Martin v. Löwiseba40652007-08-30 20:10:57 +000014401 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14402echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014403if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14404 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014405else
Martin v. Löwis11437992002-04-12 09:54:03 +000014406 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014407LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014408cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014409/* confdefs.h. */
14410_ACEOF
14411cat confdefs.h >>conftest.$ac_ext
14412cat >>conftest.$ac_ext <<_ACEOF
14413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014414
Martin v. Löwiseba40652007-08-30 20:10:57 +000014415/* Override any GCC internal prototype to avoid an error.
14416 Use char because int might match the return type of a GCC
14417 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014418#ifdef __cplusplus
14419extern "C"
14420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014421char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014422int
14423main ()
14424{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014425return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014426 ;
14427 return 0;
14428}
14429_ACEOF
14430rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014431if { (ac_try="$ac_link"
14432case "(($ac_try" in
14433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14434 *) ac_try_echo=$ac_try;;
14435esac
14436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14437 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014439 grep -v '^ *+' conftest.er1 >conftest.err
14440 rm -f conftest.er1
14441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014443 (exit $ac_status); } && {
14444 test -z "$ac_c_werror_flag" ||
14445 test ! -s conftest.err
14446 } && test -s conftest$ac_exeext &&
14447 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014448 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014449else
Martin v. Löwis11437992002-04-12 09:54:03 +000014450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014451sed 's/^/| /' conftest.$ac_ext >&5
14452
Martin v. Löwiseba40652007-08-30 20:10:57 +000014453 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014455
14456rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014457 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014458LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014460{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14461echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014462if test $ac_cv_lib_cma_pthread_create = yes; then
14463 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014464#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014465_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014466
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014467 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014468 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014469 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014470else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014471
Martin v. Löwis130fb172001-07-19 11:00:41 +000014472 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014473fi
14474
Guido van Rossum627b2d71993-12-24 10:39:16 +000014475
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014476fi
14477
Guido van Rossum0be3e491997-05-22 20:33:33 +000014478fi
14479
Guido van Rossum49545951997-12-02 19:28:29 +000014480fi
14481
Guido van Rossumb93a8621998-05-07 13:27:32 +000014482fi
14483
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014484
Michael W. Hudson54241132001-12-07 15:38:26 +000014485fi
14486
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014487
14488fi
14489
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014491
14492rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014493 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494fi
14495
Martin v. Löwis11437992002-04-12 09:54:03 +000014496fi
14497
14498
14499fi
14500
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014501
Michael W. Hudson54241132001-12-07 15:38:26 +000014502
Martin v. Löwiseba40652007-08-30 20:10:57 +000014503 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14504echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014505if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14506 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014507else
Martin v. Löwis11437992002-04-12 09:54:03 +000014508 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014509LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014510cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014511/* confdefs.h. */
14512_ACEOF
14513cat confdefs.h >>conftest.$ac_ext
14514cat >>conftest.$ac_ext <<_ACEOF
14515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
Martin v. Löwiseba40652007-08-30 20:10:57 +000014517/* Override any GCC internal prototype to avoid an error.
14518 Use char because int might match the return type of a GCC
14519 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014520#ifdef __cplusplus
14521extern "C"
14522#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014523char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014524int
14525main ()
14526{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014527return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014528 ;
14529 return 0;
14530}
14531_ACEOF
14532rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014533if { (ac_try="$ac_link"
14534case "(($ac_try" in
14535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14536 *) ac_try_echo=$ac_try;;
14537esac
14538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14539 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014540 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014541 grep -v '^ *+' conftest.er1 >conftest.err
14542 rm -f conftest.er1
14543 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014545 (exit $ac_status); } && {
14546 test -z "$ac_c_werror_flag" ||
14547 test ! -s conftest.err
14548 } && test -s conftest$ac_exeext &&
14549 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014550 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014551else
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014553sed 's/^/| /' conftest.$ac_ext >&5
14554
Martin v. Löwiseba40652007-08-30 20:10:57 +000014555 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014557
14558rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014559 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014560LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014562{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14563echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014564if test $ac_cv_lib_mpc_usconfig = yes; then
14565 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014566#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014567_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014568
Martin v. Löwis130fb172001-07-19 11:00:41 +000014569 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014570 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014571 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014572fi
14573
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014574
Neal Norwitza978ab02002-11-02 16:58:05 +000014575 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014576 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14577echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014578if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014580else
Martin v. Löwis11437992002-04-12 09:54:03 +000014581 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014582LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014583cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014584/* confdefs.h. */
14585_ACEOF
14586cat confdefs.h >>conftest.$ac_ext
14587cat >>conftest.$ac_ext <<_ACEOF
14588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014589
Martin v. Löwiseba40652007-08-30 20:10:57 +000014590/* Override any GCC internal prototype to avoid an error.
14591 Use char because int might match the return type of a GCC
14592 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014593#ifdef __cplusplus
14594extern "C"
14595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014596char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014597int
14598main ()
14599{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014600return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014601 ;
14602 return 0;
14603}
14604_ACEOF
14605rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014606if { (ac_try="$ac_link"
14607case "(($ac_try" in
14608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14609 *) ac_try_echo=$ac_try;;
14610esac
14611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14612 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014614 grep -v '^ *+' conftest.er1 >conftest.err
14615 rm -f conftest.er1
14616 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014618 (exit $ac_status); } && {
14619 test -z "$ac_c_werror_flag" ||
14620 test ! -s conftest.err
14621 } && test -s conftest$ac_exeext &&
14622 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014623 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014624else
Martin v. Löwis11437992002-04-12 09:54:03 +000014625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014626sed 's/^/| /' conftest.$ac_ext >&5
14627
Martin v. Löwiseba40652007-08-30 20:10:57 +000014628 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014630
14631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014632 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014633LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014635{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14636echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014637if test $ac_cv_lib_thread_thr_create = yes; then
14638 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014639#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014640_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014641
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014642 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014643 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014644 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014645fi
14646
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014647 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014648
Martin v. Löwis130fb172001-07-19 11:00:41 +000014649 if test "$USE_THREAD_MODULE" != "#"
14650 then
14651 # If the above checks didn't disable threads, (at least) OSF1
14652 # needs this '-threads' argument during linking.
14653 case $ac_sys_system in
14654 OSF1) LDLAST=-threads;;
14655 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014656 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014657fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014658
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014659if test "$posix_threads" = "yes"; then
14660 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014661
14662cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014663#define _POSIX_THREADS 1
14664_ACEOF
14665
14666 fi
14667
14668 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14669 case $ac_sys_system/$ac_sys_release in
14670 SunOS/5.6)
14671cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014672#define HAVE_PTHREAD_DESTRUCTOR 1
14673_ACEOF
14674
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014675 ;;
14676 SunOS/5.8)
14677cat >>confdefs.h <<\_ACEOF
14678#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14679_ACEOF
14680
14681 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014682 AIX/5)
14683cat >>confdefs.h <<\_ACEOF
14684#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14685_ACEOF
14686
14687 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014688 esac
14689
Martin v. Löwiseba40652007-08-30 20:10:57 +000014690 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14691echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014692 if test "${ac_cv_pthread_system_supported+set}" = set; then
14693 echo $ECHO_N "(cached) $ECHO_C" >&6
14694else
14695 if test "$cross_compiling" = yes; then
14696 ac_cv_pthread_system_supported=no
14697else
14698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014699/* confdefs.h. */
14700_ACEOF
14701cat confdefs.h >>conftest.$ac_ext
14702cat >>conftest.$ac_ext <<_ACEOF
14703/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014704#include <pthread.h>
14705 void *foo(void *parm) {
14706 return NULL;
14707 }
14708 main() {
14709 pthread_attr_t attr;
14710 pthread_t id;
14711 if (pthread_attr_init(&attr)) exit(-1);
14712 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14713 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14714 exit(0);
14715 }
14716_ACEOF
14717rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014718if { (ac_try="$ac_link"
14719case "(($ac_try" in
14720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14721 *) ac_try_echo=$ac_try;;
14722esac
14723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14724 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014725 ac_status=$?
14726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14727 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014728 { (case "(($ac_try" in
14729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14730 *) ac_try_echo=$ac_try;;
14731esac
14732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14733 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014734 ac_status=$?
14735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14736 (exit $ac_status); }; }; then
14737 ac_cv_pthread_system_supported=yes
14738else
14739 echo "$as_me: program exited with status $ac_status" >&5
14740echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014741sed 's/^/| /' conftest.$ac_ext >&5
14742
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014743( exit $ac_status )
14744ac_cv_pthread_system_supported=no
14745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014746rm -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 +000014747fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014748
Martin v. Löwiseba40652007-08-30 20:10:57 +000014749
14750
Guido van Rossum627b2d71993-12-24 10:39:16 +000014751fi
14752
Martin v. Löwiseba40652007-08-30 20:10:57 +000014753 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14754echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014755 if test "$ac_cv_pthread_system_supported" = "yes"; then
14756
14757cat >>confdefs.h <<\_ACEOF
14758#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14759_ACEOF
14760
14761 fi
14762
14763for ac_func in pthread_sigmask
14764do
14765as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014766{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14767echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14768if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014769 echo $ECHO_N "(cached) $ECHO_C" >&6
14770else
14771 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014772/* confdefs.h. */
14773_ACEOF
14774cat confdefs.h >>conftest.$ac_ext
14775cat >>conftest.$ac_ext <<_ACEOF
14776/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014777/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14778 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14779#define $ac_func innocuous_$ac_func
14780
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014781/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014782 which can conflict with char $ac_func (); below.
14783 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014784 <limits.h> exists even on freestanding compilers. */
14785
14786#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014787# include <limits.h>
14788#else
14789# include <assert.h>
14790#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014791
14792#undef $ac_func
14793
Martin v. Löwiseba40652007-08-30 20:10:57 +000014794/* Override any GCC internal prototype to avoid an error.
14795 Use char because int might match the return type of a GCC
14796 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014797#ifdef __cplusplus
14798extern "C"
14799#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014800char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014801/* The GNU C library defines this for functions which it implements
14802 to always fail with ENOSYS. Some functions are actually named
14803 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014804#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014805choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014806#endif
14807
Skip Montanaro6dead952003-09-25 14:50:04 +000014808int
14809main ()
14810{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014811return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014812 ;
14813 return 0;
14814}
14815_ACEOF
14816rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014817if { (ac_try="$ac_link"
14818case "(($ac_try" in
14819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14820 *) ac_try_echo=$ac_try;;
14821esac
14822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14823 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014825 grep -v '^ *+' conftest.er1 >conftest.err
14826 rm -f conftest.er1
14827 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014829 (exit $ac_status); } && {
14830 test -z "$ac_c_werror_flag" ||
14831 test ! -s conftest.err
14832 } && test -s conftest$ac_exeext &&
14833 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014834 eval "$as_ac_var=yes"
14835else
14836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014837sed 's/^/| /' conftest.$ac_ext >&5
14838
Martin v. Löwiseba40652007-08-30 20:10:57 +000014839 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014841
14842rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014843 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014845ac_res=`eval echo '${'$as_ac_var'}'`
14846 { echo "$as_me:$LINENO: result: $ac_res" >&5
14847echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014848if test `eval echo '${'$as_ac_var'}'` = yes; then
14849 cat >>confdefs.h <<_ACEOF
14850#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14851_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014852 case $ac_sys_system in
14853 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014854
Jason Tishlerfac083d2003-07-22 15:20:49 +000014855cat >>confdefs.h <<\_ACEOF
14856#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14857_ACEOF
14858
14859 ;;
14860 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014861fi
14862done
14863
14864fi
14865
14866
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014867# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014868
14869
Martin v. Löwiseba40652007-08-30 20:10:57 +000014870{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14871echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14872# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014873if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014874 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014875 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014876 { echo "$as_me:$LINENO: result: no" >&5
14877echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014878 ipv6=no
14879 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014880 *) { echo "$as_me:$LINENO: result: yes" >&5
14881echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014882 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014883#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014884_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014885
14886 ipv6=yes
14887 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014888 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014889else
Martin v. Löwis11437992002-04-12 09:54:03 +000014890
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014891 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014892 { echo "$as_me:$LINENO: result: no" >&5
14893echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014894 ipv6=no
14895
14896else
Martin v. Löwis11437992002-04-12 09:54:03 +000014897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014898/* confdefs.h. */
14899_ACEOF
14900cat confdefs.h >>conftest.$ac_ext
14901cat >>conftest.$ac_ext <<_ACEOF
14902/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014903 /* AF_INET6 available check */
14904#include <sys/types.h>
14905#include <sys/socket.h>
14906main()
14907{
14908 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14909 exit(1);
14910 else
14911 exit(0);
14912}
14913
Martin v. Löwis11437992002-04-12 09:54:03 +000014914_ACEOF
14915rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014916if { (ac_try="$ac_link"
14917case "(($ac_try" in
14918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14919 *) ac_try_echo=$ac_try;;
14920esac
14921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14922 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 ac_status=$?
14924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14925 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014926 { (case "(($ac_try" in
14927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14928 *) ac_try_echo=$ac_try;;
14929esac
14930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14931 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014932 ac_status=$?
14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14934 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014935 { echo "$as_me:$LINENO: result: yes" >&5
14936echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014937 ipv6=yes
14938else
Martin v. Löwis11437992002-04-12 09:54:03 +000014939 echo "$as_me: program exited with status $ac_status" >&5
14940echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014941sed 's/^/| /' conftest.$ac_ext >&5
14942
Martin v. Löwis11437992002-04-12 09:54:03 +000014943( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014944{ echo "$as_me:$LINENO: result: no" >&5
14945echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014946 ipv6=no
14947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014948rm -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 +000014949fi
14950
Martin v. Löwiseba40652007-08-30 20:10:57 +000014951
14952
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014953if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014954 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14955echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014957/* confdefs.h. */
14958_ACEOF
14959cat confdefs.h >>conftest.$ac_ext
14960cat >>conftest.$ac_ext <<_ACEOF
14961/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014962#include <sys/types.h>
14963#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014964int
14965main ()
14966{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014967struct sockaddr_in6 x;
14968x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 ;
14970 return 0;
14971}
14972_ACEOF
14973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014974if { (ac_try="$ac_compile"
14975case "(($ac_try" in
14976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14977 *) ac_try_echo=$ac_try;;
14978esac
14979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014982 grep -v '^ *+' conftest.er1 >conftest.err
14983 rm -f conftest.er1
14984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014986 (exit $ac_status); } && {
14987 test -z "$ac_c_werror_flag" ||
14988 test ! -s conftest.err
14989 } && test -s conftest.$ac_objext; then
14990 { echo "$as_me:$LINENO: result: yes" >&5
14991echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014992 ipv6=yes
14993else
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014995sed 's/^/| /' conftest.$ac_ext >&5
14996
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997 { echo "$as_me:$LINENO: result: no" >&5
14998echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014999 ipv6=no
15000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015001
15002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015003fi
15004
15005if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015007#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015008_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015009
15010fi
15011
Martin v. Löwiseba40652007-08-30 20:10:57 +000015012fi
15013
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015014
15015ipv6type=unknown
15016ipv6lib=none
15017ipv6trylibc=no
15018
15019if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015020 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15021echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015022 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15023 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015024 case $i in
15025 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015027/* confdefs.h. */
15028_ACEOF
15029cat confdefs.h >>conftest.$ac_ext
15030cat >>conftest.$ac_ext <<_ACEOF
15031/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015032
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015033#include <netinet/in.h>
15034#ifdef IPV6_INRIA_VERSION
15035yes
15036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015037_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015039 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015040 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015041fi
15042rm -f conftest*
15043
15044 ;;
15045 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015047/* confdefs.h. */
15048_ACEOF
15049cat confdefs.h >>conftest.$ac_ext
15050cat >>conftest.$ac_ext <<_ACEOF
15051/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015052
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015053#include <netinet/in.h>
15054#ifdef __KAME__
15055yes
15056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015057_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015059 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015060 ipv6type=$i;
15061 ipv6lib=inet6
15062 ipv6libdir=/usr/local/v6/lib
15063 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015064fi
15065rm -f conftest*
15066
15067 ;;
15068 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015070/* confdefs.h. */
15071_ACEOF
15072cat confdefs.h >>conftest.$ac_ext
15073cat >>conftest.$ac_ext <<_ACEOF
15074/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015075
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015076#include <features.h>
15077#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15078yes
15079#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015080_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015081if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015082 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015083 ipv6type=$i;
15084 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015085fi
15086rm -f conftest*
15087
15088 ;;
15089 linux-inet6)
15090 if test -d /usr/inet6; then
15091 ipv6type=$i
15092 ipv6lib=inet6
15093 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015094 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015095 fi
15096 ;;
15097 solaris)
15098 if test -f /etc/netconfig; then
15099 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15100 ipv6type=$i
15101 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015102 fi
15103 fi
15104 ;;
15105 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015107/* confdefs.h. */
15108_ACEOF
15109cat confdefs.h >>conftest.$ac_ext
15110cat >>conftest.$ac_ext <<_ACEOF
15111/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015112
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015113#include <sys/param.h>
15114#ifdef _TOSHIBA_INET6
15115yes
15116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015117_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015119 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015120 ipv6type=$i;
15121 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015122 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015123fi
15124rm -f conftest*
15125
15126 ;;
15127 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015129/* confdefs.h. */
15130_ACEOF
15131cat confdefs.h >>conftest.$ac_ext
15132cat >>conftest.$ac_ext <<_ACEOF
15133/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015135#include </usr/local/v6/include/sys/v6config.h>
15136#ifdef __V6D__
15137yes
15138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015139_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015141 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015142 ipv6type=$i;
15143 ipv6lib=v6;
15144 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015145 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015146fi
15147rm -f conftest*
15148
15149 ;;
15150 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015152/* confdefs.h. */
15153_ACEOF
15154cat confdefs.h >>conftest.$ac_ext
15155cat >>conftest.$ac_ext <<_ACEOF
15156/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015157
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015158#include <sys/param.h>
15159#ifdef _ZETA_MINAMI_INET6
15160yes
15161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015162_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015164 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015165 ipv6type=$i;
15166 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015167 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015168fi
15169rm -f conftest*
15170
15171 ;;
15172 esac
15173 if test "$ipv6type" != "unknown"; then
15174 break
15175 fi
15176 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015177 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15178echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015179fi
15180
15181if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15182 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15183 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15184 echo "using lib$ipv6lib"
15185 else
15186 if test $ipv6trylibc = "yes"; then
15187 echo "using libc"
15188 else
15189 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15190 echo "You need to fetch lib$ipv6lib.a from appropriate"
15191 echo 'ipv6 kit and compile beforehand.'
15192 exit 1
15193 fi
15194 fi
15195fi
15196
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015197# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15199echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015200
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015202if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015203 withval=$with_doc_strings;
15204fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015205
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015206
15207if test -z "$with_doc_strings"
15208then with_doc_strings="yes"
15209fi
15210if test "$with_doc_strings" != "no"
15211then
15212
15213cat >>confdefs.h <<\_ACEOF
15214#define WITH_DOC_STRINGS 1
15215_ACEOF
15216
15217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015218{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15219echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015220
Neil Schemenauera35c6882001-02-27 04:45:05 +000015221# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015222{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15223echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015224
Martin v. Löwiseba40652007-08-30 20:10:57 +000015225# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015226if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015228if test "$withval" != no
15229then
15230
15231cat >>confdefs.h <<\_ACEOF
15232#define WITH_TSC 1
15233_ACEOF
15234
Martin v. Löwiseba40652007-08-30 20:10:57 +000015235 { echo "$as_me:$LINENO: result: yes" >&5
15236echo "${ECHO_T}yes" >&6; }
15237else { echo "$as_me:$LINENO: result: no" >&5
15238echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015239fi
15240else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015241 { echo "$as_me:$LINENO: result: no" >&5
15242echo "${ECHO_T}no" >&6; }
15243fi
15244
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015245
15246# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015247{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15248echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015249
Martin v. Löwiseba40652007-08-30 20:10:57 +000015250# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015251if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015252 withval=$with_pymalloc;
15253fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015254
Neil Schemenauera35c6882001-02-27 04:45:05 +000015255
Neil Schemenauer16c22972002-03-22 15:34:49 +000015256if test -z "$with_pymalloc"
15257then with_pymalloc="yes"
15258fi
15259if test "$with_pymalloc" != "no"
15260then
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
15262cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015263#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015264_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015265
15266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015267{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15268echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015269
Barry Warsawef82cd72000-06-30 16:21:01 +000015270# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015271{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15272echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015273
Martin v. Löwiseba40652007-08-30 20:10:57 +000015274# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015275if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015276 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015277if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015278then
15279
15280cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015281#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015282_ACEOF
15283
Martin v. Löwiseba40652007-08-30 20:10:57 +000015284 { echo "$as_me:$LINENO: result: yes" >&5
15285echo "${ECHO_T}yes" >&6; }
15286else { echo "$as_me:$LINENO: result: no" >&5
15287echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015288fi
15289else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015290 { echo "$as_me:$LINENO: result: no" >&5
15291echo "${ECHO_T}no" >&6; }
15292fi
15293
Barry Warsawef82cd72000-06-30 16:21:01 +000015294
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015295# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015296
Guido van Rossum98935bf2001-09-05 19:13:16 +000015297DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015298
Guido van Rossume97ee181999-12-20 21:27:22 +000015299# the dlopen() function means we might want to use dynload_shlib.o. some
15300# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015301
Thomas Wouters3a584202000-08-05 23:28:51 +000015302for ac_func in dlopen
15303do
Martin v. Löwis11437992002-04-12 09:54:03 +000015304as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015305{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15306echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15307if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015309else
Martin v. Löwis11437992002-04-12 09:54:03 +000015310 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015311/* confdefs.h. */
15312_ACEOF
15313cat confdefs.h >>conftest.$ac_ext
15314cat >>conftest.$ac_ext <<_ACEOF
15315/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015316/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15317 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15318#define $ac_func innocuous_$ac_func
15319
Guido van Rossume97ee181999-12-20 21:27:22 +000015320/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015321 which can conflict with char $ac_func (); below.
15322 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015323 <limits.h> exists even on freestanding compilers. */
15324
15325#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015326# include <limits.h>
15327#else
15328# include <assert.h>
15329#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015330
15331#undef $ac_func
15332
Martin v. Löwiseba40652007-08-30 20:10:57 +000015333/* Override any GCC internal prototype to avoid an error.
15334 Use char because int might match the return type of a GCC
15335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015336#ifdef __cplusplus
15337extern "C"
15338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015339char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015340/* The GNU C library defines this for functions which it implements
15341 to always fail with ENOSYS. Some functions are actually named
15342 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015343#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015344choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015345#endif
15346
Skip Montanaro6dead952003-09-25 14:50:04 +000015347int
15348main ()
15349{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015350return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015351 ;
15352 return 0;
15353}
15354_ACEOF
15355rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356if { (ac_try="$ac_link"
15357case "(($ac_try" in
15358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15359 *) ac_try_echo=$ac_try;;
15360esac
15361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15362 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015364 grep -v '^ *+' conftest.er1 >conftest.err
15365 rm -f conftest.er1
15366 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368 (exit $ac_status); } && {
15369 test -z "$ac_c_werror_flag" ||
15370 test ! -s conftest.err
15371 } && test -s conftest$ac_exeext &&
15372 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015373 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015374else
Martin v. Löwis11437992002-04-12 09:54:03 +000015375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015376sed 's/^/| /' conftest.$ac_ext >&5
15377
Martin v. Löwiseba40652007-08-30 20:10:57 +000015378 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015380
15381rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015382 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015384ac_res=`eval echo '${'$as_ac_var'}'`
15385 { echo "$as_me:$LINENO: result: $ac_res" >&5
15386echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015387if test `eval echo '${'$as_ac_var'}'` = yes; then
15388 cat >>confdefs.h <<_ACEOF
15389#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15390_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015391
Guido van Rossume97ee181999-12-20 21:27:22 +000015392fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015393done
Guido van Rossume97ee181999-12-20 21:27:22 +000015394
Michael W. Hudson54241132001-12-07 15:38:26 +000015395
Guido van Rossume97ee181999-12-20 21:27:22 +000015396# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15397# loading of modules.
15398
Martin v. Löwiseba40652007-08-30 20:10:57 +000015399{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15400echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015401if test -z "$DYNLOADFILE"
15402then
15403 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015404 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15405 if test "$ac_cv_func_dlopen" = yes
15406 then DYNLOADFILE="dynload_shlib.o"
15407 else DYNLOADFILE="dynload_aix.o"
15408 fi
15409 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015410 BeOS*) DYNLOADFILE="dynload_beos.o";;
15411 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015412 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15413 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015414 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015415 *)
15416 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15417 # out any dynamic loading
15418 if test "$ac_cv_func_dlopen" = yes
15419 then DYNLOADFILE="dynload_shlib.o"
15420 else DYNLOADFILE="dynload_stub.o"
15421 fi
15422 ;;
15423 esac
15424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015425{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15426echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015427if test "$DYNLOADFILE" != "dynload_stub.o"
15428then
Martin v. Löwis11437992002-04-12 09:54:03 +000015429
15430cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015431#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015432_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015433
15434fi
15435
Neil Schemenauer4e425612001-06-19 15:44:15 +000015436# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15437
Michael W. Hudson54241132001-12-07 15:38:26 +000015438
Martin v. Löwiseba40652007-08-30 20:10:57 +000015439{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15440echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015441if test -z "$MACHDEP_OBJS"
15442then
Jack Jansene578a632001-08-15 01:27:14 +000015443 MACHDEP_OBJS=$extra_machdep_objs
15444else
15445 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015447{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15448echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015449
Guido van Rossum627b2d71993-12-24 10:39:16 +000015450# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
Martin v. Löwisd6320502004-08-12 13:45:08 +000015522
Martin v. Löwisc3001752005-01-23 09:27:24 +000015523
15524
Neal Norwitz05a45592006-03-20 06:30:08 +000015525
15526
Martin v. Löwis382abef2007-02-19 10:55:19 +000015527
15528
Christian Heimes36281872007-11-30 21:11:28 +000015529
Martin v. Löwisaef18b12008-03-24 13:31:16 +000015530
15531
15532for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
15533 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015534 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015535 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015536 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015537 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015538 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015539 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015540 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015541 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015542 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015543 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015544do
Martin v. Löwis11437992002-04-12 09:54:03 +000015545as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015546{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15547echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15548if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015549 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015550else
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015552/* confdefs.h. */
15553_ACEOF
15554cat confdefs.h >>conftest.$ac_ext
15555cat >>conftest.$ac_ext <<_ACEOF
15556/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015557/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15558 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15559#define $ac_func innocuous_$ac_func
15560
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015561/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015562 which can conflict with char $ac_func (); below.
15563 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015564 <limits.h> exists even on freestanding compilers. */
15565
15566#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015567# include <limits.h>
15568#else
15569# include <assert.h>
15570#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015571
15572#undef $ac_func
15573
Martin v. Löwiseba40652007-08-30 20:10:57 +000015574/* Override any GCC internal prototype to avoid an error.
15575 Use char because int might match the return type of a GCC
15576 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015577#ifdef __cplusplus
15578extern "C"
15579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015580char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015581/* The GNU C library defines this for functions which it implements
15582 to always fail with ENOSYS. Some functions are actually named
15583 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015584#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015585choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015586#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015587
Skip Montanaro6dead952003-09-25 14:50:04 +000015588int
15589main ()
15590{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015591return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015592 ;
15593 return 0;
15594}
15595_ACEOF
15596rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015597if { (ac_try="$ac_link"
15598case "(($ac_try" in
15599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15600 *) ac_try_echo=$ac_try;;
15601esac
15602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15603 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015605 grep -v '^ *+' conftest.er1 >conftest.err
15606 rm -f conftest.er1
15607 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015609 (exit $ac_status); } && {
15610 test -z "$ac_c_werror_flag" ||
15611 test ! -s conftest.err
15612 } && test -s conftest$ac_exeext &&
15613 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015614 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015615else
Martin v. Löwis11437992002-04-12 09:54:03 +000015616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015617sed 's/^/| /' conftest.$ac_ext >&5
15618
Martin v. Löwiseba40652007-08-30 20:10:57 +000015619 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015621
15622rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015623 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015625ac_res=`eval echo '${'$as_ac_var'}'`
15626 { echo "$as_me:$LINENO: result: $ac_res" >&5
15627echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015628if test `eval echo '${'$as_ac_var'}'` = yes; then
15629 cat >>confdefs.h <<_ACEOF
15630#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15631_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015632
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015633fi
15634done
15635
Michael W. Hudson54241132001-12-07 15:38:26 +000015636
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015637# For some functions, having a definition is not sufficient, since
15638# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015639{ echo "$as_me:$LINENO: checking for chroot" >&5
15640echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015641cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015642/* confdefs.h. */
15643_ACEOF
15644cat confdefs.h >>conftest.$ac_ext
15645cat >>conftest.$ac_ext <<_ACEOF
15646/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015647#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015648int
15649main ()
15650{
15651void *x=chroot
15652 ;
15653 return 0;
15654}
15655_ACEOF
15656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015657if { (ac_try="$ac_compile"
15658case "(($ac_try" in
15659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15660 *) ac_try_echo=$ac_try;;
15661esac
15662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015665 grep -v '^ *+' conftest.er1 >conftest.err
15666 rm -f conftest.er1
15667 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015669 (exit $ac_status); } && {
15670 test -z "$ac_c_werror_flag" ||
15671 test ! -s conftest.err
15672 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015673
15674cat >>confdefs.h <<\_ACEOF
15675#define HAVE_CHROOT 1
15676_ACEOF
15677
Martin v. Löwiseba40652007-08-30 20:10:57 +000015678 { echo "$as_me:$LINENO: result: yes" >&5
15679echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015680else
15681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015682sed 's/^/| /' conftest.$ac_ext >&5
15683
Martin v. Löwiseba40652007-08-30 20:10:57 +000015684 { echo "$as_me:$LINENO: result: no" >&5
15685echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015686
15687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015688
15689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15690{ echo "$as_me:$LINENO: checking for link" >&5
15691echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015692cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015693/* confdefs.h. */
15694_ACEOF
15695cat confdefs.h >>conftest.$ac_ext
15696cat >>conftest.$ac_ext <<_ACEOF
15697/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015698#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015699int
15700main ()
15701{
15702void *x=link
15703 ;
15704 return 0;
15705}
15706_ACEOF
15707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015708if { (ac_try="$ac_compile"
15709case "(($ac_try" in
15710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15711 *) ac_try_echo=$ac_try;;
15712esac
15713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015716 grep -v '^ *+' conftest.er1 >conftest.err
15717 rm -f conftest.er1
15718 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015720 (exit $ac_status); } && {
15721 test -z "$ac_c_werror_flag" ||
15722 test ! -s conftest.err
15723 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015724
15725cat >>confdefs.h <<\_ACEOF
15726#define HAVE_LINK 1
15727_ACEOF
15728
Martin v. Löwiseba40652007-08-30 20:10:57 +000015729 { echo "$as_me:$LINENO: result: yes" >&5
15730echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015731else
15732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015733sed 's/^/| /' conftest.$ac_ext >&5
15734
Martin v. Löwiseba40652007-08-30 20:10:57 +000015735 { echo "$as_me:$LINENO: result: no" >&5
15736echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015737
15738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015739
15740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15741{ echo "$as_me:$LINENO: checking for symlink" >&5
15742echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015743cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015744/* confdefs.h. */
15745_ACEOF
15746cat confdefs.h >>conftest.$ac_ext
15747cat >>conftest.$ac_ext <<_ACEOF
15748/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015749#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015750int
15751main ()
15752{
15753void *x=symlink
15754 ;
15755 return 0;
15756}
15757_ACEOF
15758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015759if { (ac_try="$ac_compile"
15760case "(($ac_try" in
15761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15762 *) ac_try_echo=$ac_try;;
15763esac
15764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015767 grep -v '^ *+' conftest.er1 >conftest.err
15768 rm -f conftest.er1
15769 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015771 (exit $ac_status); } && {
15772 test -z "$ac_c_werror_flag" ||
15773 test ! -s conftest.err
15774 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015775
15776cat >>confdefs.h <<\_ACEOF
15777#define HAVE_SYMLINK 1
15778_ACEOF
15779
Martin v. Löwiseba40652007-08-30 20:10:57 +000015780 { echo "$as_me:$LINENO: result: yes" >&5
15781echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015782else
15783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015784sed 's/^/| /' conftest.$ac_ext >&5
15785
Martin v. Löwiseba40652007-08-30 20:10:57 +000015786 { echo "$as_me:$LINENO: result: no" >&5
15787echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015788
15789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015790
15791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15792{ echo "$as_me:$LINENO: checking for fchdir" >&5
15793echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015795/* confdefs.h. */
15796_ACEOF
15797cat confdefs.h >>conftest.$ac_ext
15798cat >>conftest.$ac_ext <<_ACEOF
15799/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015800#include <unistd.h>
15801int
15802main ()
15803{
15804void *x=fchdir
15805 ;
15806 return 0;
15807}
15808_ACEOF
15809rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015810if { (ac_try="$ac_compile"
15811case "(($ac_try" in
15812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15813 *) ac_try_echo=$ac_try;;
15814esac
15815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015818 grep -v '^ *+' conftest.er1 >conftest.err
15819 rm -f conftest.er1
15820 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015822 (exit $ac_status); } && {
15823 test -z "$ac_c_werror_flag" ||
15824 test ! -s conftest.err
15825 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015826
15827cat >>confdefs.h <<\_ACEOF
15828#define HAVE_FCHDIR 1
15829_ACEOF
15830
Martin v. Löwiseba40652007-08-30 20:10:57 +000015831 { echo "$as_me:$LINENO: result: yes" >&5
15832echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015833else
15834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015835sed 's/^/| /' conftest.$ac_ext >&5
15836
Martin v. Löwiseba40652007-08-30 20:10:57 +000015837 { echo "$as_me:$LINENO: result: no" >&5
15838echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015839
15840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015841
15842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15843{ echo "$as_me:$LINENO: checking for fsync" >&5
15844echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015845cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015846/* confdefs.h. */
15847_ACEOF
15848cat confdefs.h >>conftest.$ac_ext
15849cat >>conftest.$ac_ext <<_ACEOF
15850/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015851#include <unistd.h>
15852int
15853main ()
15854{
15855void *x=fsync
15856 ;
15857 return 0;
15858}
15859_ACEOF
15860rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015861if { (ac_try="$ac_compile"
15862case "(($ac_try" in
15863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15864 *) ac_try_echo=$ac_try;;
15865esac
15866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15867 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015869 grep -v '^ *+' conftest.er1 >conftest.err
15870 rm -f conftest.er1
15871 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015873 (exit $ac_status); } && {
15874 test -z "$ac_c_werror_flag" ||
15875 test ! -s conftest.err
15876 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015877
15878cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015879#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015880_ACEOF
15881
Martin v. Löwiseba40652007-08-30 20:10:57 +000015882 { echo "$as_me:$LINENO: result: yes" >&5
15883echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015884else
15885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015886sed 's/^/| /' conftest.$ac_ext >&5
15887
Martin v. Löwiseba40652007-08-30 20:10:57 +000015888 { echo "$as_me:$LINENO: result: no" >&5
15889echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015890
15891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015892
15893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15894{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15895echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015897/* confdefs.h. */
15898_ACEOF
15899cat confdefs.h >>conftest.$ac_ext
15900cat >>conftest.$ac_ext <<_ACEOF
15901/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015902#include <unistd.h>
15903int
15904main ()
15905{
15906void *x=fdatasync
15907 ;
15908 return 0;
15909}
15910_ACEOF
15911rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015912if { (ac_try="$ac_compile"
15913case "(($ac_try" in
15914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15915 *) ac_try_echo=$ac_try;;
15916esac
15917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015920 grep -v '^ *+' conftest.er1 >conftest.err
15921 rm -f conftest.er1
15922 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015924 (exit $ac_status); } && {
15925 test -z "$ac_c_werror_flag" ||
15926 test ! -s conftest.err
15927 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015928
15929cat >>confdefs.h <<\_ACEOF
15930#define HAVE_FDATASYNC 1
15931_ACEOF
15932
Martin v. Löwiseba40652007-08-30 20:10:57 +000015933 { echo "$as_me:$LINENO: result: yes" >&5
15934echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015935else
15936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015937sed 's/^/| /' conftest.$ac_ext >&5
15938
Martin v. Löwiseba40652007-08-30 20:10:57 +000015939 { echo "$as_me:$LINENO: result: no" >&5
15940echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015941
15942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015943
15944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015945{ echo "$as_me:$LINENO: checking for epoll" >&5
15946echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
15947cat >conftest.$ac_ext <<_ACEOF
15948/* confdefs.h. */
15949_ACEOF
15950cat confdefs.h >>conftest.$ac_ext
15951cat >>conftest.$ac_ext <<_ACEOF
15952/* end confdefs.h. */
15953#include <sys/epoll.h>
15954int
15955main ()
15956{
15957void *x=epoll_create
15958 ;
15959 return 0;
15960}
15961_ACEOF
15962rm -f conftest.$ac_objext
15963if { (ac_try="$ac_compile"
15964case "(($ac_try" in
15965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15966 *) ac_try_echo=$ac_try;;
15967esac
15968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15969 (eval "$ac_compile") 2>conftest.er1
15970 ac_status=$?
15971 grep -v '^ *+' conftest.er1 >conftest.err
15972 rm -f conftest.er1
15973 cat conftest.err >&5
15974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15975 (exit $ac_status); } && {
15976 test -z "$ac_c_werror_flag" ||
15977 test ! -s conftest.err
15978 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015979
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015980cat >>confdefs.h <<\_ACEOF
15981#define HAVE_EPOLL 1
15982_ACEOF
15983
15984 { echo "$as_me:$LINENO: result: yes" >&5
15985echo "${ECHO_T}yes" >&6; }
15986else
15987 echo "$as_me: failed program was:" >&5
15988sed 's/^/| /' conftest.$ac_ext >&5
15989
15990 { echo "$as_me:$LINENO: result: no" >&5
15991echo "${ECHO_T}no" >&6; }
15992
15993fi
15994
15995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15996{ echo "$as_me:$LINENO: checking for kqueue" >&5
15997echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
15998cat >conftest.$ac_ext <<_ACEOF
15999/* confdefs.h. */
16000_ACEOF
16001cat confdefs.h >>conftest.$ac_ext
16002cat >>conftest.$ac_ext <<_ACEOF
16003/* end confdefs.h. */
16004
16005#include <sys/types.h>
16006#include <sys/event.h>
16007
16008int
16009main ()
16010{
16011int x=kqueue()
16012 ;
16013 return 0;
16014}
16015_ACEOF
16016rm -f conftest.$ac_objext
16017if { (ac_try="$ac_compile"
16018case "(($ac_try" in
16019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16020 *) ac_try_echo=$ac_try;;
16021esac
16022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16023 (eval "$ac_compile") 2>conftest.er1
16024 ac_status=$?
16025 grep -v '^ *+' conftest.er1 >conftest.err
16026 rm -f conftest.er1
16027 cat conftest.err >&5
16028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16029 (exit $ac_status); } && {
16030 test -z "$ac_c_werror_flag" ||
16031 test ! -s conftest.err
16032 } && test -s conftest.$ac_objext; then
16033
16034cat >>confdefs.h <<\_ACEOF
16035#define HAVE_KQUEUE 1
16036_ACEOF
16037
16038 { echo "$as_me:$LINENO: result: yes" >&5
16039echo "${ECHO_T}yes" >&6; }
16040else
16041 echo "$as_me: failed program was:" >&5
16042sed 's/^/| /' conftest.$ac_ext >&5
16043
16044 { echo "$as_me:$LINENO: result: no" >&5
16045echo "${ECHO_T}no" >&6; }
16046
16047fi
16048
16049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016050# On some systems (eg. FreeBSD 5), we would find a definition of the
16051# functions ctermid_r, setgroups in the library, but no prototype
16052# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16053# address to avoid compiler warnings and potential miscompilations
16054# because of the missing prototypes.
16055
Martin v. Löwiseba40652007-08-30 20:10:57 +000016056{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16057echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016058cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016059/* confdefs.h. */
16060_ACEOF
16061cat confdefs.h >>conftest.$ac_ext
16062cat >>conftest.$ac_ext <<_ACEOF
16063/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016064
16065#include "confdefs.h"
16066#include <stdio.h>
16067
Martin v. Löwisd5843682002-11-21 20:41:28 +000016068int
16069main ()
16070{
16071void* p = ctermid_r
16072 ;
16073 return 0;
16074}
16075_ACEOF
16076rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016077if { (ac_try="$ac_compile"
16078case "(($ac_try" in
16079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16080 *) ac_try_echo=$ac_try;;
16081esac
16082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016085 grep -v '^ *+' conftest.er1 >conftest.err
16086 rm -f conftest.er1
16087 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016089 (exit $ac_status); } && {
16090 test -z "$ac_c_werror_flag" ||
16091 test ! -s conftest.err
16092 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016093
16094cat >>confdefs.h <<\_ACEOF
16095#define HAVE_CTERMID_R 1
16096_ACEOF
16097
Martin v. Löwiseba40652007-08-30 20:10:57 +000016098 { echo "$as_me:$LINENO: result: yes" >&5
16099echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016100else
16101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016102sed 's/^/| /' conftest.$ac_ext >&5
16103
Martin v. Löwiseba40652007-08-30 20:10:57 +000016104 { echo "$as_me:$LINENO: result: no" >&5
16105echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016106
16107fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016108
Martin v. Löwiseba40652007-08-30 20:10:57 +000016109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16110
16111{ echo "$as_me:$LINENO: checking for flock" >&5
16112echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016114/* confdefs.h. */
16115_ACEOF
16116cat confdefs.h >>conftest.$ac_ext
16117cat >>conftest.$ac_ext <<_ACEOF
16118/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016119
16120#include "confdefs.h"
16121#include <sys/file.h>
16122
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016123int
16124main ()
16125{
16126void* p = flock
16127 ;
16128 return 0;
16129}
16130_ACEOF
16131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016132if { (ac_try="$ac_compile"
16133case "(($ac_try" in
16134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16135 *) ac_try_echo=$ac_try;;
16136esac
16137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016140 grep -v '^ *+' conftest.er1 >conftest.err
16141 rm -f conftest.er1
16142 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016144 (exit $ac_status); } && {
16145 test -z "$ac_c_werror_flag" ||
16146 test ! -s conftest.err
16147 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016148
16149cat >>confdefs.h <<\_ACEOF
16150#define HAVE_FLOCK 1
16151_ACEOF
16152
Martin v. Löwiseba40652007-08-30 20:10:57 +000016153 { echo "$as_me:$LINENO: result: yes" >&5
16154echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016155else
16156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016157sed 's/^/| /' conftest.$ac_ext >&5
16158
Martin v. Löwiseba40652007-08-30 20:10:57 +000016159 { echo "$as_me:$LINENO: result: no" >&5
16160echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016161
16162fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016163
Martin v. Löwiseba40652007-08-30 20:10:57 +000016164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16165
16166{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16167echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016168cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016169/* confdefs.h. */
16170_ACEOF
16171cat confdefs.h >>conftest.$ac_ext
16172cat >>conftest.$ac_ext <<_ACEOF
16173/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016174
16175#include "confdefs.h"
16176#include <unistd.h>
16177
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016178int
16179main ()
16180{
16181void* p = getpagesize
16182 ;
16183 return 0;
16184}
16185_ACEOF
16186rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016187if { (ac_try="$ac_compile"
16188case "(($ac_try" in
16189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16190 *) ac_try_echo=$ac_try;;
16191esac
16192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016195 grep -v '^ *+' conftest.er1 >conftest.err
16196 rm -f conftest.er1
16197 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016199 (exit $ac_status); } && {
16200 test -z "$ac_c_werror_flag" ||
16201 test ! -s conftest.err
16202 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016203
16204cat >>confdefs.h <<\_ACEOF
16205#define HAVE_GETPAGESIZE 1
16206_ACEOF
16207
Martin v. Löwiseba40652007-08-30 20:10:57 +000016208 { echo "$as_me:$LINENO: result: yes" >&5
16209echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016210else
16211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016212sed 's/^/| /' conftest.$ac_ext >&5
16213
Martin v. Löwiseba40652007-08-30 20:10:57 +000016214 { echo "$as_me:$LINENO: result: no" >&5
16215echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016216
16217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016218
16219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016220
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016221for ac_prog in true
16222do
16223 # Extract the first word of "$ac_prog", so it can be a program name with args.
16224set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016225{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16226echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016227if test "${ac_cv_prog_TRUE+set}" = set; then
16228 echo $ECHO_N "(cached) $ECHO_C" >&6
16229else
16230 if test -n "$TRUE"; then
16231 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16232else
16233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16234for as_dir in $PATH
16235do
16236 IFS=$as_save_IFS
16237 test -z "$as_dir" && as_dir=.
16238 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239 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 +000016240 ac_cv_prog_TRUE="$ac_prog"
16241 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16242 break 2
16243 fi
16244done
16245done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016246IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016247
16248fi
16249fi
16250TRUE=$ac_cv_prog_TRUE
16251if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016252 { echo "$as_me:$LINENO: result: $TRUE" >&5
16253echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016254else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016255 { echo "$as_me:$LINENO: result: no" >&5
16256echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016257fi
16258
Martin v. Löwiseba40652007-08-30 20:10:57 +000016259
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016260 test -n "$TRUE" && break
16261done
16262test -n "$TRUE" || TRUE="/bin/true"
16263
16264
Martin v. Löwiseba40652007-08-30 20:10:57 +000016265{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16266echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016267if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16268 echo $ECHO_N "(cached) $ECHO_C" >&6
16269else
16270 ac_check_lib_save_LIBS=$LIBS
16271LIBS="-lc $LIBS"
16272cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016273/* confdefs.h. */
16274_ACEOF
16275cat confdefs.h >>conftest.$ac_ext
16276cat >>conftest.$ac_ext <<_ACEOF
16277/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016278
Martin v. Löwiseba40652007-08-30 20:10:57 +000016279/* Override any GCC internal prototype to avoid an error.
16280 Use char because int might match the return type of a GCC
16281 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016282#ifdef __cplusplus
16283extern "C"
16284#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016285char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016286int
16287main ()
16288{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016289return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016290 ;
16291 return 0;
16292}
16293_ACEOF
16294rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016295if { (ac_try="$ac_link"
16296case "(($ac_try" in
16297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16298 *) ac_try_echo=$ac_try;;
16299esac
16300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16301 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016303 grep -v '^ *+' conftest.er1 >conftest.err
16304 rm -f conftest.er1
16305 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016307 (exit $ac_status); } && {
16308 test -z "$ac_c_werror_flag" ||
16309 test ! -s conftest.err
16310 } && test -s conftest$ac_exeext &&
16311 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016312 ac_cv_lib_c_inet_aton=yes
16313else
16314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016315sed 's/^/| /' conftest.$ac_ext >&5
16316
Martin v. Löwiseba40652007-08-30 20:10:57 +000016317 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016319
16320rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016321 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016322LIBS=$ac_check_lib_save_LIBS
16323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016324{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16325echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016326if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016327 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016328else
16329
Martin v. Löwiseba40652007-08-30 20:10:57 +000016330{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16331echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016332if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16333 echo $ECHO_N "(cached) $ECHO_C" >&6
16334else
16335 ac_check_lib_save_LIBS=$LIBS
16336LIBS="-lresolv $LIBS"
16337cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016338/* confdefs.h. */
16339_ACEOF
16340cat confdefs.h >>conftest.$ac_ext
16341cat >>conftest.$ac_ext <<_ACEOF
16342/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016343
Martin v. Löwiseba40652007-08-30 20:10:57 +000016344/* Override any GCC internal prototype to avoid an error.
16345 Use char because int might match the return type of a GCC
16346 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016347#ifdef __cplusplus
16348extern "C"
16349#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016350char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016351int
16352main ()
16353{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016354return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016355 ;
16356 return 0;
16357}
16358_ACEOF
16359rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016360if { (ac_try="$ac_link"
16361case "(($ac_try" in
16362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16363 *) ac_try_echo=$ac_try;;
16364esac
16365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16366 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016368 grep -v '^ *+' conftest.er1 >conftest.err
16369 rm -f conftest.er1
16370 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016372 (exit $ac_status); } && {
16373 test -z "$ac_c_werror_flag" ||
16374 test ! -s conftest.err
16375 } && test -s conftest$ac_exeext &&
16376 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016377 ac_cv_lib_resolv_inet_aton=yes
16378else
16379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016380sed 's/^/| /' conftest.$ac_ext >&5
16381
Martin v. Löwiseba40652007-08-30 20:10:57 +000016382 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016384
16385rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016386 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016387LIBS=$ac_check_lib_save_LIBS
16388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016389{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16390echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016391if test $ac_cv_lib_resolv_inet_aton = yes; then
16392 cat >>confdefs.h <<_ACEOF
16393#define HAVE_LIBRESOLV 1
16394_ACEOF
16395
16396 LIBS="-lresolv $LIBS"
16397
16398fi
16399
16400
16401fi
16402
16403
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016404# On Tru64, chflags seems to be present, but calling it will
16405# exit Python
16406{ echo "$as_me:$LINENO: checking for chflags" >&5
16407echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16408if test "$cross_compiling" = yes; then
16409 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16410See \`config.log' for more details." >&5
16411echo "$as_me: error: cannot run test program while cross compiling
16412See \`config.log' for more details." >&2;}
16413 { (exit 1); exit 1; }; }
16414else
16415 cat >conftest.$ac_ext <<_ACEOF
16416/* confdefs.h. */
16417_ACEOF
16418cat confdefs.h >>conftest.$ac_ext
16419cat >>conftest.$ac_ext <<_ACEOF
16420/* end confdefs.h. */
16421
16422#include <sys/stat.h>
16423#include <unistd.h>
16424int main(int argc, char*argv[])
16425{
16426 if(chflags(argv[0], 0) != 0)
16427 return 1;
16428 return 0;
16429}
16430
16431_ACEOF
16432rm -f conftest$ac_exeext
16433if { (ac_try="$ac_link"
16434case "(($ac_try" in
16435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16436 *) ac_try_echo=$ac_try;;
16437esac
16438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16439 (eval "$ac_link") 2>&5
16440 ac_status=$?
16441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16442 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16443 { (case "(($ac_try" in
16444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16445 *) ac_try_echo=$ac_try;;
16446esac
16447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16448 (eval "$ac_try") 2>&5
16449 ac_status=$?
16450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16451 (exit $ac_status); }; }; then
16452
16453cat >>confdefs.h <<\_ACEOF
16454#define HAVE_CHFLAGS 1
16455_ACEOF
16456
16457 { echo "$as_me:$LINENO: result: yes" >&5
16458echo "${ECHO_T}yes" >&6; }
16459else
16460 echo "$as_me: program exited with status $ac_status" >&5
16461echo "$as_me: failed program was:" >&5
16462sed 's/^/| /' conftest.$ac_ext >&5
16463
16464( exit $ac_status )
16465{ echo "$as_me:$LINENO: result: no" >&5
16466echo "${ECHO_T}no" >&6; }
16467
16468fi
16469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16470fi
16471
16472
16473
16474{ echo "$as_me:$LINENO: checking for lchflags" >&5
16475echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16476if test "$cross_compiling" = yes; then
16477 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16478See \`config.log' for more details." >&5
16479echo "$as_me: error: cannot run test program while cross compiling
16480See \`config.log' for more details." >&2;}
16481 { (exit 1); exit 1; }; }
16482else
16483 cat >conftest.$ac_ext <<_ACEOF
16484/* confdefs.h. */
16485_ACEOF
16486cat confdefs.h >>conftest.$ac_ext
16487cat >>conftest.$ac_ext <<_ACEOF
16488/* end confdefs.h. */
16489
16490#include <sys/stat.h>
16491#include <unistd.h>
16492int main(int argc, char*argv[])
16493{
16494 if(lchflags(argv[0], 0) != 0)
16495 return 1;
16496 return 0;
16497}
16498
16499_ACEOF
16500rm -f conftest$ac_exeext
16501if { (ac_try="$ac_link"
16502case "(($ac_try" in
16503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16504 *) ac_try_echo=$ac_try;;
16505esac
16506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16507 (eval "$ac_link") 2>&5
16508 ac_status=$?
16509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16510 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16511 { (case "(($ac_try" in
16512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16513 *) ac_try_echo=$ac_try;;
16514esac
16515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16516 (eval "$ac_try") 2>&5
16517 ac_status=$?
16518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16519 (exit $ac_status); }; }; then
16520
16521cat >>confdefs.h <<\_ACEOF
16522#define HAVE_LCHFLAGS 1
16523_ACEOF
16524
16525 { echo "$as_me:$LINENO: result: yes" >&5
16526echo "${ECHO_T}yes" >&6; }
16527else
16528 echo "$as_me: program exited with status $ac_status" >&5
16529echo "$as_me: failed program was:" >&5
16530sed 's/^/| /' conftest.$ac_ext >&5
16531
16532( exit $ac_status )
16533{ echo "$as_me:$LINENO: result: no" >&5
16534echo "${ECHO_T}no" >&6; }
16535
16536fi
16537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16538fi
16539
16540
16541
Ronald Oussorenf8752642006-07-06 10:13:35 +000016542case $ac_sys_system/$ac_sys_release in
16543Darwin/*)
16544 _CUR_CFLAGS="${CFLAGS}"
16545 _CUR_LDFLAGS="${LDFLAGS}"
16546 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16547 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16548 ;;
16549esac
16550
Martin v. Löwiseba40652007-08-30 20:10:57 +000016551{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16552echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016553if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16554 echo $ECHO_N "(cached) $ECHO_C" >&6
16555else
16556 ac_check_lib_save_LIBS=$LIBS
16557LIBS="-lz $LIBS"
16558cat >conftest.$ac_ext <<_ACEOF
16559/* confdefs.h. */
16560_ACEOF
16561cat confdefs.h >>conftest.$ac_ext
16562cat >>conftest.$ac_ext <<_ACEOF
16563/* end confdefs.h. */
16564
Martin v. Löwiseba40652007-08-30 20:10:57 +000016565/* Override any GCC internal prototype to avoid an error.
16566 Use char because int might match the return type of a GCC
16567 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016568#ifdef __cplusplus
16569extern "C"
16570#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016571char inflateCopy ();
16572int
16573main ()
16574{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016575return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016576 ;
16577 return 0;
16578}
16579_ACEOF
16580rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016581if { (ac_try="$ac_link"
16582case "(($ac_try" in
16583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16584 *) ac_try_echo=$ac_try;;
16585esac
16586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16587 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016588 ac_status=$?
16589 grep -v '^ *+' conftest.er1 >conftest.err
16590 rm -f conftest.er1
16591 cat conftest.err >&5
16592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016593 (exit $ac_status); } && {
16594 test -z "$ac_c_werror_flag" ||
16595 test ! -s conftest.err
16596 } && test -s conftest$ac_exeext &&
16597 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016598 ac_cv_lib_z_inflateCopy=yes
16599else
16600 echo "$as_me: failed program was:" >&5
16601sed 's/^/| /' conftest.$ac_ext >&5
16602
Martin v. Löwiseba40652007-08-30 20:10:57 +000016603 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016605
16606rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016607 conftest$ac_exeext conftest.$ac_ext
16608LIBS=$ac_check_lib_save_LIBS
16609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016610{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16611echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016612if test $ac_cv_lib_z_inflateCopy = yes; then
16613
16614cat >>confdefs.h <<\_ACEOF
16615#define HAVE_ZLIB_COPY 1
16616_ACEOF
16617
16618fi
16619
16620
Ronald Oussorenf8752642006-07-06 10:13:35 +000016621case $ac_sys_system/$ac_sys_release in
16622Darwin/*)
16623 CFLAGS="${_CUR_CFLAGS}"
16624 LDFLAGS="${_CUR_LDFLAGS}"
16625 ;;
16626esac
16627
Martin v. Löwiseba40652007-08-30 20:10:57 +000016628{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16629echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016631/* confdefs.h. */
16632_ACEOF
16633cat confdefs.h >>conftest.$ac_ext
16634cat >>conftest.$ac_ext <<_ACEOF
16635/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016636
16637#include "confdefs.h"
16638#include <netdb.h>
16639
Martin v. Löwise9416172003-05-03 10:12:45 +000016640int
16641main ()
16642{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016643void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016644 ;
16645 return 0;
16646}
16647_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016648rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016649if { (ac_try="$ac_link"
16650case "(($ac_try" in
16651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16652 *) ac_try_echo=$ac_try;;
16653esac
16654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16655 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016657 grep -v '^ *+' conftest.er1 >conftest.err
16658 rm -f conftest.er1
16659 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016661 (exit $ac_status); } && {
16662 test -z "$ac_c_werror_flag" ||
16663 test ! -s conftest.err
16664 } && test -s conftest$ac_exeext &&
16665 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016666
16667cat >>confdefs.h <<\_ACEOF
16668#define HAVE_HSTRERROR 1
16669_ACEOF
16670
Martin v. Löwiseba40652007-08-30 20:10:57 +000016671 { echo "$as_me:$LINENO: result: yes" >&5
16672echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016673else
16674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016675sed 's/^/| /' conftest.$ac_ext >&5
16676
Martin v. Löwiseba40652007-08-30 20:10:57 +000016677 { echo "$as_me:$LINENO: result: no" >&5
16678echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016679
16680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016681
16682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016684
Martin v. Löwiseba40652007-08-30 20:10:57 +000016685{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16686echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016687cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016688/* confdefs.h. */
16689_ACEOF
16690cat confdefs.h >>conftest.$ac_ext
16691cat >>conftest.$ac_ext <<_ACEOF
16692/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016693
16694#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016695#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016696#include <sys/socket.h>
16697#include <netinet/in.h>
16698#include <arpa/inet.h>
16699
Martin v. Löwise9416172003-05-03 10:12:45 +000016700int
16701main ()
16702{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016703void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016704 ;
16705 return 0;
16706}
16707_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016708rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016709if { (ac_try="$ac_link"
16710case "(($ac_try" in
16711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16712 *) ac_try_echo=$ac_try;;
16713esac
16714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16715 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016717 grep -v '^ *+' conftest.er1 >conftest.err
16718 rm -f conftest.er1
16719 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016721 (exit $ac_status); } && {
16722 test -z "$ac_c_werror_flag" ||
16723 test ! -s conftest.err
16724 } && test -s conftest$ac_exeext &&
16725 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016726
16727cat >>confdefs.h <<\_ACEOF
16728#define HAVE_INET_ATON 1
16729_ACEOF
16730
Martin v. Löwiseba40652007-08-30 20:10:57 +000016731 { echo "$as_me:$LINENO: result: yes" >&5
16732echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016733else
16734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016735sed 's/^/| /' conftest.$ac_ext >&5
16736
Martin v. Löwiseba40652007-08-30 20:10:57 +000016737 { echo "$as_me:$LINENO: result: no" >&5
16738echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016739
16740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016741
16742rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016743 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016744
Martin v. Löwiseba40652007-08-30 20:10:57 +000016745{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16746echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016747cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016748/* confdefs.h. */
16749_ACEOF
16750cat confdefs.h >>conftest.$ac_ext
16751cat >>conftest.$ac_ext <<_ACEOF
16752/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016753
16754#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016755#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016756#include <sys/socket.h>
16757#include <netinet/in.h>
16758#include <arpa/inet.h>
16759
Martin v. Löwise9416172003-05-03 10:12:45 +000016760int
16761main ()
16762{
16763void* p = inet_pton
16764 ;
16765 return 0;
16766}
16767_ACEOF
16768rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016769if { (ac_try="$ac_compile"
16770case "(($ac_try" in
16771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16772 *) ac_try_echo=$ac_try;;
16773esac
16774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016777 grep -v '^ *+' conftest.er1 >conftest.err
16778 rm -f conftest.er1
16779 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016781 (exit $ac_status); } && {
16782 test -z "$ac_c_werror_flag" ||
16783 test ! -s conftest.err
16784 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016785
16786cat >>confdefs.h <<\_ACEOF
16787#define HAVE_INET_PTON 1
16788_ACEOF
16789
Martin v. Löwiseba40652007-08-30 20:10:57 +000016790 { echo "$as_me:$LINENO: result: yes" >&5
16791echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016792else
16793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016794sed 's/^/| /' conftest.$ac_ext >&5
16795
Martin v. Löwiseba40652007-08-30 20:10:57 +000016796 { echo "$as_me:$LINENO: result: no" >&5
16797echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016798
16799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016800
16801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016802
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016803# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016804{ echo "$as_me:$LINENO: checking for setgroups" >&5
16805echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016806cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016807/* confdefs.h. */
16808_ACEOF
16809cat confdefs.h >>conftest.$ac_ext
16810cat >>conftest.$ac_ext <<_ACEOF
16811/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016812
16813#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016814#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016815#ifdef HAVE_GRP_H
16816#include <grp.h>
16817#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016818
Martin v. Löwisd5843682002-11-21 20:41:28 +000016819int
16820main ()
16821{
16822void* p = setgroups
16823 ;
16824 return 0;
16825}
16826_ACEOF
16827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016828if { (ac_try="$ac_compile"
16829case "(($ac_try" in
16830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16831 *) ac_try_echo=$ac_try;;
16832esac
16833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016836 grep -v '^ *+' conftest.er1 >conftest.err
16837 rm -f conftest.er1
16838 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016840 (exit $ac_status); } && {
16841 test -z "$ac_c_werror_flag" ||
16842 test ! -s conftest.err
16843 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016844
16845cat >>confdefs.h <<\_ACEOF
16846#define HAVE_SETGROUPS 1
16847_ACEOF
16848
Martin v. Löwiseba40652007-08-30 20:10:57 +000016849 { echo "$as_me:$LINENO: result: yes" >&5
16850echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016851else
16852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016853sed 's/^/| /' conftest.$ac_ext >&5
16854
Martin v. Löwiseba40652007-08-30 20:10:57 +000016855 { echo "$as_me:$LINENO: result: no" >&5
16856echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016857
16858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016859
16860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016861
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016862# check for openpty and forkpty
16863
Martin v. Löwis11437992002-04-12 09:54:03 +000016864
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016865for ac_func in openpty
16866do
Martin v. Löwis11437992002-04-12 09:54:03 +000016867as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016868{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16869echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16870if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016871 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016872else
Martin v. Löwis11437992002-04-12 09:54:03 +000016873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016874/* confdefs.h. */
16875_ACEOF
16876cat confdefs.h >>conftest.$ac_ext
16877cat >>conftest.$ac_ext <<_ACEOF
16878/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016879/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16880 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16881#define $ac_func innocuous_$ac_func
16882
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016883/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016884 which can conflict with char $ac_func (); below.
16885 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016886 <limits.h> exists even on freestanding compilers. */
16887
16888#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016889# include <limits.h>
16890#else
16891# include <assert.h>
16892#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016893
16894#undef $ac_func
16895
Martin v. Löwiseba40652007-08-30 20:10:57 +000016896/* Override any GCC internal prototype to avoid an error.
16897 Use char because int might match the return type of a GCC
16898 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016899#ifdef __cplusplus
16900extern "C"
16901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016902char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016903/* The GNU C library defines this for functions which it implements
16904 to always fail with ENOSYS. Some functions are actually named
16905 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016906#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016907choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016908#endif
16909
Skip Montanaro6dead952003-09-25 14:50:04 +000016910int
16911main ()
16912{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016913return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016914 ;
16915 return 0;
16916}
16917_ACEOF
16918rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016919if { (ac_try="$ac_link"
16920case "(($ac_try" in
16921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16922 *) ac_try_echo=$ac_try;;
16923esac
16924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16925 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016927 grep -v '^ *+' conftest.er1 >conftest.err
16928 rm -f conftest.er1
16929 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016931 (exit $ac_status); } && {
16932 test -z "$ac_c_werror_flag" ||
16933 test ! -s conftest.err
16934 } && test -s conftest$ac_exeext &&
16935 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016936 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016937else
Martin v. Löwis11437992002-04-12 09:54:03 +000016938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016939sed 's/^/| /' conftest.$ac_ext >&5
16940
Martin v. Löwiseba40652007-08-30 20:10:57 +000016941 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016943
16944rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016945 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016947ac_res=`eval echo '${'$as_ac_var'}'`
16948 { echo "$as_me:$LINENO: result: $ac_res" >&5
16949echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016950if test `eval echo '${'$as_ac_var'}'` = yes; then
16951 cat >>confdefs.h <<_ACEOF
16952#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16953_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016954
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016955else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016956 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16957echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016958if test "${ac_cv_lib_util_openpty+set}" = set; then
16959 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016960else
Martin v. Löwis11437992002-04-12 09:54:03 +000016961 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016962LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016963cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016964/* confdefs.h. */
16965_ACEOF
16966cat confdefs.h >>conftest.$ac_ext
16967cat >>conftest.$ac_ext <<_ACEOF
16968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016969
Martin v. Löwiseba40652007-08-30 20:10:57 +000016970/* Override any GCC internal prototype to avoid an error.
16971 Use char because int might match the return type of a GCC
16972 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016973#ifdef __cplusplus
16974extern "C"
16975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016976char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016977int
16978main ()
16979{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016980return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016981 ;
16982 return 0;
16983}
16984_ACEOF
16985rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016986if { (ac_try="$ac_link"
16987case "(($ac_try" in
16988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16989 *) ac_try_echo=$ac_try;;
16990esac
16991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16992 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016994 grep -v '^ *+' conftest.er1 >conftest.err
16995 rm -f conftest.er1
16996 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016998 (exit $ac_status); } && {
16999 test -z "$ac_c_werror_flag" ||
17000 test ! -s conftest.err
17001 } && test -s conftest$ac_exeext &&
17002 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017003 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017004else
Martin v. Löwis11437992002-04-12 09:54:03 +000017005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017006sed 's/^/| /' conftest.$ac_ext >&5
17007
Martin v. Löwiseba40652007-08-30 20:10:57 +000017008 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017010
17011rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017013LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017015{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17016echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017017if test $ac_cv_lib_util_openpty = yes; then
17018 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017019#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017020_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017021 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017022else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017023 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17024echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017025if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17026 echo $ECHO_N "(cached) $ECHO_C" >&6
17027else
17028 ac_check_lib_save_LIBS=$LIBS
17029LIBS="-lbsd $LIBS"
17030cat >conftest.$ac_ext <<_ACEOF
17031/* confdefs.h. */
17032_ACEOF
17033cat confdefs.h >>conftest.$ac_ext
17034cat >>conftest.$ac_ext <<_ACEOF
17035/* end confdefs.h. */
17036
Martin v. Löwiseba40652007-08-30 20:10:57 +000017037/* Override any GCC internal prototype to avoid an error.
17038 Use char because int might match the return type of a GCC
17039 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017040#ifdef __cplusplus
17041extern "C"
17042#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017043char openpty ();
17044int
17045main ()
17046{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017047return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017048 ;
17049 return 0;
17050}
17051_ACEOF
17052rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017053if { (ac_try="$ac_link"
17054case "(($ac_try" in
17055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17056 *) ac_try_echo=$ac_try;;
17057esac
17058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17059 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017060 ac_status=$?
17061 grep -v '^ *+' conftest.er1 >conftest.err
17062 rm -f conftest.er1
17063 cat conftest.err >&5
17064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017065 (exit $ac_status); } && {
17066 test -z "$ac_c_werror_flag" ||
17067 test ! -s conftest.err
17068 } && test -s conftest$ac_exeext &&
17069 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017070 ac_cv_lib_bsd_openpty=yes
17071else
17072 echo "$as_me: failed program was:" >&5
17073sed 's/^/| /' conftest.$ac_ext >&5
17074
Martin v. Löwiseba40652007-08-30 20:10:57 +000017075 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017077
17078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017079 conftest$ac_exeext conftest.$ac_ext
17080LIBS=$ac_check_lib_save_LIBS
17081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017082{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17083echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017084if test $ac_cv_lib_bsd_openpty = yes; then
17085 cat >>confdefs.h <<\_ACEOF
17086#define HAVE_OPENPTY 1
17087_ACEOF
17088 LIBS="$LIBS -lbsd"
17089fi
17090
17091
17092fi
17093
Fred Drake8cef4cf2000-06-28 16:40:38 +000017094
17095fi
17096done
17097
Martin v. Löwis11437992002-04-12 09:54:03 +000017098
Fred Drake8cef4cf2000-06-28 16:40:38 +000017099for ac_func in forkpty
17100do
Martin v. Löwis11437992002-04-12 09:54:03 +000017101as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017102{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17103echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17104if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017105 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017106else
Martin v. Löwis11437992002-04-12 09:54:03 +000017107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017108/* confdefs.h. */
17109_ACEOF
17110cat confdefs.h >>conftest.$ac_ext
17111cat >>conftest.$ac_ext <<_ACEOF
17112/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017113/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17114 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17115#define $ac_func innocuous_$ac_func
17116
Fred Drake8cef4cf2000-06-28 16:40:38 +000017117/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017118 which can conflict with char $ac_func (); below.
17119 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017120 <limits.h> exists even on freestanding compilers. */
17121
17122#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017123# include <limits.h>
17124#else
17125# include <assert.h>
17126#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017127
17128#undef $ac_func
17129
Martin v. Löwiseba40652007-08-30 20:10:57 +000017130/* Override any GCC internal prototype to avoid an error.
17131 Use char because int might match the return type of a GCC
17132 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017133#ifdef __cplusplus
17134extern "C"
17135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017136char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017137/* The GNU C library defines this for functions which it implements
17138 to always fail with ENOSYS. Some functions are actually named
17139 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017140#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017141choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017142#endif
17143
Skip Montanaro6dead952003-09-25 14:50:04 +000017144int
17145main ()
17146{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017147return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017148 ;
17149 return 0;
17150}
17151_ACEOF
17152rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017153if { (ac_try="$ac_link"
17154case "(($ac_try" in
17155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17156 *) ac_try_echo=$ac_try;;
17157esac
17158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17159 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017161 grep -v '^ *+' conftest.er1 >conftest.err
17162 rm -f conftest.er1
17163 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017165 (exit $ac_status); } && {
17166 test -z "$ac_c_werror_flag" ||
17167 test ! -s conftest.err
17168 } && test -s conftest$ac_exeext &&
17169 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017170 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017171else
Martin v. Löwis11437992002-04-12 09:54:03 +000017172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017173sed 's/^/| /' conftest.$ac_ext >&5
17174
Martin v. Löwiseba40652007-08-30 20:10:57 +000017175 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017177
17178rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017179 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017181ac_res=`eval echo '${'$as_ac_var'}'`
17182 { echo "$as_me:$LINENO: result: $ac_res" >&5
17183echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017184if test `eval echo '${'$as_ac_var'}'` = yes; then
17185 cat >>confdefs.h <<_ACEOF
17186#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17187_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017188
Fred Drake8cef4cf2000-06-28 16:40:38 +000017189else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017190 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17191echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017192if test "${ac_cv_lib_util_forkpty+set}" = set; then
17193 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017194else
Martin v. Löwis11437992002-04-12 09:54:03 +000017195 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017196LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017197cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017198/* confdefs.h. */
17199_ACEOF
17200cat confdefs.h >>conftest.$ac_ext
17201cat >>conftest.$ac_ext <<_ACEOF
17202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017203
Martin v. Löwiseba40652007-08-30 20:10:57 +000017204/* Override any GCC internal prototype to avoid an error.
17205 Use char because int might match the return type of a GCC
17206 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017207#ifdef __cplusplus
17208extern "C"
17209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017210char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017211int
17212main ()
17213{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017214return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017215 ;
17216 return 0;
17217}
17218_ACEOF
17219rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017220if { (ac_try="$ac_link"
17221case "(($ac_try" in
17222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17223 *) ac_try_echo=$ac_try;;
17224esac
17225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17226 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017228 grep -v '^ *+' conftest.er1 >conftest.err
17229 rm -f conftest.er1
17230 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017232 (exit $ac_status); } && {
17233 test -z "$ac_c_werror_flag" ||
17234 test ! -s conftest.err
17235 } && test -s conftest$ac_exeext &&
17236 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017237 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017238else
Martin v. Löwis11437992002-04-12 09:54:03 +000017239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017240sed 's/^/| /' conftest.$ac_ext >&5
17241
Martin v. Löwiseba40652007-08-30 20:10:57 +000017242 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017244
17245rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017246 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017247LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017249{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17250echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017251if test $ac_cv_lib_util_forkpty = yes; then
17252 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017253#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017254_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017255 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017256else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017257 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17258echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017259if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17260 echo $ECHO_N "(cached) $ECHO_C" >&6
17261else
17262 ac_check_lib_save_LIBS=$LIBS
17263LIBS="-lbsd $LIBS"
17264cat >conftest.$ac_ext <<_ACEOF
17265/* confdefs.h. */
17266_ACEOF
17267cat confdefs.h >>conftest.$ac_ext
17268cat >>conftest.$ac_ext <<_ACEOF
17269/* end confdefs.h. */
17270
Martin v. Löwiseba40652007-08-30 20:10:57 +000017271/* Override any GCC internal prototype to avoid an error.
17272 Use char because int might match the return type of a GCC
17273 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017274#ifdef __cplusplus
17275extern "C"
17276#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017277char forkpty ();
17278int
17279main ()
17280{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017281return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017282 ;
17283 return 0;
17284}
17285_ACEOF
17286rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017287if { (ac_try="$ac_link"
17288case "(($ac_try" in
17289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17290 *) ac_try_echo=$ac_try;;
17291esac
17292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17293 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017294 ac_status=$?
17295 grep -v '^ *+' conftest.er1 >conftest.err
17296 rm -f conftest.er1
17297 cat conftest.err >&5
17298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017299 (exit $ac_status); } && {
17300 test -z "$ac_c_werror_flag" ||
17301 test ! -s conftest.err
17302 } && test -s conftest$ac_exeext &&
17303 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017304 ac_cv_lib_bsd_forkpty=yes
17305else
17306 echo "$as_me: failed program was:" >&5
17307sed 's/^/| /' conftest.$ac_ext >&5
17308
Martin v. Löwiseba40652007-08-30 20:10:57 +000017309 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017311
17312rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017313 conftest$ac_exeext conftest.$ac_ext
17314LIBS=$ac_check_lib_save_LIBS
17315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017316{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17317echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017318if test $ac_cv_lib_bsd_forkpty = yes; then
17319 cat >>confdefs.h <<\_ACEOF
17320#define HAVE_FORKPTY 1
17321_ACEOF
17322 LIBS="$LIBS -lbsd"
17323fi
17324
17325
17326fi
17327
Fred Drake8cef4cf2000-06-28 16:40:38 +000017328
17329fi
17330done
17331
Jack Jansendd19cf82001-12-06 22:36:17 +000017332
Brett Cannonaa5778d2008-03-18 04:09:00 +000017333# Stuff for expat.
17334
17335for ac_func in memmove
17336do
17337as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17338{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17339echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17340if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17341 echo $ECHO_N "(cached) $ECHO_C" >&6
17342else
17343 cat >conftest.$ac_ext <<_ACEOF
17344/* confdefs.h. */
17345_ACEOF
17346cat confdefs.h >>conftest.$ac_ext
17347cat >>conftest.$ac_ext <<_ACEOF
17348/* end confdefs.h. */
17349/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17350 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17351#define $ac_func innocuous_$ac_func
17352
17353/* System header to define __stub macros and hopefully few prototypes,
17354 which can conflict with char $ac_func (); below.
17355 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17356 <limits.h> exists even on freestanding compilers. */
17357
17358#ifdef __STDC__
17359# include <limits.h>
17360#else
17361# include <assert.h>
17362#endif
17363
17364#undef $ac_func
17365
17366/* Override any GCC internal prototype to avoid an error.
17367 Use char because int might match the return type of a GCC
17368 builtin and then its argument prototype would still apply. */
17369#ifdef __cplusplus
17370extern "C"
17371#endif
17372char $ac_func ();
17373/* The GNU C library defines this for functions which it implements
17374 to always fail with ENOSYS. Some functions are actually named
17375 something starting with __ and the normal name is an alias. */
17376#if defined __stub_$ac_func || defined __stub___$ac_func
17377choke me
17378#endif
17379
17380int
17381main ()
17382{
17383return $ac_func ();
17384 ;
17385 return 0;
17386}
17387_ACEOF
17388rm -f conftest.$ac_objext conftest$ac_exeext
17389if { (ac_try="$ac_link"
17390case "(($ac_try" in
17391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17392 *) ac_try_echo=$ac_try;;
17393esac
17394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17395 (eval "$ac_link") 2>conftest.er1
17396 ac_status=$?
17397 grep -v '^ *+' conftest.er1 >conftest.err
17398 rm -f conftest.er1
17399 cat conftest.err >&5
17400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17401 (exit $ac_status); } && {
17402 test -z "$ac_c_werror_flag" ||
17403 test ! -s conftest.err
17404 } && test -s conftest$ac_exeext &&
17405 $as_test_x conftest$ac_exeext; then
17406 eval "$as_ac_var=yes"
17407else
17408 echo "$as_me: failed program was:" >&5
17409sed 's/^/| /' conftest.$ac_ext >&5
17410
17411 eval "$as_ac_var=no"
17412fi
17413
17414rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17415 conftest$ac_exeext conftest.$ac_ext
17416fi
17417ac_res=`eval echo '${'$as_ac_var'}'`
17418 { echo "$as_me:$LINENO: result: $ac_res" >&5
17419echo "${ECHO_T}$ac_res" >&6; }
17420if test `eval echo '${'$as_ac_var'}'` = yes; then
17421 cat >>confdefs.h <<_ACEOF
17422#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17423_ACEOF
17424
17425fi
17426done
17427
17428
Michael W. Hudson54241132001-12-07 15:38:26 +000017429# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017430
17431
17432
17433
17434
17435
Fred Drake8cef4cf2000-06-28 16:40:38 +000017436for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17437do
Martin v. Löwis11437992002-04-12 09:54:03 +000017438as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017439{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17440echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17441if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017442 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017443else
Martin v. Löwis11437992002-04-12 09:54:03 +000017444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017445/* confdefs.h. */
17446_ACEOF
17447cat confdefs.h >>conftest.$ac_ext
17448cat >>conftest.$ac_ext <<_ACEOF
17449/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017450/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17451 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17452#define $ac_func innocuous_$ac_func
17453
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017454/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017455 which can conflict with char $ac_func (); below.
17456 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017457 <limits.h> exists even on freestanding compilers. */
17458
17459#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017460# include <limits.h>
17461#else
17462# include <assert.h>
17463#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017464
17465#undef $ac_func
17466
Martin v. Löwiseba40652007-08-30 20:10:57 +000017467/* Override any GCC internal prototype to avoid an error.
17468 Use char because int might match the return type of a GCC
17469 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017470#ifdef __cplusplus
17471extern "C"
17472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017473char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017474/* The GNU C library defines this for functions which it implements
17475 to always fail with ENOSYS. Some functions are actually named
17476 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017477#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017478choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017479#endif
17480
Skip Montanaro6dead952003-09-25 14:50:04 +000017481int
17482main ()
17483{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017484return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017485 ;
17486 return 0;
17487}
17488_ACEOF
17489rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017490if { (ac_try="$ac_link"
17491case "(($ac_try" in
17492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17493 *) ac_try_echo=$ac_try;;
17494esac
17495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17496 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017498 grep -v '^ *+' conftest.er1 >conftest.err
17499 rm -f conftest.er1
17500 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017502 (exit $ac_status); } && {
17503 test -z "$ac_c_werror_flag" ||
17504 test ! -s conftest.err
17505 } && test -s conftest$ac_exeext &&
17506 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017507 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017508else
Martin v. Löwis11437992002-04-12 09:54:03 +000017509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017510sed 's/^/| /' conftest.$ac_ext >&5
17511
Martin v. Löwiseba40652007-08-30 20:10:57 +000017512 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017514
17515rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017516 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017518ac_res=`eval echo '${'$as_ac_var'}'`
17519 { echo "$as_me:$LINENO: result: $ac_res" >&5
17520echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017521if test `eval echo '${'$as_ac_var'}'` = yes; then
17522 cat >>confdefs.h <<_ACEOF
17523#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17524_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017525
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017526fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017527done
17528
Michael W. Hudson54241132001-12-07 15:38:26 +000017529
Martin v. Löwis11437992002-04-12 09:54:03 +000017530
17531
17532
Brett Cannonaa5778d2008-03-18 04:09:00 +000017533for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000017534do
Martin v. Löwis11437992002-04-12 09:54:03 +000017535as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017536{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17537echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17538if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017539 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017540else
Martin v. Löwis11437992002-04-12 09:54:03 +000017541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017542/* confdefs.h. */
17543_ACEOF
17544cat confdefs.h >>conftest.$ac_ext
17545cat >>conftest.$ac_ext <<_ACEOF
17546/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017547/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17548 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17549#define $ac_func innocuous_$ac_func
17550
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017551/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017552 which can conflict with char $ac_func (); below.
17553 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017554 <limits.h> exists even on freestanding compilers. */
17555
17556#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017557# include <limits.h>
17558#else
17559# include <assert.h>
17560#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017561
17562#undef $ac_func
17563
Martin v. Löwiseba40652007-08-30 20:10:57 +000017564/* Override any GCC internal prototype to avoid an error.
17565 Use char because int might match the return type of a GCC
17566 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017567#ifdef __cplusplus
17568extern "C"
17569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017570char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017571/* The GNU C library defines this for functions which it implements
17572 to always fail with ENOSYS. Some functions are actually named
17573 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017574#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017575choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017576#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017577
Skip Montanaro6dead952003-09-25 14:50:04 +000017578int
17579main ()
17580{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017581return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017582 ;
17583 return 0;
17584}
17585_ACEOF
17586rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017587if { (ac_try="$ac_link"
17588case "(($ac_try" in
17589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17590 *) ac_try_echo=$ac_try;;
17591esac
17592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17593 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017595 grep -v '^ *+' conftest.er1 >conftest.err
17596 rm -f conftest.er1
17597 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017599 (exit $ac_status); } && {
17600 test -z "$ac_c_werror_flag" ||
17601 test ! -s conftest.err
17602 } && test -s conftest$ac_exeext &&
17603 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017604 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017605else
Martin v. Löwis11437992002-04-12 09:54:03 +000017606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017607sed 's/^/| /' conftest.$ac_ext >&5
17608
Martin v. Löwiseba40652007-08-30 20:10:57 +000017609 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017611
17612rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017613 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017615ac_res=`eval echo '${'$as_ac_var'}'`
17616 { echo "$as_me:$LINENO: result: $ac_res" >&5
17617echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017618if test `eval echo '${'$as_ac_var'}'` = yes; then
17619 cat >>confdefs.h <<_ACEOF
17620#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17621_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017622
Martin v. Löwis1142de32002-03-29 16:28:31 +000017623else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017624 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017625 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017626 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17627 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017628esac
17629
Martin v. Löwis1142de32002-03-29 16:28:31 +000017630fi
17631done
17632
17633
Martin v. Löwis11437992002-04-12 09:54:03 +000017634
Martin v. Löwis1142de32002-03-29 16:28:31 +000017635for ac_func in getpgrp
17636do
Martin v. Löwis11437992002-04-12 09:54:03 +000017637as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017638{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17639echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17640if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017642else
Martin v. Löwis11437992002-04-12 09:54:03 +000017643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017644/* confdefs.h. */
17645_ACEOF
17646cat confdefs.h >>conftest.$ac_ext
17647cat >>conftest.$ac_ext <<_ACEOF
17648/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017649/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17650 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17651#define $ac_func innocuous_$ac_func
17652
Martin v. Löwis1142de32002-03-29 16:28:31 +000017653/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017654 which can conflict with char $ac_func (); below.
17655 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017656 <limits.h> exists even on freestanding compilers. */
17657
17658#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017659# include <limits.h>
17660#else
17661# include <assert.h>
17662#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017663
17664#undef $ac_func
17665
Martin v. Löwiseba40652007-08-30 20:10:57 +000017666/* Override any GCC internal prototype to avoid an error.
17667 Use char because int might match the return type of a GCC
17668 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017669#ifdef __cplusplus
17670extern "C"
17671#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017672char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017673/* The GNU C library defines this for functions which it implements
17674 to always fail with ENOSYS. Some functions are actually named
17675 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017676#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017677choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017678#endif
17679
Skip Montanaro6dead952003-09-25 14:50:04 +000017680int
17681main ()
17682{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017683return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017684 ;
17685 return 0;
17686}
17687_ACEOF
17688rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017689if { (ac_try="$ac_link"
17690case "(($ac_try" in
17691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17692 *) ac_try_echo=$ac_try;;
17693esac
17694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17695 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017697 grep -v '^ *+' conftest.er1 >conftest.err
17698 rm -f conftest.er1
17699 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017701 (exit $ac_status); } && {
17702 test -z "$ac_c_werror_flag" ||
17703 test ! -s conftest.err
17704 } && test -s conftest$ac_exeext &&
17705 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017706 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017707else
Martin v. Löwis11437992002-04-12 09:54:03 +000017708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017709sed 's/^/| /' conftest.$ac_ext >&5
17710
Martin v. Löwiseba40652007-08-30 20:10:57 +000017711 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017713
17714rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017715 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017717ac_res=`eval echo '${'$as_ac_var'}'`
17718 { echo "$as_me:$LINENO: result: $ac_res" >&5
17719echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017720if test `eval echo '${'$as_ac_var'}'` = yes; then
17721 cat >>confdefs.h <<_ACEOF
17722#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17723_ACEOF
17724 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017725/* confdefs.h. */
17726_ACEOF
17727cat confdefs.h >>conftest.$ac_ext
17728cat >>conftest.$ac_ext <<_ACEOF
17729/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017730#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017731int
17732main ()
17733{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017734getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017735 ;
17736 return 0;
17737}
17738_ACEOF
17739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017740if { (ac_try="$ac_compile"
17741case "(($ac_try" in
17742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17743 *) ac_try_echo=$ac_try;;
17744esac
17745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017748 grep -v '^ *+' conftest.er1 >conftest.err
17749 rm -f conftest.er1
17750 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017752 (exit $ac_status); } && {
17753 test -z "$ac_c_werror_flag" ||
17754 test ! -s conftest.err
17755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017756
17757cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017758#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017759_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017760
Martin v. Löwis11437992002-04-12 09:54:03 +000017761
Guido van Rossumf78abae1997-01-21 22:02:36 +000017762else
Martin v. Löwis11437992002-04-12 09:54:03 +000017763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017764sed 's/^/| /' conftest.$ac_ext >&5
17765
Martin v. Löwiseba40652007-08-30 20:10:57 +000017766
Guido van Rossum627b2d71993-12-24 10:39:16 +000017767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017768
17769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017770
Guido van Rossum627b2d71993-12-24 10:39:16 +000017771fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017772done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017773
Jack Jansen150753c2003-03-29 22:07:47 +000017774
17775for ac_func in setpgrp
17776do
17777as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017778{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17779echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17780if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017781 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017782else
Martin v. Löwis11437992002-04-12 09:54:03 +000017783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017784/* confdefs.h. */
17785_ACEOF
17786cat confdefs.h >>conftest.$ac_ext
17787cat >>conftest.$ac_ext <<_ACEOF
17788/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017789/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17790 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17791#define $ac_func innocuous_$ac_func
17792
Jack Jansen150753c2003-03-29 22:07:47 +000017793/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017794 which can conflict with char $ac_func (); below.
17795 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017796 <limits.h> exists even on freestanding compilers. */
17797
17798#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017799# include <limits.h>
17800#else
17801# include <assert.h>
17802#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017803
17804#undef $ac_func
17805
Martin v. Löwiseba40652007-08-30 20:10:57 +000017806/* Override any GCC internal prototype to avoid an error.
17807 Use char because int might match the return type of a GCC
17808 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017809#ifdef __cplusplus
17810extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017811#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017812char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017813/* The GNU C library defines this for functions which it implements
17814 to always fail with ENOSYS. Some functions are actually named
17815 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017816#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017817choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017818#endif
17819
Skip Montanaro6dead952003-09-25 14:50:04 +000017820int
17821main ()
17822{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017823return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017824 ;
17825 return 0;
17826}
17827_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017828rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017829if { (ac_try="$ac_link"
17830case "(($ac_try" in
17831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17832 *) ac_try_echo=$ac_try;;
17833esac
17834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17835 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017837 grep -v '^ *+' conftest.er1 >conftest.err
17838 rm -f conftest.er1
17839 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017841 (exit $ac_status); } && {
17842 test -z "$ac_c_werror_flag" ||
17843 test ! -s conftest.err
17844 } && test -s conftest$ac_exeext &&
17845 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017846 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017847else
Jack Jansen150753c2003-03-29 22:07:47 +000017848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017849sed 's/^/| /' conftest.$ac_ext >&5
17850
Martin v. Löwiseba40652007-08-30 20:10:57 +000017851 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017853
17854rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017855 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017857ac_res=`eval echo '${'$as_ac_var'}'`
17858 { echo "$as_me:$LINENO: result: $ac_res" >&5
17859echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017860if test `eval echo '${'$as_ac_var'}'` = yes; then
17861 cat >>confdefs.h <<_ACEOF
17862#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17863_ACEOF
17864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017865/* confdefs.h. */
17866_ACEOF
17867cat confdefs.h >>conftest.$ac_ext
17868cat >>conftest.$ac_ext <<_ACEOF
17869/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017870#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017871int
17872main ()
17873{
17874setpgrp(0,0);
17875 ;
17876 return 0;
17877}
17878_ACEOF
17879rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017880if { (ac_try="$ac_compile"
17881case "(($ac_try" in
17882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17883 *) ac_try_echo=$ac_try;;
17884esac
17885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17886 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017888 grep -v '^ *+' conftest.er1 >conftest.err
17889 rm -f conftest.er1
17890 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017892 (exit $ac_status); } && {
17893 test -z "$ac_c_werror_flag" ||
17894 test ! -s conftest.err
17895 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017896
17897cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017898#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017899_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017900
Jack Jansen150753c2003-03-29 22:07:47 +000017901
17902else
17903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017904sed 's/^/| /' conftest.$ac_ext >&5
17905
Martin v. Löwiseba40652007-08-30 20:10:57 +000017906
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017908
17909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017910
17911fi
17912done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017913
Martin v. Löwis11437992002-04-12 09:54:03 +000017914
Thomas Wouters3a584202000-08-05 23:28:51 +000017915for ac_func in gettimeofday
17916do
Martin v. Löwis11437992002-04-12 09:54:03 +000017917as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017918{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17919echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17920if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017922else
Martin v. Löwis11437992002-04-12 09:54:03 +000017923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017924/* confdefs.h. */
17925_ACEOF
17926cat confdefs.h >>conftest.$ac_ext
17927cat >>conftest.$ac_ext <<_ACEOF
17928/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017929/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17930 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17931#define $ac_func innocuous_$ac_func
17932
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017933/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017934 which can conflict with char $ac_func (); below.
17935 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017936 <limits.h> exists even on freestanding compilers. */
17937
17938#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017939# include <limits.h>
17940#else
17941# include <assert.h>
17942#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017943
17944#undef $ac_func
17945
Martin v. Löwiseba40652007-08-30 20:10:57 +000017946/* Override any GCC internal prototype to avoid an error.
17947 Use char because int might match the return type of a GCC
17948 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017949#ifdef __cplusplus
17950extern "C"
17951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017952char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017953/* The GNU C library defines this for functions which it implements
17954 to always fail with ENOSYS. Some functions are actually named
17955 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017956#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017957choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017958#endif
17959
Skip Montanaro6dead952003-09-25 14:50:04 +000017960int
17961main ()
17962{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017963return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017964 ;
17965 return 0;
17966}
17967_ACEOF
17968rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017969if { (ac_try="$ac_link"
17970case "(($ac_try" in
17971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17972 *) ac_try_echo=$ac_try;;
17973esac
17974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17975 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017977 grep -v '^ *+' conftest.er1 >conftest.err
17978 rm -f conftest.er1
17979 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017981 (exit $ac_status); } && {
17982 test -z "$ac_c_werror_flag" ||
17983 test ! -s conftest.err
17984 } && test -s conftest$ac_exeext &&
17985 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017986 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017987else
Martin v. Löwis11437992002-04-12 09:54:03 +000017988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017989sed 's/^/| /' conftest.$ac_ext >&5
17990
Martin v. Löwiseba40652007-08-30 20:10:57 +000017991 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017993
17994rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017995 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017997ac_res=`eval echo '${'$as_ac_var'}'`
17998 { echo "$as_me:$LINENO: result: $ac_res" >&5
17999echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018000if test `eval echo '${'$as_ac_var'}'` = yes; then
18001 cat >>confdefs.h <<_ACEOF
18002#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18003_ACEOF
18004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018005/* confdefs.h. */
18006_ACEOF
18007cat confdefs.h >>conftest.$ac_ext
18008cat >>conftest.$ac_ext <<_ACEOF
18009/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018010#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018011int
18012main ()
18013{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018014gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018015 ;
18016 return 0;
18017}
18018_ACEOF
18019rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018020if { (ac_try="$ac_compile"
18021case "(($ac_try" in
18022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18023 *) ac_try_echo=$ac_try;;
18024esac
18025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018028 grep -v '^ *+' conftest.er1 >conftest.err
18029 rm -f conftest.er1
18030 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018032 (exit $ac_status); } && {
18033 test -z "$ac_c_werror_flag" ||
18034 test ! -s conftest.err
18035 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018036 :
18037else
Martin v. Löwis11437992002-04-12 09:54:03 +000018038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018039sed 's/^/| /' conftest.$ac_ext >&5
18040
Martin v. Löwis11437992002-04-12 09:54:03 +000018041
18042cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018043#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018044_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018045
Martin v. Löwis11437992002-04-12 09:54:03 +000018046
Guido van Rossum627b2d71993-12-24 10:39:16 +000018047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018048
18049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018050
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018051fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018052done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018053
Michael W. Hudson54241132001-12-07 15:38:26 +000018054
Martin v. Löwiseba40652007-08-30 20:10:57 +000018055{ echo "$as_me:$LINENO: checking for major" >&5
18056echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018058/* confdefs.h. */
18059_ACEOF
18060cat confdefs.h >>conftest.$ac_ext
18061cat >>conftest.$ac_ext <<_ACEOF
18062/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018063
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018064#if defined(MAJOR_IN_MKDEV)
18065#include <sys/mkdev.h>
18066#elif defined(MAJOR_IN_SYSMACROS)
18067#include <sys/sysmacros.h>
18068#else
18069#include <sys/types.h>
18070#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018071
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018072int
18073main ()
18074{
18075
18076 makedev(major(0),minor(0));
18077
18078 ;
18079 return 0;
18080}
18081_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018082rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018083if { (ac_try="$ac_link"
18084case "(($ac_try" in
18085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18086 *) ac_try_echo=$ac_try;;
18087esac
18088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18089 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018091 grep -v '^ *+' conftest.er1 >conftest.err
18092 rm -f conftest.er1
18093 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018095 (exit $ac_status); } && {
18096 test -z "$ac_c_werror_flag" ||
18097 test ! -s conftest.err
18098 } && test -s conftest$ac_exeext &&
18099 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018100
18101
18102cat >>confdefs.h <<\_ACEOF
18103#define HAVE_DEVICE_MACROS 1
18104_ACEOF
18105
Martin v. Löwiseba40652007-08-30 20:10:57 +000018106 { echo "$as_me:$LINENO: result: yes" >&5
18107echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018108
18109else
18110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018111sed 's/^/| /' conftest.$ac_ext >&5
18112
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018113
Martin v. Löwiseba40652007-08-30 20:10:57 +000018114 { echo "$as_me:$LINENO: result: no" >&5
18115echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018116
18117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018118
18119rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018120 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018121
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018122# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018123# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018124{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18125echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018126cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018127/* confdefs.h. */
18128_ACEOF
18129cat confdefs.h >>conftest.$ac_ext
18130cat >>conftest.$ac_ext <<_ACEOF
18131/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018132
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018133#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018134#include <sys/socket.h>
18135#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018136#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018137
Martin v. Löwis11437992002-04-12 09:54:03 +000018138int
18139main ()
18140{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018141
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018142getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018143
Martin v. Löwis11437992002-04-12 09:54:03 +000018144 ;
18145 return 0;
18146}
18147_ACEOF
18148rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018149if { (ac_try="$ac_link"
18150case "(($ac_try" in
18151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18152 *) ac_try_echo=$ac_try;;
18153esac
18154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18155 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018157 grep -v '^ *+' conftest.er1 >conftest.err
18158 rm -f conftest.er1
18159 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018161 (exit $ac_status); } && {
18162 test -z "$ac_c_werror_flag" ||
18163 test ! -s conftest.err
18164 } && test -s conftest$ac_exeext &&
18165 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018166
Martin v. Löwiseba40652007-08-30 20:10:57 +000018167{ echo "$as_me:$LINENO: result: yes" >&5
18168echo "${ECHO_T}yes" >&6; }
18169{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18170echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018171if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018172 { echo "$as_me:$LINENO: result: buggy" >&5
18173echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018174buggygetaddrinfo=yes
18175else
Martin v. Löwis11437992002-04-12 09:54:03 +000018176 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018177/* confdefs.h. */
18178_ACEOF
18179cat confdefs.h >>conftest.$ac_ext
18180cat >>conftest.$ac_ext <<_ACEOF
18181/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018182
18183#include <sys/types.h>
18184#include <netdb.h>
18185#include <string.h>
18186#include <sys/socket.h>
18187#include <netinet/in.h>
18188
18189main()
18190{
18191 int passive, gaierr, inet4 = 0, inet6 = 0;
18192 struct addrinfo hints, *ai, *aitop;
18193 char straddr[INET6_ADDRSTRLEN], strport[16];
18194
18195 for (passive = 0; passive <= 1; passive++) {
18196 memset(&hints, 0, sizeof(hints));
18197 hints.ai_family = AF_UNSPEC;
18198 hints.ai_flags = passive ? AI_PASSIVE : 0;
18199 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018200 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018201 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18202 (void)gai_strerror(gaierr);
18203 goto bad;
18204 }
18205 for (ai = aitop; ai; ai = ai->ai_next) {
18206 if (ai->ai_addr == NULL ||
18207 ai->ai_addrlen == 0 ||
18208 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18209 straddr, sizeof(straddr), strport, sizeof(strport),
18210 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18211 goto bad;
18212 }
18213 switch (ai->ai_family) {
18214 case AF_INET:
18215 if (strcmp(strport, "54321") != 0) {
18216 goto bad;
18217 }
18218 if (passive) {
18219 if (strcmp(straddr, "0.0.0.0") != 0) {
18220 goto bad;
18221 }
18222 } else {
18223 if (strcmp(straddr, "127.0.0.1") != 0) {
18224 goto bad;
18225 }
18226 }
18227 inet4++;
18228 break;
18229 case AF_INET6:
18230 if (strcmp(strport, "54321") != 0) {
18231 goto bad;
18232 }
18233 if (passive) {
18234 if (strcmp(straddr, "::") != 0) {
18235 goto bad;
18236 }
18237 } else {
18238 if (strcmp(straddr, "::1") != 0) {
18239 goto bad;
18240 }
18241 }
18242 inet6++;
18243 break;
18244 case AF_UNSPEC:
18245 goto bad;
18246 break;
18247 default:
18248 /* another family support? */
18249 break;
18250 }
18251 }
18252 }
18253
18254 if (!(inet4 == 0 || inet4 == 2))
18255 goto bad;
18256 if (!(inet6 == 0 || inet6 == 2))
18257 goto bad;
18258
18259 if (aitop)
18260 freeaddrinfo(aitop);
18261 exit(0);
18262
18263 bad:
18264 if (aitop)
18265 freeaddrinfo(aitop);
18266 exit(1);
18267}
18268
Martin v. Löwis11437992002-04-12 09:54:03 +000018269_ACEOF
18270rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018271if { (ac_try="$ac_link"
18272case "(($ac_try" in
18273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18274 *) ac_try_echo=$ac_try;;
18275esac
18276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18277 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018278 ac_status=$?
18279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18280 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018281 { (case "(($ac_try" in
18282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18283 *) ac_try_echo=$ac_try;;
18284esac
18285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18286 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018287 ac_status=$?
18288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18289 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018290 { echo "$as_me:$LINENO: result: good" >&5
18291echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018292buggygetaddrinfo=no
18293else
Martin v. Löwis11437992002-04-12 09:54:03 +000018294 echo "$as_me: program exited with status $ac_status" >&5
18295echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018296sed 's/^/| /' conftest.$ac_ext >&5
18297
Martin v. Löwis11437992002-04-12 09:54:03 +000018298( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018299{ echo "$as_me:$LINENO: result: buggy" >&5
18300echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018301buggygetaddrinfo=yes
18302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018303rm -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 +000018304fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018305
18306
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018307else
Martin v. Löwis11437992002-04-12 09:54:03 +000018308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018309sed 's/^/| /' conftest.$ac_ext >&5
18310
Martin v. Löwis11437992002-04-12 09:54:03 +000018311
Martin v. Löwiseba40652007-08-30 20:10:57 +000018312{ echo "$as_me:$LINENO: result: no" >&5
18313echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018314buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018315
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018317
18318rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018319 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018320
18321if test "$buggygetaddrinfo" = "yes"; then
18322 if test "$ipv6" = "yes"; then
18323 echo 'Fatal: You must get working getaddrinfo() function.'
18324 echo ' or you can specify "--disable-ipv6"'.
18325 exit 1
18326 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018327else
Martin v. Löwis11437992002-04-12 09:54:03 +000018328
18329cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018330#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018331_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018332
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018333fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018334
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018335for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018336do
Martin v. Löwis11437992002-04-12 09:54:03 +000018337as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018338{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18339echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18340if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018341 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018342else
Martin v. Löwis11437992002-04-12 09:54:03 +000018343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018344/* confdefs.h. */
18345_ACEOF
18346cat confdefs.h >>conftest.$ac_ext
18347cat >>conftest.$ac_ext <<_ACEOF
18348/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018349/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18350 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18351#define $ac_func innocuous_$ac_func
18352
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018353/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018354 which can conflict with char $ac_func (); below.
18355 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018356 <limits.h> exists even on freestanding compilers. */
18357
18358#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018359# include <limits.h>
18360#else
18361# include <assert.h>
18362#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018363
18364#undef $ac_func
18365
Martin v. Löwiseba40652007-08-30 20:10:57 +000018366/* Override any GCC internal prototype to avoid an error.
18367 Use char because int might match the return type of a GCC
18368 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018369#ifdef __cplusplus
18370extern "C"
18371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018372char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018373/* The GNU C library defines this for functions which it implements
18374 to always fail with ENOSYS. Some functions are actually named
18375 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018376#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018377choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018378#endif
18379
Skip Montanaro6dead952003-09-25 14:50:04 +000018380int
18381main ()
18382{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018383return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018384 ;
18385 return 0;
18386}
18387_ACEOF
18388rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018389if { (ac_try="$ac_link"
18390case "(($ac_try" in
18391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18392 *) ac_try_echo=$ac_try;;
18393esac
18394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18395 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018396 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018397 grep -v '^ *+' conftest.er1 >conftest.err
18398 rm -f conftest.er1
18399 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018401 (exit $ac_status); } && {
18402 test -z "$ac_c_werror_flag" ||
18403 test ! -s conftest.err
18404 } && test -s conftest$ac_exeext &&
18405 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018406 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018407else
Martin v. Löwis11437992002-04-12 09:54:03 +000018408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018409sed 's/^/| /' conftest.$ac_ext >&5
18410
Martin v. Löwiseba40652007-08-30 20:10:57 +000018411 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018413
18414rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018415 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018417ac_res=`eval echo '${'$as_ac_var'}'`
18418 { echo "$as_me:$LINENO: result: $ac_res" >&5
18419echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018420if test `eval echo '${'$as_ac_var'}'` = yes; then
18421 cat >>confdefs.h <<_ACEOF
18422#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18423_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018424
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018425fi
18426done
18427
Michael W. Hudson54241132001-12-07 15:38:26 +000018428
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018429# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018430{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18431echo $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 +000018432if test "${ac_cv_header_time+set}" = set; then
18433 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018434else
Martin v. Löwis11437992002-04-12 09:54:03 +000018435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018436/* confdefs.h. */
18437_ACEOF
18438cat confdefs.h >>conftest.$ac_ext
18439cat >>conftest.$ac_ext <<_ACEOF
18440/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018441#include <sys/types.h>
18442#include <sys/time.h>
18443#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018444
Martin v. Löwis11437992002-04-12 09:54:03 +000018445int
18446main ()
18447{
18448if ((struct tm *) 0)
18449return 0;
18450 ;
18451 return 0;
18452}
18453_ACEOF
18454rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018455if { (ac_try="$ac_compile"
18456case "(($ac_try" in
18457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18458 *) ac_try_echo=$ac_try;;
18459esac
18460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018463 grep -v '^ *+' conftest.er1 >conftest.err
18464 rm -f conftest.er1
18465 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018467 (exit $ac_status); } && {
18468 test -z "$ac_c_werror_flag" ||
18469 test ! -s conftest.err
18470 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018471 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018472else
Martin v. Löwis11437992002-04-12 09:54:03 +000018473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018474sed 's/^/| /' conftest.$ac_ext >&5
18475
Martin v. Löwiseba40652007-08-30 20:10:57 +000018476 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018478
18479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018481{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18482echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018483if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018484
18485cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018486#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018487_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018488
18489fi
18490
Martin v. Löwiseba40652007-08-30 20:10:57 +000018491{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18492echo $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 +000018493if test "${ac_cv_struct_tm+set}" = set; then
18494 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018495else
Martin v. Löwis11437992002-04-12 09:54:03 +000018496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018497/* confdefs.h. */
18498_ACEOF
18499cat confdefs.h >>conftest.$ac_ext
18500cat >>conftest.$ac_ext <<_ACEOF
18501/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018502#include <sys/types.h>
18503#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018504
Martin v. Löwis11437992002-04-12 09:54:03 +000018505int
18506main ()
18507{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018508struct tm tm;
18509 int *p = &tm.tm_sec;
18510 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018511 ;
18512 return 0;
18513}
18514_ACEOF
18515rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018516if { (ac_try="$ac_compile"
18517case "(($ac_try" in
18518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18519 *) ac_try_echo=$ac_try;;
18520esac
18521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18522 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018524 grep -v '^ *+' conftest.er1 >conftest.err
18525 rm -f conftest.er1
18526 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018528 (exit $ac_status); } && {
18529 test -z "$ac_c_werror_flag" ||
18530 test ! -s conftest.err
18531 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018532 ac_cv_struct_tm=time.h
18533else
Martin v. Löwis11437992002-04-12 09:54:03 +000018534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018535sed 's/^/| /' conftest.$ac_ext >&5
18536
Martin v. Löwiseba40652007-08-30 20:10:57 +000018537 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018539
18540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018542{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18543echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018544if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018545
18546cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018547#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018548_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018549
18550fi
18551
Martin v. Löwiseba40652007-08-30 20:10:57 +000018552{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18553echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018554if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18555 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018556else
Martin v. Löwis11437992002-04-12 09:54:03 +000018557 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018558/* confdefs.h. */
18559_ACEOF
18560cat confdefs.h >>conftest.$ac_ext
18561cat >>conftest.$ac_ext <<_ACEOF
18562/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018563#include <sys/types.h>
18564#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018565
18566
Martin v. Löwis11437992002-04-12 09:54:03 +000018567int
18568main ()
18569{
18570static struct tm ac_aggr;
18571if (ac_aggr.tm_zone)
18572return 0;
18573 ;
18574 return 0;
18575}
18576_ACEOF
18577rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018578if { (ac_try="$ac_compile"
18579case "(($ac_try" in
18580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18581 *) ac_try_echo=$ac_try;;
18582esac
18583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018586 grep -v '^ *+' conftest.er1 >conftest.err
18587 rm -f conftest.er1
18588 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018590 (exit $ac_status); } && {
18591 test -z "$ac_c_werror_flag" ||
18592 test ! -s conftest.err
18593 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018594 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018595else
Martin v. Löwis11437992002-04-12 09:54:03 +000018596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018597sed 's/^/| /' conftest.$ac_ext >&5
18598
Martin v. Löwiseba40652007-08-30 20:10:57 +000018599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018600/* confdefs.h. */
18601_ACEOF
18602cat confdefs.h >>conftest.$ac_ext
18603cat >>conftest.$ac_ext <<_ACEOF
18604/* end confdefs.h. */
18605#include <sys/types.h>
18606#include <$ac_cv_struct_tm>
18607
18608
18609int
18610main ()
18611{
18612static struct tm ac_aggr;
18613if (sizeof ac_aggr.tm_zone)
18614return 0;
18615 ;
18616 return 0;
18617}
18618_ACEOF
18619rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018620if { (ac_try="$ac_compile"
18621case "(($ac_try" in
18622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18623 *) ac_try_echo=$ac_try;;
18624esac
18625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18626 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018628 grep -v '^ *+' conftest.er1 >conftest.err
18629 rm -f conftest.er1
18630 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018632 (exit $ac_status); } && {
18633 test -z "$ac_c_werror_flag" ||
18634 test ! -s conftest.err
18635 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018636 ac_cv_member_struct_tm_tm_zone=yes
18637else
18638 echo "$as_me: failed program was:" >&5
18639sed 's/^/| /' conftest.$ac_ext >&5
18640
Martin v. Löwiseba40652007-08-30 20:10:57 +000018641 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018643
18644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018646
18647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018649{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18650echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018651if test $ac_cv_member_struct_tm_tm_zone = yes; then
18652
18653cat >>confdefs.h <<_ACEOF
18654#define HAVE_STRUCT_TM_TM_ZONE 1
18655_ACEOF
18656
18657
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018658fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018659
Martin v. Löwis11437992002-04-12 09:54:03 +000018660if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18661
18662cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018663#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018664_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018665
18666else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018667 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18668echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18669if test "${ac_cv_have_decl_tzname+set}" = set; then
18670 echo $ECHO_N "(cached) $ECHO_C" >&6
18671else
18672 cat >conftest.$ac_ext <<_ACEOF
18673/* confdefs.h. */
18674_ACEOF
18675cat confdefs.h >>conftest.$ac_ext
18676cat >>conftest.$ac_ext <<_ACEOF
18677/* end confdefs.h. */
18678#include <time.h>
18679
18680int
18681main ()
18682{
18683#ifndef tzname
18684 (void) tzname;
18685#endif
18686
18687 ;
18688 return 0;
18689}
18690_ACEOF
18691rm -f conftest.$ac_objext
18692if { (ac_try="$ac_compile"
18693case "(($ac_try" in
18694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18695 *) ac_try_echo=$ac_try;;
18696esac
18697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18698 (eval "$ac_compile") 2>conftest.er1
18699 ac_status=$?
18700 grep -v '^ *+' conftest.er1 >conftest.err
18701 rm -f conftest.er1
18702 cat conftest.err >&5
18703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18704 (exit $ac_status); } && {
18705 test -z "$ac_c_werror_flag" ||
18706 test ! -s conftest.err
18707 } && test -s conftest.$ac_objext; then
18708 ac_cv_have_decl_tzname=yes
18709else
18710 echo "$as_me: failed program was:" >&5
18711sed 's/^/| /' conftest.$ac_ext >&5
18712
18713 ac_cv_have_decl_tzname=no
18714fi
18715
18716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18717fi
18718{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18719echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18720if test $ac_cv_have_decl_tzname = yes; then
18721
18722cat >>confdefs.h <<_ACEOF
18723#define HAVE_DECL_TZNAME 1
18724_ACEOF
18725
18726
18727else
18728 cat >>confdefs.h <<_ACEOF
18729#define HAVE_DECL_TZNAME 0
18730_ACEOF
18731
18732
18733fi
18734
18735
18736 { echo "$as_me:$LINENO: checking for tzname" >&5
18737echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018738if test "${ac_cv_var_tzname+set}" = set; then
18739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018740else
Martin v. Löwis11437992002-04-12 09:54:03 +000018741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018742/* confdefs.h. */
18743_ACEOF
18744cat confdefs.h >>conftest.$ac_ext
18745cat >>conftest.$ac_ext <<_ACEOF
18746/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018747#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018748#if !HAVE_DECL_TZNAME
18749extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018750#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018751
Martin v. Löwis11437992002-04-12 09:54:03 +000018752int
18753main ()
18754{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018755return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018756 ;
18757 return 0;
18758}
18759_ACEOF
18760rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018761if { (ac_try="$ac_link"
18762case "(($ac_try" in
18763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18764 *) ac_try_echo=$ac_try;;
18765esac
18766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18767 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018769 grep -v '^ *+' conftest.er1 >conftest.err
18770 rm -f conftest.er1
18771 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018773 (exit $ac_status); } && {
18774 test -z "$ac_c_werror_flag" ||
18775 test ! -s conftest.err
18776 } && test -s conftest$ac_exeext &&
18777 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018778 ac_cv_var_tzname=yes
18779else
Martin v. Löwis11437992002-04-12 09:54:03 +000018780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018781sed 's/^/| /' conftest.$ac_ext >&5
18782
Martin v. Löwiseba40652007-08-30 20:10:57 +000018783 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018785
18786rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018787 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018789{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18790echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018791 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018792
18793cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018794#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018795_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018796
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018797 fi
18798fi
18799
Martin v. Löwiseba40652007-08-30 20:10:57 +000018800{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18801echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018802if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18803 echo $ECHO_N "(cached) $ECHO_C" >&6
18804else
18805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018806/* confdefs.h. */
18807_ACEOF
18808cat confdefs.h >>conftest.$ac_ext
18809cat >>conftest.$ac_ext <<_ACEOF
18810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018811$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018812int
18813main ()
18814{
18815static struct stat ac_aggr;
18816if (ac_aggr.st_rdev)
18817return 0;
18818 ;
18819 return 0;
18820}
18821_ACEOF
18822rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018823if { (ac_try="$ac_compile"
18824case "(($ac_try" in
18825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18826 *) ac_try_echo=$ac_try;;
18827esac
18828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018831 grep -v '^ *+' conftest.er1 >conftest.err
18832 rm -f conftest.er1
18833 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018835 (exit $ac_status); } && {
18836 test -z "$ac_c_werror_flag" ||
18837 test ! -s conftest.err
18838 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018839 ac_cv_member_struct_stat_st_rdev=yes
18840else
18841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018842sed 's/^/| /' conftest.$ac_ext >&5
18843
Martin v. Löwiseba40652007-08-30 20:10:57 +000018844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018845/* confdefs.h. */
18846_ACEOF
18847cat confdefs.h >>conftest.$ac_ext
18848cat >>conftest.$ac_ext <<_ACEOF
18849/* end confdefs.h. */
18850$ac_includes_default
18851int
18852main ()
18853{
18854static struct stat ac_aggr;
18855if (sizeof ac_aggr.st_rdev)
18856return 0;
18857 ;
18858 return 0;
18859}
18860_ACEOF
18861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018862if { (ac_try="$ac_compile"
18863case "(($ac_try" in
18864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18865 *) ac_try_echo=$ac_try;;
18866esac
18867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18868 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018870 grep -v '^ *+' conftest.er1 >conftest.err
18871 rm -f conftest.er1
18872 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018874 (exit $ac_status); } && {
18875 test -z "$ac_c_werror_flag" ||
18876 test ! -s conftest.err
18877 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018878 ac_cv_member_struct_stat_st_rdev=yes
18879else
18880 echo "$as_me: failed program was:" >&5
18881sed 's/^/| /' conftest.$ac_ext >&5
18882
Martin v. Löwiseba40652007-08-30 20:10:57 +000018883 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018885
18886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018888
18889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018891{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18892echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018893if test $ac_cv_member_struct_stat_st_rdev = yes; then
18894
18895cat >>confdefs.h <<_ACEOF
18896#define HAVE_STRUCT_STAT_ST_RDEV 1
18897_ACEOF
18898
18899
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018900fi
18901
Martin v. Löwiseba40652007-08-30 20:10:57 +000018902{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18903echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018904if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18905 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018906else
Martin v. Löwis11437992002-04-12 09:54:03 +000018907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018908/* confdefs.h. */
18909_ACEOF
18910cat confdefs.h >>conftest.$ac_ext
18911cat >>conftest.$ac_ext <<_ACEOF
18912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018913$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018914int
18915main ()
18916{
18917static struct stat ac_aggr;
18918if (ac_aggr.st_blksize)
18919return 0;
18920 ;
18921 return 0;
18922}
18923_ACEOF
18924rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018925if { (ac_try="$ac_compile"
18926case "(($ac_try" in
18927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18928 *) ac_try_echo=$ac_try;;
18929esac
18930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18931 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018933 grep -v '^ *+' conftest.er1 >conftest.err
18934 rm -f conftest.er1
18935 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018937 (exit $ac_status); } && {
18938 test -z "$ac_c_werror_flag" ||
18939 test ! -s conftest.err
18940 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018941 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018942else
Martin v. Löwis11437992002-04-12 09:54:03 +000018943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018944sed 's/^/| /' conftest.$ac_ext >&5
18945
Martin v. Löwiseba40652007-08-30 20:10:57 +000018946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018947/* confdefs.h. */
18948_ACEOF
18949cat confdefs.h >>conftest.$ac_ext
18950cat >>conftest.$ac_ext <<_ACEOF
18951/* end confdefs.h. */
18952$ac_includes_default
18953int
18954main ()
18955{
18956static struct stat ac_aggr;
18957if (sizeof ac_aggr.st_blksize)
18958return 0;
18959 ;
18960 return 0;
18961}
18962_ACEOF
18963rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018964if { (ac_try="$ac_compile"
18965case "(($ac_try" in
18966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18967 *) ac_try_echo=$ac_try;;
18968esac
18969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18970 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018972 grep -v '^ *+' conftest.er1 >conftest.err
18973 rm -f conftest.er1
18974 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018976 (exit $ac_status); } && {
18977 test -z "$ac_c_werror_flag" ||
18978 test ! -s conftest.err
18979 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018980 ac_cv_member_struct_stat_st_blksize=yes
18981else
18982 echo "$as_me: failed program was:" >&5
18983sed 's/^/| /' conftest.$ac_ext >&5
18984
Martin v. Löwiseba40652007-08-30 20:10:57 +000018985 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018987
18988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018990
18991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018993{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
18994echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018995if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018996
Martin v. Löwis11437992002-04-12 09:54:03 +000018997cat >>confdefs.h <<_ACEOF
18998#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
18999_ACEOF
19000
19001
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019002fi
19003
Martin v. Löwiseba40652007-08-30 20:10:57 +000019004{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19005echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019006if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19007 echo $ECHO_N "(cached) $ECHO_C" >&6
19008else
19009 cat >conftest.$ac_ext <<_ACEOF
19010/* confdefs.h. */
19011_ACEOF
19012cat confdefs.h >>conftest.$ac_ext
19013cat >>conftest.$ac_ext <<_ACEOF
19014/* end confdefs.h. */
19015$ac_includes_default
19016int
19017main ()
19018{
19019static struct stat ac_aggr;
19020if (ac_aggr.st_flags)
19021return 0;
19022 ;
19023 return 0;
19024}
19025_ACEOF
19026rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019027if { (ac_try="$ac_compile"
19028case "(($ac_try" in
19029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19030 *) ac_try_echo=$ac_try;;
19031esac
19032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19033 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019034 ac_status=$?
19035 grep -v '^ *+' conftest.er1 >conftest.err
19036 rm -f conftest.er1
19037 cat conftest.err >&5
19038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019039 (exit $ac_status); } && {
19040 test -z "$ac_c_werror_flag" ||
19041 test ! -s conftest.err
19042 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019043 ac_cv_member_struct_stat_st_flags=yes
19044else
19045 echo "$as_me: failed program was:" >&5
19046sed 's/^/| /' conftest.$ac_ext >&5
19047
Martin v. Löwiseba40652007-08-30 20:10:57 +000019048 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019049/* confdefs.h. */
19050_ACEOF
19051cat confdefs.h >>conftest.$ac_ext
19052cat >>conftest.$ac_ext <<_ACEOF
19053/* end confdefs.h. */
19054$ac_includes_default
19055int
19056main ()
19057{
19058static struct stat ac_aggr;
19059if (sizeof ac_aggr.st_flags)
19060return 0;
19061 ;
19062 return 0;
19063}
19064_ACEOF
19065rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019066if { (ac_try="$ac_compile"
19067case "(($ac_try" in
19068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19069 *) ac_try_echo=$ac_try;;
19070esac
19071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19072 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019073 ac_status=$?
19074 grep -v '^ *+' conftest.er1 >conftest.err
19075 rm -f conftest.er1
19076 cat conftest.err >&5
19077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019078 (exit $ac_status); } && {
19079 test -z "$ac_c_werror_flag" ||
19080 test ! -s conftest.err
19081 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019082 ac_cv_member_struct_stat_st_flags=yes
19083else
19084 echo "$as_me: failed program was:" >&5
19085sed 's/^/| /' conftest.$ac_ext >&5
19086
Martin v. Löwiseba40652007-08-30 20:10:57 +000019087 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019089
19090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019092
19093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019095{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19096echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019097if test $ac_cv_member_struct_stat_st_flags = yes; then
19098
19099cat >>confdefs.h <<_ACEOF
19100#define HAVE_STRUCT_STAT_ST_FLAGS 1
19101_ACEOF
19102
19103
19104fi
19105
Martin v. Löwiseba40652007-08-30 20:10:57 +000019106{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19107echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019108if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19109 echo $ECHO_N "(cached) $ECHO_C" >&6
19110else
19111 cat >conftest.$ac_ext <<_ACEOF
19112/* confdefs.h. */
19113_ACEOF
19114cat confdefs.h >>conftest.$ac_ext
19115cat >>conftest.$ac_ext <<_ACEOF
19116/* end confdefs.h. */
19117$ac_includes_default
19118int
19119main ()
19120{
19121static struct stat ac_aggr;
19122if (ac_aggr.st_gen)
19123return 0;
19124 ;
19125 return 0;
19126}
19127_ACEOF
19128rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019129if { (ac_try="$ac_compile"
19130case "(($ac_try" in
19131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19132 *) ac_try_echo=$ac_try;;
19133esac
19134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019136 ac_status=$?
19137 grep -v '^ *+' conftest.er1 >conftest.err
19138 rm -f conftest.er1
19139 cat conftest.err >&5
19140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019141 (exit $ac_status); } && {
19142 test -z "$ac_c_werror_flag" ||
19143 test ! -s conftest.err
19144 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019145 ac_cv_member_struct_stat_st_gen=yes
19146else
19147 echo "$as_me: failed program was:" >&5
19148sed 's/^/| /' conftest.$ac_ext >&5
19149
Martin v. Löwiseba40652007-08-30 20:10:57 +000019150 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019151/* confdefs.h. */
19152_ACEOF
19153cat confdefs.h >>conftest.$ac_ext
19154cat >>conftest.$ac_ext <<_ACEOF
19155/* end confdefs.h. */
19156$ac_includes_default
19157int
19158main ()
19159{
19160static struct stat ac_aggr;
19161if (sizeof ac_aggr.st_gen)
19162return 0;
19163 ;
19164 return 0;
19165}
19166_ACEOF
19167rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019168if { (ac_try="$ac_compile"
19169case "(($ac_try" in
19170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19171 *) ac_try_echo=$ac_try;;
19172esac
19173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019175 ac_status=$?
19176 grep -v '^ *+' conftest.er1 >conftest.err
19177 rm -f conftest.er1
19178 cat conftest.err >&5
19179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019180 (exit $ac_status); } && {
19181 test -z "$ac_c_werror_flag" ||
19182 test ! -s conftest.err
19183 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019184 ac_cv_member_struct_stat_st_gen=yes
19185else
19186 echo "$as_me: failed program was:" >&5
19187sed 's/^/| /' conftest.$ac_ext >&5
19188
Martin v. Löwiseba40652007-08-30 20:10:57 +000019189 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019191
19192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019194
19195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019197{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19198echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019199if test $ac_cv_member_struct_stat_st_gen = yes; then
19200
19201cat >>confdefs.h <<_ACEOF
19202#define HAVE_STRUCT_STAT_ST_GEN 1
19203_ACEOF
19204
19205
19206fi
19207
Martin v. Löwiseba40652007-08-30 20:10:57 +000019208{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19209echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019210if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19211 echo $ECHO_N "(cached) $ECHO_C" >&6
19212else
19213 cat >conftest.$ac_ext <<_ACEOF
19214/* confdefs.h. */
19215_ACEOF
19216cat confdefs.h >>conftest.$ac_ext
19217cat >>conftest.$ac_ext <<_ACEOF
19218/* end confdefs.h. */
19219$ac_includes_default
19220int
19221main ()
19222{
19223static struct stat ac_aggr;
19224if (ac_aggr.st_birthtime)
19225return 0;
19226 ;
19227 return 0;
19228}
19229_ACEOF
19230rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019231if { (ac_try="$ac_compile"
19232case "(($ac_try" in
19233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19234 *) ac_try_echo=$ac_try;;
19235esac
19236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19237 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019238 ac_status=$?
19239 grep -v '^ *+' conftest.er1 >conftest.err
19240 rm -f conftest.er1
19241 cat conftest.err >&5
19242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019243 (exit $ac_status); } && {
19244 test -z "$ac_c_werror_flag" ||
19245 test ! -s conftest.err
19246 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019247 ac_cv_member_struct_stat_st_birthtime=yes
19248else
19249 echo "$as_me: failed program was:" >&5
19250sed 's/^/| /' conftest.$ac_ext >&5
19251
Martin v. Löwiseba40652007-08-30 20:10:57 +000019252 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019253/* confdefs.h. */
19254_ACEOF
19255cat confdefs.h >>conftest.$ac_ext
19256cat >>conftest.$ac_ext <<_ACEOF
19257/* end confdefs.h. */
19258$ac_includes_default
19259int
19260main ()
19261{
19262static struct stat ac_aggr;
19263if (sizeof ac_aggr.st_birthtime)
19264return 0;
19265 ;
19266 return 0;
19267}
19268_ACEOF
19269rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019270if { (ac_try="$ac_compile"
19271case "(($ac_try" in
19272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19273 *) ac_try_echo=$ac_try;;
19274esac
19275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019277 ac_status=$?
19278 grep -v '^ *+' conftest.er1 >conftest.err
19279 rm -f conftest.er1
19280 cat conftest.err >&5
19281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019282 (exit $ac_status); } && {
19283 test -z "$ac_c_werror_flag" ||
19284 test ! -s conftest.err
19285 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019286 ac_cv_member_struct_stat_st_birthtime=yes
19287else
19288 echo "$as_me: failed program was:" >&5
19289sed 's/^/| /' conftest.$ac_ext >&5
19290
Martin v. Löwiseba40652007-08-30 20:10:57 +000019291 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019293
19294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019296
19297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019299{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19300echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019301if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19302
19303cat >>confdefs.h <<_ACEOF
19304#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19305_ACEOF
19306
19307
19308fi
19309
Martin v. Löwiseba40652007-08-30 20:10:57 +000019310{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19311echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019312if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19313 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019314else
Martin v. Löwis11437992002-04-12 09:54:03 +000019315 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019316/* confdefs.h. */
19317_ACEOF
19318cat confdefs.h >>conftest.$ac_ext
19319cat >>conftest.$ac_ext <<_ACEOF
19320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019321$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019322int
19323main ()
19324{
19325static struct stat ac_aggr;
19326if (ac_aggr.st_blocks)
19327return 0;
19328 ;
19329 return 0;
19330}
19331_ACEOF
19332rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019333if { (ac_try="$ac_compile"
19334case "(($ac_try" in
19335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19336 *) ac_try_echo=$ac_try;;
19337esac
19338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19339 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019341 grep -v '^ *+' conftest.er1 >conftest.err
19342 rm -f conftest.er1
19343 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019345 (exit $ac_status); } && {
19346 test -z "$ac_c_werror_flag" ||
19347 test ! -s conftest.err
19348 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019349 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019350else
Martin v. Löwis11437992002-04-12 09:54:03 +000019351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019352sed 's/^/| /' conftest.$ac_ext >&5
19353
Martin v. Löwiseba40652007-08-30 20:10:57 +000019354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019355/* confdefs.h. */
19356_ACEOF
19357cat confdefs.h >>conftest.$ac_ext
19358cat >>conftest.$ac_ext <<_ACEOF
19359/* end confdefs.h. */
19360$ac_includes_default
19361int
19362main ()
19363{
19364static struct stat ac_aggr;
19365if (sizeof ac_aggr.st_blocks)
19366return 0;
19367 ;
19368 return 0;
19369}
19370_ACEOF
19371rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019372if { (ac_try="$ac_compile"
19373case "(($ac_try" in
19374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19375 *) ac_try_echo=$ac_try;;
19376esac
19377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19378 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019380 grep -v '^ *+' conftest.er1 >conftest.err
19381 rm -f conftest.er1
19382 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019384 (exit $ac_status); } && {
19385 test -z "$ac_c_werror_flag" ||
19386 test ! -s conftest.err
19387 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019388 ac_cv_member_struct_stat_st_blocks=yes
19389else
19390 echo "$as_me: failed program was:" >&5
19391sed 's/^/| /' conftest.$ac_ext >&5
19392
Martin v. Löwiseba40652007-08-30 20:10:57 +000019393 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019395
19396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019398
19399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019401{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19402echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019403if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019404
Martin v. Löwis11437992002-04-12 09:54:03 +000019405cat >>confdefs.h <<_ACEOF
19406#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19407_ACEOF
19408
19409
19410cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019411#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019412_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019413
19414else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019415 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019416 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019417 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19418 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019419esac
19420
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019421fi
19422
Michael W. Hudson54241132001-12-07 15:38:26 +000019423
Martin v. Löwis11437992002-04-12 09:54:03 +000019424
Martin v. Löwiseba40652007-08-30 20:10:57 +000019425{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19426echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019427if test "${ac_cv_header_time_altzone+set}" = set; then
19428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019429else
Martin v. Löwis11437992002-04-12 09:54:03 +000019430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019431/* confdefs.h. */
19432_ACEOF
19433cat confdefs.h >>conftest.$ac_ext
19434cat >>conftest.$ac_ext <<_ACEOF
19435/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019436#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019437int
19438main ()
19439{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019440return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019441 ;
19442 return 0;
19443}
19444_ACEOF
19445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019446if { (ac_try="$ac_compile"
19447case "(($ac_try" in
19448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19449 *) ac_try_echo=$ac_try;;
19450esac
19451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019454 grep -v '^ *+' conftest.er1 >conftest.err
19455 rm -f conftest.er1
19456 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019458 (exit $ac_status); } && {
19459 test -z "$ac_c_werror_flag" ||
19460 test ! -s conftest.err
19461 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019462 ac_cv_header_time_altzone=yes
19463else
Martin v. Löwis11437992002-04-12 09:54:03 +000019464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019465sed 's/^/| /' conftest.$ac_ext >&5
19466
Martin v. Löwiseba40652007-08-30 20:10:57 +000019467 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019468fi
19469
Martin v. Löwiseba40652007-08-30 20:10:57 +000019470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19471fi
19472
19473{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19474echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019475if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019476
19477cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019478#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019479_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019480
19481fi
19482
Guido van Rossumda88dad1995-01-26 00:46:29 +000019483was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019484{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19485echo $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 +000019486cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019487/* confdefs.h. */
19488_ACEOF
19489cat confdefs.h >>conftest.$ac_ext
19490cat >>conftest.$ac_ext <<_ACEOF
19491/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019492
19493#include <sys/types.h>
19494#include <sys/select.h>
19495#include <sys/time.h>
19496
Martin v. Löwis11437992002-04-12 09:54:03 +000019497int
19498main ()
19499{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019500;
Martin v. Löwis11437992002-04-12 09:54:03 +000019501 ;
19502 return 0;
19503}
19504_ACEOF
19505rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019506if { (ac_try="$ac_compile"
19507case "(($ac_try" in
19508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19509 *) ac_try_echo=$ac_try;;
19510esac
19511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019514 grep -v '^ *+' conftest.er1 >conftest.err
19515 rm -f conftest.er1
19516 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019518 (exit $ac_status); } && {
19519 test -z "$ac_c_werror_flag" ||
19520 test ! -s conftest.err
19521 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019522
19523
19524cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019525#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019526_ACEOF
19527
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019528 was_it_defined=yes
19529
Guido van Rossumf78abae1997-01-21 22:02:36 +000019530else
Martin v. Löwis11437992002-04-12 09:54:03 +000019531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019532sed 's/^/| /' conftest.$ac_ext >&5
19533
Brett Cannon19fab762007-06-02 03:02:29 +000019534
Martin v. Löwiseba40652007-08-30 20:10:57 +000019535fi
19536
19537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19538{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19539echo "${ECHO_T}$was_it_defined" >&6; }
19540
19541{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19542echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019543if test "${ac_cv_struct_addrinfo+set}" = set; then
19544 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019545else
Martin v. Löwis11437992002-04-12 09:54:03 +000019546 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019547/* confdefs.h. */
19548_ACEOF
19549cat confdefs.h >>conftest.$ac_ext
19550cat >>conftest.$ac_ext <<_ACEOF
19551/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019552
19553# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019554int
19555main ()
19556{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019557struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019558 ;
19559 return 0;
19560}
19561_ACEOF
19562rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019563if { (ac_try="$ac_compile"
19564case "(($ac_try" in
19565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19566 *) ac_try_echo=$ac_try;;
19567esac
19568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019571 grep -v '^ *+' conftest.er1 >conftest.err
19572 rm -f conftest.er1
19573 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019575 (exit $ac_status); } && {
19576 test -z "$ac_c_werror_flag" ||
19577 test ! -s conftest.err
19578 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019579 ac_cv_struct_addrinfo=yes
19580else
Martin v. Löwis11437992002-04-12 09:54:03 +000019581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019582sed 's/^/| /' conftest.$ac_ext >&5
19583
Martin v. Löwiseba40652007-08-30 20:10:57 +000019584 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019585fi
19586
Martin v. Löwiseba40652007-08-30 20:10:57 +000019587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19588fi
19589
19590{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19591echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019592if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019593
19594cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019595#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019596_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019597
19598fi
19599
Martin v. Löwiseba40652007-08-30 20:10:57 +000019600{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19601echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019602if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19603 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019604else
Martin v. Löwis11437992002-04-12 09:54:03 +000019605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019606/* confdefs.h. */
19607_ACEOF
19608cat confdefs.h >>conftest.$ac_ext
19609cat >>conftest.$ac_ext <<_ACEOF
19610/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019611
19612# include <sys/types.h>
19613# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019614int
19615main ()
19616{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019617struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019618 ;
19619 return 0;
19620}
19621_ACEOF
19622rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019623if { (ac_try="$ac_compile"
19624case "(($ac_try" in
19625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19626 *) ac_try_echo=$ac_try;;
19627esac
19628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19629 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019631 grep -v '^ *+' conftest.er1 >conftest.err
19632 rm -f conftest.er1
19633 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019635 (exit $ac_status); } && {
19636 test -z "$ac_c_werror_flag" ||
19637 test ! -s conftest.err
19638 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019639 ac_cv_struct_sockaddr_storage=yes
19640else
Martin v. Löwis11437992002-04-12 09:54:03 +000019641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019642sed 's/^/| /' conftest.$ac_ext >&5
19643
Martin v. Löwiseba40652007-08-30 20:10:57 +000019644 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019645fi
19646
Martin v. Löwiseba40652007-08-30 20:10:57 +000019647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19648fi
19649
19650{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19651echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019652if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019653
19654cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019655#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019656_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019657
19658fi
19659
Guido van Rossum627b2d71993-12-24 10:39:16 +000019660# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019661
Michael W. Hudson54241132001-12-07 15:38:26 +000019662
Martin v. Löwiseba40652007-08-30 20:10:57 +000019663{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19664echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019665if test "${ac_cv_c_char_unsigned+set}" = set; then
19666 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019667else
Martin v. Löwis11437992002-04-12 09:54:03 +000019668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019669/* confdefs.h. */
19670_ACEOF
19671cat confdefs.h >>conftest.$ac_ext
19672cat >>conftest.$ac_ext <<_ACEOF
19673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019674$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019675int
19676main ()
19677{
19678static int test_array [1 - 2 * !(((char) -1) < 0)];
19679test_array [0] = 0
19680
19681 ;
19682 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019683}
Martin v. Löwis11437992002-04-12 09:54:03 +000019684_ACEOF
19685rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019686if { (ac_try="$ac_compile"
19687case "(($ac_try" in
19688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19689 *) ac_try_echo=$ac_try;;
19690esac
19691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19692 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019694 grep -v '^ *+' conftest.er1 >conftest.err
19695 rm -f conftest.er1
19696 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019698 (exit $ac_status); } && {
19699 test -z "$ac_c_werror_flag" ||
19700 test ! -s conftest.err
19701 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019702 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019703else
19704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019705sed 's/^/| /' conftest.$ac_ext >&5
19706
Martin v. Löwiseba40652007-08-30 20:10:57 +000019707 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019709
19710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019712{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19713echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019714if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019715 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019716#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019717_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019718
19719fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019720
Martin v. Löwiseba40652007-08-30 20:10:57 +000019721{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19722echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019723if test "${ac_cv_c_const+set}" = set; then
19724 echo $ECHO_N "(cached) $ECHO_C" >&6
19725else
19726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019727/* confdefs.h. */
19728_ACEOF
19729cat confdefs.h >>conftest.$ac_ext
19730cat >>conftest.$ac_ext <<_ACEOF
19731/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019732
Martin v. Löwis11437992002-04-12 09:54:03 +000019733int
19734main ()
19735{
19736/* FIXME: Include the comments suggested by Paul. */
19737#ifndef __cplusplus
19738 /* Ultrix mips cc rejects this. */
19739 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019740 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019741 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019742 char const *const *pcpcc;
19743 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019744 /* NEC SVR4.0.2 mips cc rejects this. */
19745 struct point {int x, y;};
19746 static struct point const zero = {0,0};
19747 /* AIX XL C 1.02.0.0 rejects this.
19748 It does not let you subtract one const X* pointer from another in
19749 an arm of an if-expression whose if-part is not a constant
19750 expression */
19751 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019752 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019753 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019754 ++pcpcc;
19755 ppc = (char**) pcpcc;
19756 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019757 { /* SCO 3.2v4 cc rejects this. */
19758 char *t;
19759 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019760
Martin v. Löwis11437992002-04-12 09:54:03 +000019761 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019762 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019763 }
19764 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19765 int x[] = {25, 17};
19766 const int *foo = &x[0];
19767 ++foo;
19768 }
19769 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19770 typedef const int *iptr;
19771 iptr p = 0;
19772 ++p;
19773 }
19774 { /* AIX XL C 1.02.0.0 rejects this saying
19775 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19776 struct s { int j; const int *ap[3]; };
19777 struct s *b; b->j = 5;
19778 }
19779 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19780 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019781 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019782 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019783 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019784#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019785
Martin v. Löwis11437992002-04-12 09:54:03 +000019786 ;
19787 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019788}
Martin v. Löwis11437992002-04-12 09:54:03 +000019789_ACEOF
19790rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019791if { (ac_try="$ac_compile"
19792case "(($ac_try" in
19793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19794 *) ac_try_echo=$ac_try;;
19795esac
19796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019799 grep -v '^ *+' conftest.er1 >conftest.err
19800 rm -f conftest.er1
19801 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019803 (exit $ac_status); } && {
19804 test -z "$ac_c_werror_flag" ||
19805 test ! -s conftest.err
19806 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019807 ac_cv_c_const=yes
19808else
Martin v. Löwis11437992002-04-12 09:54:03 +000019809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019810sed 's/^/| /' conftest.$ac_ext >&5
19811
Martin v. Löwiseba40652007-08-30 20:10:57 +000019812 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019814
19815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019817{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19818echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019819if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019820
19821cat >>confdefs.h <<\_ACEOF
19822#define const
19823_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019824
19825fi
19826
Michael W. Hudson54241132001-12-07 15:38:26 +000019827
Guido van Rossumda88dad1995-01-26 00:46:29 +000019828works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019829{ echo "$as_me:$LINENO: checking for working volatile" >&5
19830echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019831cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019832/* confdefs.h. */
19833_ACEOF
19834cat confdefs.h >>conftest.$ac_ext
19835cat >>conftest.$ac_ext <<_ACEOF
19836/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019837
Martin v. Löwis11437992002-04-12 09:54:03 +000019838int
19839main ()
19840{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019841volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019842 ;
19843 return 0;
19844}
19845_ACEOF
19846rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019847if { (ac_try="$ac_compile"
19848case "(($ac_try" in
19849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19850 *) ac_try_echo=$ac_try;;
19851esac
19852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019855 grep -v '^ *+' conftest.er1 >conftest.err
19856 rm -f conftest.er1
19857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019859 (exit $ac_status); } && {
19860 test -z "$ac_c_werror_flag" ||
19861 test ! -s conftest.err
19862 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019863 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019864else
Martin v. Löwis11437992002-04-12 09:54:03 +000019865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019866sed 's/^/| /' conftest.$ac_ext >&5
19867
Martin v. Löwis11437992002-04-12 09:54:03 +000019868
19869cat >>confdefs.h <<\_ACEOF
19870#define volatile
19871_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019872
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019873
Guido van Rossum627b2d71993-12-24 10:39:16 +000019874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019875
19876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19877{ echo "$as_me:$LINENO: result: $works" >&5
19878echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019879
Guido van Rossumda88dad1995-01-26 00:46:29 +000019880works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019881{ echo "$as_me:$LINENO: checking for working signed char" >&5
19882echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019883cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019884/* confdefs.h. */
19885_ACEOF
19886cat confdefs.h >>conftest.$ac_ext
19887cat >>conftest.$ac_ext <<_ACEOF
19888/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019889
Martin v. Löwis11437992002-04-12 09:54:03 +000019890int
19891main ()
19892{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019893signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019894 ;
19895 return 0;
19896}
19897_ACEOF
19898rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019899if { (ac_try="$ac_compile"
19900case "(($ac_try" in
19901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19902 *) ac_try_echo=$ac_try;;
19903esac
19904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019907 grep -v '^ *+' conftest.er1 >conftest.err
19908 rm -f conftest.er1
19909 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019911 (exit $ac_status); } && {
19912 test -z "$ac_c_werror_flag" ||
19913 test ! -s conftest.err
19914 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019915 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019916else
Martin v. Löwis11437992002-04-12 09:54:03 +000019917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019918sed 's/^/| /' conftest.$ac_ext >&5
19919
Martin v. Löwis11437992002-04-12 09:54:03 +000019920
19921cat >>confdefs.h <<\_ACEOF
19922#define signed
19923_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019924
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019925
Guido van Rossum7f43da71994-08-01 12:15:30 +000019926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019927
19928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19929{ echo "$as_me:$LINENO: result: $works" >&5
19930echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019931
Guido van Rossumda88dad1995-01-26 00:46:29 +000019932have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019933{ echo "$as_me:$LINENO: checking for prototypes" >&5
19934echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019935cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019936/* confdefs.h. */
19937_ACEOF
19938cat confdefs.h >>conftest.$ac_ext
19939cat >>conftest.$ac_ext <<_ACEOF
19940/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019941int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019942int
19943main ()
19944{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019945return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019946 ;
19947 return 0;
19948}
19949_ACEOF
19950rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019951if { (ac_try="$ac_compile"
19952case "(($ac_try" in
19953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19954 *) ac_try_echo=$ac_try;;
19955esac
19956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019959 grep -v '^ *+' conftest.er1 >conftest.err
19960 rm -f conftest.er1
19961 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019963 (exit $ac_status); } && {
19964 test -z "$ac_c_werror_flag" ||
19965 test ! -s conftest.err
19966 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019967
19968
19969cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019970#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019971_ACEOF
19972
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019973 have_prototypes=yes
19974
Guido van Rossumf78abae1997-01-21 22:02:36 +000019975else
Martin v. Löwis11437992002-04-12 09:54:03 +000019976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019977sed 's/^/| /' conftest.$ac_ext >&5
19978
Martin v. Löwiseba40652007-08-30 20:10:57 +000019979
Guido van Rossum7f43da71994-08-01 12:15:30 +000019980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019981
19982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19983{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
19984echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019985
Guido van Rossumda88dad1995-01-26 00:46:29 +000019986works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019987{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
19988echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019989cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019990/* confdefs.h. */
19991_ACEOF
19992cat confdefs.h >>conftest.$ac_ext
19993cat >>conftest.$ac_ext <<_ACEOF
19994/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019995
19996#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019997int foo(int x, ...) {
19998 va_list va;
19999 va_start(va, x);
20000 va_arg(va, int);
20001 va_arg(va, char *);
20002 va_arg(va, double);
20003 return 0;
20004}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020005
Martin v. Löwis11437992002-04-12 09:54:03 +000020006int
20007main ()
20008{
Guido van Rossum90eea071996-08-30 20:58:57 +000020009return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020010 ;
20011 return 0;
20012}
20013_ACEOF
20014rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020015if { (ac_try="$ac_compile"
20016case "(($ac_try" in
20017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20018 *) ac_try_echo=$ac_try;;
20019esac
20020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020023 grep -v '^ *+' conftest.er1 >conftest.err
20024 rm -f conftest.er1
20025 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020027 (exit $ac_status); } && {
20028 test -z "$ac_c_werror_flag" ||
20029 test ! -s conftest.err
20030 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020031
20032
20033cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020034#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020035_ACEOF
20036
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020037 works=yes
20038
Guido van Rossumf78abae1997-01-21 22:02:36 +000020039else
Martin v. Löwis11437992002-04-12 09:54:03 +000020040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020041sed 's/^/| /' conftest.$ac_ext >&5
20042
Martin v. Löwiseba40652007-08-30 20:10:57 +000020043
Guido van Rossum627b2d71993-12-24 10:39:16 +000020044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020045
20046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20047{ echo "$as_me:$LINENO: result: $works" >&5
20048echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020049
Martin v. Löwisd6320502004-08-12 13:45:08 +000020050# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020051{ echo "$as_me:$LINENO: checking for socketpair" >&5
20052echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020053cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020054/* confdefs.h. */
20055_ACEOF
20056cat confdefs.h >>conftest.$ac_ext
20057cat >>conftest.$ac_ext <<_ACEOF
20058/* end confdefs.h. */
20059
20060#include <sys/types.h>
20061#include <sys/socket.h>
20062
20063int
20064main ()
20065{
20066void *x=socketpair
20067 ;
20068 return 0;
20069}
20070_ACEOF
20071rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020072if { (ac_try="$ac_compile"
20073case "(($ac_try" in
20074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20075 *) ac_try_echo=$ac_try;;
20076esac
20077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020080 grep -v '^ *+' conftest.er1 >conftest.err
20081 rm -f conftest.er1
20082 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020084 (exit $ac_status); } && {
20085 test -z "$ac_c_werror_flag" ||
20086 test ! -s conftest.err
20087 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020088
20089cat >>confdefs.h <<\_ACEOF
20090#define HAVE_SOCKETPAIR 1
20091_ACEOF
20092
Martin v. Löwiseba40652007-08-30 20:10:57 +000020093 { echo "$as_me:$LINENO: result: yes" >&5
20094echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020095else
20096 echo "$as_me: failed program was:" >&5
20097sed 's/^/| /' conftest.$ac_ext >&5
20098
Martin v. Löwiseba40652007-08-30 20:10:57 +000020099 { echo "$as_me:$LINENO: result: no" >&5
20100echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020101
20102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020103
20104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020105
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020106# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020107{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20108echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020110/* confdefs.h. */
20111_ACEOF
20112cat confdefs.h >>conftest.$ac_ext
20113cat >>conftest.$ac_ext <<_ACEOF
20114/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020115#include <sys/types.h>
20116#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020117int
20118main ()
20119{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020120struct sockaddr x;
20121x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020122 ;
20123 return 0;
20124}
20125_ACEOF
20126rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020127if { (ac_try="$ac_compile"
20128case "(($ac_try" in
20129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20130 *) ac_try_echo=$ac_try;;
20131esac
20132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020135 grep -v '^ *+' conftest.er1 >conftest.err
20136 rm -f conftest.er1
20137 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020139 (exit $ac_status); } && {
20140 test -z "$ac_c_werror_flag" ||
20141 test ! -s conftest.err
20142 } && test -s conftest.$ac_objext; then
20143 { echo "$as_me:$LINENO: result: yes" >&5
20144echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020145
20146cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020147#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020148_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020149
20150else
Martin v. Löwis11437992002-04-12 09:54:03 +000020151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020152sed 's/^/| /' conftest.$ac_ext >&5
20153
Martin v. Löwiseba40652007-08-30 20:10:57 +000020154 { echo "$as_me:$LINENO: result: no" >&5
20155echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020157
20158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020159
Guido van Rossumda88dad1995-01-26 00:46:29 +000020160va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020161{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20162echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020163cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020164/* confdefs.h. */
20165_ACEOF
20166cat confdefs.h >>conftest.$ac_ext
20167cat >>conftest.$ac_ext <<_ACEOF
20168/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020169
20170#ifdef HAVE_STDARG_PROTOTYPES
20171#include <stdarg.h>
20172#else
20173#include <varargs.h>
20174#endif
20175
Martin v. Löwis11437992002-04-12 09:54:03 +000020176int
20177main ()
20178{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020179va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020180 ;
20181 return 0;
20182}
20183_ACEOF
20184rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020185if { (ac_try="$ac_compile"
20186case "(($ac_try" in
20187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20188 *) ac_try_echo=$ac_try;;
20189esac
20190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20191 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020193 grep -v '^ *+' conftest.er1 >conftest.err
20194 rm -f conftest.er1
20195 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020197 (exit $ac_status); } && {
20198 test -z "$ac_c_werror_flag" ||
20199 test ! -s conftest.err
20200 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020201 :
20202else
Martin v. Löwis11437992002-04-12 09:54:03 +000020203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020204sed 's/^/| /' conftest.$ac_ext >&5
20205
Martin v. Löwis11437992002-04-12 09:54:03 +000020206
20207
20208cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020209#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020210_ACEOF
20211
Guido van Rossumda88dad1995-01-26 00:46:29 +000020212 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020213
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020215
20216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20217{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20218echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020219
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020220# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020221
20222
20223
Martin v. Löwiseba40652007-08-30 20:10:57 +000020224{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20225echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020226if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20227 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020228else
Martin v. Löwis11437992002-04-12 09:54:03 +000020229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020230/* confdefs.h. */
20231_ACEOF
20232cat confdefs.h >>conftest.$ac_ext
20233cat >>conftest.$ac_ext <<_ACEOF
20234/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020235/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20236 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20237#define gethostbyname_r innocuous_gethostbyname_r
20238
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020239/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020240 which can conflict with char gethostbyname_r (); below.
20241 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020242 <limits.h> exists even on freestanding compilers. */
20243
20244#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020245# include <limits.h>
20246#else
20247# include <assert.h>
20248#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020249
20250#undef gethostbyname_r
20251
Martin v. Löwiseba40652007-08-30 20:10:57 +000020252/* Override any GCC internal prototype to avoid an error.
20253 Use char because int might match the return type of a GCC
20254 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020255#ifdef __cplusplus
20256extern "C"
20257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020258char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020259/* The GNU C library defines this for functions which it implements
20260 to always fail with ENOSYS. Some functions are actually named
20261 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020262#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020263choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020264#endif
20265
Skip Montanaro6dead952003-09-25 14:50:04 +000020266int
20267main ()
20268{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020269return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020270 ;
20271 return 0;
20272}
20273_ACEOF
20274rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020275if { (ac_try="$ac_link"
20276case "(($ac_try" in
20277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20278 *) ac_try_echo=$ac_try;;
20279esac
20280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20281 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020283 grep -v '^ *+' conftest.er1 >conftest.err
20284 rm -f conftest.er1
20285 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020287 (exit $ac_status); } && {
20288 test -z "$ac_c_werror_flag" ||
20289 test ! -s conftest.err
20290 } && test -s conftest$ac_exeext &&
20291 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020292 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020293else
Martin v. Löwis11437992002-04-12 09:54:03 +000020294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020295sed 's/^/| /' conftest.$ac_ext >&5
20296
Martin v. Löwiseba40652007-08-30 20:10:57 +000020297 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020299
20300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020301 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020303{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20304echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020305if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020306
Martin v. Löwis11437992002-04-12 09:54:03 +000020307 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020308#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020309_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020310
Martin v. Löwiseba40652007-08-30 20:10:57 +000020311 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20312echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020313 OLD_CFLAGS=$CFLAGS
20314 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020315 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020316/* confdefs.h. */
20317_ACEOF
20318cat confdefs.h >>conftest.$ac_ext
20319cat >>conftest.$ac_ext <<_ACEOF
20320/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020321
20322# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020323
Martin v. Löwis11437992002-04-12 09:54:03 +000020324int
20325main ()
20326{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020327
20328 char *name;
20329 struct hostent *he, *res;
20330 char buffer[2048];
20331 int buflen = 2048;
20332 int h_errnop;
20333
20334 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020335
20336 ;
20337 return 0;
20338}
20339_ACEOF
20340rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020341if { (ac_try="$ac_compile"
20342case "(($ac_try" in
20343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20344 *) ac_try_echo=$ac_try;;
20345esac
20346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20347 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020349 grep -v '^ *+' conftest.er1 >conftest.err
20350 rm -f conftest.er1
20351 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020353 (exit $ac_status); } && {
20354 test -z "$ac_c_werror_flag" ||
20355 test ! -s conftest.err
20356 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020357
20358 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020359#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020360_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020361
Martin v. Löwis11437992002-04-12 09:54:03 +000020362
20363cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020364#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020365_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020366
Martin v. Löwiseba40652007-08-30 20:10:57 +000020367 { echo "$as_me:$LINENO: result: yes" >&5
20368echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020369
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020370else
Martin v. Löwis11437992002-04-12 09:54:03 +000020371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020372sed 's/^/| /' conftest.$ac_ext >&5
20373
Martin v. Löwis11437992002-04-12 09:54:03 +000020374
Martin v. Löwiseba40652007-08-30 20:10:57 +000020375 { echo "$as_me:$LINENO: result: no" >&5
20376echo "${ECHO_T}no" >&6; }
20377 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20378echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020380/* confdefs.h. */
20381_ACEOF
20382cat confdefs.h >>conftest.$ac_ext
20383cat >>conftest.$ac_ext <<_ACEOF
20384/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020385
20386# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020387
Martin v. Löwis11437992002-04-12 09:54:03 +000020388int
20389main ()
20390{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020391
20392 char *name;
20393 struct hostent *he;
20394 char buffer[2048];
20395 int buflen = 2048;
20396 int h_errnop;
20397
20398 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020399
20400 ;
20401 return 0;
20402}
20403_ACEOF
20404rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020405if { (ac_try="$ac_compile"
20406case "(($ac_try" in
20407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20408 *) ac_try_echo=$ac_try;;
20409esac
20410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020413 grep -v '^ *+' conftest.er1 >conftest.err
20414 rm -f conftest.er1
20415 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020417 (exit $ac_status); } && {
20418 test -z "$ac_c_werror_flag" ||
20419 test ! -s conftest.err
20420 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020421
20422 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020423#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020424_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020425
Martin v. Löwis11437992002-04-12 09:54:03 +000020426
20427cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020428#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020429_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020430
Martin v. Löwiseba40652007-08-30 20:10:57 +000020431 { echo "$as_me:$LINENO: result: yes" >&5
20432echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020433
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020434else
Martin v. Löwis11437992002-04-12 09:54:03 +000020435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020436sed 's/^/| /' conftest.$ac_ext >&5
20437
Martin v. Löwis11437992002-04-12 09:54:03 +000020438
Martin v. Löwiseba40652007-08-30 20:10:57 +000020439 { echo "$as_me:$LINENO: result: no" >&5
20440echo "${ECHO_T}no" >&6; }
20441 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20442echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020444/* confdefs.h. */
20445_ACEOF
20446cat confdefs.h >>conftest.$ac_ext
20447cat >>conftest.$ac_ext <<_ACEOF
20448/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020449
20450# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020451
Martin v. Löwis11437992002-04-12 09:54:03 +000020452int
20453main ()
20454{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020455
20456 char *name;
20457 struct hostent *he;
20458 struct hostent_data data;
20459
20460 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020461
20462 ;
20463 return 0;
20464}
20465_ACEOF
20466rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020467if { (ac_try="$ac_compile"
20468case "(($ac_try" in
20469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20470 *) ac_try_echo=$ac_try;;
20471esac
20472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20473 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020475 grep -v '^ *+' conftest.er1 >conftest.err
20476 rm -f conftest.er1
20477 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020479 (exit $ac_status); } && {
20480 test -z "$ac_c_werror_flag" ||
20481 test ! -s conftest.err
20482 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020483
20484 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020485#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020486_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020487
Martin v. Löwis11437992002-04-12 09:54:03 +000020488
20489cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020490#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020491_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020492
Martin v. Löwiseba40652007-08-30 20:10:57 +000020493 { echo "$as_me:$LINENO: result: yes" >&5
20494echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020496else
Martin v. Löwis11437992002-04-12 09:54:03 +000020497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020498sed 's/^/| /' conftest.$ac_ext >&5
20499
Martin v. Löwis11437992002-04-12 09:54:03 +000020500
Martin v. Löwiseba40652007-08-30 20:10:57 +000020501 { echo "$as_me:$LINENO: result: no" >&5
20502echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020503
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020505
20506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020507
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020509
20510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020511
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020513
20514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020515 CFLAGS=$OLD_CFLAGS
20516
20517else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020518
Martin v. Löwis11437992002-04-12 09:54:03 +000020519
20520for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020521do
Martin v. Löwis11437992002-04-12 09:54:03 +000020522as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020523{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20524echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20525if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020526 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020527else
Martin v. Löwis11437992002-04-12 09:54:03 +000020528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020529/* confdefs.h. */
20530_ACEOF
20531cat confdefs.h >>conftest.$ac_ext
20532cat >>conftest.$ac_ext <<_ACEOF
20533/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020534/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20535 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20536#define $ac_func innocuous_$ac_func
20537
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020538/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020539 which can conflict with char $ac_func (); below.
20540 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020541 <limits.h> exists even on freestanding compilers. */
20542
20543#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020544# include <limits.h>
20545#else
20546# include <assert.h>
20547#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020548
20549#undef $ac_func
20550
Martin v. Löwiseba40652007-08-30 20:10:57 +000020551/* Override any GCC internal prototype to avoid an error.
20552 Use char because int might match the return type of a GCC
20553 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020554#ifdef __cplusplus
20555extern "C"
20556#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020557char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020558/* The GNU C library defines this for functions which it implements
20559 to always fail with ENOSYS. Some functions are actually named
20560 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020561#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020562choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020563#endif
20564
Skip Montanaro6dead952003-09-25 14:50:04 +000020565int
20566main ()
20567{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020568return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020569 ;
20570 return 0;
20571}
20572_ACEOF
20573rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020574if { (ac_try="$ac_link"
20575case "(($ac_try" in
20576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20577 *) ac_try_echo=$ac_try;;
20578esac
20579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20580 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020582 grep -v '^ *+' conftest.er1 >conftest.err
20583 rm -f conftest.er1
20584 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020586 (exit $ac_status); } && {
20587 test -z "$ac_c_werror_flag" ||
20588 test ! -s conftest.err
20589 } && test -s conftest$ac_exeext &&
20590 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020591 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020592else
Martin v. Löwis11437992002-04-12 09:54:03 +000020593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020594sed 's/^/| /' conftest.$ac_ext >&5
20595
Martin v. Löwiseba40652007-08-30 20:10:57 +000020596 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020598
20599rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020600 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020602ac_res=`eval echo '${'$as_ac_var'}'`
20603 { echo "$as_me:$LINENO: result: $ac_res" >&5
20604echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020605if test `eval echo '${'$as_ac_var'}'` = yes; then
20606 cat >>confdefs.h <<_ACEOF
20607#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20608_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020609
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020610fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020611done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020612
Michael W. Hudson54241132001-12-07 15:38:26 +000020613
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020614fi
20615
Michael W. Hudson54241132001-12-07 15:38:26 +000020616
20617
20618
20619
20620
20621
Guido van Rossum627b2d71993-12-24 10:39:16 +000020622# checks for system services
20623# (none yet)
20624
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020625# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020626{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20627echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020628if test "${ac_cv_func___fpu_control+set}" = set; then
20629 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020630else
Martin v. Löwis11437992002-04-12 09:54:03 +000020631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020632/* confdefs.h. */
20633_ACEOF
20634cat confdefs.h >>conftest.$ac_ext
20635cat >>conftest.$ac_ext <<_ACEOF
20636/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020637/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20638 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20639#define __fpu_control innocuous___fpu_control
20640
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020641/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020642 which can conflict with char __fpu_control (); below.
20643 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020644 <limits.h> exists even on freestanding compilers. */
20645
20646#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020647# include <limits.h>
20648#else
20649# include <assert.h>
20650#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020651
20652#undef __fpu_control
20653
Martin v. Löwiseba40652007-08-30 20:10:57 +000020654/* Override any GCC internal prototype to avoid an error.
20655 Use char because int might match the return type of a GCC
20656 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020657#ifdef __cplusplus
20658extern "C"
20659#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020660char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020661/* The GNU C library defines this for functions which it implements
20662 to always fail with ENOSYS. Some functions are actually named
20663 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020664#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020665choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020666#endif
20667
Skip Montanaro6dead952003-09-25 14:50:04 +000020668int
20669main ()
20670{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020671return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020672 ;
20673 return 0;
20674}
20675_ACEOF
20676rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020677if { (ac_try="$ac_link"
20678case "(($ac_try" in
20679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20680 *) ac_try_echo=$ac_try;;
20681esac
20682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20683 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020685 grep -v '^ *+' conftest.er1 >conftest.err
20686 rm -f conftest.er1
20687 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020689 (exit $ac_status); } && {
20690 test -z "$ac_c_werror_flag" ||
20691 test ! -s conftest.err
20692 } && test -s conftest$ac_exeext &&
20693 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020694 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020695else
Martin v. Löwis11437992002-04-12 09:54:03 +000020696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020697sed 's/^/| /' conftest.$ac_ext >&5
20698
Martin v. Löwiseba40652007-08-30 20:10:57 +000020699 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020701
20702rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020703 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020705{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20706echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020707if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020708 :
20709else
Martin v. Löwis11437992002-04-12 09:54:03 +000020710
Martin v. Löwiseba40652007-08-30 20:10:57 +000020711{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20712echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020713if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20714 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020715else
Martin v. Löwis11437992002-04-12 09:54:03 +000020716 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020717LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020719/* confdefs.h. */
20720_ACEOF
20721cat confdefs.h >>conftest.$ac_ext
20722cat >>conftest.$ac_ext <<_ACEOF
20723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020724
Martin v. Löwiseba40652007-08-30 20:10:57 +000020725/* Override any GCC internal prototype to avoid an error.
20726 Use char because int might match the return type of a GCC
20727 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020728#ifdef __cplusplus
20729extern "C"
20730#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020731char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020732int
20733main ()
20734{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020735return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020736 ;
20737 return 0;
20738}
20739_ACEOF
20740rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020741if { (ac_try="$ac_link"
20742case "(($ac_try" in
20743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20744 *) ac_try_echo=$ac_try;;
20745esac
20746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20747 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020749 grep -v '^ *+' conftest.er1 >conftest.err
20750 rm -f conftest.er1
20751 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020753 (exit $ac_status); } && {
20754 test -z "$ac_c_werror_flag" ||
20755 test ! -s conftest.err
20756 } && test -s conftest$ac_exeext &&
20757 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020758 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020759else
Martin v. Löwis11437992002-04-12 09:54:03 +000020760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020761sed 's/^/| /' conftest.$ac_ext >&5
20762
Martin v. Löwiseba40652007-08-30 20:10:57 +000020763 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020765
20766rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020767 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020768LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020770{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20771echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020772if test $ac_cv_lib_ieee___fpu_control = yes; then
20773 cat >>confdefs.h <<_ACEOF
20774#define HAVE_LIBIEEE 1
20775_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020776
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020777 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020778
Guido van Rossum627b2d71993-12-24 10:39:16 +000020779fi
20780
Michael W. Hudson54241132001-12-07 15:38:26 +000020781
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020782fi
20783
Michael W. Hudson54241132001-12-07 15:38:26 +000020784
Guido van Rossum7f253911997-05-09 02:42:48 +000020785# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020786{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20787echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020788
Martin v. Löwiseba40652007-08-30 20:10:57 +000020789# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020790if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020791 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020792if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020793then
20794
20795cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020796#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020797_ACEOF
20798
Martin v. Löwiseba40652007-08-30 20:10:57 +000020799 { echo "$as_me:$LINENO: result: yes" >&5
20800echo "${ECHO_T}yes" >&6; }
20801else { echo "$as_me:$LINENO: result: no" >&5
20802echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020803fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020804else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020805 { echo "$as_me:$LINENO: result: no" >&5
20806echo "${ECHO_T}no" >&6; }
20807fi
20808
Guido van Rossum7f253911997-05-09 02:42:48 +000020809
Guido van Rossum7f43da71994-08-01 12:15:30 +000020810# check for --with-libm=...
20811
Guido van Rossum563e7081996-09-10 18:20:48 +000020812case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020813Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020814BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020815*) LIBM=-lm
20816esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020817{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20818echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020819
Martin v. Löwiseba40652007-08-30 20:10:57 +000020820# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020821if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020822 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020823if test "$withval" = no
20824then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020825 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20826echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020827elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020828then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020829 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20830echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020831else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20832echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20833 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020834fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020835else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020836 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20837echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20838fi
20839
Guido van Rossum7f43da71994-08-01 12:15:30 +000020840
20841# check for --with-libc=...
20842
Martin v. Löwiseba40652007-08-30 20:10:57 +000020843{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20844echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020845
Martin v. Löwiseba40652007-08-30 20:10:57 +000020846# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020847if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020848 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020849if test "$withval" = no
20850then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020851 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20852echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020853elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020854then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020855 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20856echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020857else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20858echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20859 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020860fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020861else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020862 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20863echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20864fi
20865
Guido van Rossum7f43da71994-08-01 12:15:30 +000020866
Christian Heimes0a8143f2007-12-18 23:22:54 +000020867# ************************************
20868# * Check for mathematical functions *
20869# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000020870
Mark Dickinson7a3d8642008-04-22 00:54:27 +000020871LIBS_SAVE=$LIBS
20872LIBS="$LIBS $LIBM"
20873
Mark Dickinson265d7382008-04-21 22:32:24 +000020874# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
20875# -0. on some architectures.
20876{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
20877echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
20878if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
20879 echo $ECHO_N "(cached) $ECHO_C" >&6
20880else
20881
20882if test "$cross_compiling" = yes; then
20883 ac_cv_tanh_preserves_zero_sign=no
20884else
20885 cat >conftest.$ac_ext <<_ACEOF
20886/* confdefs.h. */
20887_ACEOF
20888cat confdefs.h >>conftest.$ac_ext
20889cat >>conftest.$ac_ext <<_ACEOF
20890/* end confdefs.h. */
20891
20892#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000020893#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000020894int main() {
20895 /* return 0 if either negative zeros don't exist
20896 on this platform or if negative zeros exist
20897 and tanh(-0.) == -0. */
20898 if (atan2(0., -1.) == atan2(-0., -1.) ||
20899 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
20900 else exit(1);
20901}
20902
20903_ACEOF
20904rm -f conftest$ac_exeext
20905if { (ac_try="$ac_link"
20906case "(($ac_try" in
20907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20908 *) ac_try_echo=$ac_try;;
20909esac
20910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20911 (eval "$ac_link") 2>&5
20912 ac_status=$?
20913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20914 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20915 { (case "(($ac_try" in
20916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20917 *) ac_try_echo=$ac_try;;
20918esac
20919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20920 (eval "$ac_try") 2>&5
20921 ac_status=$?
20922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20923 (exit $ac_status); }; }; then
20924 ac_cv_tanh_preserves_zero_sign=yes
20925else
20926 echo "$as_me: program exited with status $ac_status" >&5
20927echo "$as_me: failed program was:" >&5
20928sed 's/^/| /' conftest.$ac_ext >&5
20929
20930( exit $ac_status )
20931ac_cv_tanh_preserves_zero_sign=no
20932fi
20933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20934fi
20935
20936
20937fi
20938
20939{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
20940echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
20941if test "$ac_cv_tanh_preserves_zero_sign" = yes
20942then
20943
20944cat >>confdefs.h <<\_ACEOF
20945#define TANH_PRESERVES_ZERO_SIGN 1
20946_ACEOF
20947
20948fi
20949
Martin v. Löwis11437992002-04-12 09:54:03 +000020950
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020951for ac_func in hypot
20952do
Martin v. Löwis11437992002-04-12 09:54:03 +000020953as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020954{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20955echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20956if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020957 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020958else
Martin v. Löwis11437992002-04-12 09:54:03 +000020959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020960/* confdefs.h. */
20961_ACEOF
20962cat confdefs.h >>conftest.$ac_ext
20963cat >>conftest.$ac_ext <<_ACEOF
20964/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020965/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20966 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20967#define $ac_func innocuous_$ac_func
20968
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020969/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020970 which can conflict with char $ac_func (); below.
20971 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020972 <limits.h> exists even on freestanding compilers. */
20973
20974#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020975# include <limits.h>
20976#else
20977# include <assert.h>
20978#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020979
20980#undef $ac_func
20981
Martin v. Löwiseba40652007-08-30 20:10:57 +000020982/* Override any GCC internal prototype to avoid an error.
20983 Use char because int might match the return type of a GCC
20984 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020985#ifdef __cplusplus
20986extern "C"
20987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020988char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020989/* The GNU C library defines this for functions which it implements
20990 to always fail with ENOSYS. Some functions are actually named
20991 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020992#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020993choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020994#endif
20995
Skip Montanaro6dead952003-09-25 14:50:04 +000020996int
20997main ()
20998{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020999return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021000 ;
21001 return 0;
21002}
21003_ACEOF
21004rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021005if { (ac_try="$ac_link"
21006case "(($ac_try" in
21007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21008 *) ac_try_echo=$ac_try;;
21009esac
21010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21011 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021013 grep -v '^ *+' conftest.er1 >conftest.err
21014 rm -f conftest.er1
21015 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021017 (exit $ac_status); } && {
21018 test -z "$ac_c_werror_flag" ||
21019 test ! -s conftest.err
21020 } && test -s conftest$ac_exeext &&
21021 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021022 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021023else
Martin v. Löwis11437992002-04-12 09:54:03 +000021024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021025sed 's/^/| /' conftest.$ac_ext >&5
21026
Martin v. Löwiseba40652007-08-30 20:10:57 +000021027 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021029
21030rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021031 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021033ac_res=`eval echo '${'$as_ac_var'}'`
21034 { echo "$as_me:$LINENO: result: $ac_res" >&5
21035echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021036if test `eval echo '${'$as_ac_var'}'` = yes; then
21037 cat >>confdefs.h <<_ACEOF
21038#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21039_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000021040
Michael W. Hudson54241132001-12-07 15:38:26 +000021041else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021042 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021043 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021044 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21045 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021046esac
21047
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021048fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021049done
21050
Michael W. Hudson54241132001-12-07 15:38:26 +000021051
Christian Heimes0a8143f2007-12-18 23:22:54 +000021052
21053
21054
21055
21056
Christian Heimes48723512008-01-20 14:28:28 +000021057
21058
21059
21060
21061
21062for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021063do
21064as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21065{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21066echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21067if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21068 echo $ECHO_N "(cached) $ECHO_C" >&6
21069else
21070 cat >conftest.$ac_ext <<_ACEOF
21071/* confdefs.h. */
21072_ACEOF
21073cat confdefs.h >>conftest.$ac_ext
21074cat >>conftest.$ac_ext <<_ACEOF
21075/* end confdefs.h. */
21076/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21077 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21078#define $ac_func innocuous_$ac_func
21079
21080/* System header to define __stub macros and hopefully few prototypes,
21081 which can conflict with char $ac_func (); below.
21082 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21083 <limits.h> exists even on freestanding compilers. */
21084
21085#ifdef __STDC__
21086# include <limits.h>
21087#else
21088# include <assert.h>
21089#endif
21090
21091#undef $ac_func
21092
21093/* Override any GCC internal prototype to avoid an error.
21094 Use char because int might match the return type of a GCC
21095 builtin and then its argument prototype would still apply. */
21096#ifdef __cplusplus
21097extern "C"
21098#endif
21099char $ac_func ();
21100/* The GNU C library defines this for functions which it implements
21101 to always fail with ENOSYS. Some functions are actually named
21102 something starting with __ and the normal name is an alias. */
21103#if defined __stub_$ac_func || defined __stub___$ac_func
21104choke me
21105#endif
21106
21107int
21108main ()
21109{
21110return $ac_func ();
21111 ;
21112 return 0;
21113}
21114_ACEOF
21115rm -f conftest.$ac_objext conftest$ac_exeext
21116if { (ac_try="$ac_link"
21117case "(($ac_try" in
21118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21119 *) ac_try_echo=$ac_try;;
21120esac
21121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21122 (eval "$ac_link") 2>conftest.er1
21123 ac_status=$?
21124 grep -v '^ *+' conftest.er1 >conftest.err
21125 rm -f conftest.er1
21126 cat conftest.err >&5
21127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21128 (exit $ac_status); } && {
21129 test -z "$ac_c_werror_flag" ||
21130 test ! -s conftest.err
21131 } && test -s conftest$ac_exeext &&
21132 $as_test_x conftest$ac_exeext; then
21133 eval "$as_ac_var=yes"
21134else
21135 echo "$as_me: failed program was:" >&5
21136sed 's/^/| /' conftest.$ac_ext >&5
21137
21138 eval "$as_ac_var=no"
21139fi
21140
21141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21142 conftest$ac_exeext conftest.$ac_ext
21143fi
21144ac_res=`eval echo '${'$as_ac_var'}'`
21145 { echo "$as_me:$LINENO: result: $ac_res" >&5
21146echo "${ECHO_T}$ac_res" >&6; }
21147if test `eval echo '${'$as_ac_var'}'` = yes; then
21148 cat >>confdefs.h <<_ACEOF
21149#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21150_ACEOF
21151
21152fi
21153done
21154
21155
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021156LIBS=$LIBS_SAVE
21157
Guido van Rossumef2255b2000-03-10 22:30:29 +000021158# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021159if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021160 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21161echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021162if test "${ac_cv_header_wchar_h+set}" = set; then
21163 echo $ECHO_N "(cached) $ECHO_C" >&6
21164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021165{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21166echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021167else
Martin v. Löwis11437992002-04-12 09:54:03 +000021168 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021169{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21170echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021172/* confdefs.h. */
21173_ACEOF
21174cat confdefs.h >>conftest.$ac_ext
21175cat >>conftest.$ac_ext <<_ACEOF
21176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021177$ac_includes_default
21178#include <wchar.h>
21179_ACEOF
21180rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021181if { (ac_try="$ac_compile"
21182case "(($ac_try" in
21183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21184 *) ac_try_echo=$ac_try;;
21185esac
21186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21187 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021189 grep -v '^ *+' conftest.er1 >conftest.err
21190 rm -f conftest.er1
21191 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021193 (exit $ac_status); } && {
21194 test -z "$ac_c_werror_flag" ||
21195 test ! -s conftest.err
21196 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021197 ac_header_compiler=yes
21198else
21199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021200sed 's/^/| /' conftest.$ac_ext >&5
21201
Martin v. Löwiseba40652007-08-30 20:10:57 +000021202 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021204
21205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21206{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21207echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021208
21209# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021210{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21211echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021212cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021213/* confdefs.h. */
21214_ACEOF
21215cat confdefs.h >>conftest.$ac_ext
21216cat >>conftest.$ac_ext <<_ACEOF
21217/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021218#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021219_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021220if { (ac_try="$ac_cpp conftest.$ac_ext"
21221case "(($ac_try" in
21222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21223 *) ac_try_echo=$ac_try;;
21224esac
21225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21226 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021227 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021228 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021229 rm -f conftest.er1
21230 cat conftest.err >&5
21231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021232 (exit $ac_status); } >/dev/null && {
21233 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21234 test ! -s conftest.err
21235 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021236 ac_header_preproc=yes
21237else
21238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021239sed 's/^/| /' conftest.$ac_ext >&5
21240
Martin v. Löwis11437992002-04-12 09:54:03 +000021241 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243
Martin v. Löwis11437992002-04-12 09:54:03 +000021244rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021245{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21246echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021247
21248# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021249case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21250 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021251 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21252echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021253 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21254echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21255 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021256 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021257 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021258 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21259echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021260 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21261echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21262 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21263echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21264 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21265echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021266 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21267echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021268 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21269echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021270 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021271## ------------------------------------------------ ##
21272## Report this to http://www.python.org/python-bugs ##
21273## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021274_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021275 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021276 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021277esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021278{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21279echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021280if test "${ac_cv_header_wchar_h+set}" = set; then
21281 echo $ECHO_N "(cached) $ECHO_C" >&6
21282else
21283 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021285{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21286echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021287
21288fi
21289if test $ac_cv_header_wchar_h = yes; then
21290
21291
21292cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021293#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021294_ACEOF
21295
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021296 wchar_h="yes"
21297
Guido van Rossumef2255b2000-03-10 22:30:29 +000021298else
Martin v. Löwis11437992002-04-12 09:54:03 +000021299 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021300
21301fi
21302
Michael W. Hudson54241132001-12-07 15:38:26 +000021303
Martin v. Löwis11437992002-04-12 09:54:03 +000021304
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021305# determine wchar_t size
21306if test "$wchar_h" = yes
21307then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021308 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21309echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021310if test "${ac_cv_type_wchar_t+set}" = set; then
21311 echo $ECHO_N "(cached) $ECHO_C" >&6
21312else
21313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021314/* confdefs.h. */
21315_ACEOF
21316cat confdefs.h >>conftest.$ac_ext
21317cat >>conftest.$ac_ext <<_ACEOF
21318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021319#include <wchar.h>
21320
Martin v. Löwiseba40652007-08-30 20:10:57 +000021321typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021322int
21323main ()
21324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021325if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021326 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021327if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021328 return 0;
21329 ;
21330 return 0;
21331}
21332_ACEOF
21333rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021334if { (ac_try="$ac_compile"
21335case "(($ac_try" in
21336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21337 *) ac_try_echo=$ac_try;;
21338esac
21339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21340 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021342 grep -v '^ *+' conftest.er1 >conftest.err
21343 rm -f conftest.er1
21344 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021346 (exit $ac_status); } && {
21347 test -z "$ac_c_werror_flag" ||
21348 test ! -s conftest.err
21349 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021350 ac_cv_type_wchar_t=yes
21351else
21352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021353sed 's/^/| /' conftest.$ac_ext >&5
21354
Martin v. Löwiseba40652007-08-30 20:10:57 +000021355 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021356fi
Brett Cannon19fab762007-06-02 03:02:29 +000021357
Martin v. Löwiseba40652007-08-30 20:10:57 +000021358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21359fi
21360{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21361echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21362
21363# The cast to long int works around a bug in the HP C Compiler
21364# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21365# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21366# This bug is HP SR number 8606223364.
21367{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21368echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021369if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21370 echo $ECHO_N "(cached) $ECHO_C" >&6
21371else
Martin v. Löwis11437992002-04-12 09:54:03 +000021372 if test "$cross_compiling" = yes; then
21373 # Depending upon the size, compute the lo and hi bounds.
21374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021375/* confdefs.h. */
21376_ACEOF
21377cat confdefs.h >>conftest.$ac_ext
21378cat >>conftest.$ac_ext <<_ACEOF
21379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021380#include <wchar.h>
21381
Martin v. Löwiseba40652007-08-30 20:10:57 +000021382 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021383int
21384main ()
21385{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021386static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021387test_array [0] = 0
21388
21389 ;
21390 return 0;
21391}
21392_ACEOF
21393rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021394if { (ac_try="$ac_compile"
21395case "(($ac_try" in
21396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21397 *) ac_try_echo=$ac_try;;
21398esac
21399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21400 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021402 grep -v '^ *+' conftest.er1 >conftest.err
21403 rm -f conftest.er1
21404 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021406 (exit $ac_status); } && {
21407 test -z "$ac_c_werror_flag" ||
21408 test ! -s conftest.err
21409 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021410 ac_lo=0 ac_mid=0
21411 while :; do
21412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021413/* confdefs.h. */
21414_ACEOF
21415cat confdefs.h >>conftest.$ac_ext
21416cat >>conftest.$ac_ext <<_ACEOF
21417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021418#include <wchar.h>
21419
Martin v. Löwiseba40652007-08-30 20:10:57 +000021420 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021421int
21422main ()
21423{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021424static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021425test_array [0] = 0
21426
21427 ;
21428 return 0;
21429}
21430_ACEOF
21431rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021432if { (ac_try="$ac_compile"
21433case "(($ac_try" in
21434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21435 *) ac_try_echo=$ac_try;;
21436esac
21437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021440 grep -v '^ *+' conftest.er1 >conftest.err
21441 rm -f conftest.er1
21442 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021444 (exit $ac_status); } && {
21445 test -z "$ac_c_werror_flag" ||
21446 test ! -s conftest.err
21447 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021448 ac_hi=$ac_mid; break
21449else
21450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021451sed 's/^/| /' conftest.$ac_ext >&5
21452
Martin v. Löwiseba40652007-08-30 20:10:57 +000021453 ac_lo=`expr $ac_mid + 1`
21454 if test $ac_lo -le $ac_mid; then
21455 ac_lo= ac_hi=
21456 break
21457 fi
21458 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021460
21461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021462 done
21463else
21464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021465sed 's/^/| /' conftest.$ac_ext >&5
21466
Martin v. Löwiseba40652007-08-30 20:10:57 +000021467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021468/* confdefs.h. */
21469_ACEOF
21470cat confdefs.h >>conftest.$ac_ext
21471cat >>conftest.$ac_ext <<_ACEOF
21472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021473#include <wchar.h>
21474
Martin v. Löwiseba40652007-08-30 20:10:57 +000021475 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021476int
21477main ()
21478{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021479static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021480test_array [0] = 0
21481
21482 ;
21483 return 0;
21484}
21485_ACEOF
21486rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021487if { (ac_try="$ac_compile"
21488case "(($ac_try" in
21489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21490 *) ac_try_echo=$ac_try;;
21491esac
21492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21493 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021495 grep -v '^ *+' conftest.er1 >conftest.err
21496 rm -f conftest.er1
21497 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021499 (exit $ac_status); } && {
21500 test -z "$ac_c_werror_flag" ||
21501 test ! -s conftest.err
21502 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021503 ac_hi=-1 ac_mid=-1
21504 while :; do
21505 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021506/* confdefs.h. */
21507_ACEOF
21508cat confdefs.h >>conftest.$ac_ext
21509cat >>conftest.$ac_ext <<_ACEOF
21510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021511#include <wchar.h>
21512
Martin v. Löwiseba40652007-08-30 20:10:57 +000021513 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021514int
21515main ()
21516{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021517static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021518test_array [0] = 0
21519
21520 ;
21521 return 0;
21522}
21523_ACEOF
21524rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021525if { (ac_try="$ac_compile"
21526case "(($ac_try" in
21527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21528 *) ac_try_echo=$ac_try;;
21529esac
21530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21531 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021533 grep -v '^ *+' conftest.er1 >conftest.err
21534 rm -f conftest.er1
21535 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021537 (exit $ac_status); } && {
21538 test -z "$ac_c_werror_flag" ||
21539 test ! -s conftest.err
21540 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021541 ac_lo=$ac_mid; break
21542else
21543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021544sed 's/^/| /' conftest.$ac_ext >&5
21545
Martin v. Löwiseba40652007-08-30 20:10:57 +000021546 ac_hi=`expr '(' $ac_mid ')' - 1`
21547 if test $ac_mid -le $ac_hi; then
21548 ac_lo= ac_hi=
21549 break
21550 fi
21551 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000021552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021553
21554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021555 done
21556else
21557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021558sed 's/^/| /' conftest.$ac_ext >&5
21559
Martin v. Löwiseba40652007-08-30 20:10:57 +000021560 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021562
21563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021565
21566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021567# Binary search between lo and hi bounds.
21568while test "x$ac_lo" != "x$ac_hi"; do
21569 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021571/* confdefs.h. */
21572_ACEOF
21573cat confdefs.h >>conftest.$ac_ext
21574cat >>conftest.$ac_ext <<_ACEOF
21575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021576#include <wchar.h>
21577
Martin v. Löwiseba40652007-08-30 20:10:57 +000021578 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021579int
21580main ()
21581{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021582static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021583test_array [0] = 0
21584
21585 ;
21586 return 0;
21587}
21588_ACEOF
21589rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021590if { (ac_try="$ac_compile"
21591case "(($ac_try" in
21592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21593 *) ac_try_echo=$ac_try;;
21594esac
21595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21596 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021598 grep -v '^ *+' conftest.er1 >conftest.err
21599 rm -f conftest.er1
21600 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021602 (exit $ac_status); } && {
21603 test -z "$ac_c_werror_flag" ||
21604 test ! -s conftest.err
21605 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021606 ac_hi=$ac_mid
21607else
21608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021609sed 's/^/| /' conftest.$ac_ext >&5
21610
Martin v. Löwiseba40652007-08-30 20:10:57 +000021611 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021613
21614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021615done
21616case $ac_lo in
21617?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021618'') if test "$ac_cv_type_wchar_t" = yes; then
21619 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021620See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021621echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021622See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021623 { (exit 77); exit 77; }; }
21624 else
21625 ac_cv_sizeof_wchar_t=0
21626 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021627esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021628else
Martin v. Löwis11437992002-04-12 09:54:03 +000021629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021630/* confdefs.h. */
21631_ACEOF
21632cat confdefs.h >>conftest.$ac_ext
21633cat >>conftest.$ac_ext <<_ACEOF
21634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021635#include <wchar.h>
21636
Martin v. Löwiseba40652007-08-30 20:10:57 +000021637 typedef wchar_t ac__type_sizeof_;
21638static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21639static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021640#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021641#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021642int
21643main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021644{
Martin v. Löwis11437992002-04-12 09:54:03 +000021645
21646 FILE *f = fopen ("conftest.val", "w");
21647 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021648 return 1;
21649 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021650 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021651 long int i = longval ();
21652 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21653 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021654 fprintf (f, "%ld\n", i);
21655 }
21656 else
21657 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021658 unsigned long int i = ulongval ();
21659 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21660 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021661 fprintf (f, "%lu\n", i);
21662 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021663 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021664
21665 ;
21666 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021667}
Martin v. Löwis11437992002-04-12 09:54:03 +000021668_ACEOF
21669rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021670if { (ac_try="$ac_link"
21671case "(($ac_try" in
21672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21673 *) ac_try_echo=$ac_try;;
21674esac
21675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21676 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021677 ac_status=$?
21678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21679 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021680 { (case "(($ac_try" in
21681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21682 *) ac_try_echo=$ac_try;;
21683esac
21684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21685 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021686 ac_status=$?
21687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21688 (exit $ac_status); }; }; then
21689 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021690else
Martin v. Löwis11437992002-04-12 09:54:03 +000021691 echo "$as_me: program exited with status $ac_status" >&5
21692echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021693sed 's/^/| /' conftest.$ac_ext >&5
21694
Martin v. Löwis11437992002-04-12 09:54:03 +000021695( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021696if test "$ac_cv_type_wchar_t" = yes; then
21697 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021698See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021699echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021700See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021701 { (exit 77); exit 77; }; }
21702 else
21703 ac_cv_sizeof_wchar_t=0
21704 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021706rm -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 +000021707fi
21708rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021709fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021710{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21711echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21712
21713
21714
Martin v. Löwis11437992002-04-12 09:54:03 +000021715cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021716#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021717_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021718
Michael W. Hudson54241132001-12-07 15:38:26 +000021719
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021720fi
21721
Martin v. Löwiseba40652007-08-30 20:10:57 +000021722{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21723echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021724have_ucs4_tcl=no
21725cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021726/* confdefs.h. */
21727_ACEOF
21728cat confdefs.h >>conftest.$ac_ext
21729cat >>conftest.$ac_ext <<_ACEOF
21730/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021731
21732#include <tcl.h>
21733#if TCL_UTF_MAX != 6
21734# error "NOT UCS4_TCL"
21735#endif
21736int
21737main ()
21738{
21739
21740 ;
21741 return 0;
21742}
21743_ACEOF
21744rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021745if { (ac_try="$ac_compile"
21746case "(($ac_try" in
21747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21748 *) ac_try_echo=$ac_try;;
21749esac
21750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21751 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021753 grep -v '^ *+' conftest.er1 >conftest.err
21754 rm -f conftest.er1
21755 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021757 (exit $ac_status); } && {
21758 test -z "$ac_c_werror_flag" ||
21759 test ! -s conftest.err
21760 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021761
21762
21763cat >>confdefs.h <<\_ACEOF
21764#define HAVE_UCS4_TCL 1
21765_ACEOF
21766
21767 have_ucs4_tcl=yes
21768
21769else
21770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021771sed 's/^/| /' conftest.$ac_ext >&5
21772
Martin v. Löwiseba40652007-08-30 20:10:57 +000021773
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021775
21776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21777{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21778echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021779
Skip Montanaro6dead952003-09-25 14:50:04 +000021780# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021781if test "$wchar_h" = yes
21782then
21783 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021784 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21785echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021786 if test "${ac_cv_wchar_t_signed+set}" = set; then
21787 echo $ECHO_N "(cached) $ECHO_C" >&6
21788else
21789
21790 if test "$cross_compiling" = yes; then
21791 ac_cv_wchar_t_signed=yes
21792else
21793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021794/* confdefs.h. */
21795_ACEOF
21796cat confdefs.h >>conftest.$ac_ext
21797cat >>conftest.$ac_ext <<_ACEOF
21798/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021799
21800 #include <wchar.h>
21801 int main()
21802 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021803 /* Success: exit code 0 */
21804 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021805 }
21806
21807_ACEOF
21808rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021809if { (ac_try="$ac_link"
21810case "(($ac_try" in
21811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21812 *) ac_try_echo=$ac_try;;
21813esac
21814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21815 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021816 ac_status=$?
21817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021819 { (case "(($ac_try" in
21820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21821 *) ac_try_echo=$ac_try;;
21822esac
21823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21824 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021825 ac_status=$?
21826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21827 (exit $ac_status); }; }; then
21828 ac_cv_wchar_t_signed=yes
21829else
21830 echo "$as_me: program exited with status $ac_status" >&5
21831echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021832sed 's/^/| /' conftest.$ac_ext >&5
21833
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021834( exit $ac_status )
21835ac_cv_wchar_t_signed=no
21836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021837rm -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 +000021838fi
21839
Martin v. Löwiseba40652007-08-30 20:10:57 +000021840
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021841fi
21842
Martin v. Löwiseba40652007-08-30 20:10:57 +000021843 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21844echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21845fi
21846
21847{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21848echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21849# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021850if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021851 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021852else
21853 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021854fi
21855
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021856
21857if test $enable_unicode = yes
21858then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021859 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021860 case "$have_ucs4_tcl" in
21861 yes) enable_unicode="ucs4"
21862 ;;
21863 *) enable_unicode="ucs2"
21864 ;;
21865 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021866fi
21867
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021868
21869
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021870case "$enable_unicode" in
21871ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021872 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021873#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021874_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021875
21876 ;;
21877ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021878 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021879#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021880_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021881
21882 ;;
21883esac
21884
Michael W. Hudson54241132001-12-07 15:38:26 +000021885
Martin v. Löwis11437992002-04-12 09:54:03 +000021886
21887
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021888
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021889if test "$enable_unicode" = "no"
21890then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021891 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021892 { echo "$as_me:$LINENO: result: not used" >&5
21893echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021894else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021895 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021896
21897cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021898#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021899_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021900
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021901
21902 # wchar_t is only usable if it maps to an unsigned type
21903 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021904 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021905 then
21906 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021907
Martin v. Löwis11437992002-04-12 09:54:03 +000021908cat >>confdefs.h <<\_ACEOF
21909#define HAVE_USABLE_WCHAR_T 1
21910_ACEOF
21911
21912 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021913#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021914_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021915
21916 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21917 then
21918 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021919 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021920#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021921_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021922
21923 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21924 then
21925 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021926 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021927#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021928_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021929
21930 else
21931 PY_UNICODE_TYPE="no type found"
21932 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021933 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21934echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021935fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021936
21937# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021938{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21939echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021940if test "${ac_cv_c_bigendian+set}" = set; then
21941 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021942else
Martin v. Löwis11437992002-04-12 09:54:03 +000021943 # See if sys/param.h defines the BYTE_ORDER macro.
21944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021945/* confdefs.h. */
21946_ACEOF
21947cat confdefs.h >>conftest.$ac_ext
21948cat >>conftest.$ac_ext <<_ACEOF
21949/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021950#include <sys/types.h>
21951#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021952
Martin v. Löwis11437992002-04-12 09:54:03 +000021953int
21954main ()
21955{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021956#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21957 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021958 bogus endian macros
21959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021960
21961 ;
21962 return 0;
21963}
21964_ACEOF
21965rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021966if { (ac_try="$ac_compile"
21967case "(($ac_try" in
21968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21969 *) ac_try_echo=$ac_try;;
21970esac
21971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21972 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021974 grep -v '^ *+' conftest.er1 >conftest.err
21975 rm -f conftest.er1
21976 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021978 (exit $ac_status); } && {
21979 test -z "$ac_c_werror_flag" ||
21980 test ! -s conftest.err
21981 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021982 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000021983cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021984/* confdefs.h. */
21985_ACEOF
21986cat confdefs.h >>conftest.$ac_ext
21987cat >>conftest.$ac_ext <<_ACEOF
21988/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021989#include <sys/types.h>
21990#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021991
Martin v. Löwis11437992002-04-12 09:54:03 +000021992int
21993main ()
21994{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021995#if BYTE_ORDER != BIG_ENDIAN
21996 not big endian
21997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021998
21999 ;
22000 return 0;
22001}
22002_ACEOF
22003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022004if { (ac_try="$ac_compile"
22005case "(($ac_try" in
22006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22007 *) ac_try_echo=$ac_try;;
22008esac
22009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022012 grep -v '^ *+' conftest.er1 >conftest.err
22013 rm -f conftest.er1
22014 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022016 (exit $ac_status); } && {
22017 test -z "$ac_c_werror_flag" ||
22018 test ! -s conftest.err
22019 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022020 ac_cv_c_bigendian=yes
22021else
Martin v. Löwis11437992002-04-12 09:54:03 +000022022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022023sed 's/^/| /' conftest.$ac_ext >&5
22024
Martin v. Löwiseba40652007-08-30 20:10:57 +000022025 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022027
22028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022029else
Martin v. Löwis11437992002-04-12 09:54:03 +000022030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022031sed 's/^/| /' conftest.$ac_ext >&5
22032
Martin v. Löwiseba40652007-08-30 20:10:57 +000022033 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022034if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022035 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022036 ac_cv_c_bigendian=unknown
22037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022038/* confdefs.h. */
22039_ACEOF
22040cat confdefs.h >>conftest.$ac_ext
22041cat >>conftest.$ac_ext <<_ACEOF
22042/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022043short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22044short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022045void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022046short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22047short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022048void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022049int
22050main ()
22051{
22052 _ascii (); _ebcdic ();
22053 ;
22054 return 0;
22055}
22056_ACEOF
22057rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022058if { (ac_try="$ac_compile"
22059case "(($ac_try" in
22060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22061 *) ac_try_echo=$ac_try;;
22062esac
22063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022066 grep -v '^ *+' conftest.er1 >conftest.err
22067 rm -f conftest.er1
22068 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022070 (exit $ac_status); } && {
22071 test -z "$ac_c_werror_flag" ||
22072 test ! -s conftest.err
22073 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022074 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022075 ac_cv_c_bigendian=yes
22076fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022077if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022078 if test "$ac_cv_c_bigendian" = unknown; then
22079 ac_cv_c_bigendian=no
22080 else
22081 # finding both strings is unlikely to happen, but who knows?
22082 ac_cv_c_bigendian=unknown
22083 fi
22084fi
22085else
22086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022087sed 's/^/| /' conftest.$ac_ext >&5
22088
Martin v. Löwiseba40652007-08-30 20:10:57 +000022089
Martin v. Löwis11437992002-04-12 09:54:03 +000022090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022091
22092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022093else
22094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022095/* confdefs.h. */
22096_ACEOF
22097cat confdefs.h >>conftest.$ac_ext
22098cat >>conftest.$ac_ext <<_ACEOF
22099/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022100$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022101int
22102main ()
22103{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022104
Guido van Rossumef2255b2000-03-10 22:30:29 +000022105 /* Are we little or big endian? From Harbison&Steele. */
22106 union
22107 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022108 long int l;
22109 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022110 } u;
22111 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022112 return u.c[sizeof (long int) - 1] == 1;
22113
22114 ;
22115 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022116}
Martin v. Löwis11437992002-04-12 09:54:03 +000022117_ACEOF
22118rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022119if { (ac_try="$ac_link"
22120case "(($ac_try" in
22121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22122 *) ac_try_echo=$ac_try;;
22123esac
22124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22125 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022126 ac_status=$?
22127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22128 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022129 { (case "(($ac_try" in
22130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22131 *) ac_try_echo=$ac_try;;
22132esac
22133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22134 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022135 ac_status=$?
22136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22137 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022138 ac_cv_c_bigendian=no
22139else
Martin v. Löwis11437992002-04-12 09:54:03 +000022140 echo "$as_me: program exited with status $ac_status" >&5
22141echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022142sed 's/^/| /' conftest.$ac_ext >&5
22143
Martin v. Löwis11437992002-04-12 09:54:03 +000022144( exit $ac_status )
22145ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022147rm -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 +000022148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022149
22150
Martin v. Löwis11437992002-04-12 09:54:03 +000022151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022152
22153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022155{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22156echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022157case $ac_cv_c_bigendian in
22158 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022159
Martin v. Löwis11437992002-04-12 09:54:03 +000022160cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022161#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022162_ACEOF
22163 ;;
22164 no)
22165 ;;
22166 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022167 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022168presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022169echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022170presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22171 { (exit 1); exit 1; }; } ;;
22172esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022173
Michael W. Hudson54241132001-12-07 15:38:26 +000022174
Ronald Oussoren988117f2006-04-29 11:31:35 +000022175
22176
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022177# Check whether right shifting a negative integer extends the sign bit
22178# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022179{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22180echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022181if test "${ac_cv_rshift_extends_sign+set}" = set; then
22182 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022183else
Martin v. Löwis11437992002-04-12 09:54:03 +000022184
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022185if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022186 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022187else
Martin v. Löwis11437992002-04-12 09:54:03 +000022188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022189/* confdefs.h. */
22190_ACEOF
22191cat confdefs.h >>conftest.$ac_ext
22192cat >>conftest.$ac_ext <<_ACEOF
22193/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022194
22195int main()
22196{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022197 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022198}
22199
Martin v. Löwis11437992002-04-12 09:54:03 +000022200_ACEOF
22201rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022202if { (ac_try="$ac_link"
22203case "(($ac_try" in
22204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22205 *) ac_try_echo=$ac_try;;
22206esac
22207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22208 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022209 ac_status=$?
22210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22211 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022212 { (case "(($ac_try" in
22213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22214 *) ac_try_echo=$ac_try;;
22215esac
22216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22217 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022218 ac_status=$?
22219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22220 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022221 ac_cv_rshift_extends_sign=yes
22222else
Martin v. Löwis11437992002-04-12 09:54:03 +000022223 echo "$as_me: program exited with status $ac_status" >&5
22224echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022225sed 's/^/| /' conftest.$ac_ext >&5
22226
Martin v. Löwis11437992002-04-12 09:54:03 +000022227( exit $ac_status )
22228ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022230rm -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 +000022231fi
22232
Martin v. Löwiseba40652007-08-30 20:10:57 +000022233
22234fi
22235
22236{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22237echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022238if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022239then
Martin v. Löwis11437992002-04-12 09:54:03 +000022240
22241cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022242#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022243_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022244
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022245fi
22246
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022247# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022248{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22249echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022250if test "${ac_cv_have_getc_unlocked+set}" = set; then
22251 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022252else
Martin v. Löwis11437992002-04-12 09:54:03 +000022253
22254cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022255/* confdefs.h. */
22256_ACEOF
22257cat confdefs.h >>conftest.$ac_ext
22258cat >>conftest.$ac_ext <<_ACEOF
22259/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022260#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022261int
22262main ()
22263{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022264
22265 FILE *f = fopen("/dev/null", "r");
22266 flockfile(f);
22267 getc_unlocked(f);
22268 funlockfile(f);
22269
Martin v. Löwis11437992002-04-12 09:54:03 +000022270 ;
22271 return 0;
22272}
22273_ACEOF
22274rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022275if { (ac_try="$ac_link"
22276case "(($ac_try" in
22277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22278 *) ac_try_echo=$ac_try;;
22279esac
22280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22281 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022283 grep -v '^ *+' conftest.er1 >conftest.err
22284 rm -f conftest.er1
22285 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022287 (exit $ac_status); } && {
22288 test -z "$ac_c_werror_flag" ||
22289 test ! -s conftest.err
22290 } && test -s conftest$ac_exeext &&
22291 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022292 ac_cv_have_getc_unlocked=yes
22293else
Martin v. Löwis11437992002-04-12 09:54:03 +000022294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022295sed 's/^/| /' conftest.$ac_ext >&5
22296
Martin v. Löwiseba40652007-08-30 20:10:57 +000022297 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022299
22300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022301 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022302fi
22303
Martin v. Löwiseba40652007-08-30 20:10:57 +000022304{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22305echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022306if test "$ac_cv_have_getc_unlocked" = yes
22307then
Martin v. Löwis11437992002-04-12 09:54:03 +000022308
22309cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022310#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022311_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022312
22313fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022314
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022315# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022316# save the value of LIBS so we don't actually link Python with readline
22317LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022318
Martin v. Löwiseba40652007-08-30 20:10:57 +000022319{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22320echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022321if test "${ac_cv_lib_readline_readline+set}" = set; then
22322 echo $ECHO_N "(cached) $ECHO_C" >&6
22323else
22324 ac_check_lib_save_LIBS=$LIBS
22325LIBS="-lreadline $LIBS"
22326cat >conftest.$ac_ext <<_ACEOF
22327/* confdefs.h. */
22328_ACEOF
22329cat confdefs.h >>conftest.$ac_ext
22330cat >>conftest.$ac_ext <<_ACEOF
22331/* end confdefs.h. */
22332
Martin v. Löwiseba40652007-08-30 20:10:57 +000022333/* Override any GCC internal prototype to avoid an error.
22334 Use char because int might match the return type of a GCC
22335 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022336#ifdef __cplusplus
22337extern "C"
22338#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022339char readline ();
22340int
22341main ()
22342{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022343return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022344 ;
22345 return 0;
22346}
22347_ACEOF
22348rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022349if { (ac_try="$ac_link"
22350case "(($ac_try" in
22351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22352 *) ac_try_echo=$ac_try;;
22353esac
22354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22355 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022356 ac_status=$?
22357 grep -v '^ *+' conftest.er1 >conftest.err
22358 rm -f conftest.er1
22359 cat conftest.err >&5
22360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022361 (exit $ac_status); } && {
22362 test -z "$ac_c_werror_flag" ||
22363 test ! -s conftest.err
22364 } && test -s conftest$ac_exeext &&
22365 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022366 ac_cv_lib_readline_readline=yes
22367else
22368 echo "$as_me: failed program was:" >&5
22369sed 's/^/| /' conftest.$ac_ext >&5
22370
Martin v. Löwiseba40652007-08-30 20:10:57 +000022371 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022373
22374rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022375 conftest$ac_exeext conftest.$ac_ext
22376LIBS=$ac_check_lib_save_LIBS
22377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022378{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22379echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022380if test $ac_cv_lib_readline_readline = yes; then
22381 cat >>confdefs.h <<_ACEOF
22382#define HAVE_LIBREADLINE 1
22383_ACEOF
22384
22385 LIBS="-lreadline $LIBS"
22386
22387fi
22388
22389if test "$ac_cv_have_readline_readline" = no
22390then
22391
Martin v. Löwiseba40652007-08-30 20:10:57 +000022392{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22393echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022394if test "${ac_cv_lib_termcap_readline+set}" = set; then
22395 echo $ECHO_N "(cached) $ECHO_C" >&6
22396else
22397 ac_check_lib_save_LIBS=$LIBS
22398LIBS="-ltermcap $LIBS"
22399cat >conftest.$ac_ext <<_ACEOF
22400/* confdefs.h. */
22401_ACEOF
22402cat confdefs.h >>conftest.$ac_ext
22403cat >>conftest.$ac_ext <<_ACEOF
22404/* end confdefs.h. */
22405
Martin v. Löwiseba40652007-08-30 20:10:57 +000022406/* Override any GCC internal prototype to avoid an error.
22407 Use char because int might match the return type of a GCC
22408 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022409#ifdef __cplusplus
22410extern "C"
22411#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022412char readline ();
22413int
22414main ()
22415{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022416return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022417 ;
22418 return 0;
22419}
22420_ACEOF
22421rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022422if { (ac_try="$ac_link"
22423case "(($ac_try" in
22424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22425 *) ac_try_echo=$ac_try;;
22426esac
22427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22428 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022429 ac_status=$?
22430 grep -v '^ *+' conftest.er1 >conftest.err
22431 rm -f conftest.er1
22432 cat conftest.err >&5
22433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022434 (exit $ac_status); } && {
22435 test -z "$ac_c_werror_flag" ||
22436 test ! -s conftest.err
22437 } && test -s conftest$ac_exeext &&
22438 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022439 ac_cv_lib_termcap_readline=yes
22440else
22441 echo "$as_me: failed program was:" >&5
22442sed 's/^/| /' conftest.$ac_ext >&5
22443
Martin v. Löwiseba40652007-08-30 20:10:57 +000022444 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022446
22447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022448 conftest$ac_exeext conftest.$ac_ext
22449LIBS=$ac_check_lib_save_LIBS
22450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022451{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22452echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022453if test $ac_cv_lib_termcap_readline = yes; then
22454 cat >>confdefs.h <<_ACEOF
22455#define HAVE_LIBTERMCAP 1
22456_ACEOF
22457
22458 LIBS="-ltermcap $LIBS"
22459
22460fi
22461
22462fi
22463
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022464# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022465{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22466echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022467if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22468 echo $ECHO_N "(cached) $ECHO_C" >&6
22469else
22470 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022471LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022472cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022473/* confdefs.h. */
22474_ACEOF
22475cat confdefs.h >>conftest.$ac_ext
22476cat >>conftest.$ac_ext <<_ACEOF
22477/* end confdefs.h. */
22478
Martin v. Löwiseba40652007-08-30 20:10:57 +000022479/* Override any GCC internal prototype to avoid an error.
22480 Use char because int might match the return type of a GCC
22481 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022482#ifdef __cplusplus
22483extern "C"
22484#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022485char rl_callback_handler_install ();
22486int
22487main ()
22488{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022489return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022490 ;
22491 return 0;
22492}
22493_ACEOF
22494rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022495if { (ac_try="$ac_link"
22496case "(($ac_try" in
22497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22498 *) ac_try_echo=$ac_try;;
22499esac
22500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22501 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022503 grep -v '^ *+' conftest.er1 >conftest.err
22504 rm -f conftest.er1
22505 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022507 (exit $ac_status); } && {
22508 test -z "$ac_c_werror_flag" ||
22509 test ! -s conftest.err
22510 } && test -s conftest$ac_exeext &&
22511 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022512 ac_cv_lib_readline_rl_callback_handler_install=yes
22513else
22514 echo "$as_me: failed program was:" >&5
22515sed 's/^/| /' conftest.$ac_ext >&5
22516
Martin v. Löwiseba40652007-08-30 20:10:57 +000022517 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022519
22520rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022521 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022522LIBS=$ac_check_lib_save_LIBS
22523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022524{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22525echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022526if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22527
22528cat >>confdefs.h <<\_ACEOF
22529#define HAVE_RL_CALLBACK 1
22530_ACEOF
22531
22532fi
22533
22534
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022535# check for readline 2.2
22536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022537/* confdefs.h. */
22538_ACEOF
22539cat confdefs.h >>conftest.$ac_ext
22540cat >>conftest.$ac_ext <<_ACEOF
22541/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022542#include <readline/readline.h>
22543_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022544if { (ac_try="$ac_cpp conftest.$ac_ext"
22545case "(($ac_try" in
22546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22547 *) ac_try_echo=$ac_try;;
22548esac
22549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22550 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022551 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022552 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022553 rm -f conftest.er1
22554 cat conftest.err >&5
22555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022556 (exit $ac_status); } >/dev/null && {
22557 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22558 test ! -s conftest.err
22559 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022560 have_readline=yes
22561else
22562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022563sed 's/^/| /' conftest.$ac_ext >&5
22564
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022565 have_readline=no
22566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022567
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022568rm -f conftest.err conftest.$ac_ext
22569if test $have_readline = yes
22570then
22571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022572/* confdefs.h. */
22573_ACEOF
22574cat confdefs.h >>conftest.$ac_ext
22575cat >>conftest.$ac_ext <<_ACEOF
22576/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022577#include <readline/readline.h>
22578
22579_ACEOF
22580if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022581 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022582
22583cat >>confdefs.h <<\_ACEOF
22584#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22585_ACEOF
22586
22587fi
22588rm -f conftest*
22589
22590fi
22591
Martin v. Löwis0daad592001-09-30 21:09:59 +000022592# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022593{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22594echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022595if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22596 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022597else
Martin v. Löwis11437992002-04-12 09:54:03 +000022598 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022599LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022600cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022601/* confdefs.h. */
22602_ACEOF
22603cat confdefs.h >>conftest.$ac_ext
22604cat >>conftest.$ac_ext <<_ACEOF
22605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022606
Martin v. Löwiseba40652007-08-30 20:10:57 +000022607/* Override any GCC internal prototype to avoid an error.
22608 Use char because int might match the return type of a GCC
22609 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022610#ifdef __cplusplus
22611extern "C"
22612#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022613char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022614int
22615main ()
22616{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022617return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022618 ;
22619 return 0;
22620}
22621_ACEOF
22622rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022623if { (ac_try="$ac_link"
22624case "(($ac_try" in
22625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22626 *) ac_try_echo=$ac_try;;
22627esac
22628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22629 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022631 grep -v '^ *+' conftest.er1 >conftest.err
22632 rm -f conftest.er1
22633 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022635 (exit $ac_status); } && {
22636 test -z "$ac_c_werror_flag" ||
22637 test ! -s conftest.err
22638 } && test -s conftest$ac_exeext &&
22639 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022640 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022641else
Martin v. Löwis11437992002-04-12 09:54:03 +000022642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022643sed 's/^/| /' conftest.$ac_ext >&5
22644
Martin v. Löwiseba40652007-08-30 20:10:57 +000022645 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022647
22648rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022649 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022650LIBS=$ac_check_lib_save_LIBS
22651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022652{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22653echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022654if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022655
Martin v. Löwis11437992002-04-12 09:54:03 +000022656cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022657#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022658_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022659
Martin v. Löwis0daad592001-09-30 21:09:59 +000022660fi
22661
Michael W. Hudson54241132001-12-07 15:38:26 +000022662
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022663# also in 4.0
22664{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22665echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22666if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22667 echo $ECHO_N "(cached) $ECHO_C" >&6
22668else
22669 ac_check_lib_save_LIBS=$LIBS
22670LIBS="-lreadline $LIBS"
22671cat >conftest.$ac_ext <<_ACEOF
22672/* confdefs.h. */
22673_ACEOF
22674cat confdefs.h >>conftest.$ac_ext
22675cat >>conftest.$ac_ext <<_ACEOF
22676/* end confdefs.h. */
22677
22678/* Override any GCC internal prototype to avoid an error.
22679 Use char because int might match the return type of a GCC
22680 builtin and then its argument prototype would still apply. */
22681#ifdef __cplusplus
22682extern "C"
22683#endif
22684char rl_completion_display_matches_hook ();
22685int
22686main ()
22687{
22688return rl_completion_display_matches_hook ();
22689 ;
22690 return 0;
22691}
22692_ACEOF
22693rm -f conftest.$ac_objext conftest$ac_exeext
22694if { (ac_try="$ac_link"
22695case "(($ac_try" in
22696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22697 *) ac_try_echo=$ac_try;;
22698esac
22699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22700 (eval "$ac_link") 2>conftest.er1
22701 ac_status=$?
22702 grep -v '^ *+' conftest.er1 >conftest.err
22703 rm -f conftest.er1
22704 cat conftest.err >&5
22705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22706 (exit $ac_status); } && {
22707 test -z "$ac_c_werror_flag" ||
22708 test ! -s conftest.err
22709 } && test -s conftest$ac_exeext &&
22710 $as_test_x conftest$ac_exeext; then
22711 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22712else
22713 echo "$as_me: failed program was:" >&5
22714sed 's/^/| /' conftest.$ac_ext >&5
22715
22716 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22717fi
22718
22719rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22720 conftest$ac_exeext conftest.$ac_ext
22721LIBS=$ac_check_lib_save_LIBS
22722fi
22723{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22724echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22725if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22726
22727cat >>confdefs.h <<\_ACEOF
22728#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22729_ACEOF
22730
22731fi
22732
22733
Martin v. Löwis0daad592001-09-30 21:09:59 +000022734# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022735{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22736echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022737if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022739else
Martin v. Löwis11437992002-04-12 09:54:03 +000022740 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022741LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022743/* confdefs.h. */
22744_ACEOF
22745cat confdefs.h >>conftest.$ac_ext
22746cat >>conftest.$ac_ext <<_ACEOF
22747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022748
Martin v. Löwiseba40652007-08-30 20:10:57 +000022749/* Override any GCC internal prototype to avoid an error.
22750 Use char because int might match the return type of a GCC
22751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022752#ifdef __cplusplus
22753extern "C"
22754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022755char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022756int
22757main ()
22758{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022759return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022760 ;
22761 return 0;
22762}
22763_ACEOF
22764rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022765if { (ac_try="$ac_link"
22766case "(($ac_try" in
22767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22768 *) ac_try_echo=$ac_try;;
22769esac
22770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22771 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022773 grep -v '^ *+' conftest.er1 >conftest.err
22774 rm -f conftest.er1
22775 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022777 (exit $ac_status); } && {
22778 test -z "$ac_c_werror_flag" ||
22779 test ! -s conftest.err
22780 } && test -s conftest$ac_exeext &&
22781 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022782 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022783else
Martin v. Löwis11437992002-04-12 09:54:03 +000022784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022785sed 's/^/| /' conftest.$ac_ext >&5
22786
Martin v. Löwiseba40652007-08-30 20:10:57 +000022787 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022789
22790rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022792LIBS=$ac_check_lib_save_LIBS
22793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022794{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22795echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022796if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022797
Martin v. Löwis11437992002-04-12 09:54:03 +000022798cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022799#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022800_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022801
Guido van Rossum353ae582001-07-10 16:45:32 +000022802fi
22803
Jack Jansendd19cf82001-12-06 22:36:17 +000022804
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022805# also in readline 4.2
22806cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022807/* confdefs.h. */
22808_ACEOF
22809cat confdefs.h >>conftest.$ac_ext
22810cat >>conftest.$ac_ext <<_ACEOF
22811/* end confdefs.h. */
22812#include <readline/readline.h>
22813_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022814if { (ac_try="$ac_cpp conftest.$ac_ext"
22815case "(($ac_try" in
22816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22817 *) ac_try_echo=$ac_try;;
22818esac
22819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22820 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022821 ac_status=$?
22822 grep -v '^ *+' conftest.er1 >conftest.err
22823 rm -f conftest.er1
22824 cat conftest.err >&5
22825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022826 (exit $ac_status); } >/dev/null && {
22827 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22828 test ! -s conftest.err
22829 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022830 have_readline=yes
22831else
22832 echo "$as_me: failed program was:" >&5
22833sed 's/^/| /' conftest.$ac_ext >&5
22834
22835 have_readline=no
22836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022837
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022838rm -f conftest.err conftest.$ac_ext
22839if test $have_readline = yes
22840then
22841 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022842/* confdefs.h. */
22843_ACEOF
22844cat confdefs.h >>conftest.$ac_ext
22845cat >>conftest.$ac_ext <<_ACEOF
22846/* end confdefs.h. */
22847#include <readline/readline.h>
22848
22849_ACEOF
22850if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22851 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22852
22853cat >>confdefs.h <<\_ACEOF
22854#define HAVE_RL_CATCH_SIGNAL 1
22855_ACEOF
22856
22857fi
22858rm -f conftest*
22859
22860fi
22861
Martin v. Löwis82bca632006-02-10 20:49:30 +000022862# End of readline checks: restore LIBS
22863LIBS=$LIBS_no_readline
22864
Martin v. Löwiseba40652007-08-30 20:10:57 +000022865{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22866echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022867if test "${ac_cv_broken_nice+set}" = set; then
22868 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022869else
Martin v. Löwis11437992002-04-12 09:54:03 +000022870
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022871if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022872 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022873else
Martin v. Löwis11437992002-04-12 09:54:03 +000022874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022875/* confdefs.h. */
22876_ACEOF
22877cat confdefs.h >>conftest.$ac_ext
22878cat >>conftest.$ac_ext <<_ACEOF
22879/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022880
22881int main()
22882{
22883 int val1 = nice(1);
22884 if (val1 != -1 && val1 == nice(2))
22885 exit(0);
22886 exit(1);
22887}
22888
Martin v. Löwis11437992002-04-12 09:54:03 +000022889_ACEOF
22890rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022891if { (ac_try="$ac_link"
22892case "(($ac_try" in
22893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22894 *) ac_try_echo=$ac_try;;
22895esac
22896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22897 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022898 ac_status=$?
22899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22900 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022901 { (case "(($ac_try" in
22902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22903 *) ac_try_echo=$ac_try;;
22904esac
22905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22906 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022907 ac_status=$?
22908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22909 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022910 ac_cv_broken_nice=yes
22911else
Martin v. Löwis11437992002-04-12 09:54:03 +000022912 echo "$as_me: program exited with status $ac_status" >&5
22913echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022914sed 's/^/| /' conftest.$ac_ext >&5
22915
Martin v. Löwis11437992002-04-12 09:54:03 +000022916( exit $ac_status )
22917ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022919rm -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 +000022920fi
22921
Martin v. Löwiseba40652007-08-30 20:10:57 +000022922
22923fi
22924
22925{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22926echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022927if test "$ac_cv_broken_nice" = yes
22928then
Martin v. Löwis11437992002-04-12 09:54:03 +000022929
22930cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022931#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022932_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022933
22934fi
22935
Martin v. Löwiseba40652007-08-30 20:10:57 +000022936{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22937echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022938if test "$cross_compiling" = yes; then
22939 ac_cv_broken_poll=no
22940else
22941 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022942/* confdefs.h. */
22943_ACEOF
22944cat confdefs.h >>conftest.$ac_ext
22945cat >>conftest.$ac_ext <<_ACEOF
22946/* end confdefs.h. */
22947
22948#include <poll.h>
22949
22950int main (void)
22951 {
22952 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22953
22954 close (42);
22955
22956 int poll_test = poll (&poll_struct, 1, 0);
22957
22958 if (poll_test < 0)
22959 {
22960 exit(0);
22961 }
22962 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22963 {
22964 exit(0);
22965 }
22966 else
22967 {
22968 exit(1);
22969 }
22970 }
22971
22972_ACEOF
22973rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022974if { (ac_try="$ac_link"
22975case "(($ac_try" in
22976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22977 *) ac_try_echo=$ac_try;;
22978esac
22979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22980 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022981 ac_status=$?
22982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22983 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022984 { (case "(($ac_try" in
22985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22986 *) ac_try_echo=$ac_try;;
22987esac
22988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22989 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022990 ac_status=$?
22991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22992 (exit $ac_status); }; }; then
22993 ac_cv_broken_poll=yes
22994else
22995 echo "$as_me: program exited with status $ac_status" >&5
22996echo "$as_me: failed program was:" >&5
22997sed 's/^/| /' conftest.$ac_ext >&5
22998
22999( exit $ac_status )
23000ac_cv_broken_poll=no
23001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002rm -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 +000023003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023004
23005
23006{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23007echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023008if test "$ac_cv_broken_poll" = yes
23009then
23010
23011cat >>confdefs.h <<\_ACEOF
23012#define HAVE_BROKEN_POLL 1
23013_ACEOF
23014
23015fi
23016
Brett Cannon43802422005-02-10 20:48:03 +000023017# 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 +000023018# (which is not required by ISO C or UNIX spec) and/or if we support
23019# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023020{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23021echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023022if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23023 echo $ECHO_N "(cached) $ECHO_C" >&6
23024else
23025 cat >conftest.$ac_ext <<_ACEOF
23026/* confdefs.h. */
23027_ACEOF
23028cat confdefs.h >>conftest.$ac_ext
23029cat >>conftest.$ac_ext <<_ACEOF
23030/* end confdefs.h. */
23031#include <sys/types.h>
23032#include <$ac_cv_struct_tm>
23033
23034
23035int
23036main ()
23037{
23038static struct tm ac_aggr;
23039if (ac_aggr.tm_zone)
23040return 0;
23041 ;
23042 return 0;
23043}
23044_ACEOF
23045rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023046if { (ac_try="$ac_compile"
23047case "(($ac_try" in
23048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23049 *) ac_try_echo=$ac_try;;
23050esac
23051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23052 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023053 ac_status=$?
23054 grep -v '^ *+' conftest.er1 >conftest.err
23055 rm -f conftest.er1
23056 cat conftest.err >&5
23057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023058 (exit $ac_status); } && {
23059 test -z "$ac_c_werror_flag" ||
23060 test ! -s conftest.err
23061 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023062 ac_cv_member_struct_tm_tm_zone=yes
23063else
23064 echo "$as_me: failed program was:" >&5
23065sed 's/^/| /' conftest.$ac_ext >&5
23066
Martin v. Löwiseba40652007-08-30 20:10:57 +000023067 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023068/* confdefs.h. */
23069_ACEOF
23070cat confdefs.h >>conftest.$ac_ext
23071cat >>conftest.$ac_ext <<_ACEOF
23072/* end confdefs.h. */
23073#include <sys/types.h>
23074#include <$ac_cv_struct_tm>
23075
23076
23077int
23078main ()
23079{
23080static struct tm ac_aggr;
23081if (sizeof ac_aggr.tm_zone)
23082return 0;
23083 ;
23084 return 0;
23085}
23086_ACEOF
23087rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023088if { (ac_try="$ac_compile"
23089case "(($ac_try" in
23090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23091 *) ac_try_echo=$ac_try;;
23092esac
23093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23094 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023095 ac_status=$?
23096 grep -v '^ *+' conftest.er1 >conftest.err
23097 rm -f conftest.er1
23098 cat conftest.err >&5
23099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023100 (exit $ac_status); } && {
23101 test -z "$ac_c_werror_flag" ||
23102 test ! -s conftest.err
23103 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023104 ac_cv_member_struct_tm_tm_zone=yes
23105else
23106 echo "$as_me: failed program was:" >&5
23107sed 's/^/| /' conftest.$ac_ext >&5
23108
Martin v. Löwiseba40652007-08-30 20:10:57 +000023109 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023111
23112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023114
23115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023117{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23118echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023119if test $ac_cv_member_struct_tm_tm_zone = yes; then
23120
23121cat >>confdefs.h <<_ACEOF
23122#define HAVE_STRUCT_TM_TM_ZONE 1
23123_ACEOF
23124
23125
23126fi
23127
23128if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23129
23130cat >>confdefs.h <<\_ACEOF
23131#define HAVE_TM_ZONE 1
23132_ACEOF
23133
23134else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023135 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23136echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23137if test "${ac_cv_have_decl_tzname+set}" = set; then
23138 echo $ECHO_N "(cached) $ECHO_C" >&6
23139else
23140 cat >conftest.$ac_ext <<_ACEOF
23141/* confdefs.h. */
23142_ACEOF
23143cat confdefs.h >>conftest.$ac_ext
23144cat >>conftest.$ac_ext <<_ACEOF
23145/* end confdefs.h. */
23146#include <time.h>
23147
23148int
23149main ()
23150{
23151#ifndef tzname
23152 (void) tzname;
23153#endif
23154
23155 ;
23156 return 0;
23157}
23158_ACEOF
23159rm -f conftest.$ac_objext
23160if { (ac_try="$ac_compile"
23161case "(($ac_try" in
23162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23163 *) ac_try_echo=$ac_try;;
23164esac
23165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23166 (eval "$ac_compile") 2>conftest.er1
23167 ac_status=$?
23168 grep -v '^ *+' conftest.er1 >conftest.err
23169 rm -f conftest.er1
23170 cat conftest.err >&5
23171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23172 (exit $ac_status); } && {
23173 test -z "$ac_c_werror_flag" ||
23174 test ! -s conftest.err
23175 } && test -s conftest.$ac_objext; then
23176 ac_cv_have_decl_tzname=yes
23177else
23178 echo "$as_me: failed program was:" >&5
23179sed 's/^/| /' conftest.$ac_ext >&5
23180
23181 ac_cv_have_decl_tzname=no
23182fi
23183
23184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23185fi
23186{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23187echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23188if test $ac_cv_have_decl_tzname = yes; then
23189
23190cat >>confdefs.h <<_ACEOF
23191#define HAVE_DECL_TZNAME 1
23192_ACEOF
23193
23194
23195else
23196 cat >>confdefs.h <<_ACEOF
23197#define HAVE_DECL_TZNAME 0
23198_ACEOF
23199
23200
23201fi
23202
23203
23204 { echo "$as_me:$LINENO: checking for tzname" >&5
23205echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023206if test "${ac_cv_var_tzname+set}" = set; then
23207 echo $ECHO_N "(cached) $ECHO_C" >&6
23208else
23209 cat >conftest.$ac_ext <<_ACEOF
23210/* confdefs.h. */
23211_ACEOF
23212cat confdefs.h >>conftest.$ac_ext
23213cat >>conftest.$ac_ext <<_ACEOF
23214/* end confdefs.h. */
23215#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023216#if !HAVE_DECL_TZNAME
23217extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023218#endif
23219
23220int
23221main ()
23222{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023223return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023224 ;
23225 return 0;
23226}
23227_ACEOF
23228rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023229if { (ac_try="$ac_link"
23230case "(($ac_try" in
23231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23232 *) ac_try_echo=$ac_try;;
23233esac
23234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23235 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023236 ac_status=$?
23237 grep -v '^ *+' conftest.er1 >conftest.err
23238 rm -f conftest.er1
23239 cat conftest.err >&5
23240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023241 (exit $ac_status); } && {
23242 test -z "$ac_c_werror_flag" ||
23243 test ! -s conftest.err
23244 } && test -s conftest$ac_exeext &&
23245 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023246 ac_cv_var_tzname=yes
23247else
23248 echo "$as_me: failed program was:" >&5
23249sed 's/^/| /' conftest.$ac_ext >&5
23250
Martin v. Löwiseba40652007-08-30 20:10:57 +000023251 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023253
23254rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023255 conftest$ac_exeext conftest.$ac_ext
23256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023257{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23258echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023259 if test $ac_cv_var_tzname = yes; then
23260
23261cat >>confdefs.h <<\_ACEOF
23262#define HAVE_TZNAME 1
23263_ACEOF
23264
23265 fi
23266fi
23267
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023268
Martin v. Löwis1d459062005-03-14 21:23:33 +000023269# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023270{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23271echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023272if test "${ac_cv_working_tzset+set}" = set; then
23273 echo $ECHO_N "(cached) $ECHO_C" >&6
23274else
23275
23276if test "$cross_compiling" = yes; then
23277 ac_cv_working_tzset=no
23278else
23279 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023280/* confdefs.h. */
23281_ACEOF
23282cat confdefs.h >>conftest.$ac_ext
23283cat >>conftest.$ac_ext <<_ACEOF
23284/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023285
23286#include <stdlib.h>
23287#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023288#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023289
23290#if HAVE_TZNAME
23291extern char *tzname[];
23292#endif
23293
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023294int main()
23295{
Brett Cannon18367812003-09-19 00:59:16 +000023296 /* Note that we need to ensure that not only does tzset(3)
23297 do 'something' with localtime, but it works as documented
23298 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023299 This includes making sure that tzname is set properly if
23300 tm->tm_zone does not exist since it is the alternative way
23301 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023302
23303 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023304 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023305 */
23306
Martin v. Löwis1d459062005-03-14 21:23:33 +000023307 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023308 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23309
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023310 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023311 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023312 if (localtime(&groundhogday)->tm_hour != 0)
23313 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023314#if HAVE_TZNAME
23315 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23316 if (strcmp(tzname[0], "UTC") ||
23317 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23318 exit(1);
23319#endif
Brett Cannon18367812003-09-19 00:59:16 +000023320
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023321 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023322 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023323 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023324 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023325#if HAVE_TZNAME
23326 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23327 exit(1);
23328#endif
Brett Cannon18367812003-09-19 00:59:16 +000023329
23330 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23331 tzset();
23332 if (localtime(&groundhogday)->tm_hour != 11)
23333 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023334#if HAVE_TZNAME
23335 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23336 exit(1);
23337#endif
23338
23339#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023340 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23341 exit(1);
23342 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23343 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023344#endif
Brett Cannon18367812003-09-19 00:59:16 +000023345
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023346 exit(0);
23347}
23348
23349_ACEOF
23350rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023351if { (ac_try="$ac_link"
23352case "(($ac_try" in
23353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23354 *) ac_try_echo=$ac_try;;
23355esac
23356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23357 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023358 ac_status=$?
23359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23360 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023361 { (case "(($ac_try" in
23362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23363 *) ac_try_echo=$ac_try;;
23364esac
23365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23366 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023367 ac_status=$?
23368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23369 (exit $ac_status); }; }; then
23370 ac_cv_working_tzset=yes
23371else
23372 echo "$as_me: program exited with status $ac_status" >&5
23373echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023374sed 's/^/| /' conftest.$ac_ext >&5
23375
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023376( exit $ac_status )
23377ac_cv_working_tzset=no
23378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023379rm -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 +000023380fi
23381
Martin v. Löwiseba40652007-08-30 20:10:57 +000023382
23383fi
23384
23385{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23386echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023387if test "$ac_cv_working_tzset" = yes
23388then
23389
23390cat >>confdefs.h <<\_ACEOF
23391#define HAVE_WORKING_TZSET 1
23392_ACEOF
23393
23394fi
23395
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023396# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023397{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23398echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023399if test "${ac_cv_stat_tv_nsec+set}" = set; then
23400 echo $ECHO_N "(cached) $ECHO_C" >&6
23401else
23402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023403/* confdefs.h. */
23404_ACEOF
23405cat confdefs.h >>conftest.$ac_ext
23406cat >>conftest.$ac_ext <<_ACEOF
23407/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023408#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023409int
23410main ()
23411{
23412
23413struct stat st;
23414st.st_mtim.tv_nsec = 1;
23415
23416 ;
23417 return 0;
23418}
23419_ACEOF
23420rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023421if { (ac_try="$ac_compile"
23422case "(($ac_try" in
23423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23424 *) ac_try_echo=$ac_try;;
23425esac
23426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23427 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023429 grep -v '^ *+' conftest.er1 >conftest.err
23430 rm -f conftest.er1
23431 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023433 (exit $ac_status); } && {
23434 test -z "$ac_c_werror_flag" ||
23435 test ! -s conftest.err
23436 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023437 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023438else
23439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023440sed 's/^/| /' conftest.$ac_ext >&5
23441
Martin v. Löwiseba40652007-08-30 20:10:57 +000023442 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023443fi
23444
Martin v. Löwiseba40652007-08-30 20:10:57 +000023445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23446fi
23447
23448{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23449echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023450if test "$ac_cv_stat_tv_nsec" = yes
23451then
23452
23453cat >>confdefs.h <<\_ACEOF
23454#define HAVE_STAT_TV_NSEC 1
23455_ACEOF
23456
23457fi
23458
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023459# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023460{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23461echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023462if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23463 echo $ECHO_N "(cached) $ECHO_C" >&6
23464else
23465 cat >conftest.$ac_ext <<_ACEOF
23466/* confdefs.h. */
23467_ACEOF
23468cat confdefs.h >>conftest.$ac_ext
23469cat >>conftest.$ac_ext <<_ACEOF
23470/* end confdefs.h. */
23471#include <sys/stat.h>
23472int
23473main ()
23474{
23475
23476struct stat st;
23477st.st_mtimespec.tv_nsec = 1;
23478
23479 ;
23480 return 0;
23481}
23482_ACEOF
23483rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023484if { (ac_try="$ac_compile"
23485case "(($ac_try" in
23486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23487 *) ac_try_echo=$ac_try;;
23488esac
23489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023491 ac_status=$?
23492 grep -v '^ *+' conftest.er1 >conftest.err
23493 rm -f conftest.er1
23494 cat conftest.err >&5
23495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023496 (exit $ac_status); } && {
23497 test -z "$ac_c_werror_flag" ||
23498 test ! -s conftest.err
23499 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023500 ac_cv_stat_tv_nsec2=yes
23501else
23502 echo "$as_me: failed program was:" >&5
23503sed 's/^/| /' conftest.$ac_ext >&5
23504
Martin v. Löwiseba40652007-08-30 20:10:57 +000023505 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023506fi
23507
Martin v. Löwiseba40652007-08-30 20:10:57 +000023508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23509fi
23510
23511{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23512echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023513if test "$ac_cv_stat_tv_nsec2" = yes
23514then
23515
23516cat >>confdefs.h <<\_ACEOF
23517#define HAVE_STAT_TV_NSEC2 1
23518_ACEOF
23519
23520fi
23521
Jack Jansen666b1e72001-10-31 12:11:48 +000023522# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023523{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23524echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023525if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23526 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023527else
Martin v. Löwis11437992002-04-12 09:54:03 +000023528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023529/* confdefs.h. */
23530_ACEOF
23531cat confdefs.h >>conftest.$ac_ext
23532cat >>conftest.$ac_ext <<_ACEOF
23533/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023534#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023535int
23536main ()
23537{
Jack Jansen666b1e72001-10-31 12:11:48 +000023538
23539 int rtn;
23540 rtn = mvwdelch(0,0,0);
23541
Martin v. Löwis11437992002-04-12 09:54:03 +000023542 ;
23543 return 0;
23544}
23545_ACEOF
23546rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023547if { (ac_try="$ac_compile"
23548case "(($ac_try" in
23549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23550 *) ac_try_echo=$ac_try;;
23551esac
23552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023555 grep -v '^ *+' conftest.er1 >conftest.err
23556 rm -f conftest.er1
23557 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023559 (exit $ac_status); } && {
23560 test -z "$ac_c_werror_flag" ||
23561 test ! -s conftest.err
23562 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023563 ac_cv_mvwdelch_is_expression=yes
23564else
Martin v. Löwis11437992002-04-12 09:54:03 +000023565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023566sed 's/^/| /' conftest.$ac_ext >&5
23567
Martin v. Löwiseba40652007-08-30 20:10:57 +000023568 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023569fi
23570
Martin v. Löwiseba40652007-08-30 20:10:57 +000023571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23572fi
23573
23574{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23575echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023576
23577if test "$ac_cv_mvwdelch_is_expression" = yes
23578then
Martin v. Löwis11437992002-04-12 09:54:03 +000023579
23580cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023581#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023582_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023583
23584fi
23585
Martin v. Löwiseba40652007-08-30 20:10:57 +000023586{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23587echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023588if test "${ac_cv_window_has_flags+set}" = set; then
23589 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023590else
Martin v. Löwis11437992002-04-12 09:54:03 +000023591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023592/* confdefs.h. */
23593_ACEOF
23594cat confdefs.h >>conftest.$ac_ext
23595cat >>conftest.$ac_ext <<_ACEOF
23596/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023597#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023598int
23599main ()
23600{
Jack Jansen666b1e72001-10-31 12:11:48 +000023601
23602 WINDOW *w;
23603 w->_flags = 0;
23604
Martin v. Löwis11437992002-04-12 09:54:03 +000023605 ;
23606 return 0;
23607}
23608_ACEOF
23609rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023610if { (ac_try="$ac_compile"
23611case "(($ac_try" in
23612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23613 *) ac_try_echo=$ac_try;;
23614esac
23615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023618 grep -v '^ *+' conftest.er1 >conftest.err
23619 rm -f conftest.er1
23620 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023622 (exit $ac_status); } && {
23623 test -z "$ac_c_werror_flag" ||
23624 test ! -s conftest.err
23625 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023626 ac_cv_window_has_flags=yes
23627else
Martin v. Löwis11437992002-04-12 09:54:03 +000023628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023629sed 's/^/| /' conftest.$ac_ext >&5
23630
Martin v. Löwiseba40652007-08-30 20:10:57 +000023631 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023632fi
23633
Martin v. Löwiseba40652007-08-30 20:10:57 +000023634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23635fi
23636
23637{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23638echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023639
Jack Jansen666b1e72001-10-31 12:11:48 +000023640
23641if test "$ac_cv_window_has_flags" = yes
23642then
Martin v. Löwis11437992002-04-12 09:54:03 +000023643
23644cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023645#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023646_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023647
23648fi
23649
Martin v. Löwiseba40652007-08-30 20:10:57 +000023650{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23651echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023652cat >conftest.$ac_ext <<_ACEOF
23653/* confdefs.h. */
23654_ACEOF
23655cat confdefs.h >>conftest.$ac_ext
23656cat >>conftest.$ac_ext <<_ACEOF
23657/* end confdefs.h. */
23658#include <curses.h>
23659int
23660main ()
23661{
23662void *x=is_term_resized
23663 ;
23664 return 0;
23665}
23666_ACEOF
23667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023668if { (ac_try="$ac_compile"
23669case "(($ac_try" in
23670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23671 *) ac_try_echo=$ac_try;;
23672esac
23673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23674 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023675 ac_status=$?
23676 grep -v '^ *+' conftest.er1 >conftest.err
23677 rm -f conftest.er1
23678 cat conftest.err >&5
23679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023680 (exit $ac_status); } && {
23681 test -z "$ac_c_werror_flag" ||
23682 test ! -s conftest.err
23683 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023684
23685cat >>confdefs.h <<\_ACEOF
23686#define HAVE_CURSES_IS_TERM_RESIZED 1
23687_ACEOF
23688
Martin v. Löwiseba40652007-08-30 20:10:57 +000023689 { echo "$as_me:$LINENO: result: yes" >&5
23690echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023691else
23692 echo "$as_me: failed program was:" >&5
23693sed 's/^/| /' conftest.$ac_ext >&5
23694
Martin v. Löwiseba40652007-08-30 20:10:57 +000023695 { echo "$as_me:$LINENO: result: no" >&5
23696echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023697
23698fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023699
Martin v. Löwiseba40652007-08-30 20:10:57 +000023700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23701
23702{ echo "$as_me:$LINENO: checking for resize_term" >&5
23703echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023704cat >conftest.$ac_ext <<_ACEOF
23705/* confdefs.h. */
23706_ACEOF
23707cat confdefs.h >>conftest.$ac_ext
23708cat >>conftest.$ac_ext <<_ACEOF
23709/* end confdefs.h. */
23710#include <curses.h>
23711int
23712main ()
23713{
23714void *x=resize_term
23715 ;
23716 return 0;
23717}
23718_ACEOF
23719rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023720if { (ac_try="$ac_compile"
23721case "(($ac_try" in
23722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23723 *) ac_try_echo=$ac_try;;
23724esac
23725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23726 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023727 ac_status=$?
23728 grep -v '^ *+' conftest.er1 >conftest.err
23729 rm -f conftest.er1
23730 cat conftest.err >&5
23731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023732 (exit $ac_status); } && {
23733 test -z "$ac_c_werror_flag" ||
23734 test ! -s conftest.err
23735 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023736
23737cat >>confdefs.h <<\_ACEOF
23738#define HAVE_CURSES_RESIZE_TERM 1
23739_ACEOF
23740
Martin v. Löwiseba40652007-08-30 20:10:57 +000023741 { echo "$as_me:$LINENO: result: yes" >&5
23742echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023743else
23744 echo "$as_me: failed program was:" >&5
23745sed 's/^/| /' conftest.$ac_ext >&5
23746
Martin v. Löwiseba40652007-08-30 20:10:57 +000023747 { echo "$as_me:$LINENO: result: no" >&5
23748echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023749
23750fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023751
Martin v. Löwiseba40652007-08-30 20:10:57 +000023752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23753
23754{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23755echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023756cat >conftest.$ac_ext <<_ACEOF
23757/* confdefs.h. */
23758_ACEOF
23759cat confdefs.h >>conftest.$ac_ext
23760cat >>conftest.$ac_ext <<_ACEOF
23761/* end confdefs.h. */
23762#include <curses.h>
23763int
23764main ()
23765{
23766void *x=resizeterm
23767 ;
23768 return 0;
23769}
23770_ACEOF
23771rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023772if { (ac_try="$ac_compile"
23773case "(($ac_try" in
23774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23775 *) ac_try_echo=$ac_try;;
23776esac
23777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23778 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023779 ac_status=$?
23780 grep -v '^ *+' conftest.er1 >conftest.err
23781 rm -f conftest.er1
23782 cat conftest.err >&5
23783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023784 (exit $ac_status); } && {
23785 test -z "$ac_c_werror_flag" ||
23786 test ! -s conftest.err
23787 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023788
23789cat >>confdefs.h <<\_ACEOF
23790#define HAVE_CURSES_RESIZETERM 1
23791_ACEOF
23792
Martin v. Löwiseba40652007-08-30 20:10:57 +000023793 { echo "$as_me:$LINENO: result: yes" >&5
23794echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023795else
23796 echo "$as_me: failed program was:" >&5
23797sed 's/^/| /' conftest.$ac_ext >&5
23798
Martin v. Löwiseba40652007-08-30 20:10:57 +000023799 { echo "$as_me:$LINENO: result: no" >&5
23800echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023801
23802fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023803
Martin v. Löwiseba40652007-08-30 20:10:57 +000023804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23805
23806{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23807echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023808
23809if test -r /dev/ptmx
23810then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023811 { echo "$as_me:$LINENO: result: yes" >&5
23812echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023813
23814cat >>confdefs.h <<\_ACEOF
23815#define HAVE_DEV_PTMX 1
23816_ACEOF
23817
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023818else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023819 { echo "$as_me:$LINENO: result: no" >&5
23820echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023821fi
23822
Martin v. Löwiseba40652007-08-30 20:10:57 +000023823{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23824echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023825
23826if test -r /dev/ptc
23827then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023828 { echo "$as_me:$LINENO: result: yes" >&5
23829echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023830
23831cat >>confdefs.h <<\_ACEOF
23832#define HAVE_DEV_PTC 1
23833_ACEOF
23834
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023835else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023836 { echo "$as_me:$LINENO: result: no" >&5
23837echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023838fi
23839
Martin v. Löwiseba40652007-08-30 20:10:57 +000023840{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23841echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023842if test "$cross_compiling" = yes; then
23843 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23844See \`config.log' for more details." >&5
23845echo "$as_me: error: cannot run test program while cross compiling
23846See \`config.log' for more details." >&2;}
23847 { (exit 1); exit 1; }; }
23848else
23849 cat >conftest.$ac_ext <<_ACEOF
23850/* confdefs.h. */
23851_ACEOF
23852cat confdefs.h >>conftest.$ac_ext
23853cat >>conftest.$ac_ext <<_ACEOF
23854/* end confdefs.h. */
23855#include <stdio.h>
23856#include <stddef.h>
23857#include <string.h>
23858
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023859#ifdef HAVE_SYS_TYPES_H
23860#include <sys/types.h>
23861#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023862
23863#ifdef HAVE_SSIZE_T
23864typedef ssize_t Py_ssize_t;
23865#elif SIZEOF_VOID_P == SIZEOF_LONG
23866typedef long Py_ssize_t;
23867#else
23868typedef int Py_ssize_t;
23869#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023870
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023871int main()
23872{
23873 char buffer[256];
23874
Brett Cannon09d12362006-05-11 05:11:33 +000023875 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23876 return 1;
23877
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023878 if (strcmp(buffer, "123"))
23879 return 1;
23880
23881 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23882 return 1;
23883
23884 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023885 return 1;
23886
23887 return 0;
23888}
23889_ACEOF
23890rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023891if { (ac_try="$ac_link"
23892case "(($ac_try" in
23893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23894 *) ac_try_echo=$ac_try;;
23895esac
23896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23897 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023898 ac_status=$?
23899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23900 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023901 { (case "(($ac_try" in
23902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23903 *) ac_try_echo=$ac_try;;
23904esac
23905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23906 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023907 ac_status=$?
23908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23909 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023910 { echo "$as_me:$LINENO: result: yes" >&5
23911echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023912
23913cat >>confdefs.h <<\_ACEOF
23914#define PY_FORMAT_SIZE_T "z"
23915_ACEOF
23916
23917else
23918 echo "$as_me: program exited with status $ac_status" >&5
23919echo "$as_me: failed program was:" >&5
23920sed 's/^/| /' conftest.$ac_ext >&5
23921
23922( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023923{ echo "$as_me:$LINENO: result: no" >&5
23924echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023926rm -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 +000023927fi
23928
Martin v. Löwiseba40652007-08-30 20:10:57 +000023929
23930
23931{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23932echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023933if test "${ac_cv_type_socklen_t+set}" = set; then
23934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023935else
Martin v. Löwis11437992002-04-12 09:54:03 +000023936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023937/* confdefs.h. */
23938_ACEOF
23939cat confdefs.h >>conftest.$ac_ext
23940cat >>conftest.$ac_ext <<_ACEOF
23941/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023942
23943#ifdef HAVE_SYS_TYPES_H
23944#include <sys/types.h>
23945#endif
23946#ifdef HAVE_SYS_SOCKET_H
23947#include <sys/socket.h>
23948#endif
23949
23950
Martin v. Löwiseba40652007-08-30 20:10:57 +000023951typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023952int
23953main ()
23954{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023955if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023956 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023957if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023958 return 0;
23959 ;
23960 return 0;
23961}
23962_ACEOF
23963rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023964if { (ac_try="$ac_compile"
23965case "(($ac_try" in
23966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23967 *) ac_try_echo=$ac_try;;
23968esac
23969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23970 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023972 grep -v '^ *+' conftest.er1 >conftest.err
23973 rm -f conftest.er1
23974 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023976 (exit $ac_status); } && {
23977 test -z "$ac_c_werror_flag" ||
23978 test ! -s conftest.err
23979 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000023980 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000023981else
Martin v. Löwis11437992002-04-12 09:54:03 +000023982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023983sed 's/^/| /' conftest.$ac_ext >&5
23984
Martin v. Löwiseba40652007-08-30 20:10:57 +000023985 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000023986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023987
23988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023990{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
23991echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023992if test $ac_cv_type_socklen_t = yes; then
23993 :
23994else
Guido van Rossum95713eb2000-05-18 20:53:31 +000023995
Martin v. Löwis01c04012002-11-11 14:58:44 +000023996cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023997#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000023998_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023999
24000fi
24001
Michael W. Hudson54241132001-12-07 15:38:26 +000024002
Michael W. Hudson54241132001-12-07 15:38:26 +000024003
24004
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024005for h in `(cd $srcdir;echo Python/thread_*.h)`
24006do
24007 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24008done
24009
Michael W. Hudson54241132001-12-07 15:38:26 +000024010
Neal Norwitzd24499d2005-12-18 21:36:39 +000024011SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024012{ echo "$as_me:$LINENO: checking for build directories" >&5
24013echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024014for dir in $SRCDIRS; do
24015 if test ! -d $dir; then
24016 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024017 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024018done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024019{ echo "$as_me:$LINENO: result: done" >&5
24020echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024021
Guido van Rossum627b2d71993-12-24 10:39:16 +000024022# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024023ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024024
Martin v. Löwis11437992002-04-12 09:54:03 +000024025cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024026# This file is a shell script that caches the results of configure
24027# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024028# scripts and configure runs, see configure's option --config-cache.
24029# It is not useful on other systems. If it contains results you don't
24030# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024031#
Martin v. Löwis11437992002-04-12 09:54:03 +000024032# config.status only pays attention to the cache file if you give it
24033# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024034#
Skip Montanaro6dead952003-09-25 14:50:04 +000024035# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024036# loading this file, other *unset* `ac_cv_foo' will be assigned the
24037# following values.
24038
24039_ACEOF
24040
Guido van Rossumf78abae1997-01-21 22:02:36 +000024041# The following way of writing the cache mishandles newlines in values,
24042# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024043# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024044# Ultrix sh set writes to stderr and can't be redirected directly,
24045# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024046(
24047 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24048 eval ac_val=\$$ac_var
24049 case $ac_val in #(
24050 *${as_nl}*)
24051 case $ac_var in #(
24052 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24053echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24054 esac
24055 case $ac_var in #(
24056 _ | IFS | as_nl) ;; #(
24057 *) $as_unset $ac_var ;;
24058 esac ;;
24059 esac
24060 done
24061
Martin v. Löwis11437992002-04-12 09:54:03 +000024062 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024063 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24064 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024065 # `set' does not quote correctly, so add quotes (double-quote
24066 # substitution turns \\\\ into \\, and sed turns \\ into \).
24067 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024068 "s/'/'\\\\''/g;
24069 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024070 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024071 *)
24072 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024073 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024074 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024075 esac |
24076 sort
24077) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024078 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024079 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024080 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024081 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024082 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24083 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024084 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24085 :end' >>confcache
24086if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24087 if test -w "$cache_file"; then
24088 test "x$cache_file" != "x/dev/null" &&
24089 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24090echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024091 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024092 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024093 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24094echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024095 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024096fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024097rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024098
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024099test "x$prefix" = xNONE && prefix=$ac_default_prefix
24100# Let make expand exec_prefix.
24101test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024102
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024103DEFS=-DHAVE_CONFIG_H
24104
Skip Montanaro6dead952003-09-25 14:50:04 +000024105ac_libobjs=
24106ac_ltlibobjs=
24107for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24108 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024109 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24110 ac_i=`echo "$ac_i" | sed "$ac_script"`
24111 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24112 # will be set to the directory where LIBOBJS objects are built.
24113 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24114 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024115done
24116LIBOBJS=$ac_libobjs
24117
24118LTLIBOBJS=$ac_ltlibobjs
24119
24120
Martin v. Löwis11437992002-04-12 09:54:03 +000024121
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024122: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024123ac_clean_files_save=$ac_clean_files
24124ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24125{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24126echo "$as_me: creating $CONFIG_STATUS" >&6;}
24127cat >$CONFIG_STATUS <<_ACEOF
24128#! $SHELL
24129# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024130# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024131# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024132# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024133
Martin v. Löwis11437992002-04-12 09:54:03 +000024134debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024135ac_cs_recheck=false
24136ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024137SHELL=\${CONFIG_SHELL-$SHELL}
24138_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024139
Martin v. Löwis11437992002-04-12 09:54:03 +000024140cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024141## --------------------- ##
24142## M4sh Initialization. ##
24143## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024144
Martin v. Löwiseba40652007-08-30 20:10:57 +000024145# Be more Bourne compatible
24146DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024147if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24148 emulate sh
24149 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024150 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24151 # is contrary to our usage. Disable this feature.
24152 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024153 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024154else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024155 case `(set -o) 2>/dev/null` in
24156 *posix*) set -o posix ;;
24157esac
24158
Martin v. Löwis11437992002-04-12 09:54:03 +000024159fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024160
Skip Montanaro6dead952003-09-25 14:50:04 +000024161
Martin v. Löwis11437992002-04-12 09:54:03 +000024162
24163
Martin v. Löwiseba40652007-08-30 20:10:57 +000024164# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024165# Avoid depending upon Character Ranges.
24166as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24167as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24168as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24169as_cr_digits='0123456789'
24170as_cr_alnum=$as_cr_Letters$as_cr_digits
24171
24172# The user is always right.
24173if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024174 echo "#! /bin/sh" >conf$$.sh
24175 echo "exit 0" >>conf$$.sh
24176 chmod +x conf$$.sh
24177 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024178 PATH_SEPARATOR=';'
24179 else
24180 PATH_SEPARATOR=:
24181 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024182 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024183fi
24184
Martin v. Löwiseba40652007-08-30 20:10:57 +000024185# Support unset when possible.
24186if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24187 as_unset=unset
24188else
24189 as_unset=false
24190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024191
Martin v. Löwiseba40652007-08-30 20:10:57 +000024192
24193# IFS
24194# We need space, tab and new line, in precisely that order. Quoting is
24195# there to prevent editors from complaining about space-tab.
24196# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24197# splitting by setting IFS to empty value.)
24198as_nl='
24199'
24200IFS=" "" $as_nl"
24201
24202# Find who we are. Look in the path if we contain no directory separator.
24203case $0 in
24204 *[\\/]* ) as_myself=$0 ;;
24205 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024206for as_dir in $PATH
24207do
24208 IFS=$as_save_IFS
24209 test -z "$as_dir" && as_dir=.
24210 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24211done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024212IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024213
Martin v. Löwiseba40652007-08-30 20:10:57 +000024214 ;;
24215esac
24216# We did not find ourselves, most probably we were run as `sh COMMAND'
24217# in which case we are not to be found in the path.
24218if test "x$as_myself" = x; then
24219 as_myself=$0
24220fi
24221if test ! -f "$as_myself"; then
24222 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24223 { (exit 1); exit 1; }
24224fi
24225
24226# Work around bugs in pre-3.0 UWIN ksh.
24227for as_var in ENV MAIL MAILPATH
24228do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24229done
24230PS1='$ '
24231PS2='> '
24232PS4='+ '
24233
24234# NLS nuisances.
24235for as_var in \
24236 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24237 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24238 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024239do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024240 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24241 eval $as_var=C; export $as_var
24242 else
24243 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24244 fi
24245done
24246
24247# Required to use basename.
24248if expr a : '\(a\)' >/dev/null 2>&1 &&
24249 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24250 as_expr=expr
24251else
24252 as_expr=false
24253fi
24254
24255if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24256 as_basename=basename
24257else
24258 as_basename=false
24259fi
24260
24261
24262# Name of the executable.
24263as_me=`$as_basename -- "$0" ||
24264$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24265 X"$0" : 'X\(//\)$' \| \
24266 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24267echo X/"$0" |
24268 sed '/^.*\/\([^/][^/]*\)\/*$/{
24269 s//\1/
24270 q
24271 }
24272 /^X\/\(\/\/\)$/{
24273 s//\1/
24274 q
24275 }
24276 /^X\/\(\/\).*/{
24277 s//\1/
24278 q
24279 }
24280 s/.*/./; q'`
24281
24282# CDPATH.
24283$as_unset CDPATH
24284
24285
24286
Martin v. Löwis11437992002-04-12 09:54:03 +000024287 as_lineno_1=$LINENO
24288 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024289 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024290 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024291
Martin v. Löwis11437992002-04-12 09:54:03 +000024292 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24293 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024294 # line-number line after each line using $LINENO; the second 'sed'
24295 # does the real work. The second script uses 'N' to pair each
24296 # line-number line with the line containing $LINENO, and appends
24297 # trailing '-' during substitution so that $LINENO is not a special
24298 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024299 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024300 # scripts with optimization help from Paolo Bonzini. Blame Lee
24301 # E. McMahon (1931-1989) for sed's syntax. :-)
24302 sed -n '
24303 p
24304 /[$]LINENO/=
24305 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024306 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024307 s/[$]LINENO.*/&-/
24308 t lineno
24309 b
24310 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024311 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024312 :loop
24313 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024314 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024315 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024316 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024317 chmod +x "$as_me.lineno" ||
24318 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024319 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024320
Martin v. Löwis11437992002-04-12 09:54:03 +000024321 # Don't try to exec as it changes $[0], causing all sort of problems
24322 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024323 # original and so on. Autoconf is especially sensitive to this).
24324 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024325 # Exit status is that of the last command.
24326 exit
24327}
24328
24329
Martin v. Löwiseba40652007-08-30 20:10:57 +000024330if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24331 as_dirname=dirname
24332else
24333 as_dirname=false
24334fi
24335
24336ECHO_C= ECHO_N= ECHO_T=
24337case `echo -n x` in
24338-n*)
24339 case `echo 'x\c'` in
24340 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24341 *) ECHO_C='\c';;
24342 esac;;
24343*)
24344 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024345esac
24346
Martin v. Löwiseba40652007-08-30 20:10:57 +000024347if expr a : '\(a\)' >/dev/null 2>&1 &&
24348 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024349 as_expr=expr
24350else
24351 as_expr=false
24352fi
24353
24354rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024355if test -d conf$$.dir; then
24356 rm -f conf$$.dir/conf$$.file
24357else
24358 rm -f conf$$.dir
24359 mkdir conf$$.dir
24360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024361echo >conf$$.file
24362if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024363 as_ln_s='ln -s'
24364 # ... but there are two gotchas:
24365 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24366 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24367 # In both cases, we have to default to `cp -p'.
24368 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024369 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024370elif ln conf$$.file conf$$ 2>/dev/null; then
24371 as_ln_s=ln
24372else
24373 as_ln_s='cp -p'
24374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024375rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24376rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024377
Skip Montanaro6dead952003-09-25 14:50:04 +000024378if mkdir -p . 2>/dev/null; then
24379 as_mkdir_p=:
24380else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024381 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024382 as_mkdir_p=false
24383fi
24384
Martin v. Löwiseba40652007-08-30 20:10:57 +000024385if test -x / >/dev/null 2>&1; then
24386 as_test_x='test -x'
24387else
24388 if ls -dL / >/dev/null 2>&1; then
24389 as_ls_L_option=L
24390 else
24391 as_ls_L_option=
24392 fi
24393 as_test_x='
24394 eval sh -c '\''
24395 if test -d "$1"; then
24396 test -d "$1/.";
24397 else
24398 case $1 in
24399 -*)set "./$1";;
24400 esac;
24401 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24402 ???[sx]*):;;*)false;;esac;fi
24403 '\'' sh
24404 '
24405fi
24406as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024407
24408# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024409as_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 +000024410
24411# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024412as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024413
24414
Martin v. Löwis11437992002-04-12 09:54:03 +000024415exec 6>&1
24416
Martin v. Löwiseba40652007-08-30 20:10:57 +000024417# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024418# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024419# values after options handling.
24420ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024421This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024422generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024423
24424 CONFIG_FILES = $CONFIG_FILES
24425 CONFIG_HEADERS = $CONFIG_HEADERS
24426 CONFIG_LINKS = $CONFIG_LINKS
24427 CONFIG_COMMANDS = $CONFIG_COMMANDS
24428 $ $0 $@
24429
Martin v. Löwiseba40652007-08-30 20:10:57 +000024430on `(hostname || uname -n) 2>/dev/null | sed 1q`
24431"
24432
Martin v. Löwis11437992002-04-12 09:54:03 +000024433_ACEOF
24434
Martin v. Löwiseba40652007-08-30 20:10:57 +000024435cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024436# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024437config_files="$ac_config_files"
24438config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024439
Martin v. Löwiseba40652007-08-30 20:10:57 +000024440_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024441
24442cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024443ac_cs_usage="\
24444\`$as_me' instantiates files from templates according to the
24445current configuration.
24446
24447Usage: $0 [OPTIONS] [FILE]...
24448
24449 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024450 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024451 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024452 -d, --debug don't remove temporary files
24453 --recheck update $as_me by reconfiguring in the same conditions
24454 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024455 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024456 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024457 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024458
24459Configuration files:
24460$config_files
24461
24462Configuration headers:
24463$config_headers
24464
24465Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024466
Martin v. Löwiseba40652007-08-30 20:10:57 +000024467_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024468cat >>$CONFIG_STATUS <<_ACEOF
24469ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024470python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024471configured by $0, generated by GNU Autoconf 2.61,
24472 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024473
Martin v. Löwiseba40652007-08-30 20:10:57 +000024474Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024475This config.status script is free software; the Free Software Foundation
24476gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024477
24478ac_pwd='$ac_pwd'
24479srcdir='$srcdir'
24480INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024481_ACEOF
24482
24483cat >>$CONFIG_STATUS <<\_ACEOF
24484# If no file are specified by the user, then we need to provide default
24485# value. By we need to know if files were specified by the user.
24486ac_need_defaults=:
24487while test $# != 0
24488do
24489 case $1 in
24490 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024491 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24492 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024493 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024494 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024495 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024496 ac_option=$1
24497 ac_optarg=$2
24498 ac_shift=shift
24499 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024500 esac
24501
Skip Montanaro6dead952003-09-25 14:50:04 +000024502 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024503 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024504 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24505 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024506 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24507 echo "$ac_cs_version"; exit ;;
24508 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024509 debug=: ;;
24510 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024511 $ac_shift
24512 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024513 ac_need_defaults=false;;
24514 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024515 $ac_shift
24516 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024517 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024518 --he | --h)
24519 # Conflict between --help and --header
24520 { echo "$as_me: error: ambiguous option: $1
24521Try \`$0 --help' for more information." >&2
24522 { (exit 1); exit 1; }; };;
24523 --help | --hel | -h )
24524 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024525 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24526 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24527 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024528
24529 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024530 -*) { echo "$as_me: error: unrecognized option: $1
24531Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024532 { (exit 1); exit 1; }; } ;;
24533
Martin v. Löwiseba40652007-08-30 20:10:57 +000024534 *) ac_config_targets="$ac_config_targets $1"
24535 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024536
24537 esac
24538 shift
24539done
24540
Skip Montanaro6dead952003-09-25 14:50:04 +000024541ac_configure_extra_args=
24542
24543if $ac_cs_silent; then
24544 exec 6>/dev/null
24545 ac_configure_extra_args="$ac_configure_extra_args --silent"
24546fi
24547
24548_ACEOF
24549cat >>$CONFIG_STATUS <<_ACEOF
24550if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024551 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24552 CONFIG_SHELL=$SHELL
24553 export CONFIG_SHELL
24554 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024555fi
24556
Martin v. Löwis11437992002-04-12 09:54:03 +000024557_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024558cat >>$CONFIG_STATUS <<\_ACEOF
24559exec 5>>config.log
24560{
24561 echo
24562 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24563## Running $as_me. ##
24564_ASBOX
24565 echo "$ac_log"
24566} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024567
Martin v. Löwiseba40652007-08-30 20:10:57 +000024568_ACEOF
24569cat >>$CONFIG_STATUS <<_ACEOF
24570_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024571
24572cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024573
24574# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024575for ac_config_target in $ac_config_targets
24576do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024577 case $ac_config_target in
24578 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24579 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24580 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24581 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
24582 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24583 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24584
Martin v. Löwis11437992002-04-12 09:54:03 +000024585 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24586echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24587 { (exit 1); exit 1; }; };;
24588 esac
24589done
24590
Martin v. Löwiseba40652007-08-30 20:10:57 +000024591
Martin v. Löwis11437992002-04-12 09:54:03 +000024592# If the user did not use the arguments to specify the items to instantiate,
24593# then the envvar interface is used. Set only those that are not.
24594# We use the long form for the default assignment because of an extremely
24595# bizarre bug on SunOS 4.1.3.
24596if $ac_need_defaults; then
24597 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24598 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24599fi
24600
Skip Montanaro6dead952003-09-25 14:50:04 +000024601# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024602# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024603# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024604# Hook for its removal unless debugging.
24605# Note that there is a small window in which the directory will not be cleaned:
24606# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024607$debug ||
24608{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024609 tmp=
24610 trap 'exit_status=$?
24611 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24612' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024613 trap '{ (exit 1); exit 1; }' 1 2 13 15
24614}
Martin v. Löwis11437992002-04-12 09:54:03 +000024615# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024616
Martin v. Löwis11437992002-04-12 09:54:03 +000024617{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024618 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024619 test -n "$tmp" && test -d "$tmp"
24620} ||
24621{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024622 tmp=./conf$$-$RANDOM
24623 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024624} ||
24625{
Skip Montanaro6dead952003-09-25 14:50:04 +000024626 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024627 { (exit 1); exit 1; }
24628}
24629
Martin v. Löwis11437992002-04-12 09:54:03 +000024630#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024631# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024632#
24633
24634# No need to generate the scripts if there are no CONFIG_FILES.
24635# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024636if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024637
24638_ACEOF
24639
Martin v. Löwiseba40652007-08-30 20:10:57 +000024640
24641
24642ac_delim='%!_!# '
24643for ac_last_try in false false false false false :; do
24644 cat >conf$$subs.sed <<_ACEOF
24645SHELL!$SHELL$ac_delim
24646PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24647PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24648PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24649PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24650PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24651PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24652exec_prefix!$exec_prefix$ac_delim
24653prefix!$prefix$ac_delim
24654program_transform_name!$program_transform_name$ac_delim
24655bindir!$bindir$ac_delim
24656sbindir!$sbindir$ac_delim
24657libexecdir!$libexecdir$ac_delim
24658datarootdir!$datarootdir$ac_delim
24659datadir!$datadir$ac_delim
24660sysconfdir!$sysconfdir$ac_delim
24661sharedstatedir!$sharedstatedir$ac_delim
24662localstatedir!$localstatedir$ac_delim
24663includedir!$includedir$ac_delim
24664oldincludedir!$oldincludedir$ac_delim
24665docdir!$docdir$ac_delim
24666infodir!$infodir$ac_delim
24667htmldir!$htmldir$ac_delim
24668dvidir!$dvidir$ac_delim
24669pdfdir!$pdfdir$ac_delim
24670psdir!$psdir$ac_delim
24671libdir!$libdir$ac_delim
24672localedir!$localedir$ac_delim
24673mandir!$mandir$ac_delim
24674DEFS!$DEFS$ac_delim
24675ECHO_C!$ECHO_C$ac_delim
24676ECHO_N!$ECHO_N$ac_delim
24677ECHO_T!$ECHO_T$ac_delim
24678LIBS!$LIBS$ac_delim
24679build_alias!$build_alias$ac_delim
24680host_alias!$host_alias$ac_delim
24681target_alias!$target_alias$ac_delim
24682VERSION!$VERSION$ac_delim
24683SOVERSION!$SOVERSION$ac_delim
24684CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24685UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24686PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
24687PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24688PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24689PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24690FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24691FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24692FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24693FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24694FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24695MACHDEP!$MACHDEP$ac_delim
24696SGI_ABI!$SGI_ABI$ac_delim
24697EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24698EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24699CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24700EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24701CC!$CC$ac_delim
24702CFLAGS!$CFLAGS$ac_delim
24703LDFLAGS!$LDFLAGS$ac_delim
24704CPPFLAGS!$CPPFLAGS$ac_delim
24705ac_ct_CC!$ac_ct_CC$ac_delim
24706EXEEXT!$EXEEXT$ac_delim
24707OBJEXT!$OBJEXT$ac_delim
24708CXX!$CXX$ac_delim
24709MAINCC!$MAINCC$ac_delim
24710CPP!$CPP$ac_delim
24711GREP!$GREP$ac_delim
24712EGREP!$EGREP$ac_delim
24713BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24714LIBRARY!$LIBRARY$ac_delim
24715LDLIBRARY!$LDLIBRARY$ac_delim
24716DLLLIBRARY!$DLLLIBRARY$ac_delim
24717BLDLIBRARY!$BLDLIBRARY$ac_delim
24718LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24719INSTSONAME!$INSTSONAME$ac_delim
24720RUNSHARED!$RUNSHARED$ac_delim
24721LINKCC!$LINKCC$ac_delim
24722RANLIB!$RANLIB$ac_delim
24723AR!$AR$ac_delim
24724SVNVERSION!$SVNVERSION$ac_delim
24725INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24726INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24727INSTALL_DATA!$INSTALL_DATA$ac_delim
24728LN!$LN$ac_delim
24729OPT!$OPT$ac_delim
24730BASECFLAGS!$BASECFLAGS$ac_delim
24731OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24732LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24733SO!$SO$ac_delim
24734LDSHARED!$LDSHARED$ac_delim
24735BLDSHARED!$BLDSHARED$ac_delim
24736CCSHARED!$CCSHARED$ac_delim
24737LINKFORSHARED!$LINKFORSHARED$ac_delim
24738CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24739SHLIBS!$SHLIBS$ac_delim
24740USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
24741SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
24742_ACEOF
24743
24744 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24745 break
24746 elif $ac_last_try; then
24747 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24748echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24749 { (exit 1); exit 1; }; }
24750 else
24751 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024752 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024753done
24754
24755ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24756if test -n "$ac_eof"; then
24757 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24758 ac_eof=`expr $ac_eof + 1`
24759fi
24760
24761cat >>$CONFIG_STATUS <<_ACEOF
24762cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24763/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24764_ACEOF
24765sed '
24766s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24767s/^/s,@/; s/!/@,|#_!!_#|/
24768:n
24769t n
24770s/'"$ac_delim"'$/,g/; t
24771s/$/\\/; p
24772N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24773' >>$CONFIG_STATUS <conf$$subs.sed
24774rm -f conf$$subs.sed
24775cat >>$CONFIG_STATUS <<_ACEOF
24776CEOF$ac_eof
24777_ACEOF
24778
24779
24780ac_delim='%!_!# '
24781for ac_last_try in false false false false false :; do
24782 cat >conf$$subs.sed <<_ACEOF
24783USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24784LDLAST!$LDLAST$ac_delim
24785THREADOBJ!$THREADOBJ$ac_delim
24786DLINCLDIR!$DLINCLDIR$ac_delim
24787DYNLOADFILE!$DYNLOADFILE$ac_delim
24788MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24789TRUE!$TRUE$ac_delim
24790LIBOBJS!$LIBOBJS$ac_delim
24791HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24792HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24793HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24794HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24795HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24796LIBM!$LIBM$ac_delim
24797LIBC!$LIBC$ac_delim
24798UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24799THREADHEADERS!$THREADHEADERS$ac_delim
24800SRCDIRS!$SRCDIRS$ac_delim
24801LTLIBOBJS!$LTLIBOBJS$ac_delim
24802_ACEOF
24803
24804 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
24805 break
24806 elif $ac_last_try; then
24807 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24808echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24809 { (exit 1); exit 1; }; }
24810 else
24811 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24812 fi
24813done
24814
24815ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24816if test -n "$ac_eof"; then
24817 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24818 ac_eof=`expr $ac_eof + 1`
24819fi
24820
24821cat >>$CONFIG_STATUS <<_ACEOF
24822cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24823/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24824_ACEOF
24825sed '
24826s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24827s/^/s,@/; s/!/@,|#_!!_#|/
24828:n
24829t n
24830s/'"$ac_delim"'$/,g/; t
24831s/$/\\/; p
24832N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24833' >>$CONFIG_STATUS <conf$$subs.sed
24834rm -f conf$$subs.sed
24835cat >>$CONFIG_STATUS <<_ACEOF
24836:end
24837s/|#_!!_#|//g
24838CEOF$ac_eof
24839_ACEOF
24840
24841
24842# VPATH may cause trouble with some makes, so we remove $(srcdir),
24843# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24844# trailing colons and then remove the whole line if VPATH becomes empty
24845# (actually we leave an empty line to preserve line numbers).
24846if test "x$srcdir" = x.; then
24847 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24848s/:*\$(srcdir):*/:/
24849s/:*\${srcdir}:*/:/
24850s/:*@srcdir@:*/:/
24851s/^\([^=]*=[ ]*\):*/\1/
24852s/:*$//
24853s/^[^=]*=[ ]*$//
24854}'
24855fi
24856
24857cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024858fi # test -n "$CONFIG_FILES"
24859
Martin v. Löwiseba40652007-08-30 20:10:57 +000024860
24861for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24862do
24863 case $ac_tag in
24864 :[FHLC]) ac_mode=$ac_tag; continue;;
24865 esac
24866 case $ac_mode$ac_tag in
24867 :[FHL]*:*);;
24868 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24869echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24870 { (exit 1); exit 1; }; };;
24871 :[FH]-) ac_tag=-:-;;
24872 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24873 esac
24874 ac_save_IFS=$IFS
24875 IFS=:
24876 set x $ac_tag
24877 IFS=$ac_save_IFS
24878 shift
24879 ac_file=$1
24880 shift
24881
24882 case $ac_mode in
24883 :L) ac_source=$1;;
24884 :[FH])
24885 ac_file_inputs=
24886 for ac_f
24887 do
24888 case $ac_f in
24889 -) ac_f="$tmp/stdin";;
24890 *) # Look for the file first in the build tree, then in the source tree
24891 # (if the path is not absolute). The absolute path cannot be DOS-style,
24892 # because $ac_f cannot contain `:'.
24893 test -f "$ac_f" ||
24894 case $ac_f in
24895 [\\/$]*) false;;
24896 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24897 esac ||
24898 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24899echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24900 { (exit 1); exit 1; }; };;
24901 esac
24902 ac_file_inputs="$ac_file_inputs $ac_f"
24903 done
24904
24905 # Let's still pretend it is `configure' which instantiates (i.e., don't
24906 # use $as_me), people would be surprised to read:
24907 # /* config.h. Generated by config.status. */
24908 configure_input="Generated from "`IFS=:
24909 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24910 if test x"$ac_file" != x-; then
24911 configure_input="$ac_file. $configure_input"
24912 { echo "$as_me:$LINENO: creating $ac_file" >&5
24913echo "$as_me: creating $ac_file" >&6;}
24914 fi
24915
24916 case $ac_tag in
24917 *:-:* | *:-) cat >"$tmp/stdin";;
24918 esac
24919 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024920 esac
24921
Martin v. Löwiseba40652007-08-30 20:10:57 +000024922 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024923$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024924 X"$ac_file" : 'X\(//\)[^/]' \| \
24925 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024926 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024927echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024928 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24929 s//\1/
24930 q
24931 }
24932 /^X\(\/\/\)[^/].*/{
24933 s//\1/
24934 q
24935 }
24936 /^X\(\/\/\)$/{
24937 s//\1/
24938 q
24939 }
24940 /^X\(\/\).*/{
24941 s//\1/
24942 q
24943 }
24944 s/.*/./; q'`
24945 { as_dir="$ac_dir"
24946 case $as_dir in #(
24947 -*) as_dir=./$as_dir;;
24948 esac
24949 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024950 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024951 while :; do
24952 case $as_dir in #(
24953 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24954 *) as_qdir=$as_dir;;
24955 esac
24956 as_dirs="'$as_qdir' $as_dirs"
24957 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024958$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024959 X"$as_dir" : 'X\(//\)[^/]' \| \
24960 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024961 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024962echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024963 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24964 s//\1/
24965 q
24966 }
24967 /^X\(\/\/\)[^/].*/{
24968 s//\1/
24969 q
24970 }
24971 /^X\(\/\/\)$/{
24972 s//\1/
24973 q
24974 }
24975 /^X\(\/\).*/{
24976 s//\1/
24977 q
24978 }
24979 s/.*/./; q'`
24980 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000024981 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024982 test -z "$as_dirs" || eval "mkdir $as_dirs"
24983 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24984echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000024985 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024986 ac_builddir=.
24987
Martin v. Löwiseba40652007-08-30 20:10:57 +000024988case "$ac_dir" in
24989.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24990*)
Martin v. Löwis11437992002-04-12 09:54:03 +000024991 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000024992 # A ".." for each directory in $ac_dir_suffix.
24993 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24994 case $ac_top_builddir_sub in
24995 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24996 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24997 esac ;;
24998esac
24999ac_abs_top_builddir=$ac_pwd
25000ac_abs_builddir=$ac_pwd$ac_dir_suffix
25001# for backward compatibility:
25002ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025003
25004case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025005 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025006 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025007 ac_top_srcdir=$ac_top_builddir_sub
25008 ac_abs_top_srcdir=$ac_pwd ;;
25009 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025010 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025011 ac_top_srcdir=$srcdir
25012 ac_abs_top_srcdir=$srcdir ;;
25013 *) # Relative name.
25014 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25015 ac_top_srcdir=$ac_top_build_prefix$srcdir
25016 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025017esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025018ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025019
Martin v. Löwis11437992002-04-12 09:54:03 +000025020
Martin v. Löwiseba40652007-08-30 20:10:57 +000025021 case $ac_mode in
25022 :F)
25023 #
25024 # CONFIG_FILE
25025 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025026
25027 case $INSTALL in
25028 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025029 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025030 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025031_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025032
25033cat >>$CONFIG_STATUS <<\_ACEOF
25034# If the template does not know about datarootdir, expand it.
25035# FIXME: This hack should be removed a few years after 2.60.
25036ac_datarootdir_hack=; ac_datarootdir_seen=
25037
25038case `sed -n '/datarootdir/ {
25039 p
25040 q
25041}
25042/@datadir@/p
25043/@docdir@/p
25044/@infodir@/p
25045/@localedir@/p
25046/@mandir@/p
25047' $ac_file_inputs` in
25048*datarootdir*) ac_datarootdir_seen=yes;;
25049*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25050 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25051echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25052_ACEOF
25053cat >>$CONFIG_STATUS <<_ACEOF
25054 ac_datarootdir_hack='
25055 s&@datadir@&$datadir&g
25056 s&@docdir@&$docdir&g
25057 s&@infodir@&$infodir&g
25058 s&@localedir@&$localedir&g
25059 s&@mandir@&$mandir&g
25060 s&\\\${datarootdir}&$datarootdir&g' ;;
25061esac
25062_ACEOF
25063
25064# Neutralize VPATH when `$srcdir' = `.'.
25065# Shell code in configure.ac might set extrasub.
25066# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025067cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025068 sed "$ac_vpsub
25069$extrasub
25070_ACEOF
25071cat >>$CONFIG_STATUS <<\_ACEOF
25072:t
25073/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025074s&@configure_input@&$configure_input&;t t
25075s&@top_builddir@&$ac_top_builddir_sub&;t t
25076s&@srcdir@&$ac_srcdir&;t t
25077s&@abs_srcdir@&$ac_abs_srcdir&;t t
25078s&@top_srcdir@&$ac_top_srcdir&;t t
25079s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25080s&@builddir@&$ac_builddir&;t t
25081s&@abs_builddir@&$ac_abs_builddir&;t t
25082s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25083s&@INSTALL@&$ac_INSTALL&;t t
25084$ac_datarootdir_hack
25085" $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 +000025086
Martin v. Löwiseba40652007-08-30 20:10:57 +000025087test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25088 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25089 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25090 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25091which seems to be undefined. Please make sure it is defined." >&5
25092echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25093which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025094
Martin v. Löwiseba40652007-08-30 20:10:57 +000025095 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025096 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025097 -) cat "$tmp/out"; rm -f "$tmp/out";;
25098 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025099 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025100 ;;
25101 :H)
25102 #
25103 # CONFIG_HEADER
25104 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025105_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025106
Martin v. Löwiseba40652007-08-30 20:10:57 +000025107# Transform confdefs.h into a sed script `conftest.defines', that
25108# substitutes the proper values into config.h.in to produce config.h.
25109rm -f conftest.defines conftest.tail
25110# First, append a space to every undef/define line, to ease matching.
25111echo 's/$/ /' >conftest.defines
25112# Then, protect against being on the right side of a sed subst, or in
25113# an unquoted here document, in config.status. If some macros were
25114# called several times there might be several #defines for the same
25115# symbol, which is useless. But do not sort them, since the last
25116# AC_DEFINE must be honored.
25117ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25118# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25119# NAME is the cpp macro being defined, VALUE is the value it is being given.
25120# PARAMS is the parameter list in the macro definition--in most cases, it's
25121# just an empty string.
25122ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25123ac_dB='\\)[ (].*,\\1define\\2'
25124ac_dC=' '
25125ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025126
Martin v. Löwiseba40652007-08-30 20:10:57 +000025127uniq confdefs.h |
25128 sed -n '
25129 t rset
25130 :rset
25131 s/^[ ]*#[ ]*define[ ][ ]*//
25132 t ok
25133 d
25134 :ok
25135 s/[\\&,]/\\&/g
25136 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25137 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25138 ' >>conftest.defines
25139
25140# Remove the space that was appended to ease matching.
25141# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025142# example, in the case of _POSIX_SOURCE, which is predefined and required
25143# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025144# (The regexp can be short, since the line contains either #define or #undef.)
25145echo 's/ $//
25146s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025147
Martin v. Löwiseba40652007-08-30 20:10:57 +000025148# Break up conftest.defines:
25149ac_max_sed_lines=50
25150
25151# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25152# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25153# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25154# et cetera.
25155ac_in='$ac_file_inputs'
25156ac_out='"$tmp/out1"'
25157ac_nxt='"$tmp/out2"'
25158
25159while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025160do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025161 # Write a here document:
25162 cat >>$CONFIG_STATUS <<_ACEOF
25163 # First, check the format of the line:
25164 cat >"\$tmp/defines.sed" <<\\CEOF
25165/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25166/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25167b
25168:def
25169_ACEOF
25170 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025171 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025172 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25173 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25174 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25175 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025176 rm -f conftest.defines
25177 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025178done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025179rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025180
Martin v. Löwiseba40652007-08-30 20:10:57 +000025181echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025182cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025183 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025184 echo "/* $configure_input */" >"$tmp/config.h"
25185 cat "$ac_result" >>"$tmp/config.h"
25186 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025187 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25188echo "$as_me: $ac_file is unchanged" >&6;}
25189 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025190 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025191 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025192 fi
25193 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025194 echo "/* $configure_input */"
25195 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025196 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025197 rm -f "$tmp/out12"
25198 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025199
Martin v. Löwiseba40652007-08-30 20:10:57 +000025200
25201 esac
25202
25203done # for ac_tag
25204
Guido van Rossum627b2d71993-12-24 10:39:16 +000025205
Martin v. Löwis11437992002-04-12 09:54:03 +000025206{ (exit 0); exit 0; }
25207_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025208chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025209ac_clean_files=$ac_clean_files_save
25210
25211
25212# configure is writing to config.log, and then calls config.status.
25213# config.status does its own redirection, appending to config.log.
25214# Unfortunately, on DOS this fails, as config.log is still kept open
25215# by configure, so config.status won't be able to write to it; its
25216# output is simply discarded. So we exec the FD to /dev/null,
25217# effectively closing config.log, so it can be properly (re)opened and
25218# appended to by config.status. When coming back to configure, we
25219# need to make the FD available again.
25220if test "$no_create" != yes; then
25221 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025222 ac_config_status_args=
25223 test "$silent" = yes &&
25224 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025225 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025226 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025227 exec 5>>config.log
25228 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25229 # would make configure fail if this is the last instruction.
25230 $ac_cs_success || { (exit 1); exit 1; }
25231fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025232
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025233
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025234echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025235if test ! -f Modules/Setup
25236then
25237 cp $srcdir/Modules/Setup.dist Modules/Setup
25238fi
25239
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025240echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025241if test ! -f Modules/Setup.local
25242then
25243 echo "# Edit this file for local setup changes" >Modules/Setup.local
25244fi
25245
25246echo "creating Makefile"
25247$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25248 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025249 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025250
25251case $ac_sys_system in
25252BeOS)
25253 { echo "$as_me:$LINENO: WARNING:
25254
25255 Support for BeOS is deprecated as of Python 2.6.
25256 See PEP 11 for the gory details.
25257 " >&5
25258echo "$as_me: WARNING:
25259
25260 Support for BeOS is deprecated as of Python 2.6.
25261 See PEP 11 for the gory details.
25262 " >&2;}
25263 ;;
25264*) ;;
25265esac
25266
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025267mv config.c Modules