blob: 16102d92bcebc15c6da0b42e5edbdfa6a9d2d519 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Christian Heimes6f341092008-04-18 23:13:07 +00002# From configure.in Revision: 62145 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004# Generated by GNU Autoconf 2.61 for python 2.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000049 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000053 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
Martin v. Löwis11437992002-04-12 09:54:03 +0000115 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116done
117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
138echo X/"$0" |
139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
164 if test $as_have_required = yes && (eval ":
165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Neal Norwitz9be57322006-08-18 05:39:20 +0000578PACKAGE_VERSION='2.6'
579PACKAGE_STRING='python 2.6'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000580PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660PYTHONFRAMEWORK
661PYTHONFRAMEWORKDIR
662PYTHONFRAMEWORKPREFIX
663PYTHONFRAMEWORKINSTALLDIR
664FRAMEWORKINSTALLFIRST
665FRAMEWORKINSTALLLAST
666FRAMEWORKALTINSTALLFIRST
667FRAMEWORKALTINSTALLLAST
668FRAMEWORKUNIXTOOLSPREFIX
669MACHDEP
670SGI_ABI
671EXTRAPLATDIR
672EXTRAMACHDEPPATH
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696RANLIB
697AR
698SVNVERSION
699INSTALL_PROGRAM
700INSTALL_SCRIPT
701INSTALL_DATA
702LN
703OPT
704BASECFLAGS
705OTHER_LIBTOOL_OPT
706LIBTOOL_CRUFT
707SO
708LDSHARED
709BLDSHARED
710CCSHARED
711LINKFORSHARED
712CFLAGSFORSHARED
713SHLIBS
714USE_SIGNAL_MODULE
715SIGNAL_OBJS
716USE_THREAD_MODULE
717LDLAST
718THREADOBJ
719DLINCLDIR
720DYNLOADFILE
721MACHDEP_OBJS
722TRUE
723LIBOBJS
724HAVE_GETHOSTBYNAME_R_6_ARG
725HAVE_GETHOSTBYNAME_R_5_ARG
726HAVE_GETHOSTBYNAME_R_3_ARG
727HAVE_GETHOSTBYNAME_R
728HAVE_GETHOSTBYNAME
729LIBM
730LIBC
731UNICODE_OBJS
732THREADHEADERS
733SRCDIRS
734LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000735ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000736 ac_precious_vars='build_alias
737host_alias
738target_alias
739CC
740CFLAGS
741LDFLAGS
742LIBS
743CPPFLAGS
744CPP'
745
Guido van Rossum627b2d71993-12-24 10:39:16 +0000746
Guido van Rossum7f43da71994-08-01 12:15:30 +0000747# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000748ac_init_help=
749ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# The variables have the same names as the options, with
751# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000752cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000753exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000754no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755no_recursion=
756prefix=NONE
757program_prefix=NONE
758program_suffix=NONE
759program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764x_includes=NONE
765x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000766
767# Installation directory options.
768# These are left unexpanded so users can "make install exec_prefix=/foo"
769# and all the variables that are supposed to be based on exec_prefix
770# by default will actually change.
771# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000772# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000773bindir='${exec_prefix}/bin'
774sbindir='${exec_prefix}/sbin'
775libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000776datarootdir='${prefix}/share'
777datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778sysconfdir='${prefix}/etc'
779sharedstatedir='${prefix}/com'
780localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781includedir='${prefix}/include'
782oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000783docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
784infodir='${datarootdir}/info'
785htmldir='${docdir}'
786dvidir='${docdir}'
787pdfdir='${docdir}'
788psdir='${docdir}'
789libdir='${exec_prefix}/lib'
790localedir='${datarootdir}/locale'
791mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000794ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000796do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797 # If the previous option needs an argument, assign it.
798 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 ac_prev=
801 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 case $ac_option in
805 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
806 *) ac_optarg=yes ;;
807 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809 # Accept the important Cygnus configure options, so we can diagnose typos.
810
Martin v. Löwiseba40652007-08-30 20:10:57 +0000811 case $ac_dashdash$ac_option in
812 --)
813 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815 -bindir | --bindir | --bindi | --bind | --bin | --bi)
816 ac_prev=bindir ;;
817 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000818 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819
820 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825 -cache-file | --cache-file | --cache-fil | --cache-fi \
826 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
827 ac_prev=cache_file ;;
828 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
829 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000830 cache_file=$ac_optarg ;;
831
832 --config-cache | -C)
833 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834
Martin v. Löwiseba40652007-08-30 20:10:57 +0000835 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000838 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
841 | --dataroo | --dataro | --datar)
842 ac_prev=datarootdir ;;
843 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
844 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
845 datarootdir=$ac_optarg ;;
846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000850 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
852 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
854 eval enable_$ac_feature=no ;;
855
856 -docdir | --docdir | --docdi | --doc | --do)
857 ac_prev=docdir ;;
858 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
859 docdir=$ac_optarg ;;
860
861 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
862 ac_prev=dvidir ;;
863 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
864 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865
866 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000867 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000869 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
871 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
873 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
876 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
877 | --exec | --exe | --ex)
878 ac_prev=exec_prefix ;;
879 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
880 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
881 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000882 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
884 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Obsolete; use --with-gas.
886 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 -help | --help | --hel | --he | -h)
889 ac_init_help=long ;;
890 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
891 ac_init_help=recursive ;;
892 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
893 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
895 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Martin v. Löwiseba40652007-08-30 20:10:57 +0000900 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
901 ac_prev=htmldir ;;
902 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
903 | --ht=*)
904 htmldir=$ac_optarg ;;
905
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 -includedir | --includedir | --includedi | --included | --include \
907 | --includ | --inclu | --incl | --inc)
908 ac_prev=includedir ;;
909 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
910 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912
913 -infodir | --infodir | --infodi | --infod | --info | --inf)
914 ac_prev=infodir ;;
915 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -libdir | --libdir | --libdi | --libd)
919 ac_prev=libdir ;;
920 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
924 | --libexe | --libex | --libe)
925 ac_prev=libexecdir ;;
926 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
927 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
Martin v. Löwiseba40652007-08-30 20:10:57 +0000930 -localedir | --localedir | --localedi | --localed | --locale)
931 ac_prev=localedir ;;
932 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
933 localedir=$ac_optarg ;;
934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000936 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 ac_prev=localstatedir ;;
938 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941
942 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
943 ac_prev=mandir ;;
944 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Obsolete; use --without-fp.
949 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 no_create=yes ;;
954
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
956 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
957 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
960 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
961 | --oldin | --oldi | --old | --ol | --o)
962 ac_prev=oldincludedir ;;
963 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
964 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
965 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
969 ac_prev=prefix ;;
970 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972
973 -program-prefix | --program-prefix | --program-prefi | --program-pref \
974 | --program-pre | --program-pr | --program-p)
975 ac_prev=program_prefix ;;
976 -program-prefix=* | --program-prefix=* | --program-prefi=* \
977 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
980 -program-suffix | --program-suffix | --program-suffi | --program-suff \
981 | --program-suf | --program-su | --program-s)
982 ac_prev=program_suffix ;;
983 -program-suffix=* | --program-suffix=* | --program-suffi=* \
984 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -program-transform-name | --program-transform-name \
988 | --program-transform-nam | --program-transform-na \
989 | --program-transform-n | --program-transform- \
990 | --program-transform | --program-transfor \
991 | --program-transfo | --program-transf \
992 | --program-trans | --program-tran \
993 | --progr-tra | --program-tr | --program-t)
994 ac_prev=program_transform_name ;;
995 -program-transform-name=* | --program-transform-name=* \
996 | --program-transform-nam=* | --program-transform-na=* \
997 | --program-transform-n=* | --program-transform-=* \
998 | --program-transform=* | --program-transfor=* \
999 | --program-transfo=* | --program-transf=* \
1000 | --program-trans=* | --program-tran=* \
1001 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Martin v. Löwiseba40652007-08-30 20:10:57 +00001004 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1005 ac_prev=pdfdir ;;
1006 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1007 pdfdir=$ac_optarg ;;
1008
1009 -psdir | --psdir | --psdi | --psd | --ps)
1010 ac_prev=psdir ;;
1011 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1012 psdir=$ac_optarg ;;
1013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1015 | -silent | --silent | --silen | --sile | --sil)
1016 silent=yes ;;
1017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1019 ac_prev=sbindir ;;
1020 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1021 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1025 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1026 | --sharedst | --shareds | --shared | --share | --shar \
1027 | --sha | --sh)
1028 ac_prev=sharedstatedir ;;
1029 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1030 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1031 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1032 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035 -site | --site | --sit)
1036 ac_prev=site ;;
1037 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1041 ac_prev=srcdir ;;
1042 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1046 | --syscon | --sysco | --sysc | --sys | --sy)
1047 ac_prev=sysconfdir ;;
1048 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1049 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1058 verbose=yes ;;
1059
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 -version | --version | --versio | --versi | --vers | -V)
1061 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001066 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 { echo "$as_me: error: invalid package name: $ac_package" >&2
1068 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1070 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001075 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 { echo "$as_me: error: invalid package name: $ac_package" >&2
1077 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1079 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 --x)
1082 # Obsolete; use --with-x.
1083 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1086 | --x-incl | --x-inc | --x-in | --x-i)
1087 ac_prev=x_includes ;;
1088 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1089 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1093 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1094 ac_prev=x_libraries ;;
1095 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1096 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 -*) { echo "$as_me: error: unrecognized option: $ac_option
1100Try \`$0 --help' for more information." >&2
1101 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 ;;
1103
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 *=*)
1105 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1106 # Reject names that are not valid shell variable names.
1107 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1108 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1109 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001110 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 export $ac_envvar ;;
1112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 # FIXME: should be removed in autoconf 3.0.
1115 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1116 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1117 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1118 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 ;;
1120
1121 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001122done
1123
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1126 { echo "$as_me: error: missing argument to $ac_option" >&2
1127 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128fi
1129
Martin v. Löwiseba40652007-08-30 20:10:57 +00001130# Be sure to have absolute directory names.
1131for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1132 datadir sysconfdir sharedstatedir localstatedir includedir \
1133 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1134 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001138 [\\/$]* | ?:[\\/]* ) continue;;
1139 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1142 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001143done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001144
Martin v. Löwis11437992002-04-12 09:54:03 +00001145# There might be people who depend on the old broken behavior: `$host'
1146# used to hold the argument of --host etc.
1147# FIXME: To remove some day.
1148build=$build_alias
1149host=$host_alias
1150target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152# FIXME: To remove some day.
1153if test "x$host_alias" != x; then
1154 if test "x$build_alias" = x; then
1155 cross_compiling=maybe
1156 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1157 If a cross compiler is detected then cross compile mode will be used." >&2
1158 elif test "x$build_alias" != "x$host_alias"; then
1159 cross_compiling=yes
1160 fi
1161fi
1162
1163ac_tool_prefix=
1164test -n "$host_alias" && ac_tool_prefix=$host_alias-
1165
1166test "$silent" = yes && exec 6>/dev/null
1167
Guido van Rossum627b2d71993-12-24 10:39:16 +00001168
Martin v. Löwiseba40652007-08-30 20:10:57 +00001169ac_pwd=`pwd` && test -n "$ac_pwd" &&
1170ac_ls_di=`ls -di .` &&
1171ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1172 { echo "$as_me: error: Working directory cannot be determined" >&2
1173 { (exit 1); exit 1; }; }
1174test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1175 { echo "$as_me: error: pwd does not report name of working directory" >&2
1176 { (exit 1); exit 1; }; }
1177
1178
Guido van Rossum627b2d71993-12-24 10:39:16 +00001179# Find the source files, if location was not specified.
1180if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001182 # Try the directory containing this script, then the parent directory.
1183 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001184$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001185 X"$0" : 'X\(//\)[^/]' \| \
1186 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001188echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001189 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1190 s//\1/
1191 q
1192 }
1193 /^X\(\/\/\)[^/].*/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)$/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\).*/{
1202 s//\1/
1203 q
1204 }
1205 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001207 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208 srcdir=..
1209 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210else
1211 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001213if test ! -r "$srcdir/$ac_unique_file"; then
1214 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1215 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1219ac_abs_confdir=`(
1220 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001221 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001222 pwd)`
1223# When building in place, set srcdir=.
1224if test "$ac_abs_confdir" = "$ac_pwd"; then
1225 srcdir=.
1226fi
1227# Remove unnecessary trailing slashes from srcdir.
1228# Double slashes in file names in object file debugging info
1229# mess up M-x gdb in Emacs.
1230case $srcdir in
1231*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1232esac
1233for ac_var in $ac_precious_vars; do
1234 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1235 eval ac_env_${ac_var}_value=\$${ac_var}
1236 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1238done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239
Martin v. Löwis11437992002-04-12 09:54:03 +00001240#
1241# Report the --help message.
1242#
1243if test "$ac_init_help" = "long"; then
1244 # Omit some internal or obsolete options to make the list less imposing.
1245 # This message is too long to be a string in the A/UX 3.1 sh.
1246 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001247\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001248
1249Usage: $0 [OPTION]... [VAR=VALUE]...
1250
1251To assign environment variables (e.g., CC, CFLAGS...), specify them as
1252VAR=VALUE. See below for descriptions of some of the useful variables.
1253
1254Defaults for the options are specified in brackets.
1255
1256Configuration:
1257 -h, --help display this help and exit
1258 --help=short display options specific to this package
1259 --help=recursive display the short help of all the included packages
1260 -V, --version display version information and exit
1261 -q, --quiet, --silent do not print \`checking...' messages
1262 --cache-file=FILE cache test results in FILE [disabled]
1263 -C, --config-cache alias for \`--cache-file=config.cache'
1264 -n, --no-create do not create output files
1265 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1266
Martin v. Löwis11437992002-04-12 09:54:03 +00001267Installation directories:
1268 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001269 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001271 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272
1273By default, \`make install' will install all the files in
1274\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1275an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1276for instance \`--prefix=\$HOME'.
1277
1278For better control, use the options below.
1279
1280Fine tuning of the installation directories:
1281 --bindir=DIR user executables [EPREFIX/bin]
1282 --sbindir=DIR system admin executables [EPREFIX/sbin]
1283 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1285 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1286 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1287 --libdir=DIR object code libraries [EPREFIX/lib]
1288 --includedir=DIR C header files [PREFIX/include]
1289 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001290 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1291 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1292 --infodir=DIR info documentation [DATAROOTDIR/info]
1293 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1294 --mandir=DIR man documentation [DATAROOTDIR/man]
1295 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1296 --htmldir=DIR html documentation [DOCDIR]
1297 --dvidir=DIR dvi documentation [DOCDIR]
1298 --pdfdir=DIR pdf documentation [DOCDIR]
1299 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001300_ACEOF
1301
1302 cat <<\_ACEOF
1303_ACEOF
1304fi
1305
1306if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001307 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001308 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001310 cat <<\_ACEOF
1311
1312Optional Features:
1313 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1314 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001315 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001316 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001317 --enable-framework[=INSTALLDIR]
1318 Build (MacOSX|Darwin) framework
1319 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001320 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001321 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1322 --enable-ipv6 Enable ipv6 (with ipv4) support
1323 --disable-ipv6 Disable ipv6 support
1324 --enable-unicode[=ucs[24]]
1325 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
1327Optional Packages:
1328 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1329 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001330 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001331 --with-cxx-main=<compiler>
1332 compile main() and link python executable with C++
1333 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --with-suffix=.exe set executable suffix
1335 --with-pydebug build with Py_DEBUG defined
1336 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001337 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --with-signal-module disable/enable signal module
1339 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1340 --with(out)-threads[=DIRECTORY]
1341 disable/enable thread support
1342 --with(out)-thread[=DIRECTORY]
1343 deprecated; use --with(out)-threads
1344 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001346 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with(out)-pymalloc disable/enable specialized mallocs
1348 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-fpectl enable SIGFPE catching
1350 --with-libm=STRING math library
1351 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001352
1353Some influential environment variables:
1354 CC C compiler command
1355 CFLAGS C compiler flags
1356 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1357 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001358 LIBS libraries to pass to the linker, e.g. -l<library>
1359 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1360 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001361 CPP C preprocessor
1362
1363Use these variables to override the choices made by `configure' or to help
1364it to find libraries and programs with nonstandard names/locations.
1365
Martin v. Löwis1d459062005-03-14 21:23:33 +00001366Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001367_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001368ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001369fi
1370
1371if test "$ac_init_help" = "recursive"; then
1372 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001374 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 ac_builddir=.
1376
Martin v. Löwiseba40652007-08-30 20:10:57 +00001377case "$ac_dir" in
1378.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1379*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001381 # A ".." for each directory in $ac_dir_suffix.
1382 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1383 case $ac_top_builddir_sub in
1384 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1385 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1386 esac ;;
1387esac
1388ac_abs_top_builddir=$ac_pwd
1389ac_abs_builddir=$ac_pwd$ac_dir_suffix
1390# for backward compatibility:
1391ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001396 ac_top_srcdir=$ac_top_builddir_sub
1397 ac_abs_top_srcdir=$ac_pwd ;;
1398 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 ac_top_srcdir=$srcdir
1401 ac_abs_top_srcdir=$srcdir ;;
1402 *) # Relative name.
1403 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1404 ac_top_srcdir=$ac_top_build_prefix$srcdir
1405 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001406esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001407ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001408
Martin v. Löwiseba40652007-08-30 20:10:57 +00001409 cd "$ac_dir" || { ac_status=$?; continue; }
1410 # Check for guested configure.
1411 if test -f "$ac_srcdir/configure.gnu"; then
1412 echo &&
1413 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1414 elif test -f "$ac_srcdir/configure"; then
1415 echo &&
1416 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 else
1418 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001419 fi || ac_status=$?
1420 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 done
1422fi
1423
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001425if $ac_init_version; then
1426 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001427python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14312002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001432This configure script is free software; the Free Software Foundation
1433gives unlimited permission to copy, distribute and modify it.
1434_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001435 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001438This file contains any messages produced by compilers while
1439running configure, to aid debugging if configure makes a mistake.
1440
Neal Norwitz9be57322006-08-18 05:39:20 +00001441It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001442generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444 $ $0 $@
1445
1446_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001448{
1449cat <<_ASUNAME
1450## --------- ##
1451## Platform. ##
1452## --------- ##
1453
1454hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1455uname -m = `(uname -m) 2>/dev/null || echo unknown`
1456uname -r = `(uname -r) 2>/dev/null || echo unknown`
1457uname -s = `(uname -s) 2>/dev/null || echo unknown`
1458uname -v = `(uname -v) 2>/dev/null || echo unknown`
1459
1460/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1461/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1462
1463/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1464/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1465/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001466/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001467/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1468/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1469/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1470
1471_ASUNAME
1472
1473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1474for as_dir in $PATH
1475do
1476 IFS=$as_save_IFS
1477 test -z "$as_dir" && as_dir=.
1478 echo "PATH: $as_dir"
1479done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001480IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001481
1482} >&5
1483
1484cat >&5 <<_ACEOF
1485
1486
1487## ----------- ##
1488## Core tests. ##
1489## ----------- ##
1490
1491_ACEOF
1492
1493
1494# Keep a trace of the command line.
1495# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001496# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001497# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001498# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001499ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001500ac_configure_args0=
1501ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001502ac_must_keep_next=false
1503for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001504do
Skip Montanaro6dead952003-09-25 14:50:04 +00001505 for ac_arg
1506 do
1507 case $ac_arg in
1508 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1509 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510 | -silent | --silent | --silen | --sile | --sil)
1511 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001512 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001513 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1514 esac
1515 case $ac_pass in
1516 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1517 2)
1518 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1519 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001520 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001522 case $ac_arg in
1523 *=* | --config-cache | -C | -disable-* | --disable-* \
1524 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1525 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1526 | -with-* | --with-* | -without-* | --without-* | --x)
1527 case "$ac_configure_args0 " in
1528 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1529 esac
1530 ;;
1531 -* ) ac_must_keep_next=true ;;
1532 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001534 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 ;;
1536 esac
1537 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001538done
Skip Montanaro6dead952003-09-25 14:50:04 +00001539$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1540$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542# When interrupted or exit'd, cleanup temporary files, and complete
1543# config.log. We remove comments because anyway the quotes in there
1544# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545# WARNING: Use '\'' to represent an apostrophe within the trap.
1546# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547trap 'exit_status=$?
1548 # Save into config.log some information that might help in debugging.
1549 {
1550 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001551
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 cat <<\_ASBOX
1553## ---------------- ##
1554## Cache variables. ##
1555## ---------------- ##
1556_ASBOX
1557 echo
1558 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001559(
1560 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1561 eval ac_val=\$$ac_var
1562 case $ac_val in #(
1563 *${as_nl}*)
1564 case $ac_var in #(
1565 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1566echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1567 esac
1568 case $ac_var in #(
1569 _ | IFS | as_nl) ;; #(
1570 *) $as_unset $ac_var ;;
1571 esac ;;
1572 esac
1573 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1576 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 "s/'\''/'\''\\\\'\'''\''/g;
1579 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1580 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001581 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001583 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac |
1585 sort
1586)
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001588
1589 cat <<\_ASBOX
1590## ----------------- ##
1591## Output variables. ##
1592## ----------------- ##
1593_ASBOX
1594 echo
1595 for ac_var in $ac_subst_vars
1596 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001597 eval ac_val=\$$ac_var
1598 case $ac_val in
1599 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1600 esac
1601 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001602 done | sort
1603 echo
1604
1605 if test -n "$ac_subst_files"; then
1606 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001607## ------------------- ##
1608## File substitutions. ##
1609## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_files
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
1616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1617 esac
1618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621 fi
1622
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 if test -s confdefs.h; then
1624 cat <<\_ASBOX
1625## ----------- ##
1626## confdefs.h. ##
1627## ----------- ##
1628_ASBOX
1629 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001630 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 echo
1632 fi
1633 test "$ac_signal" != 0 &&
1634 echo "$as_me: caught signal $ac_signal"
1635 echo "$as_me: exit $exit_status"
1636 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001637 rm -f core *.core core.conftest.* &&
1638 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001640' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001641for ac_signal in 1 2 13 15; do
1642 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1643done
1644ac_signal=0
1645
1646# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648
1649# Predefined preprocessor variables.
1650
1651cat >>confdefs.h <<_ACEOF
1652#define PACKAGE_NAME "$PACKAGE_NAME"
1653_ACEOF
1654
1655
1656cat >>confdefs.h <<_ACEOF
1657#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1658_ACEOF
1659
1660
1661cat >>confdefs.h <<_ACEOF
1662#define PACKAGE_VERSION "$PACKAGE_VERSION"
1663_ACEOF
1664
1665
1666cat >>confdefs.h <<_ACEOF
1667#define PACKAGE_STRING "$PACKAGE_STRING"
1668_ACEOF
1669
1670
1671cat >>confdefs.h <<_ACEOF
1672#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1673_ACEOF
1674
1675
1676# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001677# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001678if test -n "$CONFIG_SITE"; then
1679 set x "$CONFIG_SITE"
1680elif test "x$prefix" != xNONE; then
1681 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1682else
1683 set x "$ac_default_prefix/share/config.site" \
1684 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001686shift
1687for ac_site_file
1688do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001690 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1691echo "$as_me: loading site script $ac_site_file" >&6;}
1692 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693 . "$ac_site_file"
1694 fi
1695done
1696
1697if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001698 # Some versions of bash will fail to source /dev/null (special
1699 # files actually), so we avoid doing that.
1700 if test -f "$cache_file"; then
1701 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1702echo "$as_me: loading cache $cache_file" >&6;}
1703 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001704 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1705 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 esac
1707 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708else
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1710echo "$as_me: creating cache $cache_file" >&6;}
1711 >$cache_file
1712fi
1713
1714# Check that the precious variables saved in the cache have kept the same
1715# value.
1716ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001717for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1719 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001720 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1721 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $ac_old_set,$ac_new_set in
1723 set,)
1724 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1725echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1726 ac_cache_corrupted=: ;;
1727 ,set)
1728 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1729echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1730 ac_cache_corrupted=: ;;
1731 ,);;
1732 *)
1733 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001734 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001735echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001736 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001737echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001738 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001739echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001740 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 fi;;
1742 esac
1743 # Pass precious variables to config.status.
1744 if test "$ac_new_set" = set; then
1745 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001746 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 *) ac_arg=$ac_var=$ac_new_val ;;
1748 esac
1749 case " $ac_configure_args " in
1750 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1751 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1752 esac
1753 fi
1754done
1755if $ac_cache_corrupted; then
1756 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1757echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1758 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1759echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1760 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001761fi
1762
Martin v. Löwiseba40652007-08-30 20:10:57 +00001763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
Guido van Rossum7f43da71994-08-01 12:15:30 +00001787ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1791ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792
Guido van Rossum627b2d71993-12-24 10:39:16 +00001793
Michael W. Hudson54241132001-12-07 15:38:26 +00001794
Martin v. Löwiseba40652007-08-30 20:10:57 +00001795ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001796
1797
Martin v. Löwis11437992002-04-12 09:54:03 +00001798
1799
1800
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001801
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001802
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001803# We don't use PACKAGE_ variables, and they cause conflicts
1804# with other autoconf-based packages that include Python.h
1805grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1806rm confdefs.h
1807mv confdefs.h.new confdefs.h
1808
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001809
Neal Norwitz9be57322006-08-18 05:39:20 +00001810VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001811
Martin v. Löwis1142de32002-03-29 16:28:31 +00001812
1813SOVERSION=1.0
1814
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001815# The later defininition of _XOPEN_SOURCE disables certain features
1816# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1817
1818cat >>confdefs.h <<\_ACEOF
1819#define _GNU_SOURCE 1
1820_ACEOF
1821
1822
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001823# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1824# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1825# them.
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _NETBSD_SOURCE 1
1829_ACEOF
1830
1831
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001832# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1833# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1834# them.
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define __BSD_VISIBLE 1
1838_ACEOF
1839
1840
Martin v. Löwisd6320502004-08-12 13:45:08 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1843
1844cat >>confdefs.h <<\_ACEOF
1845#define _BSD_TYPES 1
1846_ACEOF
1847
1848
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001849define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001850
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001851# Arguments passed to configure.
1852
1853CONFIG_ARGS="$ac_configure_args"
1854
Martin v. Löwiseba40652007-08-30 20:10:57 +00001855# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001856if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001857 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001858 case $enableval in
1859 yes)
1860 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1861 ;;
1862 esac
1863 case $enableval in
1864 no)
1865 UNIVERSALSDK=
1866 enable_universalsdk=
1867 ;;
1868 *)
1869 UNIVERSALSDK=$enableval
1870 ;;
1871 esac
1872
1873else
1874
1875 UNIVERSALSDK=
1876 enable_universalsdk=
1877
Martin v. Löwiseba40652007-08-30 20:10:57 +00001878fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001879
1880
Martin v. Löwiseba40652007-08-30 20:10:57 +00001881
1882# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001883if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001884 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001885 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001886 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001887 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001888 esac
1889 case $enableval in
1890 no)
1891 PYTHONFRAMEWORK=
1892 PYTHONFRAMEWORKDIR=no-framework
1893 PYTHONFRAMEWORKPREFIX=
1894 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001895 FRAMEWORKINSTALLFIRST=
1896 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001897 FRAMEWORKALTINSTALLFIRST=
1898 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001899 if test "x${prefix}" = "xNONE"; then
1900 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1901 else
1902 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1903 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001904 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001905 ;;
1906 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001907 PYTHONFRAMEWORK=Python
1908 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001909 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001910 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001911 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1912 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5b787322006-06-06 19:50:24 +00001913 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1914 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001915 if test "x${prefix}" = "xNONE" ; then
1916 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1917 else
1918 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1919 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001920 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001921
1922 # Add makefiles for Mac specific code to the list of output
1923 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001924 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001925
Martin v. Löwiseba40652007-08-30 20:10:57 +00001926 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001927
Martin v. Löwiseba40652007-08-30 20:10:57 +00001928 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001929
Jack Jansene578a632001-08-15 01:27:14 +00001930 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001931
Guido van Rossum563e7081996-09-10 18:20:48 +00001932else
Martin v. Löwis11437992002-04-12 09:54:03 +00001933
Jack Jansene578a632001-08-15 01:27:14 +00001934 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001935 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001936 PYTHONFRAMEWORKPREFIX=
1937 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001938 FRAMEWORKINSTALLFIRST=
1939 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001940 FRAMEWORKALTINSTALLFIRST=
1941 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001942 if test "x${prefix}" = "xNONE" ; then
1943 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1944 else
1945 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1946 fi
Jack Jansene578a632001-08-15 01:27:14 +00001947 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001948
Martin v. Löwiseba40652007-08-30 20:10:57 +00001949fi
1950
Michael W. Hudson54241132001-12-07 15:38:26 +00001951
1952
1953
1954
Jack Jansene578a632001-08-15 01:27:14 +00001955
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001956
1957
Ronald Oussoren5b787322006-06-06 19:50:24 +00001958
1959
1960
Jack Jansene578a632001-08-15 01:27:14 +00001961##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001962## AC_HELP_STRING(--with-dyld,
1963## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001964##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001965# Set name for machine-dependent library files
1966
Martin v. Löwiseba40652007-08-30 20:10:57 +00001967{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1968echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001969if test -z "$MACHDEP"
1970then
Guido van Rossum563e7081996-09-10 18:20:48 +00001971 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001972 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1973 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001974 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001975 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001976 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001977 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001978 ac_md_system=`echo $ac_sys_system |
1979 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1980 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001981 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001982 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001983
Guido van Rossum07397971997-04-29 21:49:50 +00001984 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001985 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001986 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001987 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001988 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001989 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001990 esac
1991fi
Guido van Rossum91922671997-10-09 20:24:13 +00001992
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001993# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1994# disable features if it is defined, without any means to access these
1995# features as extensions. For these systems, we skip the definition of
1996# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1997# some feature, make sure there is no alternative way to access this
1998# feature. Also, when using wildcards, make sure you have verified the
1999# need for not defining _XOPEN_SOURCE on all systems matching the
2000# wildcard, and that the wildcard does not include future systems
2001# (which may remove their limitations).
2002case $ac_sys_system/$ac_sys_release in
2003 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2004 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002005 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz4bc2c092006-09-05 02:57:01 +00002006 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002007 define_xopen_source=no
2008 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2009 # also defined. This can be overridden by defining _BSD_SOURCE
2010 # As this has a different meaning on Linux, only define it on OpenBSD
2011
2012cat >>confdefs.h <<\_ACEOF
2013#define _BSD_SOURCE 1
2014_ACEOF
2015
2016 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002017 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2018 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2019 # Marc Recht
2020 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2021 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002022 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2023 # of union __?sigval. Reported by Stuart Bishop.
2024 SunOS/5.6)
2025 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002026 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2027 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002028 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002029 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002030 define_xopen_source=no;;
2031 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002032 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002033 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002034 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002035 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2036 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2037 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2038 # This should hopefully be fixed in FreeBSD 4.9
2039 FreeBSD/4.8* | Darwin/6* )
2040 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002041 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2042 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2043 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002044 AIX/4)
2045 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002046 AIX/5)
2047 if test `uname -r` -eq 1; then
2048 define_xopen_source=no
2049 fi
2050 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002051 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2052 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002053 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002054 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002055 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002056 define_xopen_source=no
2057 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002058
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002059esac
2060
2061if test $define_xopen_source = yes
2062then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002063 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2064 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002065 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2066 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002067 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002068 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002069
2070cat >>confdefs.h <<\_ACEOF
2071#define _XOPEN_SOURCE 500
2072_ACEOF
2073
2074 ;;
2075 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002076
2077cat >>confdefs.h <<\_ACEOF
2078#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002079_ACEOF
2080
Skip Montanarof0d5f792004-08-15 14:08:23 +00002081 ;;
2082 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002083
2084 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2085 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2086 # several APIs are not declared. Since this is also needed in some
2087 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002088 # except for Solaris 10, where it must not be defined,
2089 # as it implies XPG4.2
2090 case $ac_sys_system/$ac_sys_release in
2091 SunOS/5.10)
2092 ;;
2093 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002094
2095cat >>confdefs.h <<\_ACEOF
2096#define _XOPEN_SOURCE_EXTENDED 1
2097_ACEOF
2098
Martin v. Löwis7dece662005-11-26 11:38:24 +00002099 ;;
2100 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002101
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002102
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002103cat >>confdefs.h <<\_ACEOF
2104#define _POSIX_C_SOURCE 200112L
2105_ACEOF
2106
2107
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002108fi
2109
Guido van Rossum91922671997-10-09 20:24:13 +00002110#
2111# SGI compilers allow the specification of the both the ABI and the
2112# ISA on the command line. Depending on the values of these switches,
2113# different and often incompatable code will be generated.
2114#
2115# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2116# thus supply support for various ABI/ISA combinations. The MACHDEP
2117# variable is also adjusted.
2118#
2119
2120if test ! -z "$SGI_ABI"
2121then
2122 CC="cc $SGI_ABI"
2123 LDFLAGS="$SGI_ABI $LDFLAGS"
2124 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002126{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2127echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002128
Jack Jansen83f898c2002-12-30 22:23:40 +00002129# And add extra plat-mac for darwin
2130
Jack Jansen7b59b422003-03-17 15:44:10 +00002131
Martin v. Löwiseba40652007-08-30 20:10:57 +00002132{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2133echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002134if test -z "$EXTRAPLATDIR"
2135then
2136 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002137 darwin)
2138 EXTRAPLATDIR="\$(PLATMACDIRS)"
2139 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2140 ;;
2141 *)
2142 EXTRAPLATDIR=""
2143 EXTRAMACHDEPPATH=""
2144 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002145 esac
2146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002147{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2148echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002149
Jack Jansen6b08a402004-06-03 12:41:45 +00002150# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2151# it may influence the way we can build extensions, so distutils
2152# needs to check it
2153
Ronald Oussoren988117f2006-04-29 11:31:35 +00002154
Jack Jansen6b08a402004-06-03 12:41:45 +00002155CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002156EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002157
Guido van Rossum627b2d71993-12-24 10:39:16 +00002158# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002159
2160# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2161# for debug/optimization stuff. BASECFLAGS is for flags that are required
2162# just to get things to compile and link. Users are free to override OPT
2163# when running configure or make. The build should not break if they do.
2164# BASECFLAGS should generally not be messed with, however.
2165
2166# XXX shouldn't some/most/all of this code be merged with the stuff later
2167# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002168{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2169echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002170
Martin v. Löwiseba40652007-08-30 20:10:57 +00002171# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002172if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002173 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002174 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002175 no) CC=cc
2176 without_gcc=yes;;
2177 yes) CC=gcc
2178 without_gcc=no;;
2179 *) CC=$withval
2180 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002181 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002182else
Martin v. Löwis11437992002-04-12 09:54:03 +00002183
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002184 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002185 AIX*) CC=cc_r
2186 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002187 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002188 case $BE_HOST_CPU in
2189 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002190 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002191 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002192 BASECFLAGS="$BASECFLAGS -export pragma"
2193 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002194 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002195 ;;
2196 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002197 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002198 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002199 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002200 ;;
2201 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002202 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2203echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2204 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002205 ;;
2206 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002207 AR="\$(srcdir)/Modules/ar_beos"
2208 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002209 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002210 Monterey*)
2211 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002212 without_gcc=;;
2213 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002214 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002215fi
2216
2217{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2218echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002219
Guido van Rossum8b131c51995-03-09 14:10:13 +00002220# If the user switches compilers, we can't believe the cache
2221if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2222then
Martin v. Löwis11437992002-04-12 09:54:03 +00002223 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2224(it is also a good idea to do 'make clean' before compiling)" >&5
2225echo "$as_me: error: cached CC is different -- throw away $cache_file
2226(it is also a good idea to do 'make clean' before compiling)" >&2;}
2227 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002228fi
2229
Martin v. Löwis11437992002-04-12 09:54:03 +00002230ac_ext=c
2231ac_cpp='$CPP $CPPFLAGS'
2232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2234ac_compiler_gnu=$ac_cv_c_compiler_gnu
2235if test -n "$ac_tool_prefix"; then
2236 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2237set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002238{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002240if test "${ac_cv_prog_CC+set}" = set; then
2241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242else
2243 if test -n "$CC"; then
2244 ac_cv_prog_CC="$CC" # Let the user override the test.
2245else
Martin v. Löwis11437992002-04-12 09:54:03 +00002246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2247for as_dir in $PATH
2248do
2249 IFS=$as_save_IFS
2250 test -z "$as_dir" && as_dir=.
2251 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002253 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2255 break 2
2256 fi
2257done
2258done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002259IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002260
Jack Jansendd19cf82001-12-06 22:36:17 +00002261fi
2262fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002263CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002264if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002265 { echo "$as_me:$LINENO: result: $CC" >&5
2266echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002267else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002268 { echo "$as_me:$LINENO: result: no" >&5
2269echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002270fi
2271
Martin v. Löwiseba40652007-08-30 20:10:57 +00002272
Martin v. Löwis11437992002-04-12 09:54:03 +00002273fi
2274if test -z "$ac_cv_prog_CC"; then
2275 ac_ct_CC=$CC
2276 # Extract the first word of "gcc", so it can be a program name with args.
2277set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002280if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2281 echo $ECHO_N "(cached) $ECHO_C" >&6
2282else
2283 if test -n "$ac_ct_CC"; then
2284 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2285else
2286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2287for as_dir in $PATH
2288do
2289 IFS=$as_save_IFS
2290 test -z "$as_dir" && as_dir=.
2291 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002292 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002293 ac_cv_prog_ac_ct_CC="gcc"
2294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2295 break 2
2296 fi
2297done
2298done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002299IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002300
2301fi
2302fi
2303ac_ct_CC=$ac_cv_prog_ac_ct_CC
2304if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002305 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2306echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002307else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002308 { echo "$as_me:$LINENO: result: no" >&5
2309echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002310fi
2311
Martin v. Löwiseba40652007-08-30 20:10:57 +00002312 if test "x$ac_ct_CC" = x; then
2313 CC=""
2314 else
2315 case $cross_compiling:$ac_tool_warned in
2316yes:)
2317{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2318whose name does not start with the host triplet. If you think this
2319configuration is useful to you, please write to autoconf@gnu.org." >&5
2320echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2321whose name does not start with the host triplet. If you think this
2322configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2323ac_tool_warned=yes ;;
2324esac
2325 CC=$ac_ct_CC
2326 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002327else
2328 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002329fi
2330
Jack Jansendd19cf82001-12-06 22:36:17 +00002331if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002332 if test -n "$ac_tool_prefix"; then
2333 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002334set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002335{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002337if test "${ac_cv_prog_CC+set}" = set; then
2338 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002339else
2340 if test -n "$CC"; then
2341 ac_cv_prog_CC="$CC" # Let the user override the test.
2342else
Martin v. Löwis11437992002-04-12 09:54:03 +00002343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2344for as_dir in $PATH
2345do
2346 IFS=$as_save_IFS
2347 test -z "$as_dir" && as_dir=.
2348 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002350 ac_cv_prog_CC="${ac_tool_prefix}cc"
2351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2352 break 2
2353 fi
2354done
2355done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002357
2358fi
2359fi
2360CC=$ac_cv_prog_CC
2361if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362 { echo "$as_me:$LINENO: result: $CC" >&5
2363echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002364else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002365 { echo "$as_me:$LINENO: result: no" >&5
2366echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002367fi
2368
Martin v. Löwiseba40652007-08-30 20:10:57 +00002369
Martin v. Löwis11437992002-04-12 09:54:03 +00002370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002371fi
2372if test -z "$CC"; then
2373 # Extract the first word of "cc", so it can be a program name with args.
2374set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002375{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002377if test "${ac_cv_prog_CC+set}" = set; then
2378 echo $ECHO_N "(cached) $ECHO_C" >&6
2379else
2380 if test -n "$CC"; then
2381 ac_cv_prog_CC="$CC" # Let the user override the test.
2382else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002383 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
2389 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002391 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2392 ac_prog_rejected=yes
2393 continue
2394 fi
2395 ac_cv_prog_CC="cc"
2396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2397 break 2
2398 fi
2399done
2400done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002403if test $ac_prog_rejected = yes; then
2404 # We found a bogon in the path, so make sure we never use it.
2405 set dummy $ac_cv_prog_CC
2406 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002407 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002408 # We chose a different compiler from the bogus one.
2409 # However, it has the same basename, so the bogon will be chosen
2410 # first if we set CC to just the basename; use the full file name.
2411 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002413 fi
2414fi
2415fi
2416fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002417CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002418if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419 { echo "$as_me:$LINENO: result: $CC" >&5
2420echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002421else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002422 { echo "$as_me:$LINENO: result: no" >&5
2423echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002424fi
2425
Martin v. Löwiseba40652007-08-30 20:10:57 +00002426
Martin v. Löwis11437992002-04-12 09:54:03 +00002427fi
2428if test -z "$CC"; then
2429 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 do
2432 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2433set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002434{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2435echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002436if test "${ac_cv_prog_CC+set}" = set; then
2437 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002438else
2439 if test -n "$CC"; then
2440 ac_cv_prog_CC="$CC" # Let the user override the test.
2441else
Martin v. Löwis11437992002-04-12 09:54:03 +00002442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443for as_dir in $PATH
2444do
2445 IFS=$as_save_IFS
2446 test -z "$as_dir" && as_dir=.
2447 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2450 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2451 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002453done
2454done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002456
2457fi
2458fi
2459CC=$ac_cv_prog_CC
2460if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461 { echo "$as_me:$LINENO: result: $CC" >&5
2462echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002463else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464 { echo "$as_me:$LINENO: result: no" >&5
2465echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002466fi
2467
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 test -n "$CC" && break
2470 done
2471fi
2472if test -z "$CC"; then
2473 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002475do
2476 # Extract the first word of "$ac_prog", so it can be a program name with args.
2477set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002480if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2481 echo $ECHO_N "(cached) $ECHO_C" >&6
2482else
2483 if test -n "$ac_ct_CC"; then
2484 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2485else
2486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2487for as_dir in $PATH
2488do
2489 IFS=$as_save_IFS
2490 test -z "$as_dir" && as_dir=.
2491 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002492 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 ac_cv_prog_ac_ct_CC="$ac_prog"
2494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2495 break 2
2496 fi
2497done
2498done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002500
Martin v. Löwis11437992002-04-12 09:54:03 +00002501fi
2502fi
2503ac_ct_CC=$ac_cv_prog_ac_ct_CC
2504if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2506echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002507else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508 { echo "$as_me:$LINENO: result: no" >&5
2509echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002510fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002511
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 test -n "$ac_ct_CC" && break
2514done
Michael W. Hudson54241132001-12-07 15:38:26 +00002515
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516 if test "x$ac_ct_CC" = x; then
2517 CC=""
2518 else
2519 case $cross_compiling:$ac_tool_warned in
2520yes:)
2521{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2522whose name does not start with the host triplet. If you think this
2523configuration is useful to you, please write to autoconf@gnu.org." >&5
2524echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2525whose name does not start with the host triplet. If you think this
2526configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2527ac_tool_warned=yes ;;
2528esac
2529 CC=$ac_ct_CC
2530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002531fi
2532
2533fi
2534
2535
Skip Montanaro6dead952003-09-25 14:50:04 +00002536test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2537See \`config.log' for more details." >&5
2538echo "$as_me: error: no acceptable C compiler found in \$PATH
2539See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 { (exit 1); exit 1; }; }
2541
2542# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002544ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545{ (ac_try="$ac_compiler --version >&5"
2546case "(($ac_try" in
2547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2548 *) ac_try_echo=$ac_try;;
2549esac
2550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2551 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 ac_status=$?
2553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002555{ (ac_try="$ac_compiler -v >&5"
2556case "(($ac_try" in
2557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2558 *) ac_try_echo=$ac_try;;
2559esac
2560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2561 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 ac_status=$?
2563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2564 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565{ (ac_try="$ac_compiler -V >&5"
2566case "(($ac_try" in
2567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2568 *) ac_try_echo=$ac_try;;
2569esac
2570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2571 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 ac_status=$?
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); }
2575
2576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002577/* confdefs.h. */
2578_ACEOF
2579cat confdefs.h >>conftest.$ac_ext
2580cat >>conftest.$ac_ext <<_ACEOF
2581/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583int
2584main ()
2585{
2586
2587 ;
2588 return 0;
2589}
2590_ACEOF
2591ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002592ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593# Try to create an executable without -o first, disregard a.out.
2594# It will help us diagnose broken compilers, and finding out an intuition
2595# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2597echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002598ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002599#
2600# List of possible output files, starting from the most likely.
2601# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2602# only as a last resort. b.out is created by i960 compilers.
2603ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2604#
2605# The IRIX 6 linker writes into existing files which may not be
2606# executable, retaining their permissions. Remove them first so a
2607# subsequent execution test works.
2608ac_rmfiles=
2609for ac_file in $ac_files
2610do
2611 case $ac_file in
2612 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2613 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2614 esac
2615done
2616rm -f $ac_rmfiles
2617
2618if { (ac_try="$ac_link_default"
2619case "(($ac_try" in
2620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2621 *) ac_try_echo=$ac_try;;
2622esac
2623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2624 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_status=$?
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002628 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2629# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2630# in a Makefile. We should not override ac_cv_exeext if it was cached,
2631# so that the user can short-circuit this test for compilers unknown to
2632# Autoconf.
2633for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002634do
2635 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002638 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002639 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002640 # We found the default executable, but exeext='' is most
2641 # certainly right.
2642 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002643 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002644 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2645 then :; else
2646 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2647 fi
2648 # We set ac_cv_exeext here because the later test for it is not
2649 # safe: cross compilers may not add the suffix if given an `-o'
2650 # argument, so we may need to know it at that point already.
2651 # Even if this section looks crufty: it has the advantage of
2652 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002653 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002654 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002655 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 esac
2657done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658test "$ac_cv_exeext" = no && ac_cv_exeext=
2659
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002660else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002661 ac_file=''
2662fi
2663
2664{ echo "$as_me:$LINENO: result: $ac_file" >&5
2665echo "${ECHO_T}$ac_file" >&6; }
2666if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002668sed 's/^/| /' conftest.$ac_ext >&5
2669
2670{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2671See \`config.log' for more details." >&5
2672echo "$as_me: error: C compiler cannot create executables
2673See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002675fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002678
Martin v. Löwiseba40652007-08-30 20:10:57 +00002679# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002680# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002681{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2682echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002683# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2684# If not cross compiling, check that we can run a simple program.
2685if test "$cross_compiling" != yes; then
2686 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687 { (case "(($ac_try" in
2688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2689 *) ac_try_echo=$ac_try;;
2690esac
2691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2692 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 ac_status=$?
2694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2695 (exit $ac_status); }; }; then
2696 cross_compiling=no
2697 else
2698 if test "$cross_compiling" = maybe; then
2699 cross_compiling=yes
2700 else
2701 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002702If you meant to cross compile, use \`--host'.
2703See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002705If you meant to cross compile, use \`--host'.
2706See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 { (exit 1); exit 1; }; }
2708 fi
2709 fi
2710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002711{ echo "$as_me:$LINENO: result: yes" >&5
2712echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002713
Skip Montanaro6dead952003-09-25 14:50:04 +00002714rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002715ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002716# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002717# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002718{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2719echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2720{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2721echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002722
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2724echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2725if { (ac_try="$ac_link"
2726case "(($ac_try" in
2727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2728 *) ac_try_echo=$ac_try;;
2729esac
2730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2731 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 ac_status=$?
2733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734 (exit $ac_status); }; then
2735 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2736# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2737# work properly (i.e., refer to `conftest.exe'), while it won't with
2738# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002739for ac_file in conftest.exe conftest conftest.*; do
2740 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002742 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002744 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 * ) break;;
2746 esac
2747done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748else
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2750See \`config.log' for more details." >&5
2751echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2752See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002754fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002755
Martin v. Löwis11437992002-04-12 09:54:03 +00002756rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002757{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2758echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759
2760rm -f conftest.$ac_ext
2761EXEEXT=$ac_cv_exeext
2762ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002763{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2764echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002765if test "${ac_cv_objext+set}" = set; then
2766 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002767else
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002769/* confdefs.h. */
2770_ACEOF
2771cat confdefs.h >>conftest.$ac_ext
2772cat >>conftest.$ac_ext <<_ACEOF
2773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002774
Martin v. Löwis11437992002-04-12 09:54:03 +00002775int
2776main ()
2777{
2778
2779 ;
2780 return 0;
2781}
2782_ACEOF
2783rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002784if { (ac_try="$ac_compile"
2785case "(($ac_try" in
2786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2787 *) ac_try_echo=$ac_try;;
2788esac
2789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2790 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 ac_status=$?
2792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002794 for ac_file in conftest.o conftest.obj conftest.*; do
2795 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2799 break;;
2800 esac
2801done
2802else
2803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002804sed 's/^/| /' conftest.$ac_ext >&5
2805
2806{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2807See \`config.log' for more details." >&5
2808echo "$as_me: error: cannot compute suffix of object files: cannot compile
2809See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 { (exit 1); exit 1; }; }
2811fi
2812
2813rm -f conftest.$ac_cv_objext conftest.$ac_ext
2814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002815{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2816echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817OBJEXT=$ac_cv_objext
2818ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002819{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2820echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002821if test "${ac_cv_c_compiler_gnu+set}" = set; then
2822 echo $ECHO_N "(cached) $ECHO_C" >&6
2823else
2824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002825/* confdefs.h. */
2826_ACEOF
2827cat confdefs.h >>conftest.$ac_ext
2828cat >>conftest.$ac_ext <<_ACEOF
2829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002830
Martin v. Löwis11437992002-04-12 09:54:03 +00002831int
2832main ()
2833{
2834#ifndef __GNUC__
2835 choke me
2836#endif
2837
2838 ;
2839 return 0;
2840}
2841_ACEOF
2842rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002843if { (ac_try="$ac_compile"
2844case "(($ac_try" in
2845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2846 *) ac_try_echo=$ac_try;;
2847esac
2848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002851 grep -v '^ *+' conftest.er1 >conftest.err
2852 rm -f conftest.er1
2853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002855 (exit $ac_status); } && {
2856 test -z "$ac_c_werror_flag" ||
2857 test ! -s conftest.err
2858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002859 ac_compiler_gnu=yes
2860else
2861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002862sed 's/^/| /' conftest.$ac_ext >&5
2863
Martin v. Löwiseba40652007-08-30 20:10:57 +00002864 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002866
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002868ac_cv_c_compiler_gnu=$ac_compiler_gnu
2869
2870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002871{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2872echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002873GCC=`test $ac_compiler_gnu = yes && echo yes`
2874ac_test_CFLAGS=${CFLAGS+set}
2875ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002876{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2877echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002878if test "${ac_cv_prog_cc_g+set}" = set; then
2879 echo $ECHO_N "(cached) $ECHO_C" >&6
2880else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002881 ac_save_c_werror_flag=$ac_c_werror_flag
2882 ac_c_werror_flag=yes
2883 ac_cv_prog_cc_g=no
2884 CFLAGS="-g"
2885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002886/* confdefs.h. */
2887_ACEOF
2888cat confdefs.h >>conftest.$ac_ext
2889cat >>conftest.$ac_ext <<_ACEOF
2890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002891
Martin v. Löwis11437992002-04-12 09:54:03 +00002892int
2893main ()
2894{
2895
2896 ;
2897 return 0;
2898}
2899_ACEOF
2900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002901if { (ac_try="$ac_compile"
2902case "(($ac_try" in
2903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2904 *) ac_try_echo=$ac_try;;
2905esac
2906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002909 grep -v '^ *+' conftest.er1 >conftest.err
2910 rm -f conftest.er1
2911 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002913 (exit $ac_status); } && {
2914 test -z "$ac_c_werror_flag" ||
2915 test ! -s conftest.err
2916 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002917 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002918else
Martin v. Löwis11437992002-04-12 09:54:03 +00002919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002920sed 's/^/| /' conftest.$ac_ext >&5
2921
Martin v. Löwiseba40652007-08-30 20:10:57 +00002922 CFLAGS=""
2923 cat >conftest.$ac_ext <<_ACEOF
2924/* confdefs.h. */
2925_ACEOF
2926cat confdefs.h >>conftest.$ac_ext
2927cat >>conftest.$ac_ext <<_ACEOF
2928/* end confdefs.h. */
2929
2930int
2931main ()
2932{
2933
2934 ;
2935 return 0;
2936}
2937_ACEOF
2938rm -f conftest.$ac_objext
2939if { (ac_try="$ac_compile"
2940case "(($ac_try" in
2941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2942 *) ac_try_echo=$ac_try;;
2943esac
2944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2945 (eval "$ac_compile") 2>conftest.er1
2946 ac_status=$?
2947 grep -v '^ *+' conftest.er1 >conftest.err
2948 rm -f conftest.er1
2949 cat conftest.err >&5
2950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951 (exit $ac_status); } && {
2952 test -z "$ac_c_werror_flag" ||
2953 test ! -s conftest.err
2954 } && test -s conftest.$ac_objext; then
2955 :
2956else
2957 echo "$as_me: failed program was:" >&5
2958sed 's/^/| /' conftest.$ac_ext >&5
2959
2960 ac_c_werror_flag=$ac_save_c_werror_flag
2961 CFLAGS="-g"
2962 cat >conftest.$ac_ext <<_ACEOF
2963/* confdefs.h. */
2964_ACEOF
2965cat confdefs.h >>conftest.$ac_ext
2966cat >>conftest.$ac_ext <<_ACEOF
2967/* end confdefs.h. */
2968
2969int
2970main ()
2971{
2972
2973 ;
2974 return 0;
2975}
2976_ACEOF
2977rm -f conftest.$ac_objext
2978if { (ac_try="$ac_compile"
2979case "(($ac_try" in
2980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2981 *) ac_try_echo=$ac_try;;
2982esac
2983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2984 (eval "$ac_compile") 2>conftest.er1
2985 ac_status=$?
2986 grep -v '^ *+' conftest.er1 >conftest.err
2987 rm -f conftest.er1
2988 cat conftest.err >&5
2989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2990 (exit $ac_status); } && {
2991 test -z "$ac_c_werror_flag" ||
2992 test ! -s conftest.err
2993 } && test -s conftest.$ac_objext; then
2994 ac_cv_prog_cc_g=yes
2995else
2996 echo "$as_me: failed program was:" >&5
2997sed 's/^/| /' conftest.$ac_ext >&5
2998
2999
Guido van Rossum627b2d71993-12-24 10:39:16 +00003000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003001
3002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003004
3005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3006fi
3007
3008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3009 ac_c_werror_flag=$ac_save_c_werror_flag
3010fi
3011{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3012echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003013if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003014 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003015elif test $ac_cv_prog_cc_g = yes; then
3016 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003017 CFLAGS="-g -O2"
3018 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003019 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003020 fi
3021else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003022 if test "$GCC" = yes; then
3023 CFLAGS="-O2"
3024 else
3025 CFLAGS=
3026 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003028{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3029echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3030if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003031 echo $ECHO_N "(cached) $ECHO_C" >&6
3032else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003033 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003034ac_save_CC=$CC
3035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003036/* confdefs.h. */
3037_ACEOF
3038cat confdefs.h >>conftest.$ac_ext
3039cat >>conftest.$ac_ext <<_ACEOF
3040/* end confdefs.h. */
3041#include <stdarg.h>
3042#include <stdio.h>
3043#include <sys/types.h>
3044#include <sys/stat.h>
3045/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3046struct buf { int x; };
3047FILE * (*rcsopen) (struct buf *, struct stat *, int);
3048static char *e (p, i)
3049 char **p;
3050 int i;
3051{
3052 return p[i];
3053}
3054static char *f (char * (*g) (char **, int), char **p, ...)
3055{
3056 char *s;
3057 va_list v;
3058 va_start (v,p);
3059 s = g (p, va_arg (v,int));
3060 va_end (v);
3061 return s;
3062}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003063
3064/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3065 function prototypes and stuff, but not '\xHH' hex character constants.
3066 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003067 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003068 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3069 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003070 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003071int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3072
Martin v. Löwiseba40652007-08-30 20:10:57 +00003073/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3074 inside strings and character constants. */
3075#define FOO(x) 'x'
3076int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3077
Skip Montanaro6dead952003-09-25 14:50:04 +00003078int test (int i, double x);
3079struct s1 {int (*f) (int a);};
3080struct s2 {int (*f) (double a);};
3081int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3082int argc;
3083char **argv;
3084int
3085main ()
3086{
3087return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3088 ;
3089 return 0;
3090}
3091_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003092for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3093 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003094do
3095 CC="$ac_save_CC $ac_arg"
3096 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003097if { (ac_try="$ac_compile"
3098case "(($ac_try" in
3099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3100 *) ac_try_echo=$ac_try;;
3101esac
3102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3103 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003105 grep -v '^ *+' conftest.er1 >conftest.err
3106 rm -f conftest.er1
3107 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003109 (exit $ac_status); } && {
3110 test -z "$ac_c_werror_flag" ||
3111 test ! -s conftest.err
3112 } && test -s conftest.$ac_objext; then
3113 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003114else
3115 echo "$as_me: failed program was:" >&5
3116sed 's/^/| /' conftest.$ac_ext >&5
3117
Martin v. Löwiseba40652007-08-30 20:10:57 +00003118
Skip Montanaro6dead952003-09-25 14:50:04 +00003119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003120
3121rm -f core conftest.err conftest.$ac_objext
3122 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003123done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003124rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003125CC=$ac_save_CC
3126
3127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003128# AC_CACHE_VAL
3129case "x$ac_cv_prog_cc_c89" in
3130 x)
3131 { echo "$as_me:$LINENO: result: none needed" >&5
3132echo "${ECHO_T}none needed" >&6; } ;;
3133 xno)
3134 { echo "$as_me:$LINENO: result: unsupported" >&5
3135echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003136 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003137 CC="$CC $ac_cv_prog_cc_c89"
3138 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3139echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003140esac
3141
Skip Montanaro6dead952003-09-25 14:50:04 +00003142
Martin v. Löwis11437992002-04-12 09:54:03 +00003143ac_ext=c
3144ac_cpp='$CPP $CPPFLAGS'
3145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3147ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003149
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003150
3151
Martin v. Löwiseba40652007-08-30 20:10:57 +00003152{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3153echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003154
Martin v. Löwiseba40652007-08-30 20:10:57 +00003155# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003156if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003157 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003158
3159 case $withval in
3160 no) with_cxx_main=no
3161 MAINCC='$(CC)';;
3162 yes) with_cxx_main=yes
3163 MAINCC='$(CXX)';;
3164 *) with_cxx_main=yes
3165 MAINCC=$withval
3166 if test -z "$CXX"
3167 then
3168 CXX=$withval
3169 fi;;
3170 esac
3171else
3172
3173 with_cxx_main=no
3174 MAINCC='$(CC)'
3175
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176fi
3177
3178{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3179echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003180
3181preset_cxx="$CXX"
3182if test -z "$CXX"
3183then
3184 case "$CC" in
3185 gcc) # Extract the first word of "g++", so it can be a program name with args.
3186set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3188echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003189if test "${ac_cv_path_CXX+set}" = set; then
3190 echo $ECHO_N "(cached) $ECHO_C" >&6
3191else
3192 case $CXX in
3193 [\\/]* | ?:[\\/]*)
3194 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3195 ;;
3196 *)
3197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3198for as_dir in notfound
3199do
3200 IFS=$as_save_IFS
3201 test -z "$as_dir" && as_dir=.
3202 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003203 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003204 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3205 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3206 break 2
3207 fi
3208done
3209done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003211
3212 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3213 ;;
3214esac
3215fi
3216CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003217if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218 { echo "$as_me:$LINENO: result: $CXX" >&5
3219echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003220else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221 { echo "$as_me:$LINENO: result: no" >&5
3222echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003224
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003225 ;;
3226 cc) # Extract the first word of "c++", so it can be a program name with args.
3227set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003228{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3229echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003230if test "${ac_cv_path_CXX+set}" = set; then
3231 echo $ECHO_N "(cached) $ECHO_C" >&6
3232else
3233 case $CXX in
3234 [\\/]* | ?:[\\/]*)
3235 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3236 ;;
3237 *)
3238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239for as_dir in notfound
3240do
3241 IFS=$as_save_IFS
3242 test -z "$as_dir" && as_dir=.
3243 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003245 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3246 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3247 break 2
3248 fi
3249done
3250done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003251IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003252
3253 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3254 ;;
3255esac
3256fi
3257CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003258if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003259 { echo "$as_me:$LINENO: result: $CXX" >&5
3260echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003261else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262 { echo "$as_me:$LINENO: result: no" >&5
3263echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003265
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003266 ;;
3267 esac
3268 if test "$CXX" = "notfound"
3269 then
3270 CXX=""
3271 fi
3272fi
3273if test -z "$CXX"
3274then
3275 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3276do
3277 # Extract the first word of "$ac_prog", so it can be a program name with args.
3278set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003281if test "${ac_cv_prog_CXX+set}" = set; then
3282 echo $ECHO_N "(cached) $ECHO_C" >&6
3283else
3284 if test -n "$CXX"; then
3285 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3286else
3287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3288for as_dir in $PATH
3289do
3290 IFS=$as_save_IFS
3291 test -z "$as_dir" && as_dir=.
3292 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003294 ac_cv_prog_CXX="$ac_prog"
3295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3296 break 2
3297 fi
3298done
3299done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003300IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301
3302fi
3303fi
3304CXX=$ac_cv_prog_CXX
3305if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 { echo "$as_me:$LINENO: result: $CXX" >&5
3307echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003308else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003309 { echo "$as_me:$LINENO: result: no" >&5
3310echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003311fi
3312
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003314 test -n "$CXX" && break
3315done
3316test -n "$CXX" || CXX="notfound"
3317
3318 if test "$CXX" = "notfound"
3319 then
3320 CXX=""
3321 fi
3322fi
3323if test "$preset_cxx" != "$CXX"
3324then
3325 { echo "$as_me:$LINENO: WARNING:
3326
3327 By default, distutils will build C++ extension modules with \"$CXX\".
3328 If this is not intended, then set CXX on the configure command line.
3329 " >&5
3330echo "$as_me: WARNING:
3331
3332 By default, distutils will build C++ extension modules with \"$CXX\".
3333 If this is not intended, then set CXX on the configure command line.
3334 " >&2;}
3335fi
3336
3337
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003338# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003339
3340ac_ext=c
3341ac_cpp='$CPP $CPPFLAGS'
3342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3344ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3346echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003347# On Suns, sometimes $CPP names a directory.
3348if test -n "$CPP" && test -d "$CPP"; then
3349 CPP=
3350fi
3351if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003352 if test "${ac_cv_prog_CPP+set}" = set; then
3353 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003354else
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 # Double quotes because CPP needs to be expanded
3356 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3357 do
3358 ac_preproc_ok=false
3359for ac_c_preproc_warn_flag in '' yes
3360do
3361 # Use a header file that comes with gcc, so configuring glibc
3362 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003363 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3364 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003365 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 # not just through cpp. "Syntax error" is here to catch this case.
3367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003368/* confdefs.h. */
3369_ACEOF
3370cat confdefs.h >>conftest.$ac_ext
3371cat >>conftest.$ac_ext <<_ACEOF
3372/* end confdefs.h. */
3373#ifdef __STDC__
3374# include <limits.h>
3375#else
3376# include <assert.h>
3377#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003378 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003379_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003380if { (ac_try="$ac_cpp conftest.$ac_ext"
3381case "(($ac_try" in
3382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3383 *) ac_try_echo=$ac_try;;
3384esac
3385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3386 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003388 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003389 rm -f conftest.er1
3390 cat conftest.err >&5
3391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392 (exit $ac_status); } >/dev/null && {
3393 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3394 test ! -s conftest.err
3395 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003396 :
3397else
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003399sed 's/^/| /' conftest.$ac_ext >&5
3400
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 # Broken: fails on valid input.
3402continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003404
Martin v. Löwis11437992002-04-12 09:54:03 +00003405rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003406
Martin v. Löwiseba40652007-08-30 20:10:57 +00003407 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003408 # can be detected and how.
3409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003410/* confdefs.h. */
3411_ACEOF
3412cat confdefs.h >>conftest.$ac_ext
3413cat >>conftest.$ac_ext <<_ACEOF
3414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003415#include <ac_nonexistent.h>
3416_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003417if { (ac_try="$ac_cpp conftest.$ac_ext"
3418case "(($ac_try" in
3419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3420 *) ac_try_echo=$ac_try;;
3421esac
3422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3423 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003425 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003426 rm -f conftest.er1
3427 cat conftest.err >&5
3428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429 (exit $ac_status); } >/dev/null && {
3430 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3431 test ! -s conftest.err
3432 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 # Broken: success on invalid input.
3434continue
3435else
3436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003437sed 's/^/| /' conftest.$ac_ext >&5
3438
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 # Passes both tests.
3440ac_preproc_ok=:
3441break
3442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003443
Martin v. Löwis11437992002-04-12 09:54:03 +00003444rm -f conftest.err conftest.$ac_ext
3445
3446done
3447# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3448rm -f conftest.err conftest.$ac_ext
3449if $ac_preproc_ok; then
3450 break
3451fi
3452
3453 done
3454 ac_cv_prog_CPP=$CPP
3455
3456fi
3457 CPP=$ac_cv_prog_CPP
3458else
3459 ac_cv_prog_CPP=$CPP
3460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003461{ echo "$as_me:$LINENO: result: $CPP" >&5
3462echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003463ac_preproc_ok=false
3464for ac_c_preproc_warn_flag in '' yes
3465do
3466 # Use a header file that comes with gcc, so configuring glibc
3467 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003468 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3469 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 # On the NeXT, cc -E runs the code through the compiler's parser,
3471 # not just through cpp. "Syntax error" is here to catch this case.
3472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003473/* confdefs.h. */
3474_ACEOF
3475cat confdefs.h >>conftest.$ac_ext
3476cat >>conftest.$ac_ext <<_ACEOF
3477/* end confdefs.h. */
3478#ifdef __STDC__
3479# include <limits.h>
3480#else
3481# include <assert.h>
3482#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003483 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003484_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003485if { (ac_try="$ac_cpp conftest.$ac_ext"
3486case "(($ac_try" in
3487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3488 *) ac_try_echo=$ac_try;;
3489esac
3490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3491 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003493 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 rm -f conftest.er1
3495 cat conftest.err >&5
3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003497 (exit $ac_status); } >/dev/null && {
3498 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3499 test ! -s conftest.err
3500 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 :
3502else
3503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003504sed 's/^/| /' conftest.$ac_ext >&5
3505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 # Broken: fails on valid input.
3507continue
3508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510rm -f conftest.err conftest.$ac_ext
3511
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 # can be detected and how.
3514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003515/* confdefs.h. */
3516_ACEOF
3517cat confdefs.h >>conftest.$ac_ext
3518cat >>conftest.$ac_ext <<_ACEOF
3519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003520#include <ac_nonexistent.h>
3521_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522if { (ac_try="$ac_cpp conftest.$ac_ext"
3523case "(($ac_try" in
3524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3525 *) ac_try_echo=$ac_try;;
3526esac
3527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3528 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003530 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 rm -f conftest.er1
3532 cat conftest.err >&5
3533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003534 (exit $ac_status); } >/dev/null && {
3535 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3536 test ! -s conftest.err
3537 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 # Broken: success on invalid input.
3539continue
3540else
3541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003542sed 's/^/| /' conftest.$ac_ext >&5
3543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Passes both tests.
3545ac_preproc_ok=:
3546break
3547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003548
Martin v. Löwis11437992002-04-12 09:54:03 +00003549rm -f conftest.err conftest.$ac_ext
3550
3551done
3552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3553rm -f conftest.err conftest.$ac_ext
3554if $ac_preproc_ok; then
3555 :
3556else
Skip Montanaro6dead952003-09-25 14:50:04 +00003557 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3558See \`config.log' for more details." >&5
3559echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3560See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003561 { (exit 1); exit 1; }; }
3562fi
3563
3564ac_ext=c
3565ac_cpp='$CPP $CPPFLAGS'
3566ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3567ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3568ac_compiler_gnu=$ac_cv_c_compiler_gnu
3569
3570
Martin v. Löwiseba40652007-08-30 20:10:57 +00003571{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3572echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3573if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003574 echo $ECHO_N "(cached) $ECHO_C" >&6
3575else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003576 # Extract the first word of "grep ggrep" to use in msg output
3577if test -z "$GREP"; then
3578set dummy grep ggrep; ac_prog_name=$2
3579if test "${ac_cv_path_GREP+set}" = set; then
3580 echo $ECHO_N "(cached) $ECHO_C" >&6
3581else
3582 ac_path_GREP_found=false
3583# Loop through the user's path and test for each of PROGNAME-LIST
3584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
3589 for ac_prog in grep ggrep; do
3590 for ac_exec_ext in '' $ac_executable_extensions; do
3591 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3592 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3593 # Check for GNU ac_path_GREP and select it if it is found.
3594 # Check for GNU $ac_path_GREP
3595case `"$ac_path_GREP" --version 2>&1` in
3596*GNU*)
3597 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3598*)
3599 ac_count=0
3600 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3601 while :
3602 do
3603 cat "conftest.in" "conftest.in" >"conftest.tmp"
3604 mv "conftest.tmp" "conftest.in"
3605 cp "conftest.in" "conftest.nl"
3606 echo 'GREP' >> "conftest.nl"
3607 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3608 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3609 ac_count=`expr $ac_count + 1`
3610 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3611 # Best one so far, save it but keep looking for a better one
3612 ac_cv_path_GREP="$ac_path_GREP"
3613 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003614 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615 # 10*(2^10) chars as input seems more than enough
3616 test $ac_count -gt 10 && break
3617 done
3618 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3619esac
3620
3621
3622 $ac_path_GREP_found && break 3
3623 done
3624done
3625
3626done
3627IFS=$as_save_IFS
3628
3629
Skip Montanaro6dead952003-09-25 14:50:04 +00003630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631
3632GREP="$ac_cv_path_GREP"
3633if test -z "$GREP"; then
3634 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3635echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3636 { (exit 1); exit 1; }; }
3637fi
3638
3639else
3640 ac_cv_path_GREP=$GREP
3641fi
3642
3643
3644fi
3645{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3646echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3647 GREP="$ac_cv_path_GREP"
3648
3649
3650{ echo "$as_me:$LINENO: checking for egrep" >&5
3651echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3652if test "${ac_cv_path_EGREP+set}" = set; then
3653 echo $ECHO_N "(cached) $ECHO_C" >&6
3654else
3655 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3656 then ac_cv_path_EGREP="$GREP -E"
3657 else
3658 # Extract the first word of "egrep" to use in msg output
3659if test -z "$EGREP"; then
3660set dummy egrep; ac_prog_name=$2
3661if test "${ac_cv_path_EGREP+set}" = set; then
3662 echo $ECHO_N "(cached) $ECHO_C" >&6
3663else
3664 ac_path_EGREP_found=false
3665# Loop through the user's path and test for each of PROGNAME-LIST
3666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
3671 for ac_prog in egrep; do
3672 for ac_exec_ext in '' $ac_executable_extensions; do
3673 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3674 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3675 # Check for GNU ac_path_EGREP and select it if it is found.
3676 # Check for GNU $ac_path_EGREP
3677case `"$ac_path_EGREP" --version 2>&1` in
3678*GNU*)
3679 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3680*)
3681 ac_count=0
3682 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3683 while :
3684 do
3685 cat "conftest.in" "conftest.in" >"conftest.tmp"
3686 mv "conftest.tmp" "conftest.in"
3687 cp "conftest.in" "conftest.nl"
3688 echo 'EGREP' >> "conftest.nl"
3689 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3690 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3691 ac_count=`expr $ac_count + 1`
3692 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3693 # Best one so far, save it but keep looking for a better one
3694 ac_cv_path_EGREP="$ac_path_EGREP"
3695 ac_path_EGREP_max=$ac_count
3696 fi
3697 # 10*(2^10) chars as input seems more than enough
3698 test $ac_count -gt 10 && break
3699 done
3700 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3701esac
3702
3703
3704 $ac_path_EGREP_found && break 3
3705 done
3706done
3707
3708done
3709IFS=$as_save_IFS
3710
3711
3712fi
3713
3714EGREP="$ac_cv_path_EGREP"
3715if test -z "$EGREP"; then
3716 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3717echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3718 { (exit 1); exit 1; }; }
3719fi
3720
3721else
3722 ac_cv_path_EGREP=$EGREP
3723fi
3724
3725
3726 fi
3727fi
3728{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3729echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3730 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003731
3732
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734{ echo "$as_me:$LINENO: checking for AIX" >&5
3735echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003737/* confdefs.h. */
3738_ACEOF
3739cat confdefs.h >>conftest.$ac_ext
3740cat >>conftest.$ac_ext <<_ACEOF
3741/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003742#ifdef _AIX
3743 yes
3744#endif
3745
Martin v. Löwis11437992002-04-12 09:54:03 +00003746_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003748 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749 { echo "$as_me:$LINENO: result: yes" >&5
3750echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003752#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003753_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003754
3755else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003756 { echo "$as_me:$LINENO: result: no" >&5
3757echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003758fi
3759rm -f conftest*
3760
Michael W. Hudson54241132001-12-07 15:38:26 +00003761
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003762
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003763# Check for unsupported systems
3764case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003765atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003766 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3767 echo See README for details.
3768 exit 1;;
3769esac
3770
Michael W. Hudson54241132001-12-07 15:38:26 +00003771
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3773echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003774
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003776if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003778 case $withval in
3779 no) EXEEXT=;;
3780 yes) EXEEXT=.exe;;
3781 *) EXEEXT=$withval;;
3782 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003783fi
3784
3785{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3786echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003787
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003788# Test whether we're running on a non-case-sensitive system, in which
3789# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003790
Martin v. Löwiseba40652007-08-30 20:10:57 +00003791{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3792echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003793if test ! -d CaseSensitiveTestDir; then
3794mkdir CaseSensitiveTestDir
3795fi
3796
3797if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003798then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003799 { echo "$as_me:$LINENO: result: yes" >&5
3800echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003801 BUILDEXEEXT=.exe
3802else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803 { echo "$as_me:$LINENO: result: no" >&5
3804echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003805 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003806fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003807rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003808
Guido van Rossumdd997f71998-10-07 19:58:26 +00003809case $MACHDEP in
3810bsdos*)
3811 case $CC in
3812 gcc) CC="$CC -D_HAVE_BSDI";;
3813 esac;;
3814esac
3815
Guido van Rossum24b1e751997-08-21 02:29:16 +00003816case $ac_sys_system in
3817hp*|HP*)
3818 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003819 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003820 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003821Monterey*)
3822 case $CC in
3823 cc) CC="$CC -Wl,-Bexport";;
3824 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003825SunOS*)
3826 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003827
3828cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003829#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003830_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003831
3832 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003833esac
3834
Michael W. Hudson54241132001-12-07 15:38:26 +00003835
3836
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3838echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003839if test -z "$LIBRARY"
3840then
3841 LIBRARY='libpython$(VERSION).a'
3842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003843{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3844echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003845
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003846# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003847# name of the library into which to insert object files). BLDLIBRARY is also
3848# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3849# is blank as the main program is not linked directly against LDLIBRARY.
3850# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3851# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3852# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3853# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003854#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003855# RUNSHARED is used to run shared python without installed libraries
3856#
3857# INSTSONAME is the name of the shared library that will be use to install
3858# on the system - some systems like version suffix, others don't
3859
3860
Michael W. Hudson54241132001-12-07 15:38:26 +00003861
3862
3863
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003864
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003865LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003866BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003867INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003868DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003869LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003870RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003871
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003872# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003873# If CXX is set, and if it is needed to link a main function that was
3874# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3875# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003876# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003877# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003878
Martin v. Löwiseba40652007-08-30 20:10:57 +00003879{ echo "$as_me:$LINENO: checking LINKCC" >&5
3880echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003881if test -z "$LINKCC"
3882then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003883 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003884 case $ac_sys_system in
3885 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003886 exp_extra="\"\""
3887 if test $ac_sys_release -ge 5 -o \
3888 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3889 exp_extra="."
3890 fi
3891 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003892 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003893 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003894 esac
3895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3897echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003898
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3900echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3901# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003902if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003903 enableval=$enable_shared;
3904fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003905
Martin v. Löwis1142de32002-03-29 16:28:31 +00003906
3907if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003908then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003909 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003910 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003911 enable_shared="yes";;
3912 *)
3913 enable_shared="no";;
3914 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003916{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3917echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003918
Martin v. Löwiseba40652007-08-30 20:10:57 +00003919{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3920echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3921# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003922if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003924 CC="$CC -pg"
3925 if test "$cross_compiling" = yes; then
3926 ac_enable_profiling="no"
3927else
3928 cat >conftest.$ac_ext <<_ACEOF
3929/* confdefs.h. */
3930_ACEOF
3931cat confdefs.h >>conftest.$ac_ext
3932cat >>conftest.$ac_ext <<_ACEOF
3933/* end confdefs.h. */
3934int main() { return 0; }
3935_ACEOF
3936rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003937if { (ac_try="$ac_link"
3938case "(($ac_try" in
3939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3940 *) ac_try_echo=$ac_try;;
3941esac
3942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3943 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00003947 { (case "(($ac_try" in
3948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3949 *) ac_try_echo=$ac_try;;
3950esac
3951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3952 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003953 ac_status=$?
3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955 (exit $ac_status); }; }; then
3956 ac_enable_profiling="yes"
3957else
3958 echo "$as_me: program exited with status $ac_status" >&5
3959echo "$as_me: failed program was:" >&5
3960sed 's/^/| /' conftest.$ac_ext >&5
3961
3962( exit $ac_status )
3963ac_enable_profiling="no"
3964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003967
3968
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003969 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003970fi
3971
3972{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3973echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003974
3975case "$ac_enable_profiling" in
3976 "yes")
3977 BASECFLAGS="-pg $BASECFLAGS"
3978 LDFLAGS="-pg $LDFLAGS"
3979 ;;
3980esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003981
Martin v. Löwiseba40652007-08-30 20:10:57 +00003982{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3983echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00003984
Guido van Rossumb8552162001-09-05 14:58:11 +00003985# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3986# library that we build, but we do not want to link against it (we
3987# will find it with a -framework option). For this reason there is an
3988# extra variable BLDLIBRARY against which Python and the extension
3989# modules are linked, BLDLIBRARY. This is normally the same as
3990# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003991if test "$enable_framework"
3992then
3993 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003994 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003995 BLDLIBRARY=''
3996else
3997 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003998fi
Jack Jansene578a632001-08-15 01:27:14 +00003999
Martin v. Löwis1142de32002-03-29 16:28:31 +00004000# Other platforms follow
4001if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004002
4003cat >>confdefs.h <<\_ACEOF
4004#define Py_ENABLE_SHARED 1
4005_ACEOF
4006
Martin v. Löwis1142de32002-03-29 16:28:31 +00004007 case $ac_sys_system in
4008 BeOS*)
4009 LDLIBRARY='libpython$(VERSION).so'
4010 ;;
4011 CYGWIN*)
4012 LDLIBRARY='libpython$(VERSION).dll.a'
4013 DLLLIBRARY='libpython$(VERSION).dll'
4014 ;;
4015 SunOS*)
4016 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004017 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004018 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004019 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004020 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004021 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004022 LDLIBRARY='libpython$(VERSION).so'
4023 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004024 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004025 case $ac_sys_system in
4026 FreeBSD*)
4027 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4028 ;;
4029 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004030 INSTSONAME="$LDLIBRARY".$SOVERSION
4031 ;;
4032 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004033 case `uname -m` in
4034 ia64)
4035 LDLIBRARY='libpython$(VERSION).so'
4036 ;;
4037 *)
4038 LDLIBRARY='libpython$(VERSION).sl'
4039 ;;
4040 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004041 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004042 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004043 ;;
4044 OSF*)
4045 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004046 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004047 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004048 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004049 atheos*)
4050 LDLIBRARY='libpython$(VERSION).so'
4051 BLDLIBRARY='-L. -lpython$(VERSION)'
4052 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4053 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004054 esac
Jason Tishler30765592003-09-04 11:04:06 +00004055else # shared is disabled
4056 case $ac_sys_system in
4057 CYGWIN*)
4058 BLDLIBRARY='$(LIBRARY)'
4059 LDLIBRARY='libpython$(VERSION).dll.a'
4060 ;;
4061 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004062fi
4063
Martin v. Löwiseba40652007-08-30 20:10:57 +00004064{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4065echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004066
Martin v. Löwis11437992002-04-12 09:54:03 +00004067if test -n "$ac_tool_prefix"; then
4068 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4069set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004070{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4071echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004072if test "${ac_cv_prog_RANLIB+set}" = set; then
4073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074else
4075 if test -n "$RANLIB"; then
4076 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4077else
Martin v. Löwis11437992002-04-12 09:54:03 +00004078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4079for as_dir in $PATH
4080do
4081 IFS=$as_save_IFS
4082 test -z "$as_dir" && as_dir=.
4083 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4086 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4087 break 2
4088 fi
4089done
4090done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004091IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004092
Guido van Rossum627b2d71993-12-24 10:39:16 +00004093fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004095RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004096if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004097 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4098echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004100 { echo "$as_me:$LINENO: result: no" >&5
4101echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004102fi
4103
Martin v. Löwiseba40652007-08-30 20:10:57 +00004104
Martin v. Löwis11437992002-04-12 09:54:03 +00004105fi
4106if test -z "$ac_cv_prog_RANLIB"; then
4107 ac_ct_RANLIB=$RANLIB
4108 # Extract the first word of "ranlib", so it can be a program name with args.
4109set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004110{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4111echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004112if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4113 echo $ECHO_N "(cached) $ECHO_C" >&6
4114else
4115 if test -n "$ac_ct_RANLIB"; then
4116 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4117else
4118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4119for as_dir in $PATH
4120do
4121 IFS=$as_save_IFS
4122 test -z "$as_dir" && as_dir=.
4123 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004124 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 ac_cv_prog_ac_ct_RANLIB="ranlib"
4126 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4127 break 2
4128 fi
4129done
4130done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004131IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004132
Martin v. Löwis11437992002-04-12 09:54:03 +00004133fi
4134fi
4135ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4136if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4138echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004139else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004140 { echo "$as_me:$LINENO: result: no" >&5
4141echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004142fi
4143
Martin v. Löwiseba40652007-08-30 20:10:57 +00004144 if test "x$ac_ct_RANLIB" = x; then
4145 RANLIB=":"
4146 else
4147 case $cross_compiling:$ac_tool_warned in
4148yes:)
4149{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4150whose name does not start with the host triplet. If you think this
4151configuration is useful to you, please write to autoconf@gnu.org." >&5
4152echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4153whose name does not start with the host triplet. If you think this
4154configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4155ac_tool_warned=yes ;;
4156esac
4157 RANLIB=$ac_ct_RANLIB
4158 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004159else
4160 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004162
4163
Guido van Rossum7f43da71994-08-01 12:15:30 +00004164for ac_prog in ar aal
4165do
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004168{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4169echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004170if test "${ac_cv_prog_AR+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172else
4173 if test -n "$AR"; then
4174 ac_cv_prog_AR="$AR" # Let the user override the test.
4175else
Martin v. Löwis11437992002-04-12 09:54:03 +00004176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177for as_dir in $PATH
4178do
4179 IFS=$as_save_IFS
4180 test -z "$as_dir" && as_dir=.
4181 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004182 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 ac_cv_prog_AR="$ac_prog"
4184 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4185 break 2
4186 fi
4187done
4188done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004190
Guido van Rossum7f43da71994-08-01 12:15:30 +00004191fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004193AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195 { echo "$as_me:$LINENO: result: $AR" >&5
4196echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004198 { echo "$as_me:$LINENO: result: no" >&5
4199echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004201
Martin v. Löwiseba40652007-08-30 20:10:57 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004204done
4205test -n "$AR" || AR="ar"
4206
Michael W. Hudson54241132001-12-07 15:38:26 +00004207
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004208
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004209# Extract the first word of "svnversion", so it can be a program name with args.
4210set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004211{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4212echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004213if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4214 echo $ECHO_N "(cached) $ECHO_C" >&6
4215else
4216 if test -n "$SVNVERSION"; then
4217 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4218else
4219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220for as_dir in $PATH
4221do
4222 IFS=$as_save_IFS
4223 test -z "$as_dir" && as_dir=.
4224 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004225 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004226 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004227 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4228 break 2
4229 fi
4230done
4231done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004232IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004233
Martin v. Löwisff600232006-04-03 19:12:32 +00004234 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004235fi
4236fi
4237SVNVERSION=$ac_cv_prog_SVNVERSION
4238if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4240echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004241else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242 { echo "$as_me:$LINENO: result: no" >&5
4243echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004244fi
4245
Martin v. Löwiseba40652007-08-30 20:10:57 +00004246
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004247if test $SVNVERSION = found
4248then
4249 SVNVERSION="svnversion \$(srcdir)"
4250else
4251 SVNVERSION="echo exported"
4252fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004253
Neil Schemenauera42c8272001-03-31 00:01:55 +00004254case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004255bsdos*|hp*|HP*)
4256 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004257 if test -z "$INSTALL"
4258 then
4259 INSTALL="${srcdir}/install-sh -c"
4260 fi
4261esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004262ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004263for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4264 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004265 ac_aux_dir=$ac_dir
4266 ac_install_sh="$ac_aux_dir/install-sh -c"
4267 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004268 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004269 ac_aux_dir=$ac_dir
4270 ac_install_sh="$ac_aux_dir/install.sh -c"
4271 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004272 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 ac_aux_dir=$ac_dir
4274 ac_install_sh="$ac_aux_dir/shtool install -c"
4275 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004276 fi
4277done
4278if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4280echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283
4284# These three variables are undocumented and unsupported,
4285# and are intended to be withdrawn in a future Autoconf release.
4286# They can cause serious problems if a builder's source tree is in a directory
4287# whose full name contains unusual characters.
4288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4291
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004292
4293# Find a good install program. We prefer a C program (faster),
4294# so one script is as good as another. But avoid the broken or
4295# incompatible versions:
4296# SysV /etc/install, /usr/sbin/install
4297# SunOS /usr/etc/install
4298# IRIX /sbin/install
4299# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004300# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004301# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4302# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4303# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004305# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004306{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4307echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004308if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004309if test "${ac_cv_path_install+set}" = set; then
4310 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004311else
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4313for as_dir in $PATH
4314do
4315 IFS=$as_save_IFS
4316 test -z "$as_dir" && as_dir=.
4317 # Account for people who put trailing slashes in PATH elements.
4318case $as_dir/ in
4319 ./ | .// | /cC/* | \
4320 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004322 /usr/ucb/* ) ;;
4323 *)
4324 # OSF1 and SCO ODT 3.0 have their own names for install.
4325 # Don't use installbsd from OSF since it installs stuff as root
4326 # by default.
4327 for ac_prog in ginstall scoinst install; do
4328 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004329 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00004330 if test $ac_prog = install &&
4331 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4332 # AIX install. It has an incompatible calling convention.
4333 :
4334 elif test $ac_prog = install &&
4335 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4336 # program-specific install script used by HP pwplus--don't use.
4337 :
4338 else
4339 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4340 break 3
4341 fi
4342 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004343 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 done
4345 ;;
4346esac
4347done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004348IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004349
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004350
4351fi
4352 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004353 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004354 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004355 # As a last resort, use the slow shell script. Don't cache a
4356 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004357 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004358 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004360 fi
4361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004362{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4363echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004364
4365# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4366# It thinks the first close brace ends the variable substitution.
4367test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4368
Martin v. Löwis11437992002-04-12 09:54:03 +00004369test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004370
4371test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4372
Michael W. Hudson54241132001-12-07 15:38:26 +00004373
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004374# Not every filesystem supports hard links
4375
4376if test -z "$LN" ; then
4377 case $ac_sys_system in
4378 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004379 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004380 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004381 *) LN=ln;;
4382 esac
4383fi
4384
Fred Drake109d9862001-07-11 06:27:56 +00004385# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004386{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4387echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004388
Martin v. Löwiseba40652007-08-30 20:10:57 +00004389# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004390if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004392if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004393then
4394
4395cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004396#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004397_ACEOF
4398
Martin v. Löwiseba40652007-08-30 20:10:57 +00004399 { echo "$as_me:$LINENO: result: yes" >&5
4400echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004401 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402else { echo "$as_me:$LINENO: result: no" >&5
4403echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004404fi
4405else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004406 { echo "$as_me:$LINENO: result: no" >&5
4407echo "${ECHO_T}no" >&6; }
4408fi
4409
Fred Drake109d9862001-07-11 06:27:56 +00004410
Skip Montanarodecc6a42003-01-01 20:07:49 +00004411# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4412# merged with this chunk of code?
4413
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004414# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004415# ------------------------
4416# (The following bit of code is complicated enough - please keep things
4417# indented properly. Just pretend you're editing Python code. ;-)
4418
4419# There are two parallel sets of case statements below, one that checks to
4420# see if OPT was set and one that does BASECFLAGS setting based upon
4421# compiler and platform. BASECFLAGS tweaks need to be made even if the
4422# user set OPT.
4423
4424# tweak OPT based on compiler and platform, only if the user didn't set
4425# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004426
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004427if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004428then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004429 case $GCC in
4430 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004431 if test "$CC" != 'g++' ; then
4432 STRICT_PROTO="-Wstrict-prototypes"
4433 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004434 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4435 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4436 WRAP="-fwrapv"
4437 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004438 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004439 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004440 if test "$Py_DEBUG" = 'true' ; then
4441 # Optimization messes up debuggers, so turn it off for
4442 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004443 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004444 else
Thomas Hellere5529592007-12-13 21:20:29 +00004445 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004446 fi
4447 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004448 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004449 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004450 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004451 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004452 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004453 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4454 ;;
4455 esac
Fred Drake109d9862001-07-11 06:27:56 +00004456 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004457
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004458 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004459 OPT="-O"
4460 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004461 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004462
4463 # The current (beta) Monterey compiler dies with optimizations
4464 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004465 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004466 Monterey*)
4467 OPT=""
4468 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004469 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004470
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004471fi
4472
Skip Montanarodecc6a42003-01-01 20:07:49 +00004473
4474# tweak BASECFLAGS based on compiler and platform
4475case $GCC in
4476yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004477 # Python violates C99 rules, by casting between incompatible
4478 # pointer types. GCC may generate bad code as a result of that,
4479 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4481echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004482 ac_save_cc="$CC"
4483 CC="$CC -fno-strict-aliasing"
4484 if test "$cross_compiling" = yes; then
4485 ac_cv_no_strict_aliasing_ok=no
4486else
4487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004488/* confdefs.h. */
4489_ACEOF
4490cat confdefs.h >>conftest.$ac_ext
4491cat >>conftest.$ac_ext <<_ACEOF
4492/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004493int main() { return 0; }
4494_ACEOF
4495rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004496if { (ac_try="$ac_link"
4497case "(($ac_try" in
4498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4499 *) ac_try_echo=$ac_try;;
4500esac
4501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4502 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004503 ac_status=$?
4504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004506 { (case "(($ac_try" in
4507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4508 *) ac_try_echo=$ac_try;;
4509esac
4510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4511 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004512 ac_status=$?
4513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514 (exit $ac_status); }; }; then
4515 ac_cv_no_strict_aliasing_ok=yes
4516else
4517 echo "$as_me: program exited with status $ac_status" >&5
4518echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004519sed 's/^/| /' conftest.$ac_ext >&5
4520
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004521( exit $ac_status )
4522ac_cv_no_strict_aliasing_ok=no
4523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004526
4527
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004528 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004529 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4530echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004531 if test $ac_cv_no_strict_aliasing_ok = yes
4532 then
4533 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4534 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004535 case $ac_sys_system in
4536 SCO_SV*)
4537 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4538 ;;
4539 # is there any other compiler on Darwin besides gcc?
4540 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004541 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4542 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren988117f2006-04-29 11:31:35 +00004543 if test "${enable_universalsdk}"; then
4544 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4545 fi
4546
Skip Montanarodecc6a42003-01-01 20:07:49 +00004547 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004548 OSF*)
4549 BASECFLAGS="$BASECFLAGS -mieee"
4550 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004551 esac
4552 ;;
4553
4554*)
4555 case $ac_sys_system in
4556 OpenUNIX*|UnixWare*)
4557 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4558 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004559 OSF*)
4560 BASECFLAGS="$BASECFLAGS -ieee -std"
4561 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004562 SCO_SV*)
4563 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4564 ;;
4565 esac
4566 ;;
4567esac
4568
Fred Drakee1ceaa02001-12-04 20:55:47 +00004569if test "$Py_DEBUG" = 'true'; then
4570 :
4571else
4572 OPT="-DNDEBUG $OPT"
4573fi
4574
Guido van Rossum563e7081996-09-10 18:20:48 +00004575if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004576then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004577 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004578fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004579
Neal Norwitz020c46a2006-01-07 21:39:28 +00004580# disable check for icc since it seems to pass, but generates a warning
4581if test "$CC" = icc
4582then
4583 ac_cv_opt_olimit_ok=no
4584fi
4585
Martin v. Löwiseba40652007-08-30 20:10:57 +00004586{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4587echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004588if test "${ac_cv_opt_olimit_ok+set}" = set; then
4589 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004590else
4591 ac_save_cc="$CC"
4592CC="$CC -OPT:Olimit=0"
4593if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004594 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004595else
Martin v. Löwis11437992002-04-12 09:54:03 +00004596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004597/* confdefs.h. */
4598_ACEOF
4599cat confdefs.h >>conftest.$ac_ext
4600cat >>conftest.$ac_ext <<_ACEOF
4601/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004602int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004603_ACEOF
4604rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004605if { (ac_try="$ac_link"
4606case "(($ac_try" in
4607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4608 *) ac_try_echo=$ac_try;;
4609esac
4610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4611 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004612 ac_status=$?
4613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4614 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004615 { (case "(($ac_try" in
4616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4617 *) ac_try_echo=$ac_try;;
4618esac
4619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4620 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004621 ac_status=$?
4622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4623 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004624 ac_cv_opt_olimit_ok=yes
4625else
Martin v. Löwis11437992002-04-12 09:54:03 +00004626 echo "$as_me: program exited with status $ac_status" >&5
4627echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004628sed 's/^/| /' conftest.$ac_ext >&5
4629
Martin v. Löwis11437992002-04-12 09:54:03 +00004630( exit $ac_status )
4631ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004633rm -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 +00004634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004635
4636
Guido van Rossum91922671997-10-09 20:24:13 +00004637CC="$ac_save_cc"
4638fi
4639
Martin v. Löwiseba40652007-08-30 20:10:57 +00004640{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4641echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004642if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004643 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004644 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4645 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4646 # environment?
4647 Darwin*)
4648 ;;
4649 *)
4650 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4651 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004652 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004653else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004654 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4655echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004656 if test "${ac_cv_olimit_ok+set}" = set; then
4657 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004658else
4659 ac_save_cc="$CC"
4660 CC="$CC -Olimit 1500"
4661 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004662 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004663else
Martin v. Löwis11437992002-04-12 09:54:03 +00004664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004665/* confdefs.h. */
4666_ACEOF
4667cat confdefs.h >>conftest.$ac_ext
4668cat >>conftest.$ac_ext <<_ACEOF
4669/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004670int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004671_ACEOF
4672rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004673if { (ac_try="$ac_link"
4674case "(($ac_try" in
4675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4676 *) ac_try_echo=$ac_try;;
4677esac
4678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4679 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004680 ac_status=$?
4681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4682 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004683 { (case "(($ac_try" in
4684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4685 *) ac_try_echo=$ac_try;;
4686esac
4687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4688 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004689 ac_status=$?
4690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4691 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004692 ac_cv_olimit_ok=yes
4693else
Martin v. Löwis11437992002-04-12 09:54:03 +00004694 echo "$as_me: program exited with status $ac_status" >&5
4695echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004696sed 's/^/| /' conftest.$ac_ext >&5
4697
Martin v. Löwis11437992002-04-12 09:54:03 +00004698( exit $ac_status )
4699ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004701rm -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 +00004702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004703
4704
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004705 CC="$ac_save_cc"
4706fi
4707
Martin v. Löwiseba40652007-08-30 20:10:57 +00004708 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4709echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004710 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004711 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004712 fi
4713fi
4714
Martin v. Löwisaac13162006-10-19 10:58:46 +00004715# Check whether GCC supports PyArg_ParseTuple format
4716if test "$GCC" = "yes"
4717then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004718 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4719echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004720 save_CFLAGS=$CFLAGS
4721 CFLAGS="$CFLAGS -Werror"
4722 cat >conftest.$ac_ext <<_ACEOF
4723/* confdefs.h. */
4724_ACEOF
4725cat confdefs.h >>conftest.$ac_ext
4726cat >>conftest.$ac_ext <<_ACEOF
4727/* end confdefs.h. */
4728
4729 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4730
4731int
4732main ()
4733{
4734
4735 ;
4736 return 0;
4737}
4738_ACEOF
4739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004740if { (ac_try="$ac_compile"
4741case "(($ac_try" in
4742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4743 *) ac_try_echo=$ac_try;;
4744esac
4745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004747 ac_status=$?
4748 grep -v '^ *+' conftest.er1 >conftest.err
4749 rm -f conftest.er1
4750 cat conftest.err >&5
4751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004752 (exit $ac_status); } && {
4753 test -z "$ac_c_werror_flag" ||
4754 test ! -s conftest.err
4755 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004756
4757cat >>confdefs.h <<\_ACEOF
4758#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4759_ACEOF
4760
Martin v. Löwiseba40652007-08-30 20:10:57 +00004761 { echo "$as_me:$LINENO: result: yes" >&5
4762echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004763else
4764 echo "$as_me: failed program was:" >&5
4765sed 's/^/| /' conftest.$ac_ext >&5
4766
Martin v. Löwiseba40652007-08-30 20:10:57 +00004767 { echo "$as_me:$LINENO: result: no" >&5
4768echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004769
4770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004771
4772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004773 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004774fi
4775
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004776# On some compilers, pthreads are available without further options
4777# (e.g. MacOS X). On some of these systems, the compiler will not
4778# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4779# So we have to see first whether pthreads are available without
4780# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004781{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4782echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004783if test "${ac_cv_pthread_is_default+set}" = set; then
4784 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004785else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004786 if test "$cross_compiling" = yes; then
4787 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004788else
Martin v. Löwis11437992002-04-12 09:54:03 +00004789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004790/* confdefs.h. */
4791_ACEOF
4792cat confdefs.h >>conftest.$ac_ext
4793cat >>conftest.$ac_ext <<_ACEOF
4794/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004795
Martin v. Löwis130fb172001-07-19 11:00:41 +00004796#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004797
4798void* routine(void* p){return NULL;}
4799
4800int main(){
4801 pthread_t p;
4802 if(pthread_create(&p,NULL,routine,NULL)!=0)
4803 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004804 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004805 return 0;
4806}
4807
Martin v. Löwis11437992002-04-12 09:54:03 +00004808_ACEOF
4809rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004810if { (ac_try="$ac_link"
4811case "(($ac_try" in
4812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4813 *) ac_try_echo=$ac_try;;
4814esac
4815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4816 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004817 ac_status=$?
4818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4819 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004820 { (case "(($ac_try" in
4821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4822 *) ac_try_echo=$ac_try;;
4823esac
4824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4825 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004826 ac_status=$?
4827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4828 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004829
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004830 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004831 ac_cv_kthread=no
4832 ac_cv_pthread=no
4833
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004834else
Martin v. Löwis11437992002-04-12 09:54:03 +00004835 echo "$as_me: program exited with status $ac_status" >&5
4836echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004837sed 's/^/| /' conftest.$ac_ext >&5
4838
Martin v. Löwis11437992002-04-12 09:54:03 +00004839( exit $ac_status )
4840ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004842rm -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 +00004843fi
4844
Martin v. Löwiseba40652007-08-30 20:10:57 +00004845
4846
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004847fi
4848
Martin v. Löwiseba40652007-08-30 20:10:57 +00004849{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4850echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004851
Michael W. Hudson54241132001-12-07 15:38:26 +00004852
Martin v. Löwis11437992002-04-12 09:54:03 +00004853if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004854then
4855 ac_cv_kpthread=no
4856else
4857# -Kpthread, if available, provides the right #defines
4858# and linker options to make pthread_create available
4859# Some compilers won't report that they do not support -Kpthread,
4860# so we need to run a program to see whether it really made the
4861# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004862{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4863echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004864if test "${ac_cv_kpthread+set}" = set; then
4865 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004866else
4867 ac_save_cc="$CC"
4868CC="$CC -Kpthread"
4869if test "$cross_compiling" = yes; then
4870 ac_cv_kpthread=no
4871else
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004873/* confdefs.h. */
4874_ACEOF
4875cat confdefs.h >>conftest.$ac_ext
4876cat >>conftest.$ac_ext <<_ACEOF
4877/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004878
4879#include <pthread.h>
4880
4881void* routine(void* p){return NULL;}
4882
4883int main(){
4884 pthread_t p;
4885 if(pthread_create(&p,NULL,routine,NULL)!=0)
4886 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004887 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004888 return 0;
4889}
4890
Martin v. Löwis11437992002-04-12 09:54:03 +00004891_ACEOF
4892rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004893if { (ac_try="$ac_link"
4894case "(($ac_try" in
4895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4896 *) ac_try_echo=$ac_try;;
4897esac
4898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4899 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004900 ac_status=$?
4901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4902 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004903 { (case "(($ac_try" in
4904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4905 *) ac_try_echo=$ac_try;;
4906esac
4907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4908 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004909 ac_status=$?
4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4911 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004912 ac_cv_kpthread=yes
4913else
Martin v. Löwis11437992002-04-12 09:54:03 +00004914 echo "$as_me: program exited with status $ac_status" >&5
4915echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004916sed 's/^/| /' conftest.$ac_ext >&5
4917
Martin v. Löwis11437992002-04-12 09:54:03 +00004918( exit $ac_status )
4919ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004921rm -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 +00004922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004923
4924
Martin v. Löwis130fb172001-07-19 11:00:41 +00004925CC="$ac_save_cc"
4926fi
4927
Martin v. Löwiseba40652007-08-30 20:10:57 +00004928{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4929echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004930fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004931
Skip Montanarod8d39a02003-07-10 20:44:10 +00004932if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004933then
4934# -Kthread, if available, provides the right #defines
4935# and linker options to make pthread_create available
4936# Some compilers won't report that they do not support -Kthread,
4937# so we need to run a program to see whether it really made the
4938# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004939{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4940echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004941if test "${ac_cv_kthread+set}" = set; then
4942 echo $ECHO_N "(cached) $ECHO_C" >&6
4943else
4944 ac_save_cc="$CC"
4945CC="$CC -Kthread"
4946if test "$cross_compiling" = yes; then
4947 ac_cv_kthread=no
4948else
4949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004950/* confdefs.h. */
4951_ACEOF
4952cat confdefs.h >>conftest.$ac_ext
4953cat >>conftest.$ac_ext <<_ACEOF
4954/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004955
4956#include <pthread.h>
4957
4958void* routine(void* p){return NULL;}
4959
4960int main(){
4961 pthread_t p;
4962 if(pthread_create(&p,NULL,routine,NULL)!=0)
4963 return 1;
4964 (void)pthread_detach(p);
4965 return 0;
4966}
4967
4968_ACEOF
4969rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004970if { (ac_try="$ac_link"
4971case "(($ac_try" in
4972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4973 *) ac_try_echo=$ac_try;;
4974esac
4975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4976 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004977 ac_status=$?
4978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004980 { (case "(($ac_try" in
4981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4982 *) ac_try_echo=$ac_try;;
4983esac
4984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4985 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004986 ac_status=$?
4987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4988 (exit $ac_status); }; }; then
4989 ac_cv_kthread=yes
4990else
4991 echo "$as_me: program exited with status $ac_status" >&5
4992echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004993sed 's/^/| /' conftest.$ac_ext >&5
4994
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004995( exit $ac_status )
4996ac_cv_kthread=no
4997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004998rm -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 +00004999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005000
5001
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005002CC="$ac_save_cc"
5003fi
5004
Martin v. Löwiseba40652007-08-30 20:10:57 +00005005{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5006echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005007fi
5008
Skip Montanarod8d39a02003-07-10 20:44:10 +00005009if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005010then
5011# -pthread, if available, provides the right #defines
5012# and linker options to make pthread_create available
5013# Some compilers won't report that they do not support -pthread,
5014# so we need to run a program to see whether it really made the
5015# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005016{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5017echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005018if test "${ac_cv_thread+set}" = set; then
5019 echo $ECHO_N "(cached) $ECHO_C" >&6
5020else
5021 ac_save_cc="$CC"
5022CC="$CC -pthread"
5023if test "$cross_compiling" = yes; then
5024 ac_cv_pthread=no
5025else
5026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005027/* confdefs.h. */
5028_ACEOF
5029cat confdefs.h >>conftest.$ac_ext
5030cat >>conftest.$ac_ext <<_ACEOF
5031/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005032
5033#include <pthread.h>
5034
5035void* routine(void* p){return NULL;}
5036
5037int main(){
5038 pthread_t p;
5039 if(pthread_create(&p,NULL,routine,NULL)!=0)
5040 return 1;
5041 (void)pthread_detach(p);
5042 return 0;
5043}
5044
5045_ACEOF
5046rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005047if { (ac_try="$ac_link"
5048case "(($ac_try" in
5049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5050 *) ac_try_echo=$ac_try;;
5051esac
5052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5053 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005054 ac_status=$?
5055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005057 { (case "(($ac_try" in
5058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5059 *) ac_try_echo=$ac_try;;
5060esac
5061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5062 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005063 ac_status=$?
5064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065 (exit $ac_status); }; }; then
5066 ac_cv_pthread=yes
5067else
5068 echo "$as_me: program exited with status $ac_status" >&5
5069echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005070sed 's/^/| /' conftest.$ac_ext >&5
5071
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005072( exit $ac_status )
5073ac_cv_pthread=no
5074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005075rm -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 +00005076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005077
5078
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005079CC="$ac_save_cc"
5080fi
5081
Martin v. Löwiseba40652007-08-30 20:10:57 +00005082{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5083echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005084fi
5085
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005086# If we have set a CC compiler flag for thread support then
5087# check if it works for CXX, too.
5088ac_cv_cxx_thread=no
5089if test ! -z "$CXX"
5090then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005091{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5092echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005093ac_save_cxx="$CXX"
5094
5095if test "$ac_cv_kpthread" = "yes"
5096then
5097 CXX="$CXX -Kpthread"
5098 ac_cv_cxx_thread=yes
5099elif test "$ac_cv_kthread" = "yes"
5100then
5101 CXX="$CXX -Kthread"
5102 ac_cv_cxx_thread=yes
5103elif test "$ac_cv_pthread" = "yes"
5104then
5105 CXX="$CXX -pthread"
5106 ac_cv_cxx_thread=yes
5107fi
5108
5109if test $ac_cv_cxx_thread = yes
5110then
5111 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5112 $CXX -c conftest.$ac_ext 2>&5
5113 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5114 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5115 then
5116 ac_cv_cxx_thread=yes
5117 else
5118 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005119 fi
5120 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005122{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5123echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005124fi
5125CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005126
Michael W. Hudson54241132001-12-07 15:38:26 +00005127
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005128# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005129{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5130echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005131if test "${ac_cv_header_stdc+set}" = set; then
5132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005133else
Martin v. Löwis11437992002-04-12 09:54:03 +00005134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005135/* confdefs.h. */
5136_ACEOF
5137cat confdefs.h >>conftest.$ac_ext
5138cat >>conftest.$ac_ext <<_ACEOF
5139/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005140#include <stdlib.h>
5141#include <stdarg.h>
5142#include <string.h>
5143#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005144
Skip Montanaro6dead952003-09-25 14:50:04 +00005145int
5146main ()
5147{
5148
5149 ;
5150 return 0;
5151}
Martin v. Löwis11437992002-04-12 09:54:03 +00005152_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005153rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005154if { (ac_try="$ac_compile"
5155case "(($ac_try" in
5156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5157 *) ac_try_echo=$ac_try;;
5158esac
5159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5160 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005162 grep -v '^ *+' conftest.er1 >conftest.err
5163 rm -f conftest.er1
5164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005166 (exit $ac_status); } && {
5167 test -z "$ac_c_werror_flag" ||
5168 test ! -s conftest.err
5169 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005170 ac_cv_header_stdc=yes
5171else
Martin v. Löwis11437992002-04-12 09:54:03 +00005172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005173sed 's/^/| /' conftest.$ac_ext >&5
5174
Martin v. Löwiseba40652007-08-30 20:10:57 +00005175 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005177
5178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005179
5180if test $ac_cv_header_stdc = yes; then
5181 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005183/* confdefs.h. */
5184_ACEOF
5185cat confdefs.h >>conftest.$ac_ext
5186cat >>conftest.$ac_ext <<_ACEOF
5187/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005188#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005189
5190_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005192 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005193 :
5194else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005195 ac_cv_header_stdc=no
5196fi
5197rm -f conftest*
5198
5199fi
5200
5201if test $ac_cv_header_stdc = yes; then
5202 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005204/* confdefs.h. */
5205_ACEOF
5206cat confdefs.h >>conftest.$ac_ext
5207cat >>conftest.$ac_ext <<_ACEOF
5208/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005209#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005210
5211_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005213 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005214 :
5215else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005216 ac_cv_header_stdc=no
5217fi
5218rm -f conftest*
5219
5220fi
5221
5222if test $ac_cv_header_stdc = yes; then
5223 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005224 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005225 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005226else
Martin v. Löwis11437992002-04-12 09:54:03 +00005227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005228/* confdefs.h. */
5229_ACEOF
5230cat confdefs.h >>conftest.$ac_ext
5231cat >>conftest.$ac_ext <<_ACEOF
5232/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005233#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005234#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005235#if ((' ' & 0x0FF) == 0x020)
5236# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5237# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5238#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005239# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005240 (('a' <= (c) && (c) <= 'i') \
5241 || ('j' <= (c) && (c) <= 'r') \
5242 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005243# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5244#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005245
Martin v. Löwis11437992002-04-12 09:54:03 +00005246#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5247int
5248main ()
5249{
5250 int i;
5251 for (i = 0; i < 256; i++)
5252 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005253 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005254 return 2;
5255 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005256}
5257_ACEOF
5258rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005259if { (ac_try="$ac_link"
5260case "(($ac_try" in
5261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5262 *) ac_try_echo=$ac_try;;
5263esac
5264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5265 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005266 ac_status=$?
5267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5268 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005269 { (case "(($ac_try" in
5270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5271 *) ac_try_echo=$ac_try;;
5272esac
5273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5274 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005275 ac_status=$?
5276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005278 :
5279else
Martin v. Löwis11437992002-04-12 09:54:03 +00005280 echo "$as_me: program exited with status $ac_status" >&5
5281echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005282sed 's/^/| /' conftest.$ac_ext >&5
5283
Martin v. Löwis11437992002-04-12 09:54:03 +00005284( exit $ac_status )
5285ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5288fi
5289
5290
Michael W. Hudson54241132001-12-07 15:38:26 +00005291fi
5292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005293{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5294echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005295if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005296
5297cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005298#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005299_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005300
5301fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005302
Skip Montanarob9820a32004-01-17 00:16:12 +00005303# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005314 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005315do
5316as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005317{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5318echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5319if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005320 echo $ECHO_N "(cached) $ECHO_C" >&6
5321else
5322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005323/* confdefs.h. */
5324_ACEOF
5325cat confdefs.h >>conftest.$ac_ext
5326cat >>conftest.$ac_ext <<_ACEOF
5327/* end confdefs.h. */
5328$ac_includes_default
5329
5330#include <$ac_header>
5331_ACEOF
5332rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005333if { (ac_try="$ac_compile"
5334case "(($ac_try" in
5335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5336 *) ac_try_echo=$ac_try;;
5337esac
5338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5339 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005341 grep -v '^ *+' conftest.er1 >conftest.err
5342 rm -f conftest.er1
5343 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005345 (exit $ac_status); } && {
5346 test -z "$ac_c_werror_flag" ||
5347 test ! -s conftest.err
5348 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005349 eval "$as_ac_Header=yes"
5350else
5351 echo "$as_me: failed program was:" >&5
5352sed 's/^/| /' conftest.$ac_ext >&5
5353
Martin v. Löwiseba40652007-08-30 20:10:57 +00005354 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005356
5357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005359ac_res=`eval echo '${'$as_ac_Header'}'`
5360 { echo "$as_me:$LINENO: result: $ac_res" >&5
5361echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005362if test `eval echo '${'$as_ac_Header'}'` = yes; then
5363 cat >>confdefs.h <<_ACEOF
5364#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5365_ACEOF
5366
5367fi
5368
5369done
5370
5371
Martin v. Löwis11437992002-04-12 09:54:03 +00005372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
Anthony Baxter8a560de2004-10-13 15:30:56 +00005408
Martin v. Löwisc3001752005-01-23 09:27:24 +00005409
Martin v. Löwis11017b12006-01-14 18:12:57 +00005410
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005411
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005412
5413
5414
5415
5416
5417
5418
5419
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005420
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005421
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005422
5423
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005424
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005425for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5426fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005427ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005428shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005429unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005430sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5431sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005432sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5433sys/time.h \
5434sys/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 +00005435sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005436bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005437do
Martin v. Löwis11437992002-04-12 09:54:03 +00005438as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005439if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5440 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5441echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5442if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005443 echo $ECHO_N "(cached) $ECHO_C" >&6
5444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005445ac_res=`eval echo '${'$as_ac_Header'}'`
5446 { echo "$as_me:$LINENO: result: $ac_res" >&5
5447echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005448else
Martin v. Löwis11437992002-04-12 09:54:03 +00005449 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005450{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5451echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005452cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005453/* confdefs.h. */
5454_ACEOF
5455cat confdefs.h >>conftest.$ac_ext
5456cat >>conftest.$ac_ext <<_ACEOF
5457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005458$ac_includes_default
5459#include <$ac_header>
5460_ACEOF
5461rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005462if { (ac_try="$ac_compile"
5463case "(($ac_try" in
5464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5465 *) ac_try_echo=$ac_try;;
5466esac
5467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005470 grep -v '^ *+' conftest.er1 >conftest.err
5471 rm -f conftest.er1
5472 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005474 (exit $ac_status); } && {
5475 test -z "$ac_c_werror_flag" ||
5476 test ! -s conftest.err
5477 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005478 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005479else
Martin v. Löwis11437992002-04-12 09:54:03 +00005480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005481sed 's/^/| /' conftest.$ac_ext >&5
5482
Martin v. Löwiseba40652007-08-30 20:10:57 +00005483 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005485
5486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5487{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5488echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005489
5490# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005491{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5492echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005493cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005494/* confdefs.h. */
5495_ACEOF
5496cat confdefs.h >>conftest.$ac_ext
5497cat >>conftest.$ac_ext <<_ACEOF
5498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005499#include <$ac_header>
5500_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005501if { (ac_try="$ac_cpp conftest.$ac_ext"
5502case "(($ac_try" in
5503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5504 *) ac_try_echo=$ac_try;;
5505esac
5506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5507 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005508 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005509 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005510 rm -f conftest.er1
5511 cat conftest.err >&5
5512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005513 (exit $ac_status); } >/dev/null && {
5514 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5515 test ! -s conftest.err
5516 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005517 ac_header_preproc=yes
5518else
5519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005520sed 's/^/| /' conftest.$ac_ext >&5
5521
Martin v. Löwis11437992002-04-12 09:54:03 +00005522 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005524
Martin v. Löwis11437992002-04-12 09:54:03 +00005525rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005526{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5527echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005528
5529# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005530case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5531 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005532 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5533echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005534 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5535echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5536 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005537 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005538 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005539 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5540echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005541 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5542echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5543 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5544echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5545 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5546echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005547 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5548echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005549 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5550echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005551 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005552## ------------------------------------------------ ##
5553## Report this to http://www.python.org/python-bugs ##
5554## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005555_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005556 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005557 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005558esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005559{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5560echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5561if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005562 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005563else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005564 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005566ac_res=`eval echo '${'$as_ac_Header'}'`
5567 { echo "$as_me:$LINENO: result: $ac_res" >&5
5568echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005569
5570fi
5571if test `eval echo '${'$as_ac_Header'}'` = yes; then
5572 cat >>confdefs.h <<_ACEOF
5573#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5574_ACEOF
5575
5576fi
5577
Guido van Rossum627b2d71993-12-24 10:39:16 +00005578done
5579
Martin v. Löwis11437992002-04-12 09:54:03 +00005580
5581
5582
5583
5584
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005585ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005586for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5587 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005588{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5589echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5590if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005591 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005592else
Martin v. Löwis11437992002-04-12 09:54:03 +00005593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005594/* confdefs.h. */
5595_ACEOF
5596cat confdefs.h >>conftest.$ac_ext
5597cat >>conftest.$ac_ext <<_ACEOF
5598/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005599#include <sys/types.h>
5600#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005601
Martin v. Löwis11437992002-04-12 09:54:03 +00005602int
5603main ()
5604{
5605if ((DIR *) 0)
5606return 0;
5607 ;
5608 return 0;
5609}
5610_ACEOF
5611rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005612if { (ac_try="$ac_compile"
5613case "(($ac_try" in
5614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5615 *) ac_try_echo=$ac_try;;
5616esac
5617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005620 grep -v '^ *+' conftest.er1 >conftest.err
5621 rm -f conftest.er1
5622 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005624 (exit $ac_status); } && {
5625 test -z "$ac_c_werror_flag" ||
5626 test ! -s conftest.err
5627 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005628 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005629else
Martin v. Löwis11437992002-04-12 09:54:03 +00005630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005631sed 's/^/| /' conftest.$ac_ext >&5
5632
Martin v. Löwiseba40652007-08-30 20:10:57 +00005633 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005635
5636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005638ac_res=`eval echo '${'$as_ac_Header'}'`
5639 { echo "$as_me:$LINENO: result: $ac_res" >&5
5640echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005641if test `eval echo '${'$as_ac_Header'}'` = yes; then
5642 cat >>confdefs.h <<_ACEOF
5643#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5644_ACEOF
5645
5646ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005647fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005648
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005649done
5650# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5651if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005652 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5653echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005654if test "${ac_cv_search_opendir+set}" = set; then
5655 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005656else
Martin v. Löwis11437992002-04-12 09:54:03 +00005657 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005659/* confdefs.h. */
5660_ACEOF
5661cat confdefs.h >>conftest.$ac_ext
5662cat >>conftest.$ac_ext <<_ACEOF
5663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005664
Martin v. Löwiseba40652007-08-30 20:10:57 +00005665/* Override any GCC internal prototype to avoid an error.
5666 Use char because int might match the return type of a GCC
5667 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005668#ifdef __cplusplus
5669extern "C"
5670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005671char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005672int
5673main ()
5674{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005675return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005676 ;
5677 return 0;
5678}
5679_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005680for ac_lib in '' dir; do
5681 if test -z "$ac_lib"; then
5682 ac_res="none required"
5683 else
5684 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005685 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005686 fi
5687 rm -f conftest.$ac_objext conftest$ac_exeext
5688if { (ac_try="$ac_link"
5689case "(($ac_try" in
5690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5691 *) ac_try_echo=$ac_try;;
5692esac
5693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5694 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005695 ac_status=$?
5696 grep -v '^ *+' conftest.er1 >conftest.err
5697 rm -f conftest.er1
5698 cat conftest.err >&5
5699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005700 (exit $ac_status); } && {
5701 test -z "$ac_c_werror_flag" ||
5702 test ! -s conftest.err
5703 } && test -s conftest$ac_exeext &&
5704 $as_test_x conftest$ac_exeext; then
5705 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005706else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005707 echo "$as_me: failed program was:" >&5
5708sed 's/^/| /' conftest.$ac_ext >&5
5709
Martin v. Löwiseba40652007-08-30 20:10:57 +00005710
Brett Cannon19fab762007-06-02 03:02:29 +00005711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005712
5713rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5714 conftest$ac_exeext
5715 if test "${ac_cv_search_opendir+set}" = set; then
5716 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005718done
5719if test "${ac_cv_search_opendir+set}" = set; then
5720 :
5721else
5722 ac_cv_search_opendir=no
5723fi
5724rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005725LIBS=$ac_func_search_save_LIBS
5726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005727{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5728echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5729ac_res=$ac_cv_search_opendir
5730if test "$ac_res" != no; then
5731 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005732
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005733fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005734
Michael W. Hudson54241132001-12-07 15:38:26 +00005735else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005736 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5737echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005738if test "${ac_cv_search_opendir+set}" = set; then
5739 echo $ECHO_N "(cached) $ECHO_C" >&6
5740else
5741 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005743/* confdefs.h. */
5744_ACEOF
5745cat confdefs.h >>conftest.$ac_ext
5746cat >>conftest.$ac_ext <<_ACEOF
5747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005748
Martin v. Löwiseba40652007-08-30 20:10:57 +00005749/* Override any GCC internal prototype to avoid an error.
5750 Use char because int might match the return type of a GCC
5751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005752#ifdef __cplusplus
5753extern "C"
5754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005755char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005756int
5757main ()
5758{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005759return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005760 ;
5761 return 0;
5762}
5763_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005764for ac_lib in '' x; do
5765 if test -z "$ac_lib"; then
5766 ac_res="none required"
5767 else
5768 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005769 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005770 fi
5771 rm -f conftest.$ac_objext conftest$ac_exeext
5772if { (ac_try="$ac_link"
5773case "(($ac_try" in
5774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5775 *) ac_try_echo=$ac_try;;
5776esac
5777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5778 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005779 ac_status=$?
5780 grep -v '^ *+' conftest.er1 >conftest.err
5781 rm -f conftest.er1
5782 cat conftest.err >&5
5783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005784 (exit $ac_status); } && {
5785 test -z "$ac_c_werror_flag" ||
5786 test ! -s conftest.err
5787 } && test -s conftest$ac_exeext &&
5788 $as_test_x conftest$ac_exeext; then
5789 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005790else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005791 echo "$as_me: failed program was:" >&5
5792sed 's/^/| /' conftest.$ac_ext >&5
5793
Martin v. Löwiseba40652007-08-30 20:10:57 +00005794
Brett Cannon19fab762007-06-02 03:02:29 +00005795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005796
5797rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5798 conftest$ac_exeext
5799 if test "${ac_cv_search_opendir+set}" = set; then
5800 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005802done
5803if test "${ac_cv_search_opendir+set}" = set; then
5804 :
5805else
5806 ac_cv_search_opendir=no
5807fi
5808rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005809LIBS=$ac_func_search_save_LIBS
5810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005811{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5812echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5813ac_res=$ac_cv_search_opendir
5814if test "$ac_res" != no; then
5815 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005816
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005817fi
5818
5819fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005820
Martin v. Löwiseba40652007-08-30 20:10:57 +00005821{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5822echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005823if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5824 echo $ECHO_N "(cached) $ECHO_C" >&6
5825else
5826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005827/* confdefs.h. */
5828_ACEOF
5829cat confdefs.h >>conftest.$ac_ext
5830cat >>conftest.$ac_ext <<_ACEOF
5831/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005832#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005833int
5834main ()
5835{
5836return makedev(0, 0);
5837 ;
5838 return 0;
5839}
5840_ACEOF
5841rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005842if { (ac_try="$ac_link"
5843case "(($ac_try" in
5844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5845 *) ac_try_echo=$ac_try;;
5846esac
5847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5848 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005850 grep -v '^ *+' conftest.er1 >conftest.err
5851 rm -f conftest.er1
5852 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005854 (exit $ac_status); } && {
5855 test -z "$ac_c_werror_flag" ||
5856 test ! -s conftest.err
5857 } && test -s conftest$ac_exeext &&
5858 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005859 ac_cv_header_sys_types_h_makedev=yes
5860else
5861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005862sed 's/^/| /' conftest.$ac_ext >&5
5863
Martin v. Löwiseba40652007-08-30 20:10:57 +00005864 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005866
5867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005869
5870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005871{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5872echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005873
5874if test $ac_cv_header_sys_types_h_makedev = no; then
5875if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005876 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5877echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005878if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5879 echo $ECHO_N "(cached) $ECHO_C" >&6
5880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005881{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5882echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005883else
5884 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005885{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5886echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005887cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005888/* confdefs.h. */
5889_ACEOF
5890cat confdefs.h >>conftest.$ac_ext
5891cat >>conftest.$ac_ext <<_ACEOF
5892/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005893$ac_includes_default
5894#include <sys/mkdev.h>
5895_ACEOF
5896rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005897if { (ac_try="$ac_compile"
5898case "(($ac_try" in
5899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5900 *) ac_try_echo=$ac_try;;
5901esac
5902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005905 grep -v '^ *+' conftest.er1 >conftest.err
5906 rm -f conftest.er1
5907 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005909 (exit $ac_status); } && {
5910 test -z "$ac_c_werror_flag" ||
5911 test ! -s conftest.err
5912 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005913 ac_header_compiler=yes
5914else
5915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005916sed 's/^/| /' conftest.$ac_ext >&5
5917
Martin v. Löwiseba40652007-08-30 20:10:57 +00005918 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005920
5921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5922{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5923echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005924
5925# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005926{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5927echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005928cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005929/* confdefs.h. */
5930_ACEOF
5931cat confdefs.h >>conftest.$ac_ext
5932cat >>conftest.$ac_ext <<_ACEOF
5933/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005934#include <sys/mkdev.h>
5935_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005936if { (ac_try="$ac_cpp conftest.$ac_ext"
5937case "(($ac_try" in
5938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5939 *) ac_try_echo=$ac_try;;
5940esac
5941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5942 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005943 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005944 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005945 rm -f conftest.er1
5946 cat conftest.err >&5
5947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005948 (exit $ac_status); } >/dev/null && {
5949 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5950 test ! -s conftest.err
5951 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005952 ac_header_preproc=yes
5953else
5954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005955sed 's/^/| /' conftest.$ac_ext >&5
5956
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005957 ac_header_preproc=no
5958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005959
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005960rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005961{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5962echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005963
5964# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005965case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5966 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005967 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5968echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005969 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5970echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5971 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005972 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005973 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005974 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5975echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005976 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5977echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5978 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5979echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5980 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5981echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005982 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5983echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005984 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5985echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005986 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005987## ------------------------------------------------ ##
5988## Report this to http://www.python.org/python-bugs ##
5989## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005990_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005991 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005992 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005993esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005994{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5995echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005996if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5997 echo $ECHO_N "(cached) $ECHO_C" >&6
5998else
5999 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006001{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6002echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006003
6004fi
6005if test $ac_cv_header_sys_mkdev_h = yes; then
6006
6007cat >>confdefs.h <<\_ACEOF
6008#define MAJOR_IN_MKDEV 1
6009_ACEOF
6010
6011fi
6012
6013
6014
6015 if test $ac_cv_header_sys_mkdev_h = no; then
6016 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006017 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6018echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006019if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6020 echo $ECHO_N "(cached) $ECHO_C" >&6
6021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006022{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6023echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024else
6025 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006026{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6027echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006028cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006029/* confdefs.h. */
6030_ACEOF
6031cat confdefs.h >>conftest.$ac_ext
6032cat >>conftest.$ac_ext <<_ACEOF
6033/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006034$ac_includes_default
6035#include <sys/sysmacros.h>
6036_ACEOF
6037rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006038if { (ac_try="$ac_compile"
6039case "(($ac_try" in
6040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6041 *) ac_try_echo=$ac_try;;
6042esac
6043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006046 grep -v '^ *+' conftest.er1 >conftest.err
6047 rm -f conftest.er1
6048 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006050 (exit $ac_status); } && {
6051 test -z "$ac_c_werror_flag" ||
6052 test ! -s conftest.err
6053 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006054 ac_header_compiler=yes
6055else
6056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006057sed 's/^/| /' conftest.$ac_ext >&5
6058
Martin v. Löwiseba40652007-08-30 20:10:57 +00006059 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006061
6062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6063{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6064echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065
6066# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006067{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6068echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006069cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006070/* confdefs.h. */
6071_ACEOF
6072cat confdefs.h >>conftest.$ac_ext
6073cat >>conftest.$ac_ext <<_ACEOF
6074/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075#include <sys/sysmacros.h>
6076_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006077if { (ac_try="$ac_cpp conftest.$ac_ext"
6078case "(($ac_try" in
6079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6080 *) ac_try_echo=$ac_try;;
6081esac
6082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6083 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006085 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086 rm -f conftest.er1
6087 cat conftest.err >&5
6088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006089 (exit $ac_status); } >/dev/null && {
6090 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6091 test ! -s conftest.err
6092 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093 ac_header_preproc=yes
6094else
6095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006096sed 's/^/| /' conftest.$ac_ext >&5
6097
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098 ac_header_preproc=no
6099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006100
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006101rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006102{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6103echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104
6105# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006106case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6107 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6109echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006110 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6111echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6112 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006113 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006114 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006115 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6116echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006117 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6118echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6119 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6120echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6121 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6122echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006123 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6124echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006125 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6126echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006127 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006128## ------------------------------------------------ ##
6129## Report this to http://www.python.org/python-bugs ##
6130## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006131_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006132 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006133 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006135{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6136echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006137if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6138 echo $ECHO_N "(cached) $ECHO_C" >&6
6139else
6140 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006142{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6143echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144
6145fi
6146if test $ac_cv_header_sys_sysmacros_h = yes; then
6147
6148cat >>confdefs.h <<\_ACEOF
6149#define MAJOR_IN_SYSMACROS 1
6150_ACEOF
6151
6152fi
6153
6154
6155 fi
6156fi
6157
Michael W. Hudson54241132001-12-07 15:38:26 +00006158
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006159# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006160
6161for ac_header in term.h
6162do
6163as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006164{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6165echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6166if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006167 echo $ECHO_N "(cached) $ECHO_C" >&6
6168else
6169 cat >conftest.$ac_ext <<_ACEOF
6170/* confdefs.h. */
6171_ACEOF
6172cat confdefs.h >>conftest.$ac_ext
6173cat >>conftest.$ac_ext <<_ACEOF
6174/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006175
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006176#ifdef HAVE_CURSES_H
6177#include <curses.h>
6178#endif
6179
6180
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006181#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006182_ACEOF
6183rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006184if { (ac_try="$ac_compile"
6185case "(($ac_try" in
6186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6187 *) ac_try_echo=$ac_try;;
6188esac
6189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006191 ac_status=$?
6192 grep -v '^ *+' conftest.er1 >conftest.err
6193 rm -f conftest.er1
6194 cat conftest.err >&5
6195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006196 (exit $ac_status); } && {
6197 test -z "$ac_c_werror_flag" ||
6198 test ! -s conftest.err
6199 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006200 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006201else
6202 echo "$as_me: failed program was:" >&5
6203sed 's/^/| /' conftest.$ac_ext >&5
6204
Martin v. Löwiseba40652007-08-30 20:10:57 +00006205 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006207
6208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006210ac_res=`eval echo '${'$as_ac_Header'}'`
6211 { echo "$as_me:$LINENO: result: $ac_res" >&5
6212echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006213if test `eval echo '${'$as_ac_Header'}'` = yes; then
6214 cat >>confdefs.h <<_ACEOF
6215#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6216_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006217
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006218fi
6219
6220done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006221
6222
Martin v. Löwis11017b12006-01-14 18:12:57 +00006223# On Linux, netlink.h requires asm/types.h
6224
6225for ac_header in linux/netlink.h
6226do
6227as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006228{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6229echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6230if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006231 echo $ECHO_N "(cached) $ECHO_C" >&6
6232else
6233 cat >conftest.$ac_ext <<_ACEOF
6234/* confdefs.h. */
6235_ACEOF
6236cat confdefs.h >>conftest.$ac_ext
6237cat >>conftest.$ac_ext <<_ACEOF
6238/* end confdefs.h. */
6239
6240#ifdef HAVE_ASM_TYPES_H
6241#include <asm/types.h>
6242#endif
6243#ifdef HAVE_SYS_SOCKET_H
6244#include <sys/socket.h>
6245#endif
6246
6247
6248#include <$ac_header>
6249_ACEOF
6250rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006251if { (ac_try="$ac_compile"
6252case "(($ac_try" in
6253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6254 *) ac_try_echo=$ac_try;;
6255esac
6256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6257 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006258 ac_status=$?
6259 grep -v '^ *+' conftest.er1 >conftest.err
6260 rm -f conftest.er1
6261 cat conftest.err >&5
6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006263 (exit $ac_status); } && {
6264 test -z "$ac_c_werror_flag" ||
6265 test ! -s conftest.err
6266 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006267 eval "$as_ac_Header=yes"
6268else
6269 echo "$as_me: failed program was:" >&5
6270sed 's/^/| /' conftest.$ac_ext >&5
6271
Martin v. Löwiseba40652007-08-30 20:10:57 +00006272 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006274
6275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006277ac_res=`eval echo '${'$as_ac_Header'}'`
6278 { echo "$as_me:$LINENO: result: $ac_res" >&5
6279echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006280if test `eval echo '${'$as_ac_Header'}'` = yes; then
6281 cat >>confdefs.h <<_ACEOF
6282#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6283_ACEOF
6284
6285fi
6286
6287done
6288
6289
Guido van Rossum627b2d71993-12-24 10:39:16 +00006290# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006291was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006292{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6293echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006294cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006295/* confdefs.h. */
6296_ACEOF
6297cat confdefs.h >>conftest.$ac_ext
6298cat >>conftest.$ac_ext <<_ACEOF
6299/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006300#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006301
6302_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006303if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006304 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006305 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006306else
Martin v. Löwis11437992002-04-12 09:54:03 +00006307
6308
6309cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006310#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006311_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006312
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006313
Guido van Rossum627b2d71993-12-24 10:39:16 +00006314fi
6315rm -f conftest*
6316
Martin v. Löwiseba40652007-08-30 20:10:57 +00006317{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6318echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006319
Neal Norwitz11690112002-07-30 01:08:28 +00006320# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006321{ echo "$as_me:$LINENO: checking for makedev" >&5
6322echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006323cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006324/* confdefs.h. */
6325_ACEOF
6326cat confdefs.h >>conftest.$ac_ext
6327cat >>conftest.$ac_ext <<_ACEOF
6328/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006329#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006330int
6331main ()
6332{
6333 makedev(0, 0)
6334 ;
6335 return 0;
6336}
6337_ACEOF
6338rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006339if { (ac_try="$ac_link"
6340case "(($ac_try" in
6341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6342 *) ac_try_echo=$ac_try;;
6343esac
6344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6345 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006347 grep -v '^ *+' conftest.er1 >conftest.err
6348 rm -f conftest.er1
6349 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006351 (exit $ac_status); } && {
6352 test -z "$ac_c_werror_flag" ||
6353 test ! -s conftest.err
6354 } && test -s conftest$ac_exeext &&
6355 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006356 ac_cv_has_makedev=yes
6357else
6358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006359sed 's/^/| /' conftest.$ac_ext >&5
6360
Martin v. Löwiseba40652007-08-30 20:10:57 +00006361 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006363
6364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006365 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006366if test "$ac_cv_has_makedev" = "no"; then
6367 # we didn't link, try if _OSF_SOURCE will allow us to link
6368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006369/* confdefs.h. */
6370_ACEOF
6371cat confdefs.h >>conftest.$ac_ext
6372cat >>conftest.$ac_ext <<_ACEOF
6373/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006374
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006375#define _OSF_SOURCE 1
6376#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006377
Neal Norwitz11690112002-07-30 01:08:28 +00006378int
6379main ()
6380{
6381 makedev(0, 0)
6382 ;
6383 return 0;
6384}
6385_ACEOF
6386rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006387if { (ac_try="$ac_link"
6388case "(($ac_try" in
6389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6390 *) ac_try_echo=$ac_try;;
6391esac
6392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6393 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006395 grep -v '^ *+' conftest.er1 >conftest.err
6396 rm -f conftest.er1
6397 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006399 (exit $ac_status); } && {
6400 test -z "$ac_c_werror_flag" ||
6401 test ! -s conftest.err
6402 } && test -s conftest$ac_exeext &&
6403 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006404 ac_cv_has_makedev=yes
6405else
6406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006407sed 's/^/| /' conftest.$ac_ext >&5
6408
Martin v. Löwiseba40652007-08-30 20:10:57 +00006409 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411
6412rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006413 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006414 if test "$ac_cv_has_makedev" = "yes"; then
6415
6416cat >>confdefs.h <<\_ACEOF
6417#define _OSF_SOURCE 1
6418_ACEOF
6419
6420 fi
6421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006422{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6423echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006424if test "$ac_cv_has_makedev" = "yes"; then
6425
6426cat >>confdefs.h <<\_ACEOF
6427#define HAVE_MAKEDEV 1
6428_ACEOF
6429
6430fi
6431
Martin v. Löwis399a6892002-10-04 10:22:02 +00006432# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6433# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6434# defined, but the compiler does not support pragma redefine_extname,
6435# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6436# structures (such as rlimit64) without declaring them. As a
6437# work-around, disable LFS on such configurations
6438
6439use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006440{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6441echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006442cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006443/* confdefs.h. */
6444_ACEOF
6445cat confdefs.h >>conftest.$ac_ext
6446cat >>conftest.$ac_ext <<_ACEOF
6447/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006448
6449#define _LARGEFILE_SOURCE 1
6450#define _FILE_OFFSET_BITS 64
6451#include <sys/resource.h>
6452
Martin v. Löwis399a6892002-10-04 10:22:02 +00006453int
6454main ()
6455{
6456struct rlimit foo;
6457 ;
6458 return 0;
6459}
6460_ACEOF
6461rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006462if { (ac_try="$ac_compile"
6463case "(($ac_try" in
6464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6465 *) ac_try_echo=$ac_try;;
6466esac
6467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006470 grep -v '^ *+' conftest.er1 >conftest.err
6471 rm -f conftest.er1
6472 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006474 (exit $ac_status); } && {
6475 test -z "$ac_c_werror_flag" ||
6476 test ! -s conftest.err
6477 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006478 sol_lfs_bug=no
6479else
6480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006481sed 's/^/| /' conftest.$ac_ext >&5
6482
Martin v. Löwiseba40652007-08-30 20:10:57 +00006483 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006485
6486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6487{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6488echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006489if test "$sol_lfs_bug" = "yes"; then
6490 use_lfs=no
6491fi
6492
6493if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006494# Two defines needed to enable largefile support on various platforms
6495# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006496
Martin v. Löwis11437992002-04-12 09:54:03 +00006497cat >>confdefs.h <<\_ACEOF
6498#define _LARGEFILE_SOURCE 1
6499_ACEOF
6500
6501
6502cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006503#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006504_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006505
Martin v. Löwis399a6892002-10-04 10:22:02 +00006506fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006507
Guido van Rossum84e7b241996-08-19 21:59:00 +00006508# Add some code to confdefs.h so that the test for off_t works on SCO
6509cat >> confdefs.h <<\EOF
6510#if defined(SCO_DS)
6511#undef _OFF_T
6512#endif
6513EOF
6514
Guido van Rossumef2255b2000-03-10 22:30:29 +00006515# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006516{ echo "$as_me:$LINENO: checking for mode_t" >&5
6517echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006518if test "${ac_cv_type_mode_t+set}" = set; then
6519 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006520else
Martin v. Löwis11437992002-04-12 09:54:03 +00006521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006522/* confdefs.h. */
6523_ACEOF
6524cat confdefs.h >>conftest.$ac_ext
6525cat >>conftest.$ac_ext <<_ACEOF
6526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006527$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006528typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006529int
6530main ()
6531{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006532if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006533 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006534if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006535 return 0;
6536 ;
6537 return 0;
6538}
6539_ACEOF
6540rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006541if { (ac_try="$ac_compile"
6542case "(($ac_try" in
6543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6544 *) ac_try_echo=$ac_try;;
6545esac
6546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6547 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006549 grep -v '^ *+' conftest.er1 >conftest.err
6550 rm -f conftest.er1
6551 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006553 (exit $ac_status); } && {
6554 test -z "$ac_c_werror_flag" ||
6555 test ! -s conftest.err
6556 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006557 ac_cv_type_mode_t=yes
6558else
Martin v. Löwis11437992002-04-12 09:54:03 +00006559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006560sed 's/^/| /' conftest.$ac_ext >&5
6561
Martin v. Löwiseba40652007-08-30 20:10:57 +00006562 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006564
6565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006567{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6568echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006569if test $ac_cv_type_mode_t = yes; then
6570 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006571else
Martin v. Löwis11437992002-04-12 09:54:03 +00006572
6573cat >>confdefs.h <<_ACEOF
6574#define mode_t int
6575_ACEOF
6576
6577fi
6578
Martin v. Löwiseba40652007-08-30 20:10:57 +00006579{ echo "$as_me:$LINENO: checking for off_t" >&5
6580echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006581if test "${ac_cv_type_off_t+set}" = set; then
6582 echo $ECHO_N "(cached) $ECHO_C" >&6
6583else
6584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006585/* confdefs.h. */
6586_ACEOF
6587cat confdefs.h >>conftest.$ac_ext
6588cat >>conftest.$ac_ext <<_ACEOF
6589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006590$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006591typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006592int
6593main ()
6594{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006595if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006596 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006597if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006598 return 0;
6599 ;
6600 return 0;
6601}
6602_ACEOF
6603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006604if { (ac_try="$ac_compile"
6605case "(($ac_try" in
6606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6607 *) ac_try_echo=$ac_try;;
6608esac
6609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006612 grep -v '^ *+' conftest.er1 >conftest.err
6613 rm -f conftest.er1
6614 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006616 (exit $ac_status); } && {
6617 test -z "$ac_c_werror_flag" ||
6618 test ! -s conftest.err
6619 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006620 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006621else
Martin v. Löwis11437992002-04-12 09:54:03 +00006622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006623sed 's/^/| /' conftest.$ac_ext >&5
6624
Martin v. Löwiseba40652007-08-30 20:10:57 +00006625 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006627
6628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006630{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6631echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006632if test $ac_cv_type_off_t = yes; then
6633 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006634else
Martin v. Löwis11437992002-04-12 09:54:03 +00006635
6636cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006637#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006638_ACEOF
6639
6640fi
6641
Martin v. Löwiseba40652007-08-30 20:10:57 +00006642{ echo "$as_me:$LINENO: checking for pid_t" >&5
6643echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006644if test "${ac_cv_type_pid_t+set}" = set; then
6645 echo $ECHO_N "(cached) $ECHO_C" >&6
6646else
6647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006648/* confdefs.h. */
6649_ACEOF
6650cat confdefs.h >>conftest.$ac_ext
6651cat >>conftest.$ac_ext <<_ACEOF
6652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006653$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006654typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006655int
6656main ()
6657{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006658if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006659 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006660if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006661 return 0;
6662 ;
6663 return 0;
6664}
6665_ACEOF
6666rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006667if { (ac_try="$ac_compile"
6668case "(($ac_try" in
6669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6670 *) ac_try_echo=$ac_try;;
6671esac
6672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006675 grep -v '^ *+' conftest.er1 >conftest.err
6676 rm -f conftest.er1
6677 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006679 (exit $ac_status); } && {
6680 test -z "$ac_c_werror_flag" ||
6681 test ! -s conftest.err
6682 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006683 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006684else
Martin v. Löwis11437992002-04-12 09:54:03 +00006685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006686sed 's/^/| /' conftest.$ac_ext >&5
6687
Martin v. Löwiseba40652007-08-30 20:10:57 +00006688 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006690
6691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006693{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6694echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006695if test $ac_cv_type_pid_t = yes; then
6696 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006697else
Martin v. Löwis11437992002-04-12 09:54:03 +00006698
6699cat >>confdefs.h <<_ACEOF
6700#define pid_t int
6701_ACEOF
6702
6703fi
6704
Martin v. Löwiseba40652007-08-30 20:10:57 +00006705{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6706echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006707if test "${ac_cv_type_signal+set}" = set; then
6708 echo $ECHO_N "(cached) $ECHO_C" >&6
6709else
6710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006711/* confdefs.h. */
6712_ACEOF
6713cat confdefs.h >>conftest.$ac_ext
6714cat >>conftest.$ac_ext <<_ACEOF
6715/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006716#include <sys/types.h>
6717#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719int
6720main ()
6721{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006722return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006723 ;
6724 return 0;
6725}
6726_ACEOF
6727rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006728if { (ac_try="$ac_compile"
6729case "(($ac_try" in
6730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6731 *) ac_try_echo=$ac_try;;
6732esac
6733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006736 grep -v '^ *+' conftest.er1 >conftest.err
6737 rm -f conftest.er1
6738 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006740 (exit $ac_status); } && {
6741 test -z "$ac_c_werror_flag" ||
6742 test ! -s conftest.err
6743 } && test -s conftest.$ac_objext; then
6744 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006745else
Martin v. Löwis11437992002-04-12 09:54:03 +00006746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006747sed 's/^/| /' conftest.$ac_ext >&5
6748
Martin v. Löwiseba40652007-08-30 20:10:57 +00006749 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006751
6752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006754{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6755echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006756
Martin v. Löwis11437992002-04-12 09:54:03 +00006757cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006758#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006759_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006760
Michael W. Hudson54241132001-12-07 15:38:26 +00006761
Martin v. Löwiseba40652007-08-30 20:10:57 +00006762{ echo "$as_me:$LINENO: checking for size_t" >&5
6763echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006764if test "${ac_cv_type_size_t+set}" = set; then
6765 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006766else
Martin v. Löwis11437992002-04-12 09:54:03 +00006767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006768/* confdefs.h. */
6769_ACEOF
6770cat confdefs.h >>conftest.$ac_ext
6771cat >>conftest.$ac_ext <<_ACEOF
6772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006773$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006774typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006775int
6776main ()
6777{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006778if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006779 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006780if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006781 return 0;
6782 ;
6783 return 0;
6784}
6785_ACEOF
6786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006787if { (ac_try="$ac_compile"
6788case "(($ac_try" in
6789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6790 *) ac_try_echo=$ac_try;;
6791esac
6792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006795 grep -v '^ *+' conftest.er1 >conftest.err
6796 rm -f conftest.er1
6797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006799 (exit $ac_status); } && {
6800 test -z "$ac_c_werror_flag" ||
6801 test ! -s conftest.err
6802 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006803 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006804else
Martin v. Löwis11437992002-04-12 09:54:03 +00006805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006806sed 's/^/| /' conftest.$ac_ext >&5
6807
Martin v. Löwiseba40652007-08-30 20:10:57 +00006808 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006810
6811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006812fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006813{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6814echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006815if test $ac_cv_type_size_t = yes; then
6816 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006817else
Martin v. Löwis11437992002-04-12 09:54:03 +00006818
6819cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006820#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006821_ACEOF
6822
6823fi
6824
Martin v. Löwiseba40652007-08-30 20:10:57 +00006825{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6826echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006827if test "${ac_cv_type_uid_t+set}" = set; then
6828 echo $ECHO_N "(cached) $ECHO_C" >&6
6829else
6830 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006831/* confdefs.h. */
6832_ACEOF
6833cat confdefs.h >>conftest.$ac_ext
6834cat >>conftest.$ac_ext <<_ACEOF
6835/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006836#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006837
6838_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006840 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006841 ac_cv_type_uid_t=yes
6842else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006843 ac_cv_type_uid_t=no
6844fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006845rm -f conftest*
6846
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006848{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6849echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006850if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006851
Martin v. Löwis11437992002-04-12 09:54:03 +00006852cat >>confdefs.h <<\_ACEOF
6853#define uid_t int
6854_ACEOF
6855
6856
6857cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006858#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006859_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006860
6861fi
6862
Martin v. Löwiseba40652007-08-30 20:10:57 +00006863{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6864echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006865if test "${ac_cv_type_ssize_t+set}" = set; then
6866 echo $ECHO_N "(cached) $ECHO_C" >&6
6867else
6868 cat >conftest.$ac_ext <<_ACEOF
6869/* confdefs.h. */
6870_ACEOF
6871cat confdefs.h >>conftest.$ac_ext
6872cat >>conftest.$ac_ext <<_ACEOF
6873/* end confdefs.h. */
6874$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006875typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006876int
6877main ()
6878{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006879if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006880 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006881if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006882 return 0;
6883 ;
6884 return 0;
6885}
6886_ACEOF
6887rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006888if { (ac_try="$ac_compile"
6889case "(($ac_try" in
6890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6891 *) ac_try_echo=$ac_try;;
6892esac
6893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006895 ac_status=$?
6896 grep -v '^ *+' conftest.er1 >conftest.err
6897 rm -f conftest.er1
6898 cat conftest.err >&5
6899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006900 (exit $ac_status); } && {
6901 test -z "$ac_c_werror_flag" ||
6902 test ! -s conftest.err
6903 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006904 ac_cv_type_ssize_t=yes
6905else
6906 echo "$as_me: failed program was:" >&5
6907sed 's/^/| /' conftest.$ac_ext >&5
6908
Martin v. Löwiseba40652007-08-30 20:10:57 +00006909 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006911
6912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006914{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6915echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006916if test $ac_cv_type_ssize_t = yes; then
6917
6918cat >>confdefs.h <<\_ACEOF
6919#define HAVE_SSIZE_T 1
6920_ACEOF
6921
6922fi
6923
Jack Jansendd19cf82001-12-06 22:36:17 +00006924
Michael W. Hudson54241132001-12-07 15:38:26 +00006925# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006926# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006927{ echo "$as_me:$LINENO: checking for int" >&5
6928echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006929if test "${ac_cv_type_int+set}" = set; then
6930 echo $ECHO_N "(cached) $ECHO_C" >&6
6931else
6932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006933/* confdefs.h. */
6934_ACEOF
6935cat confdefs.h >>conftest.$ac_ext
6936cat >>conftest.$ac_ext <<_ACEOF
6937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006938$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006940int
6941main ()
6942{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006943if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006944 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006945if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006946 return 0;
6947 ;
6948 return 0;
6949}
6950_ACEOF
6951rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006952if { (ac_try="$ac_compile"
6953case "(($ac_try" in
6954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6955 *) ac_try_echo=$ac_try;;
6956esac
6957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006960 grep -v '^ *+' conftest.er1 >conftest.err
6961 rm -f conftest.er1
6962 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006964 (exit $ac_status); } && {
6965 test -z "$ac_c_werror_flag" ||
6966 test ! -s conftest.err
6967 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006968 ac_cv_type_int=yes
6969else
6970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006971sed 's/^/| /' conftest.$ac_ext >&5
6972
Martin v. Löwiseba40652007-08-30 20:10:57 +00006973 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006974fi
Brett Cannon19fab762007-06-02 03:02:29 +00006975
Martin v. Löwiseba40652007-08-30 20:10:57 +00006976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6977fi
6978{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6979echo "${ECHO_T}$ac_cv_type_int" >&6; }
6980
6981# The cast to long int works around a bug in the HP C Compiler
6982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6984# This bug is HP SR number 8606223364.
6985{ echo "$as_me:$LINENO: checking size of int" >&5
6986echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006987if test "${ac_cv_sizeof_int+set}" = set; then
6988 echo $ECHO_N "(cached) $ECHO_C" >&6
6989else
Martin v. Löwis11437992002-04-12 09:54:03 +00006990 if test "$cross_compiling" = yes; then
6991 # Depending upon the size, compute the lo and hi bounds.
6992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006993/* confdefs.h. */
6994_ACEOF
6995cat confdefs.h >>conftest.$ac_ext
6996cat >>conftest.$ac_ext <<_ACEOF
6997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006998$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006999 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007000int
7001main ()
7002{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007004test_array [0] = 0
7005
7006 ;
7007 return 0;
7008}
7009_ACEOF
7010rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007011if { (ac_try="$ac_compile"
7012case "(($ac_try" in
7013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7014 *) ac_try_echo=$ac_try;;
7015esac
7016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007019 grep -v '^ *+' conftest.er1 >conftest.err
7020 rm -f conftest.er1
7021 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007023 (exit $ac_status); } && {
7024 test -z "$ac_c_werror_flag" ||
7025 test ! -s conftest.err
7026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007027 ac_lo=0 ac_mid=0
7028 while :; do
7029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007030/* confdefs.h. */
7031_ACEOF
7032cat confdefs.h >>conftest.$ac_ext
7033cat >>conftest.$ac_ext <<_ACEOF
7034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007035$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007036 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007037int
7038main ()
7039{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007040static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007041test_array [0] = 0
7042
7043 ;
7044 return 0;
7045}
7046_ACEOF
7047rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007048if { (ac_try="$ac_compile"
7049case "(($ac_try" in
7050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7051 *) ac_try_echo=$ac_try;;
7052esac
7053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007056 grep -v '^ *+' conftest.er1 >conftest.err
7057 rm -f conftest.er1
7058 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007060 (exit $ac_status); } && {
7061 test -z "$ac_c_werror_flag" ||
7062 test ! -s conftest.err
7063 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007064 ac_hi=$ac_mid; break
7065else
7066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007067sed 's/^/| /' conftest.$ac_ext >&5
7068
Martin v. Löwiseba40652007-08-30 20:10:57 +00007069 ac_lo=`expr $ac_mid + 1`
7070 if test $ac_lo -le $ac_mid; then
7071 ac_lo= ac_hi=
7072 break
7073 fi
7074 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007076
7077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007078 done
7079else
7080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007081sed 's/^/| /' conftest.$ac_ext >&5
7082
Martin v. Löwiseba40652007-08-30 20:10:57 +00007083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007084/* confdefs.h. */
7085_ACEOF
7086cat confdefs.h >>conftest.$ac_ext
7087cat >>conftest.$ac_ext <<_ACEOF
7088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007089$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007090 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007091int
7092main ()
7093{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007094static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007095test_array [0] = 0
7096
7097 ;
7098 return 0;
7099}
7100_ACEOF
7101rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007102if { (ac_try="$ac_compile"
7103case "(($ac_try" in
7104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7105 *) ac_try_echo=$ac_try;;
7106esac
7107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007110 grep -v '^ *+' conftest.er1 >conftest.err
7111 rm -f conftest.er1
7112 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007114 (exit $ac_status); } && {
7115 test -z "$ac_c_werror_flag" ||
7116 test ! -s conftest.err
7117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007118 ac_hi=-1 ac_mid=-1
7119 while :; do
7120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007121/* confdefs.h. */
7122_ACEOF
7123cat confdefs.h >>conftest.$ac_ext
7124cat >>conftest.$ac_ext <<_ACEOF
7125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007126$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007127 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007128int
7129main ()
7130{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007131static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007132test_array [0] = 0
7133
7134 ;
7135 return 0;
7136}
7137_ACEOF
7138rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007139if { (ac_try="$ac_compile"
7140case "(($ac_try" in
7141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7142 *) ac_try_echo=$ac_try;;
7143esac
7144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007147 grep -v '^ *+' conftest.er1 >conftest.err
7148 rm -f conftest.er1
7149 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007151 (exit $ac_status); } && {
7152 test -z "$ac_c_werror_flag" ||
7153 test ! -s conftest.err
7154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007155 ac_lo=$ac_mid; break
7156else
7157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007158sed 's/^/| /' conftest.$ac_ext >&5
7159
Martin v. Löwiseba40652007-08-30 20:10:57 +00007160 ac_hi=`expr '(' $ac_mid ')' - 1`
7161 if test $ac_mid -le $ac_hi; then
7162 ac_lo= ac_hi=
7163 break
7164 fi
7165 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007167
7168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007169 done
7170else
7171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007172sed 's/^/| /' conftest.$ac_ext >&5
7173
Martin v. Löwiseba40652007-08-30 20:10:57 +00007174 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007176
7177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007179
7180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007181# Binary search between lo and hi bounds.
7182while test "x$ac_lo" != "x$ac_hi"; do
7183 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007185/* confdefs.h. */
7186_ACEOF
7187cat confdefs.h >>conftest.$ac_ext
7188cat >>conftest.$ac_ext <<_ACEOF
7189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007190$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007191 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007192int
7193main ()
7194{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007196test_array [0] = 0
7197
7198 ;
7199 return 0;
7200}
7201_ACEOF
7202rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007203if { (ac_try="$ac_compile"
7204case "(($ac_try" in
7205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7206 *) ac_try_echo=$ac_try;;
7207esac
7208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007211 grep -v '^ *+' conftest.er1 >conftest.err
7212 rm -f conftest.er1
7213 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007215 (exit $ac_status); } && {
7216 test -z "$ac_c_werror_flag" ||
7217 test ! -s conftest.err
7218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007219 ac_hi=$ac_mid
7220else
7221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007222sed 's/^/| /' conftest.$ac_ext >&5
7223
Martin v. Löwiseba40652007-08-30 20:10:57 +00007224 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007226
7227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007228done
7229case $ac_lo in
7230?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007231'') if test "$ac_cv_type_int" = yes; then
7232 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007233See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007234echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007235See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007236 { (exit 77); exit 77; }; }
7237 else
7238 ac_cv_sizeof_int=0
7239 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007240esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007241else
Martin v. Löwis11437992002-04-12 09:54:03 +00007242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007243/* confdefs.h. */
7244_ACEOF
7245cat confdefs.h >>conftest.$ac_ext
7246cat >>conftest.$ac_ext <<_ACEOF
7247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007248$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007249 typedef int ac__type_sizeof_;
7250static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7251static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007252#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007253#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007254int
7255main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007256{
Martin v. Löwis11437992002-04-12 09:54:03 +00007257
7258 FILE *f = fopen ("conftest.val", "w");
7259 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007260 return 1;
7261 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007262 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007263 long int i = longval ();
7264 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7265 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007266 fprintf (f, "%ld\n", i);
7267 }
7268 else
7269 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007270 unsigned long int i = ulongval ();
7271 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7272 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007273 fprintf (f, "%lu\n", i);
7274 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007275 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007276
7277 ;
7278 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007279}
Martin v. Löwis11437992002-04-12 09:54:03 +00007280_ACEOF
7281rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007282if { (ac_try="$ac_link"
7283case "(($ac_try" in
7284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7285 *) ac_try_echo=$ac_try;;
7286esac
7287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7288 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007289 ac_status=$?
7290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7291 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007292 { (case "(($ac_try" in
7293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7294 *) ac_try_echo=$ac_try;;
7295esac
7296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7297 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007298 ac_status=$?
7299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7300 (exit $ac_status); }; }; then
7301 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007302else
Martin v. Löwis11437992002-04-12 09:54:03 +00007303 echo "$as_me: program exited with status $ac_status" >&5
7304echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007305sed 's/^/| /' conftest.$ac_ext >&5
7306
Martin v. Löwis11437992002-04-12 09:54:03 +00007307( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007308if test "$ac_cv_type_int" = yes; then
7309 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007310See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007311echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007312See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007313 { (exit 77); exit 77; }; }
7314 else
7315 ac_cv_sizeof_int=0
7316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007318rm -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 +00007319fi
7320rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007322{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7323echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7324
7325
7326
Martin v. Löwis11437992002-04-12 09:54:03 +00007327cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007328#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007329_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007330
7331
Martin v. Löwiseba40652007-08-30 20:10:57 +00007332{ echo "$as_me:$LINENO: checking for long" >&5
7333echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007334if test "${ac_cv_type_long+set}" = set; then
7335 echo $ECHO_N "(cached) $ECHO_C" >&6
7336else
7337 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007338/* confdefs.h. */
7339_ACEOF
7340cat confdefs.h >>conftest.$ac_ext
7341cat >>conftest.$ac_ext <<_ACEOF
7342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007343$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007344typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007345int
7346main ()
7347{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007348if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007349 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007350if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007351 return 0;
7352 ;
7353 return 0;
7354}
7355_ACEOF
7356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007357if { (ac_try="$ac_compile"
7358case "(($ac_try" in
7359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7360 *) ac_try_echo=$ac_try;;
7361esac
7362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007365 grep -v '^ *+' conftest.er1 >conftest.err
7366 rm -f conftest.er1
7367 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007369 (exit $ac_status); } && {
7370 test -z "$ac_c_werror_flag" ||
7371 test ! -s conftest.err
7372 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007373 ac_cv_type_long=yes
7374else
7375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007376sed 's/^/| /' conftest.$ac_ext >&5
7377
Martin v. Löwiseba40652007-08-30 20:10:57 +00007378 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007379fi
Brett Cannon19fab762007-06-02 03:02:29 +00007380
Martin v. Löwiseba40652007-08-30 20:10:57 +00007381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7382fi
7383{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7384echo "${ECHO_T}$ac_cv_type_long" >&6; }
7385
7386# The cast to long int works around a bug in the HP C Compiler
7387# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7388# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7389# This bug is HP SR number 8606223364.
7390{ echo "$as_me:$LINENO: checking size of long" >&5
7391echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007392if test "${ac_cv_sizeof_long+set}" = set; then
7393 echo $ECHO_N "(cached) $ECHO_C" >&6
7394else
Martin v. Löwis11437992002-04-12 09:54:03 +00007395 if test "$cross_compiling" = yes; then
7396 # Depending upon the size, compute the lo and hi bounds.
7397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007398/* confdefs.h. */
7399_ACEOF
7400cat confdefs.h >>conftest.$ac_ext
7401cat >>conftest.$ac_ext <<_ACEOF
7402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007403$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007404 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007405int
7406main ()
7407{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007408static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007409test_array [0] = 0
7410
7411 ;
7412 return 0;
7413}
7414_ACEOF
7415rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007416if { (ac_try="$ac_compile"
7417case "(($ac_try" in
7418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7419 *) ac_try_echo=$ac_try;;
7420esac
7421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007424 grep -v '^ *+' conftest.er1 >conftest.err
7425 rm -f conftest.er1
7426 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007428 (exit $ac_status); } && {
7429 test -z "$ac_c_werror_flag" ||
7430 test ! -s conftest.err
7431 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007432 ac_lo=0 ac_mid=0
7433 while :; do
7434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007435/* confdefs.h. */
7436_ACEOF
7437cat confdefs.h >>conftest.$ac_ext
7438cat >>conftest.$ac_ext <<_ACEOF
7439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007440$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007441 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007442int
7443main ()
7444{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007445static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007446test_array [0] = 0
7447
7448 ;
7449 return 0;
7450}
7451_ACEOF
7452rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007453if { (ac_try="$ac_compile"
7454case "(($ac_try" in
7455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7456 *) ac_try_echo=$ac_try;;
7457esac
7458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7459 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007461 grep -v '^ *+' conftest.er1 >conftest.err
7462 rm -f conftest.er1
7463 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007465 (exit $ac_status); } && {
7466 test -z "$ac_c_werror_flag" ||
7467 test ! -s conftest.err
7468 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007469 ac_hi=$ac_mid; break
7470else
7471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007472sed 's/^/| /' conftest.$ac_ext >&5
7473
Martin v. Löwiseba40652007-08-30 20:10:57 +00007474 ac_lo=`expr $ac_mid + 1`
7475 if test $ac_lo -le $ac_mid; then
7476 ac_lo= ac_hi=
7477 break
7478 fi
7479 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007481
7482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007483 done
7484else
7485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007486sed 's/^/| /' conftest.$ac_ext >&5
7487
Martin v. Löwiseba40652007-08-30 20:10:57 +00007488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007489/* confdefs.h. */
7490_ACEOF
7491cat confdefs.h >>conftest.$ac_ext
7492cat >>conftest.$ac_ext <<_ACEOF
7493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007494$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007495 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007496int
7497main ()
7498{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007499static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007500test_array [0] = 0
7501
7502 ;
7503 return 0;
7504}
7505_ACEOF
7506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007507if { (ac_try="$ac_compile"
7508case "(($ac_try" in
7509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7510 *) ac_try_echo=$ac_try;;
7511esac
7512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007515 grep -v '^ *+' conftest.er1 >conftest.err
7516 rm -f conftest.er1
7517 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007519 (exit $ac_status); } && {
7520 test -z "$ac_c_werror_flag" ||
7521 test ! -s conftest.err
7522 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007523 ac_hi=-1 ac_mid=-1
7524 while :; do
7525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007526/* confdefs.h. */
7527_ACEOF
7528cat confdefs.h >>conftest.$ac_ext
7529cat >>conftest.$ac_ext <<_ACEOF
7530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007531$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007532 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007533int
7534main ()
7535{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007536static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007537test_array [0] = 0
7538
7539 ;
7540 return 0;
7541}
7542_ACEOF
7543rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007544if { (ac_try="$ac_compile"
7545case "(($ac_try" in
7546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7547 *) ac_try_echo=$ac_try;;
7548esac
7549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007552 grep -v '^ *+' conftest.er1 >conftest.err
7553 rm -f conftest.er1
7554 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007556 (exit $ac_status); } && {
7557 test -z "$ac_c_werror_flag" ||
7558 test ! -s conftest.err
7559 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007560 ac_lo=$ac_mid; break
7561else
7562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007563sed 's/^/| /' conftest.$ac_ext >&5
7564
Martin v. Löwiseba40652007-08-30 20:10:57 +00007565 ac_hi=`expr '(' $ac_mid ')' - 1`
7566 if test $ac_mid -le $ac_hi; then
7567 ac_lo= ac_hi=
7568 break
7569 fi
7570 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007572
7573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007574 done
7575else
7576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007577sed 's/^/| /' conftest.$ac_ext >&5
7578
Martin v. Löwiseba40652007-08-30 20:10:57 +00007579 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007581
7582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007584
7585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007586# Binary search between lo and hi bounds.
7587while test "x$ac_lo" != "x$ac_hi"; do
7588 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007590/* confdefs.h. */
7591_ACEOF
7592cat confdefs.h >>conftest.$ac_ext
7593cat >>conftest.$ac_ext <<_ACEOF
7594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007595$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007596 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007597int
7598main ()
7599{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007601test_array [0] = 0
7602
7603 ;
7604 return 0;
7605}
7606_ACEOF
7607rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007608if { (ac_try="$ac_compile"
7609case "(($ac_try" in
7610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7611 *) ac_try_echo=$ac_try;;
7612esac
7613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007616 grep -v '^ *+' conftest.er1 >conftest.err
7617 rm -f conftest.er1
7618 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007620 (exit $ac_status); } && {
7621 test -z "$ac_c_werror_flag" ||
7622 test ! -s conftest.err
7623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007624 ac_hi=$ac_mid
7625else
7626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007627sed 's/^/| /' conftest.$ac_ext >&5
7628
Martin v. Löwiseba40652007-08-30 20:10:57 +00007629 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007631
7632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007633done
7634case $ac_lo in
7635?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007636'') if test "$ac_cv_type_long" = yes; then
7637 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007638See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007639echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007640See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007641 { (exit 77); exit 77; }; }
7642 else
7643 ac_cv_sizeof_long=0
7644 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007645esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007646else
Martin v. Löwis11437992002-04-12 09:54:03 +00007647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007648/* confdefs.h. */
7649_ACEOF
7650cat confdefs.h >>conftest.$ac_ext
7651cat >>conftest.$ac_ext <<_ACEOF
7652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007653$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007654 typedef long ac__type_sizeof_;
7655static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7656static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007657#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007658#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007659int
7660main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007661{
Martin v. Löwis11437992002-04-12 09:54:03 +00007662
7663 FILE *f = fopen ("conftest.val", "w");
7664 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007665 return 1;
7666 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007667 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007668 long int i = longval ();
7669 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7670 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007671 fprintf (f, "%ld\n", i);
7672 }
7673 else
7674 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007675 unsigned long int i = ulongval ();
7676 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7677 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 fprintf (f, "%lu\n", i);
7679 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007680 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007681
7682 ;
7683 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007684}
Martin v. Löwis11437992002-04-12 09:54:03 +00007685_ACEOF
7686rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007687if { (ac_try="$ac_link"
7688case "(($ac_try" in
7689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7690 *) ac_try_echo=$ac_try;;
7691esac
7692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7693 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007694 ac_status=$?
7695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007697 { (case "(($ac_try" in
7698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7699 *) ac_try_echo=$ac_try;;
7700esac
7701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7702 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007703 ac_status=$?
7704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7705 (exit $ac_status); }; }; then
7706 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007707else
Martin v. Löwis11437992002-04-12 09:54:03 +00007708 echo "$as_me: program exited with status $ac_status" >&5
7709echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007710sed 's/^/| /' conftest.$ac_ext >&5
7711
Martin v. Löwis11437992002-04-12 09:54:03 +00007712( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007713if test "$ac_cv_type_long" = yes; then
7714 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007715See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007716echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007717See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007718 { (exit 77); exit 77; }; }
7719 else
7720 ac_cv_sizeof_long=0
7721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723rm -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 +00007724fi
7725rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007727{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7728echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7729
7730
7731
Martin v. Löwis11437992002-04-12 09:54:03 +00007732cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007733#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007734_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007735
7736
Martin v. Löwiseba40652007-08-30 20:10:57 +00007737{ echo "$as_me:$LINENO: checking for void *" >&5
7738echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007739if test "${ac_cv_type_void_p+set}" = set; then
7740 echo $ECHO_N "(cached) $ECHO_C" >&6
7741else
7742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007743/* confdefs.h. */
7744_ACEOF
7745cat confdefs.h >>conftest.$ac_ext
7746cat >>conftest.$ac_ext <<_ACEOF
7747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007748$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007749typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007750int
7751main ()
7752{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007753if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007755if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 return 0;
7757 ;
7758 return 0;
7759}
7760_ACEOF
7761rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762if { (ac_try="$ac_compile"
7763case "(($ac_try" in
7764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7765 *) ac_try_echo=$ac_try;;
7766esac
7767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007770 grep -v '^ *+' conftest.er1 >conftest.err
7771 rm -f conftest.er1
7772 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007774 (exit $ac_status); } && {
7775 test -z "$ac_c_werror_flag" ||
7776 test ! -s conftest.err
7777 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007778 ac_cv_type_void_p=yes
7779else
7780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007781sed 's/^/| /' conftest.$ac_ext >&5
7782
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007784fi
Brett Cannon19fab762007-06-02 03:02:29 +00007785
Martin v. Löwiseba40652007-08-30 20:10:57 +00007786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7787fi
7788{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7789echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7790
7791# The cast to long int works around a bug in the HP C Compiler
7792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7794# This bug is HP SR number 8606223364.
7795{ echo "$as_me:$LINENO: checking size of void *" >&5
7796echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007797if test "${ac_cv_sizeof_void_p+set}" = set; then
7798 echo $ECHO_N "(cached) $ECHO_C" >&6
7799else
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 if test "$cross_compiling" = yes; then
7801 # Depending upon the size, compute the lo and hi bounds.
7802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007803/* confdefs.h. */
7804_ACEOF
7805cat confdefs.h >>conftest.$ac_ext
7806cat >>conftest.$ac_ext <<_ACEOF
7807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007808$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007809 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007810int
7811main ()
7812{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007814test_array [0] = 0
7815
7816 ;
7817 return 0;
7818}
7819_ACEOF
7820rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007821if { (ac_try="$ac_compile"
7822case "(($ac_try" in
7823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7824 *) ac_try_echo=$ac_try;;
7825esac
7826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007829 grep -v '^ *+' conftest.er1 >conftest.err
7830 rm -f conftest.er1
7831 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007833 (exit $ac_status); } && {
7834 test -z "$ac_c_werror_flag" ||
7835 test ! -s conftest.err
7836 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 ac_lo=0 ac_mid=0
7838 while :; do
7839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007840/* confdefs.h. */
7841_ACEOF
7842cat confdefs.h >>conftest.$ac_ext
7843cat >>conftest.$ac_ext <<_ACEOF
7844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007845$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007846 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007847int
7848main ()
7849{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007850static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007851test_array [0] = 0
7852
7853 ;
7854 return 0;
7855}
7856_ACEOF
7857rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007858if { (ac_try="$ac_compile"
7859case "(($ac_try" in
7860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7861 *) ac_try_echo=$ac_try;;
7862esac
7863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7864 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007866 grep -v '^ *+' conftest.er1 >conftest.err
7867 rm -f conftest.er1
7868 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870 (exit $ac_status); } && {
7871 test -z "$ac_c_werror_flag" ||
7872 test ! -s conftest.err
7873 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007874 ac_hi=$ac_mid; break
7875else
7876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007877sed 's/^/| /' conftest.$ac_ext >&5
7878
Martin v. Löwiseba40652007-08-30 20:10:57 +00007879 ac_lo=`expr $ac_mid + 1`
7880 if test $ac_lo -le $ac_mid; then
7881 ac_lo= ac_hi=
7882 break
7883 fi
7884 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007886
7887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007888 done
7889else
7890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007891sed 's/^/| /' conftest.$ac_ext >&5
7892
Martin v. Löwiseba40652007-08-30 20:10:57 +00007893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007894/* confdefs.h. */
7895_ACEOF
7896cat confdefs.h >>conftest.$ac_ext
7897cat >>conftest.$ac_ext <<_ACEOF
7898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007899$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007900 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007901int
7902main ()
7903{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007904static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007905test_array [0] = 0
7906
7907 ;
7908 return 0;
7909}
7910_ACEOF
7911rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007912if { (ac_try="$ac_compile"
7913case "(($ac_try" in
7914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7915 *) ac_try_echo=$ac_try;;
7916esac
7917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007920 grep -v '^ *+' conftest.er1 >conftest.err
7921 rm -f conftest.er1
7922 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007924 (exit $ac_status); } && {
7925 test -z "$ac_c_werror_flag" ||
7926 test ! -s conftest.err
7927 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 ac_hi=-1 ac_mid=-1
7929 while :; do
7930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007931/* confdefs.h. */
7932_ACEOF
7933cat confdefs.h >>conftest.$ac_ext
7934cat >>conftest.$ac_ext <<_ACEOF
7935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007936$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007937 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007938int
7939main ()
7940{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007941static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007942test_array [0] = 0
7943
7944 ;
7945 return 0;
7946}
7947_ACEOF
7948rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007949if { (ac_try="$ac_compile"
7950case "(($ac_try" in
7951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7952 *) ac_try_echo=$ac_try;;
7953esac
7954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007957 grep -v '^ *+' conftest.er1 >conftest.err
7958 rm -f conftest.er1
7959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007961 (exit $ac_status); } && {
7962 test -z "$ac_c_werror_flag" ||
7963 test ! -s conftest.err
7964 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007965 ac_lo=$ac_mid; break
7966else
7967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007968sed 's/^/| /' conftest.$ac_ext >&5
7969
Martin v. Löwiseba40652007-08-30 20:10:57 +00007970 ac_hi=`expr '(' $ac_mid ')' - 1`
7971 if test $ac_mid -le $ac_hi; then
7972 ac_lo= ac_hi=
7973 break
7974 fi
7975 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007977
7978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 done
7980else
7981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007982sed 's/^/| /' conftest.$ac_ext >&5
7983
Martin v. Löwiseba40652007-08-30 20:10:57 +00007984 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986
7987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007989
7990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007991# Binary search between lo and hi bounds.
7992while test "x$ac_lo" != "x$ac_hi"; do
7993 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007995/* confdefs.h. */
7996_ACEOF
7997cat confdefs.h >>conftest.$ac_ext
7998cat >>conftest.$ac_ext <<_ACEOF
7999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008000$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008001 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008002int
8003main ()
8004{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008006test_array [0] = 0
8007
8008 ;
8009 return 0;
8010}
8011_ACEOF
8012rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008013if { (ac_try="$ac_compile"
8014case "(($ac_try" in
8015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8016 *) ac_try_echo=$ac_try;;
8017esac
8018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008021 grep -v '^ *+' conftest.er1 >conftest.err
8022 rm -f conftest.er1
8023 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008025 (exit $ac_status); } && {
8026 test -z "$ac_c_werror_flag" ||
8027 test ! -s conftest.err
8028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 ac_hi=$ac_mid
8030else
8031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008032sed 's/^/| /' conftest.$ac_ext >&5
8033
Martin v. Löwiseba40652007-08-30 20:10:57 +00008034 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008036
8037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008038done
8039case $ac_lo in
8040?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008041'') if test "$ac_cv_type_void_p" = yes; then
8042 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008043See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008044echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008045See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008046 { (exit 77); exit 77; }; }
8047 else
8048 ac_cv_sizeof_void_p=0
8049 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008050esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008051else
Martin v. Löwis11437992002-04-12 09:54:03 +00008052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008053/* confdefs.h. */
8054_ACEOF
8055cat confdefs.h >>conftest.$ac_ext
8056cat >>conftest.$ac_ext <<_ACEOF
8057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008058$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008059 typedef void * ac__type_sizeof_;
8060static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8061static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008062#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008063#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008064int
8065main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008066{
Martin v. Löwis11437992002-04-12 09:54:03 +00008067
8068 FILE *f = fopen ("conftest.val", "w");
8069 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008070 return 1;
8071 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008072 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008073 long int i = longval ();
8074 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8075 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008076 fprintf (f, "%ld\n", i);
8077 }
8078 else
8079 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008080 unsigned long int i = ulongval ();
8081 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8082 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 fprintf (f, "%lu\n", i);
8084 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008085 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008086
8087 ;
8088 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008089}
Martin v. Löwis11437992002-04-12 09:54:03 +00008090_ACEOF
8091rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008092if { (ac_try="$ac_link"
8093case "(($ac_try" in
8094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8095 *) ac_try_echo=$ac_try;;
8096esac
8097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8098 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 ac_status=$?
8100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008102 { (case "(($ac_try" in
8103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8104 *) ac_try_echo=$ac_try;;
8105esac
8106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8107 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008108 ac_status=$?
8109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8110 (exit $ac_status); }; }; then
8111 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008112else
Martin v. Löwis11437992002-04-12 09:54:03 +00008113 echo "$as_me: program exited with status $ac_status" >&5
8114echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008115sed 's/^/| /' conftest.$ac_ext >&5
8116
Martin v. Löwis11437992002-04-12 09:54:03 +00008117( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118if test "$ac_cv_type_void_p" = yes; then
8119 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008120See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008121echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008122See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008123 { (exit 77); exit 77; }; }
8124 else
8125 ac_cv_sizeof_void_p=0
8126 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008128rm -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 +00008129fi
8130rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008132{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8133echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8134
8135
8136
Martin v. Löwis11437992002-04-12 09:54:03 +00008137cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008138#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008139_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008140
8141
Martin v. Löwiseba40652007-08-30 20:10:57 +00008142{ echo "$as_me:$LINENO: checking for short" >&5
8143echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008144if test "${ac_cv_type_short+set}" = set; then
8145 echo $ECHO_N "(cached) $ECHO_C" >&6
8146else
8147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008148/* confdefs.h. */
8149_ACEOF
8150cat confdefs.h >>conftest.$ac_ext
8151cat >>conftest.$ac_ext <<_ACEOF
8152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008153$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008154typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008155int
8156main ()
8157{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008158if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008160if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 return 0;
8162 ;
8163 return 0;
8164}
8165_ACEOF
8166rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008167if { (ac_try="$ac_compile"
8168case "(($ac_try" in
8169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8170 *) ac_try_echo=$ac_try;;
8171esac
8172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008175 grep -v '^ *+' conftest.er1 >conftest.err
8176 rm -f conftest.er1
8177 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179 (exit $ac_status); } && {
8180 test -z "$ac_c_werror_flag" ||
8181 test ! -s conftest.err
8182 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008183 ac_cv_type_short=yes
8184else
8185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008186sed 's/^/| /' conftest.$ac_ext >&5
8187
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008189fi
Brett Cannon19fab762007-06-02 03:02:29 +00008190
Martin v. Löwiseba40652007-08-30 20:10:57 +00008191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8192fi
8193{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8194echo "${ECHO_T}$ac_cv_type_short" >&6; }
8195
8196# The cast to long int works around a bug in the HP C Compiler
8197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8198# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8199# This bug is HP SR number 8606223364.
8200{ echo "$as_me:$LINENO: checking size of short" >&5
8201echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008202if test "${ac_cv_sizeof_short+set}" = set; then
8203 echo $ECHO_N "(cached) $ECHO_C" >&6
8204else
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 if test "$cross_compiling" = yes; then
8206 # Depending upon the size, compute the lo and hi bounds.
8207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008208/* confdefs.h. */
8209_ACEOF
8210cat confdefs.h >>conftest.$ac_ext
8211cat >>conftest.$ac_ext <<_ACEOF
8212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008213$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008215int
8216main ()
8217{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008218static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008219test_array [0] = 0
8220
8221 ;
8222 return 0;
8223}
8224_ACEOF
8225rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008226if { (ac_try="$ac_compile"
8227case "(($ac_try" in
8228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8229 *) ac_try_echo=$ac_try;;
8230esac
8231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008234 grep -v '^ *+' conftest.er1 >conftest.err
8235 rm -f conftest.er1
8236 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008238 (exit $ac_status); } && {
8239 test -z "$ac_c_werror_flag" ||
8240 test ! -s conftest.err
8241 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008242 ac_lo=0 ac_mid=0
8243 while :; do
8244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008245/* confdefs.h. */
8246_ACEOF
8247cat confdefs.h >>conftest.$ac_ext
8248cat >>conftest.$ac_ext <<_ACEOF
8249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008250$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008251 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008252int
8253main ()
8254{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008255static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008256test_array [0] = 0
8257
8258 ;
8259 return 0;
8260}
8261_ACEOF
8262rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008263if { (ac_try="$ac_compile"
8264case "(($ac_try" in
8265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8266 *) ac_try_echo=$ac_try;;
8267esac
8268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008271 grep -v '^ *+' conftest.er1 >conftest.err
8272 rm -f conftest.er1
8273 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275 (exit $ac_status); } && {
8276 test -z "$ac_c_werror_flag" ||
8277 test ! -s conftest.err
8278 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008279 ac_hi=$ac_mid; break
8280else
8281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008282sed 's/^/| /' conftest.$ac_ext >&5
8283
Martin v. Löwiseba40652007-08-30 20:10:57 +00008284 ac_lo=`expr $ac_mid + 1`
8285 if test $ac_lo -le $ac_mid; then
8286 ac_lo= ac_hi=
8287 break
8288 fi
8289 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008291
8292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008293 done
8294else
8295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008296sed 's/^/| /' conftest.$ac_ext >&5
8297
Martin v. Löwiseba40652007-08-30 20:10:57 +00008298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008299/* confdefs.h. */
8300_ACEOF
8301cat confdefs.h >>conftest.$ac_ext
8302cat >>conftest.$ac_ext <<_ACEOF
8303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008304$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008305 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008306int
8307main ()
8308{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008309static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008310test_array [0] = 0
8311
8312 ;
8313 return 0;
8314}
8315_ACEOF
8316rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008317if { (ac_try="$ac_compile"
8318case "(($ac_try" in
8319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8320 *) ac_try_echo=$ac_try;;
8321esac
8322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008325 grep -v '^ *+' conftest.er1 >conftest.err
8326 rm -f conftest.er1
8327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008329 (exit $ac_status); } && {
8330 test -z "$ac_c_werror_flag" ||
8331 test ! -s conftest.err
8332 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008333 ac_hi=-1 ac_mid=-1
8334 while :; do
8335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008336/* confdefs.h. */
8337_ACEOF
8338cat confdefs.h >>conftest.$ac_ext
8339cat >>conftest.$ac_ext <<_ACEOF
8340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008341$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008342 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008343int
8344main ()
8345{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008346static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008347test_array [0] = 0
8348
8349 ;
8350 return 0;
8351}
8352_ACEOF
8353rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008354if { (ac_try="$ac_compile"
8355case "(($ac_try" in
8356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8357 *) ac_try_echo=$ac_try;;
8358esac
8359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008362 grep -v '^ *+' conftest.er1 >conftest.err
8363 rm -f conftest.er1
8364 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008366 (exit $ac_status); } && {
8367 test -z "$ac_c_werror_flag" ||
8368 test ! -s conftest.err
8369 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008370 ac_lo=$ac_mid; break
8371else
8372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008373sed 's/^/| /' conftest.$ac_ext >&5
8374
Martin v. Löwiseba40652007-08-30 20:10:57 +00008375 ac_hi=`expr '(' $ac_mid ')' - 1`
8376 if test $ac_mid -le $ac_hi; then
8377 ac_lo= ac_hi=
8378 break
8379 fi
8380 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008382
8383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 done
8385else
8386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008387sed 's/^/| /' conftest.$ac_ext >&5
8388
Martin v. Löwiseba40652007-08-30 20:10:57 +00008389 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008391
8392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008394
8395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008396# Binary search between lo and hi bounds.
8397while test "x$ac_lo" != "x$ac_hi"; do
8398 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008400/* confdefs.h. */
8401_ACEOF
8402cat confdefs.h >>conftest.$ac_ext
8403cat >>conftest.$ac_ext <<_ACEOF
8404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008405$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008406 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008407int
8408main ()
8409{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008411test_array [0] = 0
8412
8413 ;
8414 return 0;
8415}
8416_ACEOF
8417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008418if { (ac_try="$ac_compile"
8419case "(($ac_try" in
8420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8421 *) ac_try_echo=$ac_try;;
8422esac
8423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008426 grep -v '^ *+' conftest.er1 >conftest.err
8427 rm -f conftest.er1
8428 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008430 (exit $ac_status); } && {
8431 test -z "$ac_c_werror_flag" ||
8432 test ! -s conftest.err
8433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 ac_hi=$ac_mid
8435else
8436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008437sed 's/^/| /' conftest.$ac_ext >&5
8438
Martin v. Löwiseba40652007-08-30 20:10:57 +00008439 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008441
8442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008443done
8444case $ac_lo in
8445?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008446'') if test "$ac_cv_type_short" = yes; then
8447 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008448See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008449echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008450See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008451 { (exit 77); exit 77; }; }
8452 else
8453 ac_cv_sizeof_short=0
8454 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008455esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008456else
Martin v. Löwis11437992002-04-12 09:54:03 +00008457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008458/* confdefs.h. */
8459_ACEOF
8460cat confdefs.h >>conftest.$ac_ext
8461cat >>conftest.$ac_ext <<_ACEOF
8462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008463$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008464 typedef short ac__type_sizeof_;
8465static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8466static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008467#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008468#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008469int
8470main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008471{
Martin v. Löwis11437992002-04-12 09:54:03 +00008472
8473 FILE *f = fopen ("conftest.val", "w");
8474 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008475 return 1;
8476 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008478 long int i = longval ();
8479 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8480 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 fprintf (f, "%ld\n", i);
8482 }
8483 else
8484 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008485 unsigned long int i = ulongval ();
8486 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8487 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 fprintf (f, "%lu\n", i);
8489 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008490 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008491
8492 ;
8493 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008494}
Martin v. Löwis11437992002-04-12 09:54:03 +00008495_ACEOF
8496rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008497if { (ac_try="$ac_link"
8498case "(($ac_try" in
8499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8500 *) ac_try_echo=$ac_try;;
8501esac
8502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8503 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 ac_status=$?
8505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8506 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008507 { (case "(($ac_try" in
8508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8509 *) ac_try_echo=$ac_try;;
8510esac
8511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8512 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008513 ac_status=$?
8514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8515 (exit $ac_status); }; }; then
8516 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008517else
Martin v. Löwis11437992002-04-12 09:54:03 +00008518 echo "$as_me: program exited with status $ac_status" >&5
8519echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008520sed 's/^/| /' conftest.$ac_ext >&5
8521
Martin v. Löwis11437992002-04-12 09:54:03 +00008522( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008523if test "$ac_cv_type_short" = yes; then
8524 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008525See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008526echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008527See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008528 { (exit 77); exit 77; }; }
8529 else
8530 ac_cv_sizeof_short=0
8531 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008533rm -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 +00008534fi
8535rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008537{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8538echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8539
8540
8541
Martin v. Löwis11437992002-04-12 09:54:03 +00008542cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008543#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008544_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008545
8546
Martin v. Löwiseba40652007-08-30 20:10:57 +00008547{ echo "$as_me:$LINENO: checking for float" >&5
8548echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008549if test "${ac_cv_type_float+set}" = set; then
8550 echo $ECHO_N "(cached) $ECHO_C" >&6
8551else
8552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008553/* confdefs.h. */
8554_ACEOF
8555cat confdefs.h >>conftest.$ac_ext
8556cat >>conftest.$ac_ext <<_ACEOF
8557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008558$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008559typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008560int
8561main ()
8562{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008563if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008565if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 return 0;
8567 ;
8568 return 0;
8569}
8570_ACEOF
8571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008572if { (ac_try="$ac_compile"
8573case "(($ac_try" in
8574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8575 *) ac_try_echo=$ac_try;;
8576esac
8577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008580 grep -v '^ *+' conftest.er1 >conftest.err
8581 rm -f conftest.er1
8582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584 (exit $ac_status); } && {
8585 test -z "$ac_c_werror_flag" ||
8586 test ! -s conftest.err
8587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 ac_cv_type_float=yes
8589else
8590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008591sed 's/^/| /' conftest.$ac_ext >&5
8592
Martin v. Löwiseba40652007-08-30 20:10:57 +00008593 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008594fi
Brett Cannon19fab762007-06-02 03:02:29 +00008595
Martin v. Löwiseba40652007-08-30 20:10:57 +00008596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8597fi
8598{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8599echo "${ECHO_T}$ac_cv_type_float" >&6; }
8600
8601# The cast to long int works around a bug in the HP C Compiler
8602# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8603# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8604# This bug is HP SR number 8606223364.
8605{ echo "$as_me:$LINENO: checking size of float" >&5
8606echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008607if test "${ac_cv_sizeof_float+set}" = set; then
8608 echo $ECHO_N "(cached) $ECHO_C" >&6
8609else
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 if test "$cross_compiling" = yes; then
8611 # Depending upon the size, compute the lo and hi bounds.
8612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008613/* confdefs.h. */
8614_ACEOF
8615cat confdefs.h >>conftest.$ac_ext
8616cat >>conftest.$ac_ext <<_ACEOF
8617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008618$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008619 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008620int
8621main ()
8622{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008623static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008624test_array [0] = 0
8625
8626 ;
8627 return 0;
8628}
8629_ACEOF
8630rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008631if { (ac_try="$ac_compile"
8632case "(($ac_try" in
8633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8634 *) ac_try_echo=$ac_try;;
8635esac
8636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008639 grep -v '^ *+' conftest.er1 >conftest.err
8640 rm -f conftest.er1
8641 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008643 (exit $ac_status); } && {
8644 test -z "$ac_c_werror_flag" ||
8645 test ! -s conftest.err
8646 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 ac_lo=0 ac_mid=0
8648 while :; do
8649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008650/* confdefs.h. */
8651_ACEOF
8652cat confdefs.h >>conftest.$ac_ext
8653cat >>conftest.$ac_ext <<_ACEOF
8654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008655$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008657int
8658main ()
8659{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008660static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008661test_array [0] = 0
8662
8663 ;
8664 return 0;
8665}
8666_ACEOF
8667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008668if { (ac_try="$ac_compile"
8669case "(($ac_try" in
8670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8671 *) ac_try_echo=$ac_try;;
8672esac
8673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008676 grep -v '^ *+' conftest.er1 >conftest.err
8677 rm -f conftest.er1
8678 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680 (exit $ac_status); } && {
8681 test -z "$ac_c_werror_flag" ||
8682 test ! -s conftest.err
8683 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 ac_hi=$ac_mid; break
8685else
8686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008687sed 's/^/| /' conftest.$ac_ext >&5
8688
Martin v. Löwiseba40652007-08-30 20:10:57 +00008689 ac_lo=`expr $ac_mid + 1`
8690 if test $ac_lo -le $ac_mid; then
8691 ac_lo= ac_hi=
8692 break
8693 fi
8694 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008696
8697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 done
8699else
8700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008701sed 's/^/| /' conftest.$ac_ext >&5
8702
Martin v. Löwiseba40652007-08-30 20:10:57 +00008703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008704/* confdefs.h. */
8705_ACEOF
8706cat confdefs.h >>conftest.$ac_ext
8707cat >>conftest.$ac_ext <<_ACEOF
8708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008709$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008710 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008711int
8712main ()
8713{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008714static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008715test_array [0] = 0
8716
8717 ;
8718 return 0;
8719}
8720_ACEOF
8721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008722if { (ac_try="$ac_compile"
8723case "(($ac_try" in
8724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8725 *) ac_try_echo=$ac_try;;
8726esac
8727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008730 grep -v '^ *+' conftest.er1 >conftest.err
8731 rm -f conftest.er1
8732 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008734 (exit $ac_status); } && {
8735 test -z "$ac_c_werror_flag" ||
8736 test ! -s conftest.err
8737 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 ac_hi=-1 ac_mid=-1
8739 while :; do
8740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008741/* confdefs.h. */
8742_ACEOF
8743cat confdefs.h >>conftest.$ac_ext
8744cat >>conftest.$ac_ext <<_ACEOF
8745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008746$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008747 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008748int
8749main ()
8750{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008751static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008752test_array [0] = 0
8753
8754 ;
8755 return 0;
8756}
8757_ACEOF
8758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008759if { (ac_try="$ac_compile"
8760case "(($ac_try" in
8761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8762 *) ac_try_echo=$ac_try;;
8763esac
8764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008767 grep -v '^ *+' conftest.er1 >conftest.err
8768 rm -f conftest.er1
8769 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008771 (exit $ac_status); } && {
8772 test -z "$ac_c_werror_flag" ||
8773 test ! -s conftest.err
8774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 ac_lo=$ac_mid; break
8776else
8777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008778sed 's/^/| /' conftest.$ac_ext >&5
8779
Martin v. Löwiseba40652007-08-30 20:10:57 +00008780 ac_hi=`expr '(' $ac_mid ')' - 1`
8781 if test $ac_mid -le $ac_hi; then
8782 ac_lo= ac_hi=
8783 break
8784 fi
8785 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008787
8788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 done
8790else
8791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008792sed 's/^/| /' conftest.$ac_ext >&5
8793
Martin v. Löwiseba40652007-08-30 20:10:57 +00008794 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008796
8797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008799
8800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008801# Binary search between lo and hi bounds.
8802while test "x$ac_lo" != "x$ac_hi"; do
8803 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008805/* confdefs.h. */
8806_ACEOF
8807cat confdefs.h >>conftest.$ac_ext
8808cat >>conftest.$ac_ext <<_ACEOF
8809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008810$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008811 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008812int
8813main ()
8814{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008816test_array [0] = 0
8817
8818 ;
8819 return 0;
8820}
8821_ACEOF
8822rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008823if { (ac_try="$ac_compile"
8824case "(($ac_try" in
8825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8826 *) ac_try_echo=$ac_try;;
8827esac
8828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008831 grep -v '^ *+' conftest.er1 >conftest.err
8832 rm -f conftest.er1
8833 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008835 (exit $ac_status); } && {
8836 test -z "$ac_c_werror_flag" ||
8837 test ! -s conftest.err
8838 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 ac_hi=$ac_mid
8840else
8841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008842sed 's/^/| /' conftest.$ac_ext >&5
8843
Martin v. Löwiseba40652007-08-30 20:10:57 +00008844 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008846
8847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008848done
8849case $ac_lo in
8850?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008851'') if test "$ac_cv_type_float" = yes; then
8852 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008853See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008854echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008855See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008856 { (exit 77); exit 77; }; }
8857 else
8858 ac_cv_sizeof_float=0
8859 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008860esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008861else
Martin v. Löwis11437992002-04-12 09:54:03 +00008862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008863/* confdefs.h. */
8864_ACEOF
8865cat confdefs.h >>conftest.$ac_ext
8866cat >>conftest.$ac_ext <<_ACEOF
8867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008868$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008869 typedef float ac__type_sizeof_;
8870static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8871static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008872#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008873#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008874int
8875main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008876{
Martin v. Löwis11437992002-04-12 09:54:03 +00008877
8878 FILE *f = fopen ("conftest.val", "w");
8879 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008880 return 1;
8881 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008883 long int i = longval ();
8884 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8885 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008886 fprintf (f, "%ld\n", i);
8887 }
8888 else
8889 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008890 unsigned long int i = ulongval ();
8891 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8892 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 fprintf (f, "%lu\n", i);
8894 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008895 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008896
8897 ;
8898 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008899}
Martin v. Löwis11437992002-04-12 09:54:03 +00008900_ACEOF
8901rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008902if { (ac_try="$ac_link"
8903case "(($ac_try" in
8904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8905 *) ac_try_echo=$ac_try;;
8906esac
8907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8908 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 ac_status=$?
8910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008912 { (case "(($ac_try" in
8913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8914 *) ac_try_echo=$ac_try;;
8915esac
8916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8917 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 ac_status=$?
8919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8920 (exit $ac_status); }; }; then
8921 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008922else
Martin v. Löwis11437992002-04-12 09:54:03 +00008923 echo "$as_me: program exited with status $ac_status" >&5
8924echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008925sed 's/^/| /' conftest.$ac_ext >&5
8926
Martin v. Löwis11437992002-04-12 09:54:03 +00008927( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008928if test "$ac_cv_type_float" = yes; then
8929 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008930See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008931echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008932See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008933 { (exit 77); exit 77; }; }
8934 else
8935 ac_cv_sizeof_float=0
8936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008938rm -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 +00008939fi
8940rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008942{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8943echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
8944
8945
8946
Martin v. Löwis11437992002-04-12 09:54:03 +00008947cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008948#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008950
8951
Martin v. Löwiseba40652007-08-30 20:10:57 +00008952{ echo "$as_me:$LINENO: checking for double" >&5
8953echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008954if test "${ac_cv_type_double+set}" = set; then
8955 echo $ECHO_N "(cached) $ECHO_C" >&6
8956else
8957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008958/* confdefs.h. */
8959_ACEOF
8960cat confdefs.h >>conftest.$ac_ext
8961cat >>conftest.$ac_ext <<_ACEOF
8962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008963$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008964typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008965int
8966main ()
8967{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008968if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008970if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 return 0;
8972 ;
8973 return 0;
8974}
8975_ACEOF
8976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977if { (ac_try="$ac_compile"
8978case "(($ac_try" in
8979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8980 *) ac_try_echo=$ac_try;;
8981esac
8982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008985 grep -v '^ *+' conftest.er1 >conftest.err
8986 rm -f conftest.er1
8987 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989 (exit $ac_status); } && {
8990 test -z "$ac_c_werror_flag" ||
8991 test ! -s conftest.err
8992 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 ac_cv_type_double=yes
8994else
8995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008996sed 's/^/| /' conftest.$ac_ext >&5
8997
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008999fi
Brett Cannon19fab762007-06-02 03:02:29 +00009000
Martin v. Löwiseba40652007-08-30 20:10:57 +00009001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9002fi
9003{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9004echo "${ECHO_T}$ac_cv_type_double" >&6; }
9005
9006# The cast to long int works around a bug in the HP C Compiler
9007# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9008# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9009# This bug is HP SR number 8606223364.
9010{ echo "$as_me:$LINENO: checking size of double" >&5
9011echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009012if test "${ac_cv_sizeof_double+set}" = set; then
9013 echo $ECHO_N "(cached) $ECHO_C" >&6
9014else
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 if test "$cross_compiling" = yes; then
9016 # Depending upon the size, compute the lo and hi bounds.
9017cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009018/* confdefs.h. */
9019_ACEOF
9020cat confdefs.h >>conftest.$ac_ext
9021cat >>conftest.$ac_ext <<_ACEOF
9022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009023$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009024 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009025int
9026main ()
9027{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009028static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009029test_array [0] = 0
9030
9031 ;
9032 return 0;
9033}
9034_ACEOF
9035rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036if { (ac_try="$ac_compile"
9037case "(($ac_try" in
9038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9039 *) ac_try_echo=$ac_try;;
9040esac
9041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009044 grep -v '^ *+' conftest.er1 >conftest.err
9045 rm -f conftest.er1
9046 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009048 (exit $ac_status); } && {
9049 test -z "$ac_c_werror_flag" ||
9050 test ! -s conftest.err
9051 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 ac_lo=0 ac_mid=0
9053 while :; do
9054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009055/* confdefs.h. */
9056_ACEOF
9057cat confdefs.h >>conftest.$ac_ext
9058cat >>conftest.$ac_ext <<_ACEOF
9059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009060$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009061 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009062int
9063main ()
9064{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009065static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009066test_array [0] = 0
9067
9068 ;
9069 return 0;
9070}
9071_ACEOF
9072rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009073if { (ac_try="$ac_compile"
9074case "(($ac_try" in
9075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9076 *) ac_try_echo=$ac_try;;
9077esac
9078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9079 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009081 grep -v '^ *+' conftest.er1 >conftest.err
9082 rm -f conftest.er1
9083 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085 (exit $ac_status); } && {
9086 test -z "$ac_c_werror_flag" ||
9087 test ! -s conftest.err
9088 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009089 ac_hi=$ac_mid; break
9090else
9091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009092sed 's/^/| /' conftest.$ac_ext >&5
9093
Martin v. Löwiseba40652007-08-30 20:10:57 +00009094 ac_lo=`expr $ac_mid + 1`
9095 if test $ac_lo -le $ac_mid; then
9096 ac_lo= ac_hi=
9097 break
9098 fi
9099 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009101
9102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 done
9104else
9105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009106sed 's/^/| /' conftest.$ac_ext >&5
9107
Martin v. Löwiseba40652007-08-30 20:10:57 +00009108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009109/* confdefs.h. */
9110_ACEOF
9111cat confdefs.h >>conftest.$ac_ext
9112cat >>conftest.$ac_ext <<_ACEOF
9113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009114$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009115 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009116int
9117main ()
9118{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009119static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009120test_array [0] = 0
9121
9122 ;
9123 return 0;
9124}
9125_ACEOF
9126rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009127if { (ac_try="$ac_compile"
9128case "(($ac_try" in
9129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9130 *) ac_try_echo=$ac_try;;
9131esac
9132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009135 grep -v '^ *+' conftest.er1 >conftest.err
9136 rm -f conftest.er1
9137 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009139 (exit $ac_status); } && {
9140 test -z "$ac_c_werror_flag" ||
9141 test ! -s conftest.err
9142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009143 ac_hi=-1 ac_mid=-1
9144 while :; do
9145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009146/* confdefs.h. */
9147_ACEOF
9148cat confdefs.h >>conftest.$ac_ext
9149cat >>conftest.$ac_ext <<_ACEOF
9150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009151$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009152 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009153int
9154main ()
9155{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009156static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009157test_array [0] = 0
9158
9159 ;
9160 return 0;
9161}
9162_ACEOF
9163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009164if { (ac_try="$ac_compile"
9165case "(($ac_try" in
9166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9167 *) ac_try_echo=$ac_try;;
9168esac
9169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009172 grep -v '^ *+' conftest.er1 >conftest.err
9173 rm -f conftest.er1
9174 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009176 (exit $ac_status); } && {
9177 test -z "$ac_c_werror_flag" ||
9178 test ! -s conftest.err
9179 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 ac_lo=$ac_mid; break
9181else
9182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009183sed 's/^/| /' conftest.$ac_ext >&5
9184
Martin v. Löwiseba40652007-08-30 20:10:57 +00009185 ac_hi=`expr '(' $ac_mid ')' - 1`
9186 if test $ac_mid -le $ac_hi; then
9187 ac_lo= ac_hi=
9188 break
9189 fi
9190 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009192
9193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009194 done
9195else
9196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009197sed 's/^/| /' conftest.$ac_ext >&5
9198
Martin v. Löwiseba40652007-08-30 20:10:57 +00009199 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009201
9202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009204
9205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009206# Binary search between lo and hi bounds.
9207while test "x$ac_lo" != "x$ac_hi"; do
9208 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009210/* confdefs.h. */
9211_ACEOF
9212cat confdefs.h >>conftest.$ac_ext
9213cat >>conftest.$ac_ext <<_ACEOF
9214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009215$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009216 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009217int
9218main ()
9219{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009221test_array [0] = 0
9222
9223 ;
9224 return 0;
9225}
9226_ACEOF
9227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009228if { (ac_try="$ac_compile"
9229case "(($ac_try" in
9230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9231 *) ac_try_echo=$ac_try;;
9232esac
9233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009236 grep -v '^ *+' conftest.er1 >conftest.err
9237 rm -f conftest.er1
9238 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009240 (exit $ac_status); } && {
9241 test -z "$ac_c_werror_flag" ||
9242 test ! -s conftest.err
9243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 ac_hi=$ac_mid
9245else
9246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009247sed 's/^/| /' conftest.$ac_ext >&5
9248
Martin v. Löwiseba40652007-08-30 20:10:57 +00009249 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009251
9252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009253done
9254case $ac_lo in
9255?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009256'') if test "$ac_cv_type_double" = yes; then
9257 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009258See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009259echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009260See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009261 { (exit 77); exit 77; }; }
9262 else
9263 ac_cv_sizeof_double=0
9264 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009265esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009266else
Martin v. Löwis11437992002-04-12 09:54:03 +00009267 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009268/* confdefs.h. */
9269_ACEOF
9270cat confdefs.h >>conftest.$ac_ext
9271cat >>conftest.$ac_ext <<_ACEOF
9272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009273$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009274 typedef double ac__type_sizeof_;
9275static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9276static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009277#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009278#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009279int
9280main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009281{
Martin v. Löwis11437992002-04-12 09:54:03 +00009282
9283 FILE *f = fopen ("conftest.val", "w");
9284 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009285 return 1;
9286 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009288 long int i = longval ();
9289 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9290 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 fprintf (f, "%ld\n", i);
9292 }
9293 else
9294 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009295 unsigned long int i = ulongval ();
9296 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9297 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 fprintf (f, "%lu\n", i);
9299 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009300 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009301
9302 ;
9303 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009304}
Martin v. Löwis11437992002-04-12 09:54:03 +00009305_ACEOF
9306rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009307if { (ac_try="$ac_link"
9308case "(($ac_try" in
9309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9310 *) ac_try_echo=$ac_try;;
9311esac
9312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9313 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 ac_status=$?
9315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009317 { (case "(($ac_try" in
9318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9319 *) ac_try_echo=$ac_try;;
9320esac
9321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9322 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009323 ac_status=$?
9324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9325 (exit $ac_status); }; }; then
9326 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009327else
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 echo "$as_me: program exited with status $ac_status" >&5
9329echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009330sed 's/^/| /' conftest.$ac_ext >&5
9331
Martin v. Löwis11437992002-04-12 09:54:03 +00009332( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009333if test "$ac_cv_type_double" = yes; then
9334 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009335See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009336echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009337See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009338 { (exit 77); exit 77; }; }
9339 else
9340 ac_cv_sizeof_double=0
9341 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009343rm -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 +00009344fi
9345rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009347{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9348echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9349
9350
9351
Martin v. Löwis11437992002-04-12 09:54:03 +00009352cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009353#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009354_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009355
9356
Martin v. Löwiseba40652007-08-30 20:10:57 +00009357{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9358echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009359if test "${ac_cv_type_fpos_t+set}" = set; then
9360 echo $ECHO_N "(cached) $ECHO_C" >&6
9361else
9362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009363/* confdefs.h. */
9364_ACEOF
9365cat confdefs.h >>conftest.$ac_ext
9366cat >>conftest.$ac_ext <<_ACEOF
9367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009368$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009369typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009370int
9371main ()
9372{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009373if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009374 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009375if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 return 0;
9377 ;
9378 return 0;
9379}
9380_ACEOF
9381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009382if { (ac_try="$ac_compile"
9383case "(($ac_try" in
9384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9385 *) ac_try_echo=$ac_try;;
9386esac
9387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009390 grep -v '^ *+' conftest.er1 >conftest.err
9391 rm -f conftest.er1
9392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009394 (exit $ac_status); } && {
9395 test -z "$ac_c_werror_flag" ||
9396 test ! -s conftest.err
9397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009398 ac_cv_type_fpos_t=yes
9399else
9400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009401sed 's/^/| /' conftest.$ac_ext >&5
9402
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009404fi
Brett Cannon19fab762007-06-02 03:02:29 +00009405
Martin v. Löwiseba40652007-08-30 20:10:57 +00009406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9407fi
9408{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9409echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9410
9411# The cast to long int works around a bug in the HP C Compiler
9412# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9413# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9414# This bug is HP SR number 8606223364.
9415{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9416echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009417if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9418 echo $ECHO_N "(cached) $ECHO_C" >&6
9419else
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 if test "$cross_compiling" = yes; then
9421 # Depending upon the size, compute the lo and hi bounds.
9422cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009423/* confdefs.h. */
9424_ACEOF
9425cat confdefs.h >>conftest.$ac_ext
9426cat >>conftest.$ac_ext <<_ACEOF
9427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009428$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009429 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009430int
9431main ()
9432{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009433static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009434test_array [0] = 0
9435
9436 ;
9437 return 0;
9438}
9439_ACEOF
9440rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009441if { (ac_try="$ac_compile"
9442case "(($ac_try" in
9443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9444 *) ac_try_echo=$ac_try;;
9445esac
9446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009449 grep -v '^ *+' conftest.er1 >conftest.err
9450 rm -f conftest.er1
9451 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009453 (exit $ac_status); } && {
9454 test -z "$ac_c_werror_flag" ||
9455 test ! -s conftest.err
9456 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 ac_lo=0 ac_mid=0
9458 while :; do
9459 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009460/* confdefs.h. */
9461_ACEOF
9462cat confdefs.h >>conftest.$ac_ext
9463cat >>conftest.$ac_ext <<_ACEOF
9464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009465$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009466 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009467int
9468main ()
9469{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009470static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009471test_array [0] = 0
9472
9473 ;
9474 return 0;
9475}
9476_ACEOF
9477rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009478if { (ac_try="$ac_compile"
9479case "(($ac_try" in
9480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9481 *) ac_try_echo=$ac_try;;
9482esac
9483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009486 grep -v '^ *+' conftest.er1 >conftest.err
9487 rm -f conftest.er1
9488 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490 (exit $ac_status); } && {
9491 test -z "$ac_c_werror_flag" ||
9492 test ! -s conftest.err
9493 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009494 ac_hi=$ac_mid; break
9495else
9496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009497sed 's/^/| /' conftest.$ac_ext >&5
9498
Martin v. Löwiseba40652007-08-30 20:10:57 +00009499 ac_lo=`expr $ac_mid + 1`
9500 if test $ac_lo -le $ac_mid; then
9501 ac_lo= ac_hi=
9502 break
9503 fi
9504 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009506
9507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 done
9509else
9510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009511sed 's/^/| /' conftest.$ac_ext >&5
9512
Martin v. Löwiseba40652007-08-30 20:10:57 +00009513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009514/* confdefs.h. */
9515_ACEOF
9516cat confdefs.h >>conftest.$ac_ext
9517cat >>conftest.$ac_ext <<_ACEOF
9518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009519$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009520 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009521int
9522main ()
9523{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009524static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009525test_array [0] = 0
9526
9527 ;
9528 return 0;
9529}
9530_ACEOF
9531rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009532if { (ac_try="$ac_compile"
9533case "(($ac_try" in
9534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9535 *) ac_try_echo=$ac_try;;
9536esac
9537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009540 grep -v '^ *+' conftest.er1 >conftest.err
9541 rm -f conftest.er1
9542 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009544 (exit $ac_status); } && {
9545 test -z "$ac_c_werror_flag" ||
9546 test ! -s conftest.err
9547 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 ac_hi=-1 ac_mid=-1
9549 while :; do
9550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009551/* confdefs.h. */
9552_ACEOF
9553cat confdefs.h >>conftest.$ac_ext
9554cat >>conftest.$ac_ext <<_ACEOF
9555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009556$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009557 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009558int
9559main ()
9560{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009561static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009562test_array [0] = 0
9563
9564 ;
9565 return 0;
9566}
9567_ACEOF
9568rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009569if { (ac_try="$ac_compile"
9570case "(($ac_try" in
9571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9572 *) ac_try_echo=$ac_try;;
9573esac
9574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009577 grep -v '^ *+' conftest.er1 >conftest.err
9578 rm -f conftest.er1
9579 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009581 (exit $ac_status); } && {
9582 test -z "$ac_c_werror_flag" ||
9583 test ! -s conftest.err
9584 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 ac_lo=$ac_mid; break
9586else
9587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009588sed 's/^/| /' conftest.$ac_ext >&5
9589
Martin v. Löwiseba40652007-08-30 20:10:57 +00009590 ac_hi=`expr '(' $ac_mid ')' - 1`
9591 if test $ac_mid -le $ac_hi; then
9592 ac_lo= ac_hi=
9593 break
9594 fi
9595 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009597
9598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 done
9600else
9601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009602sed 's/^/| /' conftest.$ac_ext >&5
9603
Martin v. Löwiseba40652007-08-30 20:10:57 +00009604 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606
9607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009609
9610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009611# Binary search between lo and hi bounds.
9612while test "x$ac_lo" != "x$ac_hi"; do
9613 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009615/* confdefs.h. */
9616_ACEOF
9617cat confdefs.h >>conftest.$ac_ext
9618cat >>conftest.$ac_ext <<_ACEOF
9619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009620$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009621 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009622int
9623main ()
9624{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009625static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009626test_array [0] = 0
9627
9628 ;
9629 return 0;
9630}
9631_ACEOF
9632rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009633if { (ac_try="$ac_compile"
9634case "(($ac_try" in
9635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9636 *) ac_try_echo=$ac_try;;
9637esac
9638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009641 grep -v '^ *+' conftest.er1 >conftest.err
9642 rm -f conftest.er1
9643 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009645 (exit $ac_status); } && {
9646 test -z "$ac_c_werror_flag" ||
9647 test ! -s conftest.err
9648 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 ac_hi=$ac_mid
9650else
9651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009652sed 's/^/| /' conftest.$ac_ext >&5
9653
Martin v. Löwiseba40652007-08-30 20:10:57 +00009654 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009656
9657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009658done
9659case $ac_lo in
9660?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009661'') if test "$ac_cv_type_fpos_t" = yes; then
9662 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009663See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009664echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009665See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009666 { (exit 77); exit 77; }; }
9667 else
9668 ac_cv_sizeof_fpos_t=0
9669 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009670esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009671else
Martin v. Löwis11437992002-04-12 09:54:03 +00009672 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009673/* confdefs.h. */
9674_ACEOF
9675cat confdefs.h >>conftest.$ac_ext
9676cat >>conftest.$ac_ext <<_ACEOF
9677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009678$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009679 typedef fpos_t ac__type_sizeof_;
9680static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9681static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009682#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009683#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009684int
9685main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009686{
Martin v. Löwis11437992002-04-12 09:54:03 +00009687
9688 FILE *f = fopen ("conftest.val", "w");
9689 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009690 return 1;
9691 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009693 long int i = longval ();
9694 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9695 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 fprintf (f, "%ld\n", i);
9697 }
9698 else
9699 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009700 unsigned long int i = ulongval ();
9701 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9702 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 fprintf (f, "%lu\n", i);
9704 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009705 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009706
9707 ;
9708 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009709}
Martin v. Löwis11437992002-04-12 09:54:03 +00009710_ACEOF
9711rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009712if { (ac_try="$ac_link"
9713case "(($ac_try" in
9714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9715 *) ac_try_echo=$ac_try;;
9716esac
9717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9718 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 ac_status=$?
9720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9721 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009722 { (case "(($ac_try" in
9723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9724 *) ac_try_echo=$ac_try;;
9725esac
9726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9727 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 ac_status=$?
9729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9730 (exit $ac_status); }; }; then
9731 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009732else
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 echo "$as_me: program exited with status $ac_status" >&5
9734echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009735sed 's/^/| /' conftest.$ac_ext >&5
9736
Martin v. Löwis11437992002-04-12 09:54:03 +00009737( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009738if test "$ac_cv_type_fpos_t" = yes; then
9739 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009740See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009741echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009742See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009743 { (exit 77); exit 77; }; }
9744 else
9745 ac_cv_sizeof_fpos_t=0
9746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009748rm -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 +00009749fi
9750rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009752{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9753echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9754
9755
9756
Martin v. Löwis11437992002-04-12 09:54:03 +00009757cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009758#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009759_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009760
Michael W. Hudson54241132001-12-07 15:38:26 +00009761
Martin v. Löwiseba40652007-08-30 20:10:57 +00009762{ echo "$as_me:$LINENO: checking for size_t" >&5
9763echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009764if test "${ac_cv_type_size_t+set}" = set; then
9765 echo $ECHO_N "(cached) $ECHO_C" >&6
9766else
9767 cat >conftest.$ac_ext <<_ACEOF
9768/* confdefs.h. */
9769_ACEOF
9770cat confdefs.h >>conftest.$ac_ext
9771cat >>conftest.$ac_ext <<_ACEOF
9772/* end confdefs.h. */
9773$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009774typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009775int
9776main ()
9777{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009778if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009779 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009780if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009781 return 0;
9782 ;
9783 return 0;
9784}
9785_ACEOF
9786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009787if { (ac_try="$ac_compile"
9788case "(($ac_try" in
9789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9790 *) ac_try_echo=$ac_try;;
9791esac
9792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009794 ac_status=$?
9795 grep -v '^ *+' conftest.er1 >conftest.err
9796 rm -f conftest.er1
9797 cat conftest.err >&5
9798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009799 (exit $ac_status); } && {
9800 test -z "$ac_c_werror_flag" ||
9801 test ! -s conftest.err
9802 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009803 ac_cv_type_size_t=yes
9804else
9805 echo "$as_me: failed program was:" >&5
9806sed 's/^/| /' conftest.$ac_ext >&5
9807
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009809fi
Brett Cannon19fab762007-06-02 03:02:29 +00009810
Martin v. Löwiseba40652007-08-30 20:10:57 +00009811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9812fi
9813{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9814echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9815
9816# The cast to long int works around a bug in the HP C Compiler
9817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9819# This bug is HP SR number 8606223364.
9820{ echo "$as_me:$LINENO: checking size of size_t" >&5
9821echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009822if test "${ac_cv_sizeof_size_t+set}" = set; then
9823 echo $ECHO_N "(cached) $ECHO_C" >&6
9824else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009825 if test "$cross_compiling" = yes; then
9826 # Depending upon the size, compute the lo and hi bounds.
9827cat >conftest.$ac_ext <<_ACEOF
9828/* confdefs.h. */
9829_ACEOF
9830cat confdefs.h >>conftest.$ac_ext
9831cat >>conftest.$ac_ext <<_ACEOF
9832/* end confdefs.h. */
9833$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009834 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009835int
9836main ()
9837{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009838static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009839test_array [0] = 0
9840
9841 ;
9842 return 0;
9843}
9844_ACEOF
9845rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009846if { (ac_try="$ac_compile"
9847case "(($ac_try" in
9848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9849 *) ac_try_echo=$ac_try;;
9850esac
9851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9852 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009853 ac_status=$?
9854 grep -v '^ *+' conftest.er1 >conftest.err
9855 rm -f conftest.er1
9856 cat conftest.err >&5
9857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009858 (exit $ac_status); } && {
9859 test -z "$ac_c_werror_flag" ||
9860 test ! -s conftest.err
9861 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009862 ac_lo=0 ac_mid=0
9863 while :; do
9864 cat >conftest.$ac_ext <<_ACEOF
9865/* confdefs.h. */
9866_ACEOF
9867cat confdefs.h >>conftest.$ac_ext
9868cat >>conftest.$ac_ext <<_ACEOF
9869/* end confdefs.h. */
9870$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009871 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009872int
9873main ()
9874{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009875static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009876test_array [0] = 0
9877
9878 ;
9879 return 0;
9880}
9881_ACEOF
9882rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009883if { (ac_try="$ac_compile"
9884case "(($ac_try" in
9885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9886 *) ac_try_echo=$ac_try;;
9887esac
9888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009890 ac_status=$?
9891 grep -v '^ *+' conftest.er1 >conftest.err
9892 rm -f conftest.er1
9893 cat conftest.err >&5
9894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895 (exit $ac_status); } && {
9896 test -z "$ac_c_werror_flag" ||
9897 test ! -s conftest.err
9898 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009899 ac_hi=$ac_mid; break
9900else
9901 echo "$as_me: failed program was:" >&5
9902sed 's/^/| /' conftest.$ac_ext >&5
9903
Martin v. Löwiseba40652007-08-30 20:10:57 +00009904 ac_lo=`expr $ac_mid + 1`
9905 if test $ac_lo -le $ac_mid; then
9906 ac_lo= ac_hi=
9907 break
9908 fi
9909 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009911
9912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009913 done
9914else
9915 echo "$as_me: failed program was:" >&5
9916sed 's/^/| /' conftest.$ac_ext >&5
9917
Martin v. Löwiseba40652007-08-30 20:10:57 +00009918 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009919/* confdefs.h. */
9920_ACEOF
9921cat confdefs.h >>conftest.$ac_ext
9922cat >>conftest.$ac_ext <<_ACEOF
9923/* end confdefs.h. */
9924$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009925 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009926int
9927main ()
9928{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009929static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009930test_array [0] = 0
9931
9932 ;
9933 return 0;
9934}
9935_ACEOF
9936rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009937if { (ac_try="$ac_compile"
9938case "(($ac_try" in
9939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9940 *) ac_try_echo=$ac_try;;
9941esac
9942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9943 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009944 ac_status=$?
9945 grep -v '^ *+' conftest.er1 >conftest.err
9946 rm -f conftest.er1
9947 cat conftest.err >&5
9948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009949 (exit $ac_status); } && {
9950 test -z "$ac_c_werror_flag" ||
9951 test ! -s conftest.err
9952 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009953 ac_hi=-1 ac_mid=-1
9954 while :; do
9955 cat >conftest.$ac_ext <<_ACEOF
9956/* confdefs.h. */
9957_ACEOF
9958cat confdefs.h >>conftest.$ac_ext
9959cat >>conftest.$ac_ext <<_ACEOF
9960/* end confdefs.h. */
9961$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009962 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009963int
9964main ()
9965{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009966static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009967test_array [0] = 0
9968
9969 ;
9970 return 0;
9971}
9972_ACEOF
9973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009974if { (ac_try="$ac_compile"
9975case "(($ac_try" in
9976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9977 *) ac_try_echo=$ac_try;;
9978esac
9979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009981 ac_status=$?
9982 grep -v '^ *+' conftest.er1 >conftest.err
9983 rm -f conftest.er1
9984 cat conftest.err >&5
9985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009986 (exit $ac_status); } && {
9987 test -z "$ac_c_werror_flag" ||
9988 test ! -s conftest.err
9989 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009990 ac_lo=$ac_mid; break
9991else
9992 echo "$as_me: failed program was:" >&5
9993sed 's/^/| /' conftest.$ac_ext >&5
9994
Martin v. Löwiseba40652007-08-30 20:10:57 +00009995 ac_hi=`expr '(' $ac_mid ')' - 1`
9996 if test $ac_mid -le $ac_hi; then
9997 ac_lo= ac_hi=
9998 break
9999 fi
10000 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010002
10003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010004 done
10005else
10006 echo "$as_me: failed program was:" >&5
10007sed 's/^/| /' conftest.$ac_ext >&5
10008
Martin v. Löwiseba40652007-08-30 20:10:57 +000010009 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010011
10012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010013fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010014
10015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010016# Binary search between lo and hi bounds.
10017while test "x$ac_lo" != "x$ac_hi"; do
10018 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10019 cat >conftest.$ac_ext <<_ACEOF
10020/* confdefs.h. */
10021_ACEOF
10022cat confdefs.h >>conftest.$ac_ext
10023cat >>conftest.$ac_ext <<_ACEOF
10024/* end confdefs.h. */
10025$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010026 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010027int
10028main ()
10029{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010030static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010031test_array [0] = 0
10032
10033 ;
10034 return 0;
10035}
10036_ACEOF
10037rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010038if { (ac_try="$ac_compile"
10039case "(($ac_try" in
10040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10041 *) ac_try_echo=$ac_try;;
10042esac
10043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010045 ac_status=$?
10046 grep -v '^ *+' conftest.er1 >conftest.err
10047 rm -f conftest.er1
10048 cat conftest.err >&5
10049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010050 (exit $ac_status); } && {
10051 test -z "$ac_c_werror_flag" ||
10052 test ! -s conftest.err
10053 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010054 ac_hi=$ac_mid
10055else
10056 echo "$as_me: failed program was:" >&5
10057sed 's/^/| /' conftest.$ac_ext >&5
10058
Martin v. Löwiseba40652007-08-30 20:10:57 +000010059 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010061
10062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010063done
10064case $ac_lo in
10065?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010066'') if test "$ac_cv_type_size_t" = yes; then
10067 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010068See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010069echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010070See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010071 { (exit 77); exit 77; }; }
10072 else
10073 ac_cv_sizeof_size_t=0
10074 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010075esac
10076else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010077 cat >conftest.$ac_ext <<_ACEOF
10078/* confdefs.h. */
10079_ACEOF
10080cat confdefs.h >>conftest.$ac_ext
10081cat >>conftest.$ac_ext <<_ACEOF
10082/* end confdefs.h. */
10083$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010084 typedef size_t ac__type_sizeof_;
10085static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10086static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010087#include <stdio.h>
10088#include <stdlib.h>
10089int
10090main ()
10091{
10092
10093 FILE *f = fopen ("conftest.val", "w");
10094 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010095 return 1;
10096 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010097 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010098 long int i = longval ();
10099 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10100 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010101 fprintf (f, "%ld\n", i);
10102 }
10103 else
10104 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010105 unsigned long int i = ulongval ();
10106 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10107 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010108 fprintf (f, "%lu\n", i);
10109 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010110 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010111
10112 ;
10113 return 0;
10114}
10115_ACEOF
10116rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010117if { (ac_try="$ac_link"
10118case "(($ac_try" in
10119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10120 *) ac_try_echo=$ac_try;;
10121esac
10122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10123 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010124 ac_status=$?
10125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10126 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010127 { (case "(($ac_try" in
10128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10129 *) ac_try_echo=$ac_try;;
10130esac
10131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10132 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010133 ac_status=$?
10134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10135 (exit $ac_status); }; }; then
10136 ac_cv_sizeof_size_t=`cat conftest.val`
10137else
10138 echo "$as_me: program exited with status $ac_status" >&5
10139echo "$as_me: failed program was:" >&5
10140sed 's/^/| /' conftest.$ac_ext >&5
10141
10142( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010143if test "$ac_cv_type_size_t" = yes; then
10144 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010145See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010146echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010147See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010148 { (exit 77); exit 77; }; }
10149 else
10150 ac_cv_sizeof_size_t=0
10151 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010153rm -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 +000010154fi
10155rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010157{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10158echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10159
10160
10161
Martin v. Löwis18e16552006-02-15 17:27:45 +000010162cat >>confdefs.h <<_ACEOF
10163#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10164_ACEOF
10165
10166
Christian Heimes951cc0f2008-01-31 23:08:23 +000010167{ echo "$as_me:$LINENO: checking for pid_t" >&5
10168echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10169if test "${ac_cv_type_pid_t+set}" = set; then
10170 echo $ECHO_N "(cached) $ECHO_C" >&6
10171else
10172 cat >conftest.$ac_ext <<_ACEOF
10173/* confdefs.h. */
10174_ACEOF
10175cat confdefs.h >>conftest.$ac_ext
10176cat >>conftest.$ac_ext <<_ACEOF
10177/* end confdefs.h. */
10178$ac_includes_default
10179typedef pid_t ac__type_new_;
10180int
10181main ()
10182{
10183if ((ac__type_new_ *) 0)
10184 return 0;
10185if (sizeof (ac__type_new_))
10186 return 0;
10187 ;
10188 return 0;
10189}
10190_ACEOF
10191rm -f conftest.$ac_objext
10192if { (ac_try="$ac_compile"
10193case "(($ac_try" in
10194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10195 *) ac_try_echo=$ac_try;;
10196esac
10197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10198 (eval "$ac_compile") 2>conftest.er1
10199 ac_status=$?
10200 grep -v '^ *+' conftest.er1 >conftest.err
10201 rm -f conftest.er1
10202 cat conftest.err >&5
10203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10204 (exit $ac_status); } && {
10205 test -z "$ac_c_werror_flag" ||
10206 test ! -s conftest.err
10207 } && test -s conftest.$ac_objext; then
10208 ac_cv_type_pid_t=yes
10209else
10210 echo "$as_me: failed program was:" >&5
10211sed 's/^/| /' conftest.$ac_ext >&5
10212
10213 ac_cv_type_pid_t=no
10214fi
10215
10216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10217fi
10218{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10219echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10220
10221# The cast to long int works around a bug in the HP C Compiler
10222# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10223# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10224# This bug is HP SR number 8606223364.
10225{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10226echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10227if test "${ac_cv_sizeof_pid_t+set}" = set; then
10228 echo $ECHO_N "(cached) $ECHO_C" >&6
10229else
10230 if test "$cross_compiling" = yes; then
10231 # Depending upon the size, compute the lo and hi bounds.
10232cat >conftest.$ac_ext <<_ACEOF
10233/* confdefs.h. */
10234_ACEOF
10235cat confdefs.h >>conftest.$ac_ext
10236cat >>conftest.$ac_ext <<_ACEOF
10237/* end confdefs.h. */
10238$ac_includes_default
10239 typedef pid_t ac__type_sizeof_;
10240int
10241main ()
10242{
10243static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10244test_array [0] = 0
10245
10246 ;
10247 return 0;
10248}
10249_ACEOF
10250rm -f conftest.$ac_objext
10251if { (ac_try="$ac_compile"
10252case "(($ac_try" in
10253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10254 *) ac_try_echo=$ac_try;;
10255esac
10256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10257 (eval "$ac_compile") 2>conftest.er1
10258 ac_status=$?
10259 grep -v '^ *+' conftest.er1 >conftest.err
10260 rm -f conftest.er1
10261 cat conftest.err >&5
10262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10263 (exit $ac_status); } && {
10264 test -z "$ac_c_werror_flag" ||
10265 test ! -s conftest.err
10266 } && test -s conftest.$ac_objext; then
10267 ac_lo=0 ac_mid=0
10268 while :; do
10269 cat >conftest.$ac_ext <<_ACEOF
10270/* confdefs.h. */
10271_ACEOF
10272cat confdefs.h >>conftest.$ac_ext
10273cat >>conftest.$ac_ext <<_ACEOF
10274/* end confdefs.h. */
10275$ac_includes_default
10276 typedef pid_t ac__type_sizeof_;
10277int
10278main ()
10279{
10280static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10281test_array [0] = 0
10282
10283 ;
10284 return 0;
10285}
10286_ACEOF
10287rm -f conftest.$ac_objext
10288if { (ac_try="$ac_compile"
10289case "(($ac_try" in
10290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10291 *) ac_try_echo=$ac_try;;
10292esac
10293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10294 (eval "$ac_compile") 2>conftest.er1
10295 ac_status=$?
10296 grep -v '^ *+' conftest.er1 >conftest.err
10297 rm -f conftest.er1
10298 cat conftest.err >&5
10299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10300 (exit $ac_status); } && {
10301 test -z "$ac_c_werror_flag" ||
10302 test ! -s conftest.err
10303 } && test -s conftest.$ac_objext; then
10304 ac_hi=$ac_mid; break
10305else
10306 echo "$as_me: failed program was:" >&5
10307sed 's/^/| /' conftest.$ac_ext >&5
10308
10309 ac_lo=`expr $ac_mid + 1`
10310 if test $ac_lo -le $ac_mid; then
10311 ac_lo= ac_hi=
10312 break
10313 fi
10314 ac_mid=`expr 2 '*' $ac_mid + 1`
10315fi
10316
10317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10318 done
10319else
10320 echo "$as_me: failed program was:" >&5
10321sed 's/^/| /' conftest.$ac_ext >&5
10322
10323 cat >conftest.$ac_ext <<_ACEOF
10324/* confdefs.h. */
10325_ACEOF
10326cat confdefs.h >>conftest.$ac_ext
10327cat >>conftest.$ac_ext <<_ACEOF
10328/* end confdefs.h. */
10329$ac_includes_default
10330 typedef pid_t ac__type_sizeof_;
10331int
10332main ()
10333{
10334static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10335test_array [0] = 0
10336
10337 ;
10338 return 0;
10339}
10340_ACEOF
10341rm -f conftest.$ac_objext
10342if { (ac_try="$ac_compile"
10343case "(($ac_try" in
10344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10345 *) ac_try_echo=$ac_try;;
10346esac
10347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10348 (eval "$ac_compile") 2>conftest.er1
10349 ac_status=$?
10350 grep -v '^ *+' conftest.er1 >conftest.err
10351 rm -f conftest.er1
10352 cat conftest.err >&5
10353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10354 (exit $ac_status); } && {
10355 test -z "$ac_c_werror_flag" ||
10356 test ! -s conftest.err
10357 } && test -s conftest.$ac_objext; then
10358 ac_hi=-1 ac_mid=-1
10359 while :; do
10360 cat >conftest.$ac_ext <<_ACEOF
10361/* confdefs.h. */
10362_ACEOF
10363cat confdefs.h >>conftest.$ac_ext
10364cat >>conftest.$ac_ext <<_ACEOF
10365/* end confdefs.h. */
10366$ac_includes_default
10367 typedef pid_t ac__type_sizeof_;
10368int
10369main ()
10370{
10371static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10372test_array [0] = 0
10373
10374 ;
10375 return 0;
10376}
10377_ACEOF
10378rm -f conftest.$ac_objext
10379if { (ac_try="$ac_compile"
10380case "(($ac_try" in
10381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10382 *) ac_try_echo=$ac_try;;
10383esac
10384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10385 (eval "$ac_compile") 2>conftest.er1
10386 ac_status=$?
10387 grep -v '^ *+' conftest.er1 >conftest.err
10388 rm -f conftest.er1
10389 cat conftest.err >&5
10390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10391 (exit $ac_status); } && {
10392 test -z "$ac_c_werror_flag" ||
10393 test ! -s conftest.err
10394 } && test -s conftest.$ac_objext; then
10395 ac_lo=$ac_mid; break
10396else
10397 echo "$as_me: failed program was:" >&5
10398sed 's/^/| /' conftest.$ac_ext >&5
10399
10400 ac_hi=`expr '(' $ac_mid ')' - 1`
10401 if test $ac_mid -le $ac_hi; then
10402 ac_lo= ac_hi=
10403 break
10404 fi
10405 ac_mid=`expr 2 '*' $ac_mid`
10406fi
10407
10408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10409 done
10410else
10411 echo "$as_me: failed program was:" >&5
10412sed 's/^/| /' conftest.$ac_ext >&5
10413
10414 ac_lo= ac_hi=
10415fi
10416
10417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10418fi
10419
10420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10421# Binary search between lo and hi bounds.
10422while test "x$ac_lo" != "x$ac_hi"; do
10423 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10424 cat >conftest.$ac_ext <<_ACEOF
10425/* confdefs.h. */
10426_ACEOF
10427cat confdefs.h >>conftest.$ac_ext
10428cat >>conftest.$ac_ext <<_ACEOF
10429/* end confdefs.h. */
10430$ac_includes_default
10431 typedef pid_t ac__type_sizeof_;
10432int
10433main ()
10434{
10435static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10436test_array [0] = 0
10437
10438 ;
10439 return 0;
10440}
10441_ACEOF
10442rm -f conftest.$ac_objext
10443if { (ac_try="$ac_compile"
10444case "(($ac_try" in
10445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10446 *) ac_try_echo=$ac_try;;
10447esac
10448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10449 (eval "$ac_compile") 2>conftest.er1
10450 ac_status=$?
10451 grep -v '^ *+' conftest.er1 >conftest.err
10452 rm -f conftest.er1
10453 cat conftest.err >&5
10454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10455 (exit $ac_status); } && {
10456 test -z "$ac_c_werror_flag" ||
10457 test ! -s conftest.err
10458 } && test -s conftest.$ac_objext; then
10459 ac_hi=$ac_mid
10460else
10461 echo "$as_me: failed program was:" >&5
10462sed 's/^/| /' conftest.$ac_ext >&5
10463
10464 ac_lo=`expr '(' $ac_mid ')' + 1`
10465fi
10466
10467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10468done
10469case $ac_lo in
10470?*) ac_cv_sizeof_pid_t=$ac_lo;;
10471'') if test "$ac_cv_type_pid_t" = yes; then
10472 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10473See \`config.log' for more details." >&5
10474echo "$as_me: error: cannot compute sizeof (pid_t)
10475See \`config.log' for more details." >&2;}
10476 { (exit 77); exit 77; }; }
10477 else
10478 ac_cv_sizeof_pid_t=0
10479 fi ;;
10480esac
10481else
10482 cat >conftest.$ac_ext <<_ACEOF
10483/* confdefs.h. */
10484_ACEOF
10485cat confdefs.h >>conftest.$ac_ext
10486cat >>conftest.$ac_ext <<_ACEOF
10487/* end confdefs.h. */
10488$ac_includes_default
10489 typedef pid_t ac__type_sizeof_;
10490static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10491static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10492#include <stdio.h>
10493#include <stdlib.h>
10494int
10495main ()
10496{
10497
10498 FILE *f = fopen ("conftest.val", "w");
10499 if (! f)
10500 return 1;
10501 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10502 {
10503 long int i = longval ();
10504 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10505 return 1;
10506 fprintf (f, "%ld\n", i);
10507 }
10508 else
10509 {
10510 unsigned long int i = ulongval ();
10511 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10512 return 1;
10513 fprintf (f, "%lu\n", i);
10514 }
10515 return ferror (f) || fclose (f) != 0;
10516
10517 ;
10518 return 0;
10519}
10520_ACEOF
10521rm -f conftest$ac_exeext
10522if { (ac_try="$ac_link"
10523case "(($ac_try" in
10524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10525 *) ac_try_echo=$ac_try;;
10526esac
10527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10528 (eval "$ac_link") 2>&5
10529 ac_status=$?
10530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10531 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10532 { (case "(($ac_try" in
10533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10534 *) ac_try_echo=$ac_try;;
10535esac
10536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10537 (eval "$ac_try") 2>&5
10538 ac_status=$?
10539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10540 (exit $ac_status); }; }; then
10541 ac_cv_sizeof_pid_t=`cat conftest.val`
10542else
10543 echo "$as_me: program exited with status $ac_status" >&5
10544echo "$as_me: failed program was:" >&5
10545sed 's/^/| /' conftest.$ac_ext >&5
10546
10547( exit $ac_status )
10548if test "$ac_cv_type_pid_t" = yes; then
10549 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10550See \`config.log' for more details." >&5
10551echo "$as_me: error: cannot compute sizeof (pid_t)
10552See \`config.log' for more details." >&2;}
10553 { (exit 77); exit 77; }; }
10554 else
10555 ac_cv_sizeof_pid_t=0
10556 fi
10557fi
10558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10559fi
10560rm -f conftest.val
10561fi
10562{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10563echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10564
10565
10566
10567cat >>confdefs.h <<_ACEOF
10568#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10569_ACEOF
10570
10571
Michael W. Hudson54241132001-12-07 15:38:26 +000010572
Martin v. Löwiseba40652007-08-30 20:10:57 +000010573{ echo "$as_me:$LINENO: checking for long long support" >&5
10574echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010575have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010577/* confdefs.h. */
10578_ACEOF
10579cat confdefs.h >>conftest.$ac_ext
10580cat >>conftest.$ac_ext <<_ACEOF
10581/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010582
Martin v. Löwis11437992002-04-12 09:54:03 +000010583int
10584main ()
10585{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010586long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 ;
10588 return 0;
10589}
10590_ACEOF
10591rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010592if { (ac_try="$ac_compile"
10593case "(($ac_try" in
10594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10595 *) ac_try_echo=$ac_try;;
10596esac
10597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010600 grep -v '^ *+' conftest.er1 >conftest.err
10601 rm -f conftest.er1
10602 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010604 (exit $ac_status); } && {
10605 test -z "$ac_c_werror_flag" ||
10606 test ! -s conftest.err
10607 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010608
10609
10610cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010611#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010612_ACEOF
10613
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010614 have_long_long=yes
10615
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010616else
Martin v. Löwis11437992002-04-12 09:54:03 +000010617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010618sed 's/^/| /' conftest.$ac_ext >&5
10619
Martin v. Löwiseba40652007-08-30 20:10:57 +000010620
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010622
10623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10624{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10625echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010626if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010627{ echo "$as_me:$LINENO: checking for long long" >&5
10628echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010629if test "${ac_cv_type_long_long+set}" = set; then
10630 echo $ECHO_N "(cached) $ECHO_C" >&6
10631else
10632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010633/* confdefs.h. */
10634_ACEOF
10635cat confdefs.h >>conftest.$ac_ext
10636cat >>conftest.$ac_ext <<_ACEOF
10637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010638$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010639typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010640int
10641main ()
10642{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010643if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010644 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010645if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010646 return 0;
10647 ;
10648 return 0;
10649}
10650_ACEOF
10651rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010652if { (ac_try="$ac_compile"
10653case "(($ac_try" in
10654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10655 *) ac_try_echo=$ac_try;;
10656esac
10657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010660 grep -v '^ *+' conftest.er1 >conftest.err
10661 rm -f conftest.er1
10662 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010664 (exit $ac_status); } && {
10665 test -z "$ac_c_werror_flag" ||
10666 test ! -s conftest.err
10667 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010668 ac_cv_type_long_long=yes
10669else
10670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010671sed 's/^/| /' conftest.$ac_ext >&5
10672
Martin v. Löwiseba40652007-08-30 20:10:57 +000010673 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010674fi
Brett Cannon19fab762007-06-02 03:02:29 +000010675
Martin v. Löwiseba40652007-08-30 20:10:57 +000010676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10677fi
10678{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10679echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10680
10681# The cast to long int works around a bug in the HP C Compiler
10682# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10683# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10684# This bug is HP SR number 8606223364.
10685{ echo "$as_me:$LINENO: checking size of long long" >&5
10686echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010687if test "${ac_cv_sizeof_long_long+set}" = set; then
10688 echo $ECHO_N "(cached) $ECHO_C" >&6
10689else
Martin v. Löwis11437992002-04-12 09:54:03 +000010690 if test "$cross_compiling" = yes; then
10691 # Depending upon the size, compute the lo and hi bounds.
10692cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010693/* confdefs.h. */
10694_ACEOF
10695cat confdefs.h >>conftest.$ac_ext
10696cat >>conftest.$ac_ext <<_ACEOF
10697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010698$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010699 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010700int
10701main ()
10702{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010703static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010704test_array [0] = 0
10705
10706 ;
10707 return 0;
10708}
10709_ACEOF
10710rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010711if { (ac_try="$ac_compile"
10712case "(($ac_try" in
10713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10714 *) ac_try_echo=$ac_try;;
10715esac
10716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010719 grep -v '^ *+' conftest.er1 >conftest.err
10720 rm -f conftest.er1
10721 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010723 (exit $ac_status); } && {
10724 test -z "$ac_c_werror_flag" ||
10725 test ! -s conftest.err
10726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010727 ac_lo=0 ac_mid=0
10728 while :; do
10729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010730/* confdefs.h. */
10731_ACEOF
10732cat confdefs.h >>conftest.$ac_ext
10733cat >>conftest.$ac_ext <<_ACEOF
10734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010735$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010736 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010737int
10738main ()
10739{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010740static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010741test_array [0] = 0
10742
10743 ;
10744 return 0;
10745}
10746_ACEOF
10747rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010748if { (ac_try="$ac_compile"
10749case "(($ac_try" in
10750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10751 *) ac_try_echo=$ac_try;;
10752esac
10753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10754 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010756 grep -v '^ *+' conftest.er1 >conftest.err
10757 rm -f conftest.er1
10758 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010760 (exit $ac_status); } && {
10761 test -z "$ac_c_werror_flag" ||
10762 test ! -s conftest.err
10763 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010764 ac_hi=$ac_mid; break
10765else
10766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010767sed 's/^/| /' conftest.$ac_ext >&5
10768
Martin v. Löwiseba40652007-08-30 20:10:57 +000010769 ac_lo=`expr $ac_mid + 1`
10770 if test $ac_lo -le $ac_mid; then
10771 ac_lo= ac_hi=
10772 break
10773 fi
10774 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010776
10777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 done
10779else
10780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010781sed 's/^/| /' conftest.$ac_ext >&5
10782
Martin v. Löwiseba40652007-08-30 20:10:57 +000010783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010784/* confdefs.h. */
10785_ACEOF
10786cat confdefs.h >>conftest.$ac_ext
10787cat >>conftest.$ac_ext <<_ACEOF
10788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010789$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010790 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010791int
10792main ()
10793{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010794static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010795test_array [0] = 0
10796
10797 ;
10798 return 0;
10799}
10800_ACEOF
10801rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010802if { (ac_try="$ac_compile"
10803case "(($ac_try" in
10804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10805 *) ac_try_echo=$ac_try;;
10806esac
10807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10808 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010810 grep -v '^ *+' conftest.er1 >conftest.err
10811 rm -f conftest.er1
10812 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010814 (exit $ac_status); } && {
10815 test -z "$ac_c_werror_flag" ||
10816 test ! -s conftest.err
10817 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 ac_hi=-1 ac_mid=-1
10819 while :; do
10820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010821/* confdefs.h. */
10822_ACEOF
10823cat confdefs.h >>conftest.$ac_ext
10824cat >>conftest.$ac_ext <<_ACEOF
10825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010826$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010827 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010828int
10829main ()
10830{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010831static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010832test_array [0] = 0
10833
10834 ;
10835 return 0;
10836}
10837_ACEOF
10838rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010839if { (ac_try="$ac_compile"
10840case "(($ac_try" in
10841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10842 *) ac_try_echo=$ac_try;;
10843esac
10844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010847 grep -v '^ *+' conftest.er1 >conftest.err
10848 rm -f conftest.er1
10849 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010851 (exit $ac_status); } && {
10852 test -z "$ac_c_werror_flag" ||
10853 test ! -s conftest.err
10854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 ac_lo=$ac_mid; break
10856else
10857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010858sed 's/^/| /' conftest.$ac_ext >&5
10859
Martin v. Löwiseba40652007-08-30 20:10:57 +000010860 ac_hi=`expr '(' $ac_mid ')' - 1`
10861 if test $ac_mid -le $ac_hi; then
10862 ac_lo= ac_hi=
10863 break
10864 fi
10865 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010867
10868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010869 done
10870else
10871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010872sed 's/^/| /' conftest.$ac_ext >&5
10873
Martin v. Löwiseba40652007-08-30 20:10:57 +000010874 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010876
10877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010879
10880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010881# Binary search between lo and hi bounds.
10882while test "x$ac_lo" != "x$ac_hi"; do
10883 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010885/* confdefs.h. */
10886_ACEOF
10887cat confdefs.h >>conftest.$ac_ext
10888cat >>conftest.$ac_ext <<_ACEOF
10889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010890$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010891 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010892int
10893main ()
10894{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010895static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010896test_array [0] = 0
10897
10898 ;
10899 return 0;
10900}
10901_ACEOF
10902rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010903if { (ac_try="$ac_compile"
10904case "(($ac_try" in
10905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10906 *) ac_try_echo=$ac_try;;
10907esac
10908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010911 grep -v '^ *+' conftest.er1 >conftest.err
10912 rm -f conftest.er1
10913 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010915 (exit $ac_status); } && {
10916 test -z "$ac_c_werror_flag" ||
10917 test ! -s conftest.err
10918 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010919 ac_hi=$ac_mid
10920else
10921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010922sed 's/^/| /' conftest.$ac_ext >&5
10923
Martin v. Löwiseba40652007-08-30 20:10:57 +000010924 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010926
10927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010928done
10929case $ac_lo in
10930?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010931'') if test "$ac_cv_type_long_long" = yes; then
10932 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010933See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010934echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010935See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010936 { (exit 77); exit 77; }; }
10937 else
10938 ac_cv_sizeof_long_long=0
10939 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010940esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010941else
Martin v. Löwis11437992002-04-12 09:54:03 +000010942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010943/* confdefs.h. */
10944_ACEOF
10945cat confdefs.h >>conftest.$ac_ext
10946cat >>conftest.$ac_ext <<_ACEOF
10947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010948$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010949 typedef long long ac__type_sizeof_;
10950static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10951static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010952#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010953#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010954int
10955main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010956{
Martin v. Löwis11437992002-04-12 09:54:03 +000010957
10958 FILE *f = fopen ("conftest.val", "w");
10959 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010960 return 1;
10961 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010963 long int i = longval ();
10964 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10965 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010966 fprintf (f, "%ld\n", i);
10967 }
10968 else
10969 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010970 unsigned long int i = ulongval ();
10971 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10972 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 fprintf (f, "%lu\n", i);
10974 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010975 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010976
10977 ;
10978 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010979}
Martin v. Löwis11437992002-04-12 09:54:03 +000010980_ACEOF
10981rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010982if { (ac_try="$ac_link"
10983case "(($ac_try" in
10984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10985 *) ac_try_echo=$ac_try;;
10986esac
10987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10988 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010989 ac_status=$?
10990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10991 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010992 { (case "(($ac_try" in
10993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10994 *) ac_try_echo=$ac_try;;
10995esac
10996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10997 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 ac_status=$?
10999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11000 (exit $ac_status); }; }; then
11001 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011002else
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 echo "$as_me: program exited with status $ac_status" >&5
11004echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011005sed 's/^/| /' conftest.$ac_ext >&5
11006
Martin v. Löwis11437992002-04-12 09:54:03 +000011007( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011008if test "$ac_cv_type_long_long" = yes; then
11009 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011010See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011011echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011012See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011013 { (exit 77); exit 77; }; }
11014 else
11015 ac_cv_sizeof_long_long=0
11016 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011018rm -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 +000011019fi
11020rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011022{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11023echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11024
11025
11026
Martin v. Löwis11437992002-04-12 09:54:03 +000011027cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011028#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011029_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011030
Michael W. Hudson54241132001-12-07 15:38:26 +000011031
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011032fi
11033
Martin v. Löwiseba40652007-08-30 20:10:57 +000011034{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11035echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011036have_c99_bool=no
11037cat >conftest.$ac_ext <<_ACEOF
11038/* confdefs.h. */
11039_ACEOF
11040cat confdefs.h >>conftest.$ac_ext
11041cat >>conftest.$ac_ext <<_ACEOF
11042/* end confdefs.h. */
11043
11044int
11045main ()
11046{
11047_Bool x; x = (_Bool)0;
11048 ;
11049 return 0;
11050}
11051_ACEOF
11052rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011053if { (ac_try="$ac_compile"
11054case "(($ac_try" in
11055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11056 *) ac_try_echo=$ac_try;;
11057esac
11058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11059 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011060 ac_status=$?
11061 grep -v '^ *+' conftest.er1 >conftest.err
11062 rm -f conftest.er1
11063 cat conftest.err >&5
11064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011065 (exit $ac_status); } && {
11066 test -z "$ac_c_werror_flag" ||
11067 test ! -s conftest.err
11068 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011069
11070
11071cat >>confdefs.h <<\_ACEOF
11072#define HAVE_C99_BOOL 1
11073_ACEOF
11074
11075 have_c99_bool=yes
11076
11077else
11078 echo "$as_me: failed program was:" >&5
11079sed 's/^/| /' conftest.$ac_ext >&5
11080
Martin v. Löwiseba40652007-08-30 20:10:57 +000011081
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011082fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011083
11084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11085{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11086echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011087if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011088{ echo "$as_me:$LINENO: checking for _Bool" >&5
11089echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011090if test "${ac_cv_type__Bool+set}" = set; then
11091 echo $ECHO_N "(cached) $ECHO_C" >&6
11092else
11093 cat >conftest.$ac_ext <<_ACEOF
11094/* confdefs.h. */
11095_ACEOF
11096cat confdefs.h >>conftest.$ac_ext
11097cat >>conftest.$ac_ext <<_ACEOF
11098/* end confdefs.h. */
11099$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011100typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011101int
11102main ()
11103{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011104if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011105 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011106if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011107 return 0;
11108 ;
11109 return 0;
11110}
11111_ACEOF
11112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011113if { (ac_try="$ac_compile"
11114case "(($ac_try" in
11115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11116 *) ac_try_echo=$ac_try;;
11117esac
11118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011120 ac_status=$?
11121 grep -v '^ *+' conftest.er1 >conftest.err
11122 rm -f conftest.er1
11123 cat conftest.err >&5
11124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011125 (exit $ac_status); } && {
11126 test -z "$ac_c_werror_flag" ||
11127 test ! -s conftest.err
11128 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011129 ac_cv_type__Bool=yes
11130else
11131 echo "$as_me: failed program was:" >&5
11132sed 's/^/| /' conftest.$ac_ext >&5
11133
Martin v. Löwiseba40652007-08-30 20:10:57 +000011134 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011135fi
Brett Cannon19fab762007-06-02 03:02:29 +000011136
Martin v. Löwiseba40652007-08-30 20:10:57 +000011137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11138fi
11139{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11140echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11141
11142# The cast to long int works around a bug in the HP C Compiler
11143# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11144# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11145# This bug is HP SR number 8606223364.
11146{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11147echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011148if test "${ac_cv_sizeof__Bool+set}" = set; then
11149 echo $ECHO_N "(cached) $ECHO_C" >&6
11150else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011151 if test "$cross_compiling" = yes; then
11152 # Depending upon the size, compute the lo and hi bounds.
11153cat >conftest.$ac_ext <<_ACEOF
11154/* confdefs.h. */
11155_ACEOF
11156cat confdefs.h >>conftest.$ac_ext
11157cat >>conftest.$ac_ext <<_ACEOF
11158/* end confdefs.h. */
11159$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011160 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011161int
11162main ()
11163{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011164static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011165test_array [0] = 0
11166
11167 ;
11168 return 0;
11169}
11170_ACEOF
11171rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011172if { (ac_try="$ac_compile"
11173case "(($ac_try" in
11174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11175 *) ac_try_echo=$ac_try;;
11176esac
11177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011179 ac_status=$?
11180 grep -v '^ *+' conftest.er1 >conftest.err
11181 rm -f conftest.er1
11182 cat conftest.err >&5
11183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011184 (exit $ac_status); } && {
11185 test -z "$ac_c_werror_flag" ||
11186 test ! -s conftest.err
11187 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011188 ac_lo=0 ac_mid=0
11189 while :; do
11190 cat >conftest.$ac_ext <<_ACEOF
11191/* confdefs.h. */
11192_ACEOF
11193cat confdefs.h >>conftest.$ac_ext
11194cat >>conftest.$ac_ext <<_ACEOF
11195/* end confdefs.h. */
11196$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011197 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011198int
11199main ()
11200{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011201static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011202test_array [0] = 0
11203
11204 ;
11205 return 0;
11206}
11207_ACEOF
11208rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011209if { (ac_try="$ac_compile"
11210case "(($ac_try" in
11211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11212 *) ac_try_echo=$ac_try;;
11213esac
11214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011216 ac_status=$?
11217 grep -v '^ *+' conftest.er1 >conftest.err
11218 rm -f conftest.er1
11219 cat conftest.err >&5
11220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011221 (exit $ac_status); } && {
11222 test -z "$ac_c_werror_flag" ||
11223 test ! -s conftest.err
11224 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011225 ac_hi=$ac_mid; break
11226else
11227 echo "$as_me: failed program was:" >&5
11228sed 's/^/| /' conftest.$ac_ext >&5
11229
Martin v. Löwiseba40652007-08-30 20:10:57 +000011230 ac_lo=`expr $ac_mid + 1`
11231 if test $ac_lo -le $ac_mid; then
11232 ac_lo= ac_hi=
11233 break
11234 fi
11235 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011237
11238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011239 done
11240else
11241 echo "$as_me: failed program was:" >&5
11242sed 's/^/| /' conftest.$ac_ext >&5
11243
Martin v. Löwiseba40652007-08-30 20:10:57 +000011244 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011245/* confdefs.h. */
11246_ACEOF
11247cat confdefs.h >>conftest.$ac_ext
11248cat >>conftest.$ac_ext <<_ACEOF
11249/* end confdefs.h. */
11250$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011251 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011252int
11253main ()
11254{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011255static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011256test_array [0] = 0
11257
11258 ;
11259 return 0;
11260}
11261_ACEOF
11262rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011263if { (ac_try="$ac_compile"
11264case "(($ac_try" in
11265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11266 *) ac_try_echo=$ac_try;;
11267esac
11268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011270 ac_status=$?
11271 grep -v '^ *+' conftest.er1 >conftest.err
11272 rm -f conftest.er1
11273 cat conftest.err >&5
11274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011275 (exit $ac_status); } && {
11276 test -z "$ac_c_werror_flag" ||
11277 test ! -s conftest.err
11278 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011279 ac_hi=-1 ac_mid=-1
11280 while :; do
11281 cat >conftest.$ac_ext <<_ACEOF
11282/* confdefs.h. */
11283_ACEOF
11284cat confdefs.h >>conftest.$ac_ext
11285cat >>conftest.$ac_ext <<_ACEOF
11286/* end confdefs.h. */
11287$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011288 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011289int
11290main ()
11291{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011292static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011293test_array [0] = 0
11294
11295 ;
11296 return 0;
11297}
11298_ACEOF
11299rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011300if { (ac_try="$ac_compile"
11301case "(($ac_try" in
11302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11303 *) ac_try_echo=$ac_try;;
11304esac
11305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011307 ac_status=$?
11308 grep -v '^ *+' conftest.er1 >conftest.err
11309 rm -f conftest.er1
11310 cat conftest.err >&5
11311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011312 (exit $ac_status); } && {
11313 test -z "$ac_c_werror_flag" ||
11314 test ! -s conftest.err
11315 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011316 ac_lo=$ac_mid; break
11317else
11318 echo "$as_me: failed program was:" >&5
11319sed 's/^/| /' conftest.$ac_ext >&5
11320
Martin v. Löwiseba40652007-08-30 20:10:57 +000011321 ac_hi=`expr '(' $ac_mid ')' - 1`
11322 if test $ac_mid -le $ac_hi; then
11323 ac_lo= ac_hi=
11324 break
11325 fi
11326 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011328
11329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011330 done
11331else
11332 echo "$as_me: failed program was:" >&5
11333sed 's/^/| /' conftest.$ac_ext >&5
11334
Martin v. Löwiseba40652007-08-30 20:10:57 +000011335 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011337
11338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011340
11341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011342# Binary search between lo and hi bounds.
11343while test "x$ac_lo" != "x$ac_hi"; do
11344 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11345 cat >conftest.$ac_ext <<_ACEOF
11346/* confdefs.h. */
11347_ACEOF
11348cat confdefs.h >>conftest.$ac_ext
11349cat >>conftest.$ac_ext <<_ACEOF
11350/* end confdefs.h. */
11351$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011352 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011353int
11354main ()
11355{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011356static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011357test_array [0] = 0
11358
11359 ;
11360 return 0;
11361}
11362_ACEOF
11363rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011364if { (ac_try="$ac_compile"
11365case "(($ac_try" in
11366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11367 *) ac_try_echo=$ac_try;;
11368esac
11369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011371 ac_status=$?
11372 grep -v '^ *+' conftest.er1 >conftest.err
11373 rm -f conftest.er1
11374 cat conftest.err >&5
11375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011376 (exit $ac_status); } && {
11377 test -z "$ac_c_werror_flag" ||
11378 test ! -s conftest.err
11379 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011380 ac_hi=$ac_mid
11381else
11382 echo "$as_me: failed program was:" >&5
11383sed 's/^/| /' conftest.$ac_ext >&5
11384
Martin v. Löwiseba40652007-08-30 20:10:57 +000011385 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011387
11388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011389done
11390case $ac_lo in
11391?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011392'') if test "$ac_cv_type__Bool" = yes; then
11393 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011394See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011395echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011396See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011397 { (exit 77); exit 77; }; }
11398 else
11399 ac_cv_sizeof__Bool=0
11400 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011401esac
11402else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011403 cat >conftest.$ac_ext <<_ACEOF
11404/* confdefs.h. */
11405_ACEOF
11406cat confdefs.h >>conftest.$ac_ext
11407cat >>conftest.$ac_ext <<_ACEOF
11408/* end confdefs.h. */
11409$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011410 typedef _Bool ac__type_sizeof_;
11411static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11412static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011413#include <stdio.h>
11414#include <stdlib.h>
11415int
11416main ()
11417{
11418
11419 FILE *f = fopen ("conftest.val", "w");
11420 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011421 return 1;
11422 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011423 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011424 long int i = longval ();
11425 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11426 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011427 fprintf (f, "%ld\n", i);
11428 }
11429 else
11430 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011431 unsigned long int i = ulongval ();
11432 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11433 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011434 fprintf (f, "%lu\n", i);
11435 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011436 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011437
11438 ;
11439 return 0;
11440}
11441_ACEOF
11442rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011443if { (ac_try="$ac_link"
11444case "(($ac_try" in
11445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11446 *) ac_try_echo=$ac_try;;
11447esac
11448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11449 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011450 ac_status=$?
11451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11452 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011453 { (case "(($ac_try" in
11454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11455 *) ac_try_echo=$ac_try;;
11456esac
11457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11458 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011459 ac_status=$?
11460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11461 (exit $ac_status); }; }; then
11462 ac_cv_sizeof__Bool=`cat conftest.val`
11463else
11464 echo "$as_me: program exited with status $ac_status" >&5
11465echo "$as_me: failed program was:" >&5
11466sed 's/^/| /' conftest.$ac_ext >&5
11467
11468( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011469if test "$ac_cv_type__Bool" = yes; then
11470 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011471See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011472echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011473See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011474 { (exit 77); exit 77; }; }
11475 else
11476 ac_cv_sizeof__Bool=0
11477 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011479rm -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 +000011480fi
11481rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011483{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11484echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11485
11486
11487
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011488cat >>confdefs.h <<_ACEOF
11489#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11490_ACEOF
11491
11492
11493fi
11494
Martin v. Löwiseba40652007-08-30 20:10:57 +000011495{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11496echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011497if test "${ac_cv_type_uintptr_t+set}" = set; then
11498 echo $ECHO_N "(cached) $ECHO_C" >&6
11499else
11500 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011501/* confdefs.h. */
11502_ACEOF
11503cat confdefs.h >>conftest.$ac_ext
11504cat >>conftest.$ac_ext <<_ACEOF
11505/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011506#ifdef HAVE_STDINT_H
11507 #include <stdint.h>
11508 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011509
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011511int
11512main ()
11513{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011514if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011515 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011516if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011517 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 ;
11519 return 0;
11520}
11521_ACEOF
11522rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011523if { (ac_try="$ac_compile"
11524case "(($ac_try" in
11525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11526 *) ac_try_echo=$ac_try;;
11527esac
11528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11529 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011531 grep -v '^ *+' conftest.er1 >conftest.err
11532 rm -f conftest.er1
11533 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011535 (exit $ac_status); } && {
11536 test -z "$ac_c_werror_flag" ||
11537 test ! -s conftest.err
11538 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011539 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011540else
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011542sed 's/^/| /' conftest.$ac_ext >&5
11543
Martin v. Löwiseba40652007-08-30 20:10:57 +000011544 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011546
11547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011549{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11550echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011551if test $ac_cv_type_uintptr_t = yes; then
11552
11553cat >>confdefs.h <<_ACEOF
11554#define HAVE_UINTPTR_T 1
11555_ACEOF
11556
Martin v. Löwiseba40652007-08-30 20:10:57 +000011557{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11558echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011559if test "${ac_cv_type_uintptr_t+set}" = set; then
11560 echo $ECHO_N "(cached) $ECHO_C" >&6
11561else
11562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011563/* confdefs.h. */
11564_ACEOF
11565cat confdefs.h >>conftest.$ac_ext
11566cat >>conftest.$ac_ext <<_ACEOF
11567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011568$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011570int
11571main ()
11572{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011573if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011574 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011575if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011576 return 0;
11577 ;
11578 return 0;
11579}
11580_ACEOF
11581rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011582if { (ac_try="$ac_compile"
11583case "(($ac_try" in
11584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11585 *) ac_try_echo=$ac_try;;
11586esac
11587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11588 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011590 grep -v '^ *+' conftest.er1 >conftest.err
11591 rm -f conftest.er1
11592 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011594 (exit $ac_status); } && {
11595 test -z "$ac_c_werror_flag" ||
11596 test ! -s conftest.err
11597 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 ac_cv_type_uintptr_t=yes
11599else
11600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011601sed 's/^/| /' conftest.$ac_ext >&5
11602
Martin v. Löwiseba40652007-08-30 20:10:57 +000011603 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011604fi
Brett Cannon19fab762007-06-02 03:02:29 +000011605
Martin v. Löwiseba40652007-08-30 20:10:57 +000011606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11607fi
11608{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11609echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11610
11611# The cast to long int works around a bug in the HP C Compiler
11612# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11613# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11614# This bug is HP SR number 8606223364.
11615{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11616echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011617if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11618 echo $ECHO_N "(cached) $ECHO_C" >&6
11619else
Martin v. Löwis11437992002-04-12 09:54:03 +000011620 if test "$cross_compiling" = yes; then
11621 # Depending upon the size, compute the lo and hi bounds.
11622cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011623/* confdefs.h. */
11624_ACEOF
11625cat confdefs.h >>conftest.$ac_ext
11626cat >>conftest.$ac_ext <<_ACEOF
11627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011628$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011629 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011630int
11631main ()
11632{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011633static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011634test_array [0] = 0
11635
11636 ;
11637 return 0;
11638}
11639_ACEOF
11640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011641if { (ac_try="$ac_compile"
11642case "(($ac_try" in
11643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11644 *) ac_try_echo=$ac_try;;
11645esac
11646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011649 grep -v '^ *+' conftest.er1 >conftest.err
11650 rm -f conftest.er1
11651 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011653 (exit $ac_status); } && {
11654 test -z "$ac_c_werror_flag" ||
11655 test ! -s conftest.err
11656 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 ac_lo=0 ac_mid=0
11658 while :; do
11659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011660/* confdefs.h. */
11661_ACEOF
11662cat confdefs.h >>conftest.$ac_ext
11663cat >>conftest.$ac_ext <<_ACEOF
11664/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011665$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011666 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011667int
11668main ()
11669{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011670static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011671test_array [0] = 0
11672
11673 ;
11674 return 0;
11675}
11676_ACEOF
11677rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011678if { (ac_try="$ac_compile"
11679case "(($ac_try" in
11680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11681 *) ac_try_echo=$ac_try;;
11682esac
11683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11684 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011686 grep -v '^ *+' conftest.er1 >conftest.err
11687 rm -f conftest.er1
11688 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011690 (exit $ac_status); } && {
11691 test -z "$ac_c_werror_flag" ||
11692 test ! -s conftest.err
11693 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 ac_hi=$ac_mid; break
11695else
11696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011697sed 's/^/| /' conftest.$ac_ext >&5
11698
Martin v. Löwiseba40652007-08-30 20:10:57 +000011699 ac_lo=`expr $ac_mid + 1`
11700 if test $ac_lo -le $ac_mid; then
11701 ac_lo= ac_hi=
11702 break
11703 fi
11704 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011706
11707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011708 done
11709else
11710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011711sed 's/^/| /' conftest.$ac_ext >&5
11712
Martin v. Löwiseba40652007-08-30 20:10:57 +000011713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011714/* confdefs.h. */
11715_ACEOF
11716cat confdefs.h >>conftest.$ac_ext
11717cat >>conftest.$ac_ext <<_ACEOF
11718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011719$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011720 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011721int
11722main ()
11723{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011724static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011725test_array [0] = 0
11726
11727 ;
11728 return 0;
11729}
11730_ACEOF
11731rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011732if { (ac_try="$ac_compile"
11733case "(($ac_try" in
11734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11735 *) ac_try_echo=$ac_try;;
11736esac
11737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011740 grep -v '^ *+' conftest.er1 >conftest.err
11741 rm -f conftest.er1
11742 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011744 (exit $ac_status); } && {
11745 test -z "$ac_c_werror_flag" ||
11746 test ! -s conftest.err
11747 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 ac_hi=-1 ac_mid=-1
11749 while :; do
11750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011751/* confdefs.h. */
11752_ACEOF
11753cat confdefs.h >>conftest.$ac_ext
11754cat >>conftest.$ac_ext <<_ACEOF
11755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011756$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011757 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011758int
11759main ()
11760{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011761static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011762test_array [0] = 0
11763
11764 ;
11765 return 0;
11766}
11767_ACEOF
11768rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011769if { (ac_try="$ac_compile"
11770case "(($ac_try" in
11771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11772 *) ac_try_echo=$ac_try;;
11773esac
11774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011777 grep -v '^ *+' conftest.er1 >conftest.err
11778 rm -f conftest.er1
11779 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011781 (exit $ac_status); } && {
11782 test -z "$ac_c_werror_flag" ||
11783 test ! -s conftest.err
11784 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 ac_lo=$ac_mid; break
11786else
11787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011788sed 's/^/| /' conftest.$ac_ext >&5
11789
Martin v. Löwiseba40652007-08-30 20:10:57 +000011790 ac_hi=`expr '(' $ac_mid ')' - 1`
11791 if test $ac_mid -le $ac_hi; then
11792 ac_lo= ac_hi=
11793 break
11794 fi
11795 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011797
11798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011799 done
11800else
11801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011802sed 's/^/| /' conftest.$ac_ext >&5
11803
Martin v. Löwiseba40652007-08-30 20:10:57 +000011804 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011805fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011806
11807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011809
11810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011811# Binary search between lo and hi bounds.
11812while test "x$ac_lo" != "x$ac_hi"; do
11813 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011815/* confdefs.h. */
11816_ACEOF
11817cat confdefs.h >>conftest.$ac_ext
11818cat >>conftest.$ac_ext <<_ACEOF
11819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011820$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011821 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011822int
11823main ()
11824{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011825static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011826test_array [0] = 0
11827
11828 ;
11829 return 0;
11830}
11831_ACEOF
11832rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011833if { (ac_try="$ac_compile"
11834case "(($ac_try" in
11835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11836 *) ac_try_echo=$ac_try;;
11837esac
11838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11839 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011841 grep -v '^ *+' conftest.er1 >conftest.err
11842 rm -f conftest.er1
11843 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011845 (exit $ac_status); } && {
11846 test -z "$ac_c_werror_flag" ||
11847 test ! -s conftest.err
11848 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011849 ac_hi=$ac_mid
11850else
11851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011852sed 's/^/| /' conftest.$ac_ext >&5
11853
Martin v. Löwiseba40652007-08-30 20:10:57 +000011854 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011856
11857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011858done
11859case $ac_lo in
11860?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011861'') if test "$ac_cv_type_uintptr_t" = yes; then
11862 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011863See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011864echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011865See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011866 { (exit 77); exit 77; }; }
11867 else
11868 ac_cv_sizeof_uintptr_t=0
11869 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011870esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011871else
Martin v. Löwis11437992002-04-12 09:54:03 +000011872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011873/* confdefs.h. */
11874_ACEOF
11875cat confdefs.h >>conftest.$ac_ext
11876cat >>conftest.$ac_ext <<_ACEOF
11877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011878$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011879 typedef uintptr_t ac__type_sizeof_;
11880static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11881static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011882#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011883#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011884int
11885main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011886{
Martin v. Löwis11437992002-04-12 09:54:03 +000011887
11888 FILE *f = fopen ("conftest.val", "w");
11889 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011890 return 1;
11891 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011892 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011893 long int i = longval ();
11894 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11895 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011896 fprintf (f, "%ld\n", i);
11897 }
11898 else
11899 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011900 unsigned long int i = ulongval ();
11901 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11902 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011903 fprintf (f, "%lu\n", i);
11904 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011905 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011906
11907 ;
11908 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011909}
Martin v. Löwis11437992002-04-12 09:54:03 +000011910_ACEOF
11911rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011912if { (ac_try="$ac_link"
11913case "(($ac_try" in
11914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11915 *) ac_try_echo=$ac_try;;
11916esac
11917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11918 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011919 ac_status=$?
11920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11921 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011922 { (case "(($ac_try" in
11923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11924 *) ac_try_echo=$ac_try;;
11925esac
11926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11927 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011928 ac_status=$?
11929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11930 (exit $ac_status); }; }; then
11931 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011932else
Martin v. Löwis11437992002-04-12 09:54:03 +000011933 echo "$as_me: program exited with status $ac_status" >&5
11934echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011935sed 's/^/| /' conftest.$ac_ext >&5
11936
Martin v. Löwis11437992002-04-12 09:54:03 +000011937( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011938if test "$ac_cv_type_uintptr_t" = yes; then
11939 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011940See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011941echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011942See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011943 { (exit 77); exit 77; }; }
11944 else
11945 ac_cv_sizeof_uintptr_t=0
11946 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011948rm -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 +000011949fi
11950rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011952{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11953echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
11954
11955
11956
Martin v. Löwis11437992002-04-12 09:54:03 +000011957cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011958#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011959_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011960
Michael W. Hudson54241132001-12-07 15:38:26 +000011961
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011962fi
11963
Martin v. Löwisebe26702006-10-02 14:55:51 +000011964
11965
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011966# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011967{ echo "$as_me:$LINENO: checking size of off_t" >&5
11968echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011969if test "${ac_cv_sizeof_off_t+set}" = set; then
11970 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011971else
11972 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011973 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011974else
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011976/* confdefs.h. */
11977_ACEOF
11978cat confdefs.h >>conftest.$ac_ext
11979cat >>conftest.$ac_ext <<_ACEOF
11980/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011981#include <stdio.h>
11982#include <sys/types.h>
11983main()
11984{
11985 FILE *f=fopen("conftestval", "w");
11986 if (!f) exit(1);
11987 fprintf(f, "%d\n", sizeof(off_t));
11988 exit(0);
11989}
Martin v. Löwis11437992002-04-12 09:54:03 +000011990_ACEOF
11991rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011992if { (ac_try="$ac_link"
11993case "(($ac_try" in
11994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11995 *) ac_try_echo=$ac_try;;
11996esac
11997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11998 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011999 ac_status=$?
12000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12001 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012002 { (case "(($ac_try" in
12003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12004 *) ac_try_echo=$ac_try;;
12005esac
12006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12007 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012008 ac_status=$?
12009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12010 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012011 ac_cv_sizeof_off_t=`cat conftestval`
12012else
Martin v. Löwis11437992002-04-12 09:54:03 +000012013 echo "$as_me: program exited with status $ac_status" >&5
12014echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012015sed 's/^/| /' conftest.$ac_ext >&5
12016
Martin v. Löwis11437992002-04-12 09:54:03 +000012017( exit $ac_status )
12018ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012020rm -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 +000012021fi
12022
Martin v. Löwiseba40652007-08-30 20:10:57 +000012023
12024
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012025fi
12026
Martin v. Löwiseba40652007-08-30 20:10:57 +000012027{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12028echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012029
12030cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012031#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012032_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012033
Michael W. Hudson54241132001-12-07 15:38:26 +000012034
Martin v. Löwiseba40652007-08-30 20:10:57 +000012035{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12036echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012037if test "$have_long_long" = yes -a \
12038 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12039 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012040
Martin v. Löwis11437992002-04-12 09:54:03 +000012041cat >>confdefs.h <<\_ACEOF
12042#define HAVE_LARGEFILE_SUPPORT 1
12043_ACEOF
12044
Martin v. Löwiseba40652007-08-30 20:10:57 +000012045 { echo "$as_me:$LINENO: result: yes" >&5
12046echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012047else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012048 { echo "$as_me:$LINENO: result: no" >&5
12049echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012050fi
12051
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012052# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012053{ echo "$as_me:$LINENO: checking size of time_t" >&5
12054echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012055if test "${ac_cv_sizeof_time_t+set}" = set; then
12056 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012057else
12058 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012059 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012060else
Martin v. Löwis11437992002-04-12 09:54:03 +000012061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012062/* confdefs.h. */
12063_ACEOF
12064cat confdefs.h >>conftest.$ac_ext
12065cat >>conftest.$ac_ext <<_ACEOF
12066/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012067#include <stdio.h>
12068#include <time.h>
12069main()
12070{
12071 FILE *f=fopen("conftestval", "w");
12072 if (!f) exit(1);
12073 fprintf(f, "%d\n", sizeof(time_t));
12074 exit(0);
12075}
Martin v. Löwis11437992002-04-12 09:54:03 +000012076_ACEOF
12077rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012078if { (ac_try="$ac_link"
12079case "(($ac_try" in
12080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12081 *) ac_try_echo=$ac_try;;
12082esac
12083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12084 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012085 ac_status=$?
12086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12087 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012088 { (case "(($ac_try" in
12089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12090 *) ac_try_echo=$ac_try;;
12091esac
12092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12093 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012094 ac_status=$?
12095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12096 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012097 ac_cv_sizeof_time_t=`cat conftestval`
12098else
Martin v. Löwis11437992002-04-12 09:54:03 +000012099 echo "$as_me: program exited with status $ac_status" >&5
12100echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012101sed 's/^/| /' conftest.$ac_ext >&5
12102
Martin v. Löwis11437992002-04-12 09:54:03 +000012103( exit $ac_status )
12104ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012106rm -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 +000012107fi
12108
Martin v. Löwiseba40652007-08-30 20:10:57 +000012109
12110
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012111fi
12112
Martin v. Löwiseba40652007-08-30 20:10:57 +000012113{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12114echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012115
12116cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012117#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012118_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012119
Michael W. Hudson54241132001-12-07 15:38:26 +000012120
12121
Trent Mick635f6fb2000-08-23 21:33:05 +000012122# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012123ac_save_cc="$CC"
12124if test "$ac_cv_kpthread" = "yes"
12125then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012126elif test "$ac_cv_kthread" = "yes"
12127then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012128elif test "$ac_cv_pthread" = "yes"
12129then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012131{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12132echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012133have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012135/* confdefs.h. */
12136_ACEOF
12137cat confdefs.h >>conftest.$ac_ext
12138cat >>conftest.$ac_ext <<_ACEOF
12139/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012140#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012141int
12142main ()
12143{
Guido van Rossum12580492000-09-24 16:47:19 +000012144pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012145 ;
12146 return 0;
12147}
12148_ACEOF
12149rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012150if { (ac_try="$ac_compile"
12151case "(($ac_try" in
12152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12153 *) ac_try_echo=$ac_try;;
12154esac
12155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12156 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012158 grep -v '^ *+' conftest.er1 >conftest.err
12159 rm -f conftest.er1
12160 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012162 (exit $ac_status); } && {
12163 test -z "$ac_c_werror_flag" ||
12164 test ! -s conftest.err
12165 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012166 have_pthread_t=yes
12167else
Martin v. Löwis11437992002-04-12 09:54:03 +000012168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012169sed 's/^/| /' conftest.$ac_ext >&5
12170
Martin v. Löwiseba40652007-08-30 20:10:57 +000012171
Trent Mick635f6fb2000-08-23 21:33:05 +000012172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012173
12174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12175{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12176echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012177if test "$have_pthread_t" = yes ; then
12178 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012179 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12180echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012181 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12182 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012183else
12184 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012185 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012186else
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012188/* confdefs.h. */
12189_ACEOF
12190cat confdefs.h >>conftest.$ac_ext
12191cat >>conftest.$ac_ext <<_ACEOF
12192/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012193#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012194#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012195 main()
12196 {
12197 FILE *f=fopen("conftestval", "w");
12198 if (!f) exit(1);
12199 fprintf(f, "%d\n", sizeof(pthread_t));
12200 exit(0);
12201 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012202_ACEOF
12203rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012204if { (ac_try="$ac_link"
12205case "(($ac_try" in
12206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12207 *) ac_try_echo=$ac_try;;
12208esac
12209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12210 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012211 ac_status=$?
12212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12213 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012214 { (case "(($ac_try" in
12215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12216 *) ac_try_echo=$ac_try;;
12217esac
12218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12219 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 ac_status=$?
12221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12222 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012223 ac_cv_sizeof_pthread_t=`cat conftestval`
12224else
Martin v. Löwis11437992002-04-12 09:54:03 +000012225 echo "$as_me: program exited with status $ac_status" >&5
12226echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012227sed 's/^/| /' conftest.$ac_ext >&5
12228
Martin v. Löwis11437992002-04-12 09:54:03 +000012229( exit $ac_status )
12230ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012232rm -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 +000012233fi
12234
Martin v. Löwiseba40652007-08-30 20:10:57 +000012235
12236
Trent Mick635f6fb2000-08-23 21:33:05 +000012237fi
12238
Martin v. Löwiseba40652007-08-30 20:10:57 +000012239 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12240echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012241
12242cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012243#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012244_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012245
12246fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012247CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012248
Martin v. Löwiseba40652007-08-30 20:10:57 +000012249{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12250echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12251# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012252if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012253 enableval=$enable_toolbox_glue;
12254fi
Jack Jansene578a632001-08-15 01:27:14 +000012255
12256
12257if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012258then
Jack Jansene578a632001-08-15 01:27:14 +000012259 case $ac_sys_system/$ac_sys_release in
12260 Darwin/*)
12261 enable_toolbox_glue="yes";;
12262 *)
12263 enable_toolbox_glue="no";;
12264 esac
12265fi
12266case "$enable_toolbox_glue" in
12267yes)
Jack Jansene578a632001-08-15 01:27:14 +000012268 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012269 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012270
12271cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012272#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012273_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012274
12275 ;;
12276*)
Jack Jansene578a632001-08-15 01:27:14 +000012277 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012278 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012279 ;;
12280esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012281{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12282echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012283
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012284
12285case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012286 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012287 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12288 ;;
12289 Darwin/*)
12290 OTHER_LIBTOOL_OPT=""
12291 ;;
12292esac
12293
12294
12295case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012296 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012297 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12298 if test "${enable_universalsdk}"; then
12299 :
12300 else
12301 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12302 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012303 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012304 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012305 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012306 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12307 if test ${gcc_version} '<' 4.0
12308 then
12309 LIBTOOL_CRUFT="-lcc_dynamic"
12310 else
12311 LIBTOOL_CRUFT=""
12312 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012313 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012314 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012315 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012316esac
12317
Martin v. Löwiseba40652007-08-30 20:10:57 +000012318{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12319echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012320if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012321then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012322 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012323 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012324 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012325
Martin v. Löwis11437992002-04-12 09:54:03 +000012326cat >>confdefs.h <<\_ACEOF
12327#define WITH_NEXT_FRAMEWORK 1
12328_ACEOF
12329
Martin v. Löwiseba40652007-08-30 20:10:57 +000012330 { echo "$as_me:$LINENO: result: yes" >&5
12331echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012332else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012333 { echo "$as_me:$LINENO: result: no" >&5
12334echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012335fi
12336
Martin v. Löwiseba40652007-08-30 20:10:57 +000012337{ echo "$as_me:$LINENO: checking for dyld" >&5
12338echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012339case $ac_sys_system/$ac_sys_release in
12340 Darwin/*)
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_DYLD 1
12344_ACEOF
12345
Martin v. Löwiseba40652007-08-30 20:10:57 +000012346 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12347echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012348 ;;
12349 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012350 { echo "$as_me:$LINENO: result: no" >&5
12351echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012352 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012353esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012354
Guido van Rossum0a516c91994-09-12 10:58:40 +000012355# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012356
Michael W. Hudson54241132001-12-07 15:38:26 +000012357
12358
12359
12360
Guido van Rossum0a516c91994-09-12 10:58:40 +000012361# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012362# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012363{ echo "$as_me:$LINENO: checking SO" >&5
12364echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012365if test -z "$SO"
12366then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012367 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012368 hp*|HP*)
12369 case `uname -m` in
12370 ia64) SO=.so;;
12371 *) SO=.sl;;
12372 esac
12373 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012374 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012375 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012376 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012377else
12378 # this might also be a termcap variable, see #610332
12379 echo
12380 echo '====================================================================='
12381 echo '+ +'
12382 echo '+ WARNING: You have set SO in your environment. +'
12383 echo '+ Do you really mean to change the extension for shared libraries? +'
12384 echo '+ Continuing in 10 seconds to let you to ponder. +'
12385 echo '+ +'
12386 echo '====================================================================='
12387 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389{ echo "$as_me:$LINENO: result: $SO" >&5
12390echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012391
12392cat >>confdefs.h <<_ACEOF
12393#define SHLIB_EXT "$SO"
12394_ACEOF
12395
Guido van Rossum0a516c91994-09-12 10:58:40 +000012396# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012397# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012398# (Shared libraries in this instance are shared modules to be loaded into
12399# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012400{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12401echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012402if test -z "$LDSHARED"
12403then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012404 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012405 AIX*)
12406 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012407 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012408 ;;
12409 BeOS*)
12410 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012411 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012412 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012413 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012414 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012415 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012416 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012417 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012418 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012419 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000012420 hp*|HP*)
12421 if test "$GCC" = "yes"
12422 then LDSHARED='$(CC) -shared'
12423 else LDSHARED='ld -b';
12424 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012425 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012426 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012427 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12428 if test "$enable_framework" ; then
12429 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012430 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12431 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012432 else
12433 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012434 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012435 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012436 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012437 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12438 if test "$enable_framework" ; then
12439 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012440 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12441 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012442 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012443 # No framework, use the Python app as bundle-loader
12444 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012445 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012446 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012447 Darwin/*)
12448 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12449 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012450 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012451 if test ${cur_target} '>' 10.2; then
12452 cur_target=10.3
12453 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012454 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012455
12456 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12457 # environment with a value that is the same as what we'll use
12458 # in the Makefile to ensure that we'll get the same compiler
12459 # environment during configure and build time.
12460 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12461 export MACOSX_DEPLOYMENT_TARGET
12462
Ronald Oussoren988117f2006-04-29 11:31:35 +000012463 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012464 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012465 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012466 if test "${enable_universalsdk}"; then
12467 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12468 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012469 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12470 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012471 else
12472 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12473 if test "$enable_framework" ; then
12474 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012475 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12476 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012477 else
12478 # No framework, use the Python app as bundle-loader
12479 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12480 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12481 fi
12482 fi
12483 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012484 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012485 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012486 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012487 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012488 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012489 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012490 else
12491 LDSHARED="ld -Bshareable ${LDFLAGS}"
12492 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012493 OpenBSD*)
12494 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12495 then
12496 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12497 else
12498 case `uname -r` in
12499 [01].* | 2.[0-7] | 2.[0-7].*)
12500 LDSHARED="ld -Bshareable ${LDFLAGS}"
12501 ;;
12502 *)
12503 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12504 ;;
12505 esac
12506 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012507 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012508 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012509 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012510 then LDSHARED='$(CC) -shared'
12511 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012512 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012513 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012514 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012515 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012516 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012517 *) LDSHARED="ld";;
12518 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012520{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12521echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012522BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012523# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012524# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012525{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12526echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012527if test -z "$CCSHARED"
12528then
Guido van Rossum07397971997-04-29 21:49:50 +000012529 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012530 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012531 then CCSHARED="-fPIC";
12532 elif test `uname -p` = sparc;
12533 then CCSHARED="-xcode=pic32";
12534 else CCSHARED="-Kpic";
12535 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012536 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012537 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012538 else CCSHARED="+z";
12539 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012540 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012541 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012542 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012543 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012544 if test "$GCC" = "yes"
12545 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012546 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012547 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012548 SCO_SV*)
12549 if test "$GCC" = "yes"
12550 then CCSHARED="-fPIC"
12551 else CCSHARED="-Kpic -belf"
12552 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012553 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012554 IRIX*/6*) case $CC in
12555 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012556 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012557 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012558 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012559 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012561{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12562echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012563# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012564# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012565{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12566echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012567if test -z "$LINKFORSHARED"
12568then
Guido van Rossum07397971997-04-29 21:49:50 +000012569 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012570 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012571 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012572 LINKFORSHARED="-Wl,-E -Wl,+s";;
12573# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012574 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012575 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012576 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012577 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012578 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12579 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012580 # not used by the core itself but which needs to be in the core so
12581 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012582 # -prebind is no longer used, because it actually seems to give a
12583 # slowdown in stead of a speedup, maybe due to the large number of
12584 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012585
12586 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012587 if test "$enable_framework"
12588 then
Jack Jansenda49e192005-01-07 13:08:22 +000012589 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012590 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012591 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012592 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012593 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012594 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012595 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012596 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12597 then
12598 LINKFORSHARED="-Wl,--export-dynamic"
12599 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012600 SunOS/5*) case $CC in
12601 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012602 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012603 then
12604 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012605 fi;;
12606 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012607 CYGWIN*)
12608 if test $enable_shared = "no"
12609 then
12610 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12611 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012612 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012614{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12615echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012616
Michael W. Hudson54241132001-12-07 15:38:26 +000012617
Martin v. Löwiseba40652007-08-30 20:10:57 +000012618{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12619echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012620if test ! "$LIBRARY" = "$LDLIBRARY"
12621then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012622 case $ac_sys_system in
12623 CYGWIN*)
12624 # Cygwin needs CCSHARED when building extension DLLs
12625 # but not when building the interpreter DLL.
12626 CFLAGSFORSHARED='';;
12627 *)
12628 CFLAGSFORSHARED='$(CCSHARED)'
12629 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012631{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12632echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012633
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012634# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12635# library (with --enable-shared).
12636# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012637# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12638# if it is not required, since it creates a dependency of the shared library
12639# to LIBS. This, in turn, means that applications linking the shared libpython
12640# don't need to link LIBS explicitly. The default should be only changed
12641# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012642
Martin v. Löwiseba40652007-08-30 20:10:57 +000012643{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12644echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012645case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012646 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012647 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012648esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012649{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12650echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012651
12652
Guido van Rossum627b2d71993-12-24 10:39:16 +000012653# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012654
Martin v. Löwiseba40652007-08-30 20:10:57 +000012655{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12656echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012657if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12658 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012659else
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012661LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012663/* confdefs.h. */
12664_ACEOF
12665cat confdefs.h >>conftest.$ac_ext
12666cat >>conftest.$ac_ext <<_ACEOF
12667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012668
Martin v. Löwiseba40652007-08-30 20:10:57 +000012669/* Override any GCC internal prototype to avoid an error.
12670 Use char because int might match the return type of a GCC
12671 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012672#ifdef __cplusplus
12673extern "C"
12674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012675char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012676int
12677main ()
12678{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012679return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 ;
12681 return 0;
12682}
12683_ACEOF
12684rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012685if { (ac_try="$ac_link"
12686case "(($ac_try" in
12687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12688 *) ac_try_echo=$ac_try;;
12689esac
12690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12691 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012693 grep -v '^ *+' conftest.er1 >conftest.err
12694 rm -f conftest.er1
12695 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012697 (exit $ac_status); } && {
12698 test -z "$ac_c_werror_flag" ||
12699 test ! -s conftest.err
12700 } && test -s conftest$ac_exeext &&
12701 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012703else
Martin v. Löwis11437992002-04-12 09:54:03 +000012704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012705sed 's/^/| /' conftest.$ac_ext >&5
12706
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012709
12710rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012711 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012712LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012714{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12715echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012716if test $ac_cv_lib_dl_dlopen = yes; then
12717 cat >>confdefs.h <<_ACEOF
12718#define HAVE_LIBDL 1
12719_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012720
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012721 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012722
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723fi
12724 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012725
Martin v. Löwiseba40652007-08-30 20:10:57 +000012726{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12727echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012728if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12729 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012730else
Martin v. Löwis11437992002-04-12 09:54:03 +000012731 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012732LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012734/* confdefs.h. */
12735_ACEOF
12736cat confdefs.h >>conftest.$ac_ext
12737cat >>conftest.$ac_ext <<_ACEOF
12738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012739
Martin v. Löwiseba40652007-08-30 20:10:57 +000012740/* Override any GCC internal prototype to avoid an error.
12741 Use char because int might match the return type of a GCC
12742 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012743#ifdef __cplusplus
12744extern "C"
12745#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012746char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012747int
12748main ()
12749{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012750return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 ;
12752 return 0;
12753}
12754_ACEOF
12755rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012756if { (ac_try="$ac_link"
12757case "(($ac_try" in
12758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12759 *) ac_try_echo=$ac_try;;
12760esac
12761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12762 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012764 grep -v '^ *+' conftest.er1 >conftest.err
12765 rm -f conftest.er1
12766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012768 (exit $ac_status); } && {
12769 test -z "$ac_c_werror_flag" ||
12770 test ! -s conftest.err
12771 } && test -s conftest$ac_exeext &&
12772 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012774else
Martin v. Löwis11437992002-04-12 09:54:03 +000012775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012776sed 's/^/| /' conftest.$ac_ext >&5
12777
Martin v. Löwiseba40652007-08-30 20:10:57 +000012778 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012780
12781rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012783LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012785{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12786echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012787if test $ac_cv_lib_dld_shl_load = yes; then
12788 cat >>confdefs.h <<_ACEOF
12789#define HAVE_LIBDLD 1
12790_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012791
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012792 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012793
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012794fi
12795 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012796
12797# only check for sem_ini if thread support is requested
12798if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012799 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12800echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012801if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012803else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012804 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012805cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012806/* confdefs.h. */
12807_ACEOF
12808cat confdefs.h >>conftest.$ac_ext
12809cat >>conftest.$ac_ext <<_ACEOF
12810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012811
Martin v. Löwiseba40652007-08-30 20:10:57 +000012812/* Override any GCC internal prototype to avoid an error.
12813 Use char because int might match the return type of a GCC
12814 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012815#ifdef __cplusplus
12816extern "C"
12817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012818char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012819int
12820main ()
12821{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012822return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012823 ;
12824 return 0;
12825}
12826_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012827for ac_lib in '' pthread rt posix4; do
12828 if test -z "$ac_lib"; then
12829 ac_res="none required"
12830 else
12831 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012832 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012833 fi
12834 rm -f conftest.$ac_objext conftest$ac_exeext
12835if { (ac_try="$ac_link"
12836case "(($ac_try" in
12837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12838 *) ac_try_echo=$ac_try;;
12839esac
12840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12841 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012842 ac_status=$?
12843 grep -v '^ *+' conftest.er1 >conftest.err
12844 rm -f conftest.er1
12845 cat conftest.err >&5
12846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012847 (exit $ac_status); } && {
12848 test -z "$ac_c_werror_flag" ||
12849 test ! -s conftest.err
12850 } && test -s conftest$ac_exeext &&
12851 $as_test_x conftest$ac_exeext; then
12852 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012853else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012854 echo "$as_me: failed program was:" >&5
12855sed 's/^/| /' conftest.$ac_ext >&5
12856
Martin v. Löwiseba40652007-08-30 20:10:57 +000012857
Brett Cannon19fab762007-06-02 03:02:29 +000012858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012859
12860rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12861 conftest$ac_exeext
12862 if test "${ac_cv_search_sem_init+set}" = set; then
12863 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012865done
12866if test "${ac_cv_search_sem_init+set}" = set; then
12867 :
12868else
12869 ac_cv_search_sem_init=no
12870fi
12871rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012872LIBS=$ac_func_search_save_LIBS
12873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012874{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12875echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12876ac_res=$ac_cv_search_sem_init
12877if test "$ac_res" != no; then
12878 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012879
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012880fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012881 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012882 # posix4 on Solaris 2.6
12883 # pthread (first!) on Linux
12884fi
12885
Martin v. Löwis19d17342003-06-14 21:03:05 +000012886# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012887{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12888echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012889if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12890 echo $ECHO_N "(cached) $ECHO_C" >&6
12891else
12892 ac_check_lib_save_LIBS=$LIBS
12893LIBS="-lintl $LIBS"
12894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012895/* confdefs.h. */
12896_ACEOF
12897cat confdefs.h >>conftest.$ac_ext
12898cat >>conftest.$ac_ext <<_ACEOF
12899/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012900
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901/* Override any GCC internal prototype to avoid an error.
12902 Use char because int might match the return type of a GCC
12903 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012904#ifdef __cplusplus
12905extern "C"
12906#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012907char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012908int
12909main ()
12910{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012911return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012912 ;
12913 return 0;
12914}
12915_ACEOF
12916rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917if { (ac_try="$ac_link"
12918case "(($ac_try" in
12919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12920 *) ac_try_echo=$ac_try;;
12921esac
12922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12923 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012925 grep -v '^ *+' conftest.er1 >conftest.err
12926 rm -f conftest.er1
12927 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012929 (exit $ac_status); } && {
12930 test -z "$ac_c_werror_flag" ||
12931 test ! -s conftest.err
12932 } && test -s conftest$ac_exeext &&
12933 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012934 ac_cv_lib_intl_textdomain=yes
12935else
12936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012937sed 's/^/| /' conftest.$ac_ext >&5
12938
Martin v. Löwiseba40652007-08-30 20:10:57 +000012939 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012941
12942rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012943 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012944LIBS=$ac_check_lib_save_LIBS
12945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012946{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12947echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012948if test $ac_cv_lib_intl_textdomain = yes; then
12949
12950cat >>confdefs.h <<\_ACEOF
12951#define WITH_LIBINTL 1
12952_ACEOF
12953
12954fi
12955
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012956
12957# checks for system dependent C++ extensions support
12958case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000012959 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12960echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012962/* confdefs.h. */
12963_ACEOF
12964cat confdefs.h >>conftest.$ac_ext
12965cat >>conftest.$ac_ext <<_ACEOF
12966/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012967#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012968int
12969main ()
12970{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012971loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012972 ;
12973 return 0;
12974}
12975_ACEOF
12976rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012977if { (ac_try="$ac_link"
12978case "(($ac_try" in
12979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12980 *) ac_try_echo=$ac_try;;
12981esac
12982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12983 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012985 grep -v '^ *+' conftest.er1 >conftest.err
12986 rm -f conftest.er1
12987 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012989 (exit $ac_status); } && {
12990 test -z "$ac_c_werror_flag" ||
12991 test ! -s conftest.err
12992 } && test -s conftest$ac_exeext &&
12993 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012994
Martin v. Löwis11437992002-04-12 09:54:03 +000012995cat >>confdefs.h <<\_ACEOF
12996#define AIX_GENUINE_CPLUSPLUS 1
12997_ACEOF
12998
Martin v. Löwiseba40652007-08-30 20:10:57 +000012999 { echo "$as_me:$LINENO: result: yes" >&5
13000echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013001else
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013003sed 's/^/| /' conftest.$ac_ext >&5
13004
Martin v. Löwiseba40652007-08-30 20:10:57 +000013005 { echo "$as_me:$LINENO: result: no" >&5
13006echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013008
13009rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013010 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013011 *) ;;
13012esac
13013
Guido van Rossum70c7f481998-03-26 18:44:10 +000013014# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013015# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013016{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13017echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013018if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13019 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013020else
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013022LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013024/* confdefs.h. */
13025_ACEOF
13026cat confdefs.h >>conftest.$ac_ext
13027cat >>conftest.$ac_ext <<_ACEOF
13028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013029
Martin v. Löwiseba40652007-08-30 20:10:57 +000013030/* Override any GCC internal prototype to avoid an error.
13031 Use char because int might match the return type of a GCC
13032 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013033#ifdef __cplusplus
13034extern "C"
13035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013036char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013037int
13038main ()
13039{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013040return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013041 ;
13042 return 0;
13043}
13044_ACEOF
13045rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013046if { (ac_try="$ac_link"
13047case "(($ac_try" in
13048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13049 *) ac_try_echo=$ac_try;;
13050esac
13051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013054 grep -v '^ *+' conftest.er1 >conftest.err
13055 rm -f conftest.er1
13056 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013058 (exit $ac_status); } && {
13059 test -z "$ac_c_werror_flag" ||
13060 test ! -s conftest.err
13061 } && test -s conftest$ac_exeext &&
13062 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013063 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013064else
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013066sed 's/^/| /' conftest.$ac_ext >&5
13067
Martin v. Löwiseba40652007-08-30 20:10:57 +000013068 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013070
13071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013073LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013075{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13076echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013077if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013078 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013079fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013080 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013081{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13082echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013083if test "${ac_cv_lib_socket_socket+set}" = set; then
13084 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013085else
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013087LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013089/* confdefs.h. */
13090_ACEOF
13091cat confdefs.h >>conftest.$ac_ext
13092cat >>conftest.$ac_ext <<_ACEOF
13093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013094
Martin v. Löwiseba40652007-08-30 20:10:57 +000013095/* Override any GCC internal prototype to avoid an error.
13096 Use char because int might match the return type of a GCC
13097 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013098#ifdef __cplusplus
13099extern "C"
13100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013101char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013102int
13103main ()
13104{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013105return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013106 ;
13107 return 0;
13108}
13109_ACEOF
13110rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013111if { (ac_try="$ac_link"
13112case "(($ac_try" in
13113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13114 *) ac_try_echo=$ac_try;;
13115esac
13116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13117 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013119 grep -v '^ *+' conftest.er1 >conftest.err
13120 rm -f conftest.er1
13121 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013123 (exit $ac_status); } && {
13124 test -z "$ac_c_werror_flag" ||
13125 test ! -s conftest.err
13126 } && test -s conftest$ac_exeext &&
13127 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013128 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013129else
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013131sed 's/^/| /' conftest.$ac_ext >&5
13132
Martin v. Löwiseba40652007-08-30 20:10:57 +000013133 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013135
13136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013138LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013140{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13141echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013142if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013143 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013144fi
13145 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013146
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013147case "$ac_sys_system" in
13148BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013149{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13150echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013151if test "${ac_cv_lib_net_socket+set}" = set; then
13152 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013153else
Martin v. Löwis11437992002-04-12 09:54:03 +000013154 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013155LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013156cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013157/* confdefs.h. */
13158_ACEOF
13159cat confdefs.h >>conftest.$ac_ext
13160cat >>conftest.$ac_ext <<_ACEOF
13161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013162
Martin v. Löwiseba40652007-08-30 20:10:57 +000013163/* Override any GCC internal prototype to avoid an error.
13164 Use char because int might match the return type of a GCC
13165 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013166#ifdef __cplusplus
13167extern "C"
13168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013169char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013170int
13171main ()
13172{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013173return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013174 ;
13175 return 0;
13176}
13177_ACEOF
13178rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013179if { (ac_try="$ac_link"
13180case "(($ac_try" in
13181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13182 *) ac_try_echo=$ac_try;;
13183esac
13184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13185 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013187 grep -v '^ *+' conftest.er1 >conftest.err
13188 rm -f conftest.er1
13189 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013191 (exit $ac_status); } && {
13192 test -z "$ac_c_werror_flag" ||
13193 test ! -s conftest.err
13194 } && test -s conftest$ac_exeext &&
13195 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013197else
Martin v. Löwis11437992002-04-12 09:54:03 +000013198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013199sed 's/^/| /' conftest.$ac_ext >&5
13200
Martin v. Löwiseba40652007-08-30 20:10:57 +000013201 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013203
13204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013205 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013206LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013208{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13209echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013210if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013211 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013212fi
13213 # BeOS
13214;;
13215esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013216
Martin v. Löwiseba40652007-08-30 20:10:57 +000013217{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13218echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013219
Martin v. Löwiseba40652007-08-30 20:10:57 +000013220# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013221if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013222 withval=$with_libs;
13223{ echo "$as_me:$LINENO: result: $withval" >&5
13224echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013225LIBS="$withval $LIBS"
13226
13227else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013228 { echo "$as_me:$LINENO: result: no" >&5
13229echo "${ECHO_T}no" >&6; }
13230fi
13231
Guido van Rossum7f43da71994-08-01 12:15:30 +000013232
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013233# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013234{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13235echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013236
Martin v. Löwiseba40652007-08-30 20:10:57 +000013237# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013238if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013239 withval=$with_system_ffi;
13240fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013241
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013242
Martin v. Löwiseba40652007-08-30 20:10:57 +000013243{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13244echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013245
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013246# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013247
13248
Martin v. Löwiseba40652007-08-30 20:10:57 +000013249{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13250echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013251
Martin v. Löwiseba40652007-08-30 20:10:57 +000013252# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013253if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013254 withval=$with_signal_module;
13255fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013256
13257
13258if test -z "$with_signal_module"
13259then with_signal_module="yes"
13260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013261{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13262echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013263
13264if test "${with_signal_module}" = "yes"; then
13265 USE_SIGNAL_MODULE=""
13266 SIGNAL_OBJS=""
13267else
13268 USE_SIGNAL_MODULE="#"
13269 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13270fi
13271
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013272# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013273
Barry Warsawc0d24d82000-06-29 16:12:00 +000013274USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013275
Martin v. Löwiseba40652007-08-30 20:10:57 +000013276{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13277echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
Guido van Rossumec2f0731997-01-22 20:54:01 +000013279
Martin v. Löwiseba40652007-08-30 20:10:57 +000013280# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013281if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013282 withval=$with_dec_threads;
13283{ echo "$as_me:$LINENO: result: $withval" >&5
13284echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013285LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013286if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013287 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013288fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013289else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013290 { echo "$as_me:$LINENO: result: no" >&5
13291echo "${ECHO_T}no" >&6; }
13292fi
13293
Martin v. Löwis11437992002-04-12 09:54:03 +000013294
13295# Templates for things AC_DEFINEd more than once.
13296# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013297
13298
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
13300
13301
13302
13303
Martin v. Löwiseba40652007-08-30 20:10:57 +000013304{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13305echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013306
Martin v. Löwiseba40652007-08-30 20:10:57 +000013307# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013308if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013309 withval=$with_threads;
13310fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013311
13312
Barry Warsawc0d24d82000-06-29 16:12:00 +000013313# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013314
Martin v. Löwiseba40652007-08-30 20:10:57 +000013315# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013316if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013317 withval=$with_thread; with_threads=$with_thread
13318fi
13319
Barry Warsawc0d24d82000-06-29 16:12:00 +000013320
13321if test -z "$with_threads"
13322then with_threads="yes"
13323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013324{ echo "$as_me:$LINENO: result: $with_threads" >&5
13325echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013326
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013327
Barry Warsawc0d24d82000-06-29 16:12:00 +000013328if test "$with_threads" = "no"
13329then
13330 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013331elif test "$ac_cv_pthread_is_default" = yes
13332then
Martin v. Löwis11437992002-04-12 09:54:03 +000013333 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013334#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013335_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013336
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013337 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013339#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013340_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013341
13342 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013343 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013344elif test "$ac_cv_kpthread" = "yes"
13345then
13346 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013347 if test "$ac_cv_cxx_thread" = "yes"; then
13348 CXX="$CXX -Kpthread"
13349 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013351#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013352_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013353
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013354 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013355 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013356elif test "$ac_cv_kthread" = "yes"
13357then
13358 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013359 if test "$ac_cv_cxx_thread" = "yes"; then
13360 CXX="$CXX -Kthread"
13361 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013362 cat >>confdefs.h <<\_ACEOF
13363#define WITH_THREAD 1
13364_ACEOF
13365
13366 posix_threads=yes
13367 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013368elif test "$ac_cv_pthread" = "yes"
13369then
13370 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013371 if test "$ac_cv_cxx_thread" = "yes"; then
13372 CXX="$CXX -pthread"
13373 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013374 cat >>confdefs.h <<\_ACEOF
13375#define WITH_THREAD 1
13376_ACEOF
13377
13378 posix_threads=yes
13379 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013380else
13381 if test ! -z "$with_threads" -a -d "$with_threads"
13382 then LDFLAGS="$LDFLAGS -L$with_threads"
13383 fi
13384 if test ! -z "$withval" -a -d "$withval"
13385 then LDFLAGS="$LDFLAGS -L$withval"
13386 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013387
13388 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013389 # define _POSIX_THREADS in unistd.h. Some apparently don't
13390 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013391 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13392echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013394/* confdefs.h. */
13395_ACEOF
13396cat confdefs.h >>conftest.$ac_ext
13397cat >>conftest.$ac_ext <<_ACEOF
13398/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013399
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013400#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013401#ifdef _POSIX_THREADS
13402yes
13403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013404
13405_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013406if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013407 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013408 unistd_defines_pthreads=yes
13409else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013410 unistd_defines_pthreads=no
13411fi
13412rm -f conftest*
13413
Martin v. Löwiseba40652007-08-30 20:10:57 +000013414 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13415echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013416
Martin v. Löwis11437992002-04-12 09:54:03 +000013417 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013418#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013419_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013420
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013422 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13423echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013424if test "${ac_cv_header_cthreads_h+set}" = set; then
13425 echo $ECHO_N "(cached) $ECHO_C" >&6
13426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013427{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13428echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013429else
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013431{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13432echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013433cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013434/* confdefs.h. */
13435_ACEOF
13436cat confdefs.h >>conftest.$ac_ext
13437cat >>conftest.$ac_ext <<_ACEOF
13438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013439$ac_includes_default
13440#include <cthreads.h>
13441_ACEOF
13442rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013443if { (ac_try="$ac_compile"
13444case "(($ac_try" in
13445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13446 *) ac_try_echo=$ac_try;;
13447esac
13448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13449 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013451 grep -v '^ *+' conftest.er1 >conftest.err
13452 rm -f conftest.er1
13453 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013455 (exit $ac_status); } && {
13456 test -z "$ac_c_werror_flag" ||
13457 test ! -s conftest.err
13458 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013459 ac_header_compiler=yes
13460else
13461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013462sed 's/^/| /' conftest.$ac_ext >&5
13463
Martin v. Löwiseba40652007-08-30 20:10:57 +000013464 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013466
13467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13468{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13469echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013470
13471# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013472{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13473echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013474cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013475/* confdefs.h. */
13476_ACEOF
13477cat confdefs.h >>conftest.$ac_ext
13478cat >>conftest.$ac_ext <<_ACEOF
13479/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013480#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013481_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013482if { (ac_try="$ac_cpp conftest.$ac_ext"
13483case "(($ac_try" in
13484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13485 *) ac_try_echo=$ac_try;;
13486esac
13487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13488 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013489 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013490 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013491 rm -f conftest.er1
13492 cat conftest.err >&5
13493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013494 (exit $ac_status); } >/dev/null && {
13495 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13496 test ! -s conftest.err
13497 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 ac_header_preproc=yes
13499else
13500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013501sed 's/^/| /' conftest.$ac_ext >&5
13502
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013505
Martin v. Löwis11437992002-04-12 09:54:03 +000013506rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013507{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13508echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013509
13510# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013511case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13512 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13514echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013515 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13516echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13517 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013518 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013519 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013520 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13521echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013522 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13523echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13524 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13525echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13526 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13527echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013528 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13529echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013530 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13531echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013532 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013533## ------------------------------------------------ ##
13534## Report this to http://www.python.org/python-bugs ##
13535## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013536_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013537 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013538 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013539esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013540{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13541echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013542if test "${ac_cv_header_cthreads_h+set}" = set; then
13543 echo $ECHO_N "(cached) $ECHO_C" >&6
13544else
13545 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013547{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13548echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
13550fi
13551if test $ac_cv_header_cthreads_h = yes; then
13552 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013553#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013554_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013555
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013557#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013558_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013559
Martin v. Löwis11437992002-04-12 09:54:03 +000013560
13561cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013562#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013563_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013564
13565 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013566 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013567else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013568
Martin v. Löwis11437992002-04-12 09:54:03 +000013569 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013570 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13571echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013572if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13573 echo $ECHO_N "(cached) $ECHO_C" >&6
13574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013575{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13576echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013577else
Martin v. Löwis11437992002-04-12 09:54:03 +000013578 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013579{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13580echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013581cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013582/* confdefs.h. */
13583_ACEOF
13584cat confdefs.h >>conftest.$ac_ext
13585cat >>conftest.$ac_ext <<_ACEOF
13586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013587$ac_includes_default
13588#include <mach/cthreads.h>
13589_ACEOF
13590rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013591if { (ac_try="$ac_compile"
13592case "(($ac_try" in
13593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13594 *) ac_try_echo=$ac_try;;
13595esac
13596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013599 grep -v '^ *+' conftest.er1 >conftest.err
13600 rm -f conftest.er1
13601 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013603 (exit $ac_status); } && {
13604 test -z "$ac_c_werror_flag" ||
13605 test ! -s conftest.err
13606 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013607 ac_header_compiler=yes
13608else
13609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013610sed 's/^/| /' conftest.$ac_ext >&5
13611
Martin v. Löwiseba40652007-08-30 20:10:57 +000013612 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013614
13615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13616{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13617echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013618
13619# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013620{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13621echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013622cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013623/* confdefs.h. */
13624_ACEOF
13625cat confdefs.h >>conftest.$ac_ext
13626cat >>conftest.$ac_ext <<_ACEOF
13627/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013628#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013629_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013630if { (ac_try="$ac_cpp conftest.$ac_ext"
13631case "(($ac_try" in
13632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13633 *) ac_try_echo=$ac_try;;
13634esac
13635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13636 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013637 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013638 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 rm -f conftest.er1
13640 cat conftest.err >&5
13641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013642 (exit $ac_status); } >/dev/null && {
13643 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13644 test ! -s conftest.err
13645 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 ac_header_preproc=yes
13647else
13648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013649sed 's/^/| /' conftest.$ac_ext >&5
13650
Martin v. Löwis11437992002-04-12 09:54:03 +000013651 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013653
Martin v. Löwis11437992002-04-12 09:54:03 +000013654rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013655{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13656echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013657
13658# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013659case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13660 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013661 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13662echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013663 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13664echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13665 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013666 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013667 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013668 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13669echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013670 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13671echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13672 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13673echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13674 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13675echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013676 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13677echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013678 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13679echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013680 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013681## ------------------------------------------------ ##
13682## Report this to http://www.python.org/python-bugs ##
13683## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013684_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013685 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013686 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013687esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013688{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13689echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013690if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13691 echo $ECHO_N "(cached) $ECHO_C" >&6
13692else
13693 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013695{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13696echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013697
13698fi
13699if test $ac_cv_header_mach_cthreads_h = yes; then
13700 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013701#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013702_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013703
Martin v. Löwis11437992002-04-12 09:54:03 +000013704 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013705#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013706_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013707
Martin v. Löwis11437992002-04-12 09:54:03 +000013708
13709cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013710#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013711_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013712
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013713 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013714else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013715
Martin v. Löwiseba40652007-08-30 20:10:57 +000013716 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13717echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013718
Martin v. Löwiseba40652007-08-30 20:10:57 +000013719# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013720if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013721 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13722echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013723 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013724#define WITH_THREAD 1
13725_ACEOF
13726
13727
13728cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013729#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013730_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013731
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013732 LIBS="-lpth $LIBS"
13733 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013734else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013735 { echo "$as_me:$LINENO: result: no" >&5
13736echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013737
13738 # Just looking for pthread_create in libpthread is not enough:
13739 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13740 # So we really have to include pthread.h, and then link.
13741 _libs=$LIBS
13742 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013743 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13744echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013746/* confdefs.h. */
13747_ACEOF
13748cat confdefs.h >>conftest.$ac_ext
13749cat >>conftest.$ac_ext <<_ACEOF
13750/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013751#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013752
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013753void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013754int
13755main ()
13756{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013757
13758pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013759 ;
13760 return 0;
13761}
13762_ACEOF
13763rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013764if { (ac_try="$ac_link"
13765case "(($ac_try" in
13766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13767 *) ac_try_echo=$ac_try;;
13768esac
13769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13770 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013772 grep -v '^ *+' conftest.er1 >conftest.err
13773 rm -f conftest.er1
13774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013776 (exit $ac_status); } && {
13777 test -z "$ac_c_werror_flag" ||
13778 test ! -s conftest.err
13779 } && test -s conftest$ac_exeext &&
13780 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013781
Martin v. Löwiseba40652007-08-30 20:10:57 +000013782 { echo "$as_me:$LINENO: result: yes" >&5
13783echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013785#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013786_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013787
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013788 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013789 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013790else
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013792sed 's/^/| /' conftest.$ac_ext >&5
13793
Martin v. Löwis11437992002-04-12 09:54:03 +000013794
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013795 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013796 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13797echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013798if test "${ac_cv_func_pthread_detach+set}" = set; then
13799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013800else
Martin v. Löwis11437992002-04-12 09:54:03 +000013801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013802/* confdefs.h. */
13803_ACEOF
13804cat confdefs.h >>conftest.$ac_ext
13805cat >>conftest.$ac_ext <<_ACEOF
13806/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013807/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13808 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13809#define pthread_detach innocuous_pthread_detach
13810
Guido van Rossumad678af1998-10-02 14:42:15 +000013811/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013812 which can conflict with char pthread_detach (); below.
13813 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013814 <limits.h> exists even on freestanding compilers. */
13815
13816#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013817# include <limits.h>
13818#else
13819# include <assert.h>
13820#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013821
13822#undef pthread_detach
13823
Martin v. Löwiseba40652007-08-30 20:10:57 +000013824/* Override any GCC internal prototype to avoid an error.
13825 Use char because int might match the return type of a GCC
13826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013827#ifdef __cplusplus
13828extern "C"
13829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013830char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013831/* The GNU C library defines this for functions which it implements
13832 to always fail with ENOSYS. Some functions are actually named
13833 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013834#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013835choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013836#endif
13837
Skip Montanaro6dead952003-09-25 14:50:04 +000013838int
13839main ()
13840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013841return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013842 ;
13843 return 0;
13844}
13845_ACEOF
13846rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013847if { (ac_try="$ac_link"
13848case "(($ac_try" in
13849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13850 *) ac_try_echo=$ac_try;;
13851esac
13852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13853 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013855 grep -v '^ *+' conftest.er1 >conftest.err
13856 rm -f conftest.er1
13857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013859 (exit $ac_status); } && {
13860 test -z "$ac_c_werror_flag" ||
13861 test ! -s conftest.err
13862 } && test -s conftest$ac_exeext &&
13863 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013864 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013865else
Martin v. Löwis11437992002-04-12 09:54:03 +000013866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013867sed 's/^/| /' conftest.$ac_ext >&5
13868
Martin v. Löwiseba40652007-08-30 20:10:57 +000013869 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013871
13872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013873 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013875{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13876echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013877if test $ac_cv_func_pthread_detach = yes; then
13878 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013879#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013880_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013881
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013882 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013883 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013884else
Guido van Rossumad678af1998-10-02 14:42:15 +000013885
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013886 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013887 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13888echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013889if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13890 echo $ECHO_N "(cached) $ECHO_C" >&6
13891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013892{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13893echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013894else
13895 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013896{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13897echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013898cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013899/* confdefs.h. */
13900_ACEOF
13901cat confdefs.h >>conftest.$ac_ext
13902cat >>conftest.$ac_ext <<_ACEOF
13903/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013904$ac_includes_default
13905#include <atheos/threads.h>
13906_ACEOF
13907rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013908if { (ac_try="$ac_compile"
13909case "(($ac_try" in
13910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13911 *) ac_try_echo=$ac_try;;
13912esac
13913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013916 grep -v '^ *+' conftest.er1 >conftest.err
13917 rm -f conftest.er1
13918 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013920 (exit $ac_status); } && {
13921 test -z "$ac_c_werror_flag" ||
13922 test ! -s conftest.err
13923 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013924 ac_header_compiler=yes
13925else
13926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013927sed 's/^/| /' conftest.$ac_ext >&5
13928
Martin v. Löwiseba40652007-08-30 20:10:57 +000013929 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931
13932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13933{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13934echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013935
13936# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013937{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13938echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013940/* confdefs.h. */
13941_ACEOF
13942cat confdefs.h >>conftest.$ac_ext
13943cat >>conftest.$ac_ext <<_ACEOF
13944/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013945#include <atheos/threads.h>
13946_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013947if { (ac_try="$ac_cpp conftest.$ac_ext"
13948case "(($ac_try" in
13949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13950 *) ac_try_echo=$ac_try;;
13951esac
13952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13953 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013954 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013955 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013956 rm -f conftest.er1
13957 cat conftest.err >&5
13958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013959 (exit $ac_status); } >/dev/null && {
13960 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13961 test ! -s conftest.err
13962 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013963 ac_header_preproc=yes
13964else
13965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013966sed 's/^/| /' conftest.$ac_ext >&5
13967
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013968 ac_header_preproc=no
13969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013970
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013971rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013972{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13973echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013974
13975# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013976case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13977 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013978 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13979echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013980 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
13981echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
13982 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013983 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013984 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013985 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
13986echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013987 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
13988echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
13989 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
13990echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
13991 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
13992echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013993 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
13994echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013995 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
13996echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013998## ------------------------------------------------ ##
13999## Report this to http://www.python.org/python-bugs ##
14000## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014001_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014002 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014003 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014004esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014005{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14006echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014007if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14008 echo $ECHO_N "(cached) $ECHO_C" >&6
14009else
14010 ac_cv_header_atheos_threads_h=$ac_header_preproc
14011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014012{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14013echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014014
14015fi
14016if test $ac_cv_header_atheos_threads_h = yes; then
14017 cat >>confdefs.h <<\_ACEOF
14018#define WITH_THREAD 1
14019_ACEOF
14020
14021
14022cat >>confdefs.h <<\_ACEOF
14023#define ATHEOS_THREADS 1
14024_ACEOF
14025
14026 THREADOBJ="Python/thread.o"
14027else
14028
Martin v. Löwis11437992002-04-12 09:54:03 +000014029 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014030 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14031echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014032if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14033 echo $ECHO_N "(cached) $ECHO_C" >&6
14034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014035{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14036echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014037else
Martin v. Löwis11437992002-04-12 09:54:03 +000014038 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014039{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14040echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014042/* confdefs.h. */
14043_ACEOF
14044cat confdefs.h >>conftest.$ac_ext
14045cat >>conftest.$ac_ext <<_ACEOF
14046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014047$ac_includes_default
14048#include <kernel/OS.h>
14049_ACEOF
14050rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014051if { (ac_try="$ac_compile"
14052case "(($ac_try" in
14053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14054 *) ac_try_echo=$ac_try;;
14055esac
14056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014059 grep -v '^ *+' conftest.er1 >conftest.err
14060 rm -f conftest.er1
14061 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014063 (exit $ac_status); } && {
14064 test -z "$ac_c_werror_flag" ||
14065 test ! -s conftest.err
14066 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 ac_header_compiler=yes
14068else
14069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014070sed 's/^/| /' conftest.$ac_ext >&5
14071
Martin v. Löwiseba40652007-08-30 20:10:57 +000014072 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014074
14075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14076{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14077echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014078
14079# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014080{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14081echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014083/* confdefs.h. */
14084_ACEOF
14085cat confdefs.h >>conftest.$ac_ext
14086cat >>conftest.$ac_ext <<_ACEOF
14087/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014088#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014089_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014090if { (ac_try="$ac_cpp conftest.$ac_ext"
14091case "(($ac_try" in
14092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14093 *) ac_try_echo=$ac_try;;
14094esac
14095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14096 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014097 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014098 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 rm -f conftest.er1
14100 cat conftest.err >&5
14101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014102 (exit $ac_status); } >/dev/null && {
14103 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14104 test ! -s conftest.err
14105 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014106 ac_header_preproc=yes
14107else
14108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014109sed 's/^/| /' conftest.$ac_ext >&5
14110
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014113
Martin v. Löwis11437992002-04-12 09:54:03 +000014114rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014115{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14116echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014117
Martin v. Löwis11437992002-04-12 09:54:03 +000014118# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014119case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14120 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014121 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14122echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014123 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14124echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14125 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014126 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014127 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014128 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14129echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014130 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14131echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14132 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14133echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14134 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14135echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014136 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14137echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014138 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14139echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014140 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014141## ------------------------------------------------ ##
14142## Report this to http://www.python.org/python-bugs ##
14143## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014144_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014145 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014146 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014147esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014148{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14149echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014150if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14151 echo $ECHO_N "(cached) $ECHO_C" >&6
14152else
14153 ac_cv_header_kernel_OS_h=$ac_header_preproc
14154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014155{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14156echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014157
14158fi
14159if test $ac_cv_header_kernel_OS_h = yes; then
14160 cat >>confdefs.h <<\_ACEOF
14161#define WITH_THREAD 1
14162_ACEOF
14163
14164
14165cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014166#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014167_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014168
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014169 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014170else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014171
Martin v. Löwiseba40652007-08-30 20:10:57 +000014172 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14173echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014174if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14175 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014176else
Martin v. Löwis11437992002-04-12 09:54:03 +000014177 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014178LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014179cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014180/* confdefs.h. */
14181_ACEOF
14182cat confdefs.h >>conftest.$ac_ext
14183cat >>conftest.$ac_ext <<_ACEOF
14184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014185
Martin v. Löwiseba40652007-08-30 20:10:57 +000014186/* Override any GCC internal prototype to avoid an error.
14187 Use char because int might match the return type of a GCC
14188 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014189#ifdef __cplusplus
14190extern "C"
14191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014192char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014193int
14194main ()
14195{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014196return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014197 ;
14198 return 0;
14199}
14200_ACEOF
14201rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014202if { (ac_try="$ac_link"
14203case "(($ac_try" in
14204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14205 *) ac_try_echo=$ac_try;;
14206esac
14207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14208 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014210 grep -v '^ *+' conftest.er1 >conftest.err
14211 rm -f conftest.er1
14212 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014214 (exit $ac_status); } && {
14215 test -z "$ac_c_werror_flag" ||
14216 test ! -s conftest.err
14217 } && test -s conftest$ac_exeext &&
14218 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014220else
Martin v. Löwis11437992002-04-12 09:54:03 +000014221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014222sed 's/^/| /' conftest.$ac_ext >&5
14223
Martin v. Löwiseba40652007-08-30 20:10:57 +000014224 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014226
14227rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014228 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014229LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014231{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14232echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014233if test $ac_cv_lib_pthreads_pthread_create = yes; then
14234 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014235#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014236_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014237
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014238 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014239 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014240 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014241else
Greg Steinadf63d62000-07-05 10:38:09 +000014242
Martin v. Löwiseba40652007-08-30 20:10:57 +000014243 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14244echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014245if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14246 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014247else
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014249LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014250cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014251/* confdefs.h. */
14252_ACEOF
14253cat confdefs.h >>conftest.$ac_ext
14254cat >>conftest.$ac_ext <<_ACEOF
14255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014256
Martin v. Löwiseba40652007-08-30 20:10:57 +000014257/* Override any GCC internal prototype to avoid an error.
14258 Use char because int might match the return type of a GCC
14259 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014260#ifdef __cplusplus
14261extern "C"
14262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014263char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014264int
14265main ()
14266{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014267return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014268 ;
14269 return 0;
14270}
14271_ACEOF
14272rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014273if { (ac_try="$ac_link"
14274case "(($ac_try" in
14275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14276 *) ac_try_echo=$ac_try;;
14277esac
14278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14279 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014281 grep -v '^ *+' conftest.er1 >conftest.err
14282 rm -f conftest.er1
14283 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014285 (exit $ac_status); } && {
14286 test -z "$ac_c_werror_flag" ||
14287 test ! -s conftest.err
14288 } && test -s conftest$ac_exeext &&
14289 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014290 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014291else
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014293sed 's/^/| /' conftest.$ac_ext >&5
14294
Martin v. Löwiseba40652007-08-30 20:10:57 +000014295 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014297
14298rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014300LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014302{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14303echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014304if test $ac_cv_lib_c_r_pthread_create = yes; then
14305 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014306#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014307_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014308
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014309 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014310 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014311 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014312else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014313
Martin v. Löwiseba40652007-08-30 20:10:57 +000014314 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14315echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014316if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14317 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014318else
Martin v. Löwis11437992002-04-12 09:54:03 +000014319 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014320LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014322/* confdefs.h. */
14323_ACEOF
14324cat confdefs.h >>conftest.$ac_ext
14325cat >>conftest.$ac_ext <<_ACEOF
14326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014327
Martin v. Löwiseba40652007-08-30 20:10:57 +000014328/* Override any GCC internal prototype to avoid an error.
14329 Use char because int might match the return type of a GCC
14330 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014331#ifdef __cplusplus
14332extern "C"
14333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014334char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014335int
14336main ()
14337{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014338return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014339 ;
14340 return 0;
14341}
14342_ACEOF
14343rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014344if { (ac_try="$ac_link"
14345case "(($ac_try" in
14346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14347 *) ac_try_echo=$ac_try;;
14348esac
14349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14350 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014352 grep -v '^ *+' conftest.er1 >conftest.err
14353 rm -f conftest.er1
14354 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014356 (exit $ac_status); } && {
14357 test -z "$ac_c_werror_flag" ||
14358 test ! -s conftest.err
14359 } && test -s conftest$ac_exeext &&
14360 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014361 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014362else
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014364sed 's/^/| /' conftest.$ac_ext >&5
14365
Martin v. Löwiseba40652007-08-30 20:10:57 +000014366 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014368
14369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014371LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014373{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14374echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014375if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14376 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014377#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014378_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014379
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014380 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014381 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014382 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014383else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014384
Martin v. Löwiseba40652007-08-30 20:10:57 +000014385 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14386echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014387if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14388 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014389else
Martin v. Löwis11437992002-04-12 09:54:03 +000014390 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014391LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014392cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014393/* confdefs.h. */
14394_ACEOF
14395cat confdefs.h >>conftest.$ac_ext
14396cat >>conftest.$ac_ext <<_ACEOF
14397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014398
Martin v. Löwiseba40652007-08-30 20:10:57 +000014399/* Override any GCC internal prototype to avoid an error.
14400 Use char because int might match the return type of a GCC
14401 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014402#ifdef __cplusplus
14403extern "C"
14404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014405char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014406int
14407main ()
14408{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014409return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 ;
14411 return 0;
14412}
14413_ACEOF
14414rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014415if { (ac_try="$ac_link"
14416case "(($ac_try" in
14417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14418 *) ac_try_echo=$ac_try;;
14419esac
14420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14421 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014423 grep -v '^ *+' conftest.er1 >conftest.err
14424 rm -f conftest.er1
14425 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014427 (exit $ac_status); } && {
14428 test -z "$ac_c_werror_flag" ||
14429 test ! -s conftest.err
14430 } && test -s conftest$ac_exeext &&
14431 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014432 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014433else
Martin v. Löwis11437992002-04-12 09:54:03 +000014434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014435sed 's/^/| /' conftest.$ac_ext >&5
14436
Martin v. Löwiseba40652007-08-30 20:10:57 +000014437 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014439
14440rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014441 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014442LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014444{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14445echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014446if test $ac_cv_lib_cma_pthread_create = yes; then
14447 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014448#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014449_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014450
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014451 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014452 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014453 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014454else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014455
Martin v. Löwis130fb172001-07-19 11:00:41 +000014456 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014457fi
14458
Guido van Rossum627b2d71993-12-24 10:39:16 +000014459
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014460fi
14461
Guido van Rossum0be3e491997-05-22 20:33:33 +000014462fi
14463
Guido van Rossum49545951997-12-02 19:28:29 +000014464fi
14465
Guido van Rossumb93a8621998-05-07 13:27:32 +000014466fi
14467
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014468
Michael W. Hudson54241132001-12-07 15:38:26 +000014469fi
14470
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014471
14472fi
14473
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014475
14476rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014477 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014478fi
14479
Martin v. Löwis11437992002-04-12 09:54:03 +000014480fi
14481
14482
14483fi
14484
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014485
Michael W. Hudson54241132001-12-07 15:38:26 +000014486
Martin v. Löwiseba40652007-08-30 20:10:57 +000014487 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14488echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014489if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14490 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014491else
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014493LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014494cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014495/* confdefs.h. */
14496_ACEOF
14497cat confdefs.h >>conftest.$ac_ext
14498cat >>conftest.$ac_ext <<_ACEOF
14499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014500
Martin v. Löwiseba40652007-08-30 20:10:57 +000014501/* Override any GCC internal prototype to avoid an error.
14502 Use char because int might match the return type of a GCC
14503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014504#ifdef __cplusplus
14505extern "C"
14506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014507char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014508int
14509main ()
14510{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014511return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014512 ;
14513 return 0;
14514}
14515_ACEOF
14516rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014517if { (ac_try="$ac_link"
14518case "(($ac_try" in
14519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14520 *) ac_try_echo=$ac_try;;
14521esac
14522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14523 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014525 grep -v '^ *+' conftest.er1 >conftest.err
14526 rm -f conftest.er1
14527 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014529 (exit $ac_status); } && {
14530 test -z "$ac_c_werror_flag" ||
14531 test ! -s conftest.err
14532 } && test -s conftest$ac_exeext &&
14533 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014534 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014535else
Martin v. Löwis11437992002-04-12 09:54:03 +000014536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014537sed 's/^/| /' conftest.$ac_ext >&5
14538
Martin v. Löwiseba40652007-08-30 20:10:57 +000014539 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014541
14542rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014543 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014544LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014546{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14547echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014548if test $ac_cv_lib_mpc_usconfig = yes; then
14549 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014550#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014551_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014552
Martin v. Löwis130fb172001-07-19 11:00:41 +000014553 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014554 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014555 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014556fi
14557
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014558
Neal Norwitza978ab02002-11-02 16:58:05 +000014559 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014560 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14561echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014562if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14563 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014564else
Martin v. Löwis11437992002-04-12 09:54:03 +000014565 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014566LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014567cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014568/* confdefs.h. */
14569_ACEOF
14570cat confdefs.h >>conftest.$ac_ext
14571cat >>conftest.$ac_ext <<_ACEOF
14572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014573
Martin v. Löwiseba40652007-08-30 20:10:57 +000014574/* Override any GCC internal prototype to avoid an error.
14575 Use char because int might match the return type of a GCC
14576 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014577#ifdef __cplusplus
14578extern "C"
14579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014580char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014581int
14582main ()
14583{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014584return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014585 ;
14586 return 0;
14587}
14588_ACEOF
14589rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014590if { (ac_try="$ac_link"
14591case "(($ac_try" in
14592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14593 *) ac_try_echo=$ac_try;;
14594esac
14595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14596 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014598 grep -v '^ *+' conftest.er1 >conftest.err
14599 rm -f conftest.er1
14600 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014602 (exit $ac_status); } && {
14603 test -z "$ac_c_werror_flag" ||
14604 test ! -s conftest.err
14605 } && test -s conftest$ac_exeext &&
14606 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014608else
Martin v. Löwis11437992002-04-12 09:54:03 +000014609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014610sed 's/^/| /' conftest.$ac_ext >&5
14611
Martin v. Löwiseba40652007-08-30 20:10:57 +000014612 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014614
14615rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014616 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014617LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014619{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14620echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014621if test $ac_cv_lib_thread_thr_create = yes; then
14622 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014623#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014624_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014625
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014626 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014627 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014628 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014629fi
14630
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014631 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014632
Martin v. Löwis130fb172001-07-19 11:00:41 +000014633 if test "$USE_THREAD_MODULE" != "#"
14634 then
14635 # If the above checks didn't disable threads, (at least) OSF1
14636 # needs this '-threads' argument during linking.
14637 case $ac_sys_system in
14638 OSF1) LDLAST=-threads;;
14639 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014640 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014641fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014642
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014643if test "$posix_threads" = "yes"; then
14644 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014645
14646cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014647#define _POSIX_THREADS 1
14648_ACEOF
14649
14650 fi
14651
14652 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14653 case $ac_sys_system/$ac_sys_release in
14654 SunOS/5.6)
14655cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014656#define HAVE_PTHREAD_DESTRUCTOR 1
14657_ACEOF
14658
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014659 ;;
14660 SunOS/5.8)
14661cat >>confdefs.h <<\_ACEOF
14662#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14663_ACEOF
14664
14665 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014666 AIX/5)
14667cat >>confdefs.h <<\_ACEOF
14668#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14669_ACEOF
14670
14671 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014672 esac
14673
Martin v. Löwiseba40652007-08-30 20:10:57 +000014674 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14675echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014676 if test "${ac_cv_pthread_system_supported+set}" = set; then
14677 echo $ECHO_N "(cached) $ECHO_C" >&6
14678else
14679 if test "$cross_compiling" = yes; then
14680 ac_cv_pthread_system_supported=no
14681else
14682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014683/* confdefs.h. */
14684_ACEOF
14685cat confdefs.h >>conftest.$ac_ext
14686cat >>conftest.$ac_ext <<_ACEOF
14687/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014688#include <pthread.h>
14689 void *foo(void *parm) {
14690 return NULL;
14691 }
14692 main() {
14693 pthread_attr_t attr;
14694 pthread_t id;
14695 if (pthread_attr_init(&attr)) exit(-1);
14696 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14697 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14698 exit(0);
14699 }
14700_ACEOF
14701rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014702if { (ac_try="$ac_link"
14703case "(($ac_try" in
14704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14705 *) ac_try_echo=$ac_try;;
14706esac
14707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14708 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014709 ac_status=$?
14710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14711 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014712 { (case "(($ac_try" in
14713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14714 *) ac_try_echo=$ac_try;;
14715esac
14716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14717 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014718 ac_status=$?
14719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14720 (exit $ac_status); }; }; then
14721 ac_cv_pthread_system_supported=yes
14722else
14723 echo "$as_me: program exited with status $ac_status" >&5
14724echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014725sed 's/^/| /' conftest.$ac_ext >&5
14726
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014727( exit $ac_status )
14728ac_cv_pthread_system_supported=no
14729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014730rm -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 +000014731fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014732
Martin v. Löwiseba40652007-08-30 20:10:57 +000014733
14734
Guido van Rossum627b2d71993-12-24 10:39:16 +000014735fi
14736
Martin v. Löwiseba40652007-08-30 20:10:57 +000014737 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14738echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014739 if test "$ac_cv_pthread_system_supported" = "yes"; then
14740
14741cat >>confdefs.h <<\_ACEOF
14742#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14743_ACEOF
14744
14745 fi
14746
14747for ac_func in pthread_sigmask
14748do
14749as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014750{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14751echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14752if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014753 echo $ECHO_N "(cached) $ECHO_C" >&6
14754else
14755 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014756/* confdefs.h. */
14757_ACEOF
14758cat confdefs.h >>conftest.$ac_ext
14759cat >>conftest.$ac_ext <<_ACEOF
14760/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014761/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14762 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14763#define $ac_func innocuous_$ac_func
14764
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014765/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014766 which can conflict with char $ac_func (); below.
14767 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014768 <limits.h> exists even on freestanding compilers. */
14769
14770#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014771# include <limits.h>
14772#else
14773# include <assert.h>
14774#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014775
14776#undef $ac_func
14777
Martin v. Löwiseba40652007-08-30 20:10:57 +000014778/* Override any GCC internal prototype to avoid an error.
14779 Use char because int might match the return type of a GCC
14780 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014781#ifdef __cplusplus
14782extern "C"
14783#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014784char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014785/* The GNU C library defines this for functions which it implements
14786 to always fail with ENOSYS. Some functions are actually named
14787 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014788#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014789choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014790#endif
14791
Skip Montanaro6dead952003-09-25 14:50:04 +000014792int
14793main ()
14794{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014795return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014796 ;
14797 return 0;
14798}
14799_ACEOF
14800rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014801if { (ac_try="$ac_link"
14802case "(($ac_try" in
14803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14804 *) ac_try_echo=$ac_try;;
14805esac
14806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14807 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014809 grep -v '^ *+' conftest.er1 >conftest.err
14810 rm -f conftest.er1
14811 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014813 (exit $ac_status); } && {
14814 test -z "$ac_c_werror_flag" ||
14815 test ! -s conftest.err
14816 } && test -s conftest$ac_exeext &&
14817 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014818 eval "$as_ac_var=yes"
14819else
14820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014821sed 's/^/| /' conftest.$ac_ext >&5
14822
Martin v. Löwiseba40652007-08-30 20:10:57 +000014823 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014825
14826rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014829ac_res=`eval echo '${'$as_ac_var'}'`
14830 { echo "$as_me:$LINENO: result: $ac_res" >&5
14831echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014832if test `eval echo '${'$as_ac_var'}'` = yes; then
14833 cat >>confdefs.h <<_ACEOF
14834#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14835_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014836 case $ac_sys_system in
14837 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014838
Jason Tishlerfac083d2003-07-22 15:20:49 +000014839cat >>confdefs.h <<\_ACEOF
14840#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14841_ACEOF
14842
14843 ;;
14844 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014845fi
14846done
14847
14848fi
14849
14850
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014851# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014852
14853
Martin v. Löwiseba40652007-08-30 20:10:57 +000014854{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14855echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14856# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014857if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014858 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014859 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014860 { echo "$as_me:$LINENO: result: no" >&5
14861echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014862 ipv6=no
14863 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014864 *) { echo "$as_me:$LINENO: result: yes" >&5
14865echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014866 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014867#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014868_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014869
14870 ipv6=yes
14871 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014872 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014873else
Martin v. Löwis11437992002-04-12 09:54:03 +000014874
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014875 if test "$cross_compiling" = yes; then
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
14880else
Martin v. Löwis11437992002-04-12 09:54:03 +000014881 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014882/* confdefs.h. */
14883_ACEOF
14884cat confdefs.h >>conftest.$ac_ext
14885cat >>conftest.$ac_ext <<_ACEOF
14886/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014887 /* AF_INET6 available check */
14888#include <sys/types.h>
14889#include <sys/socket.h>
14890main()
14891{
14892 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14893 exit(1);
14894 else
14895 exit(0);
14896}
14897
Martin v. Löwis11437992002-04-12 09:54:03 +000014898_ACEOF
14899rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014900if { (ac_try="$ac_link"
14901case "(($ac_try" in
14902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14903 *) ac_try_echo=$ac_try;;
14904esac
14905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14906 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014907 ac_status=$?
14908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14909 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014910 { (case "(($ac_try" in
14911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14912 *) ac_try_echo=$ac_try;;
14913esac
14914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14915 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 ac_status=$?
14917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14918 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014919 { echo "$as_me:$LINENO: result: yes" >&5
14920echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014921 ipv6=yes
14922else
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 echo "$as_me: program exited with status $ac_status" >&5
14924echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014925sed 's/^/| /' conftest.$ac_ext >&5
14926
Martin v. Löwis11437992002-04-12 09:54:03 +000014927( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014928{ echo "$as_me:$LINENO: result: no" >&5
14929echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014930 ipv6=no
14931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014932rm -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 +000014933fi
14934
Martin v. Löwiseba40652007-08-30 20:10:57 +000014935
14936
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014937if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014938 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14939echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014941/* confdefs.h. */
14942_ACEOF
14943cat confdefs.h >>conftest.$ac_ext
14944cat >>conftest.$ac_ext <<_ACEOF
14945/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014946#include <sys/types.h>
14947#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014948int
14949main ()
14950{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014951struct sockaddr_in6 x;
14952x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 ;
14954 return 0;
14955}
14956_ACEOF
14957rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014958if { (ac_try="$ac_compile"
14959case "(($ac_try" in
14960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14961 *) ac_try_echo=$ac_try;;
14962esac
14963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014966 grep -v '^ *+' conftest.er1 >conftest.err
14967 rm -f conftest.er1
14968 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014970 (exit $ac_status); } && {
14971 test -z "$ac_c_werror_flag" ||
14972 test ! -s conftest.err
14973 } && test -s conftest.$ac_objext; then
14974 { echo "$as_me:$LINENO: result: yes" >&5
14975echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014976 ipv6=yes
14977else
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014979sed 's/^/| /' conftest.$ac_ext >&5
14980
Martin v. Löwiseba40652007-08-30 20:10:57 +000014981 { echo "$as_me:$LINENO: result: no" >&5
14982echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014983 ipv6=no
14984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014985
14986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014987fi
14988
14989if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014991#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014992_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014993
14994fi
14995
Martin v. Löwiseba40652007-08-30 20:10:57 +000014996fi
14997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014998
14999ipv6type=unknown
15000ipv6lib=none
15001ipv6trylibc=no
15002
15003if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015004 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15005echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015006 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15007 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015008 case $i in
15009 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015011/* confdefs.h. */
15012_ACEOF
15013cat confdefs.h >>conftest.$ac_ext
15014cat >>conftest.$ac_ext <<_ACEOF
15015/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015016
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015017#include <netinet/in.h>
15018#ifdef IPV6_INRIA_VERSION
15019yes
15020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015021_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015023 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015024 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015025fi
15026rm -f conftest*
15027
15028 ;;
15029 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015031/* confdefs.h. */
15032_ACEOF
15033cat confdefs.h >>conftest.$ac_ext
15034cat >>conftest.$ac_ext <<_ACEOF
15035/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015036
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015037#include <netinet/in.h>
15038#ifdef __KAME__
15039yes
15040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015041_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015043 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015044 ipv6type=$i;
15045 ipv6lib=inet6
15046 ipv6libdir=/usr/local/v6/lib
15047 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015048fi
15049rm -f conftest*
15050
15051 ;;
15052 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015054/* confdefs.h. */
15055_ACEOF
15056cat confdefs.h >>conftest.$ac_ext
15057cat >>conftest.$ac_ext <<_ACEOF
15058/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015059
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015060#include <features.h>
15061#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15062yes
15063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015064_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015066 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015067 ipv6type=$i;
15068 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015069fi
15070rm -f conftest*
15071
15072 ;;
15073 linux-inet6)
15074 if test -d /usr/inet6; then
15075 ipv6type=$i
15076 ipv6lib=inet6
15077 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015078 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015079 fi
15080 ;;
15081 solaris)
15082 if test -f /etc/netconfig; then
15083 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15084 ipv6type=$i
15085 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015086 fi
15087 fi
15088 ;;
15089 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015091/* confdefs.h. */
15092_ACEOF
15093cat confdefs.h >>conftest.$ac_ext
15094cat >>conftest.$ac_ext <<_ACEOF
15095/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015096
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015097#include <sys/param.h>
15098#ifdef _TOSHIBA_INET6
15099yes
15100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015101_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015103 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015104 ipv6type=$i;
15105 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015106 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015107fi
15108rm -f conftest*
15109
15110 ;;
15111 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015113/* confdefs.h. */
15114_ACEOF
15115cat confdefs.h >>conftest.$ac_ext
15116cat >>conftest.$ac_ext <<_ACEOF
15117/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015118
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015119#include </usr/local/v6/include/sys/v6config.h>
15120#ifdef __V6D__
15121yes
15122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015123_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015125 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015126 ipv6type=$i;
15127 ipv6lib=v6;
15128 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015129 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015130fi
15131rm -f conftest*
15132
15133 ;;
15134 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015136/* confdefs.h. */
15137_ACEOF
15138cat confdefs.h >>conftest.$ac_ext
15139cat >>conftest.$ac_ext <<_ACEOF
15140/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015141
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015142#include <sys/param.h>
15143#ifdef _ZETA_MINAMI_INET6
15144yes
15145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015146_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015147if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015148 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015149 ipv6type=$i;
15150 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015151 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015152fi
15153rm -f conftest*
15154
15155 ;;
15156 esac
15157 if test "$ipv6type" != "unknown"; then
15158 break
15159 fi
15160 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015161 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15162echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015163fi
15164
15165if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15166 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15167 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15168 echo "using lib$ipv6lib"
15169 else
15170 if test $ipv6trylibc = "yes"; then
15171 echo "using libc"
15172 else
15173 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15174 echo "You need to fetch lib$ipv6lib.a from appropriate"
15175 echo 'ipv6 kit and compile beforehand.'
15176 exit 1
15177 fi
15178 fi
15179fi
15180
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015181# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015182{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15183echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015184
Martin v. Löwiseba40652007-08-30 20:10:57 +000015185# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015186if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015187 withval=$with_doc_strings;
15188fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015189
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015190
15191if test -z "$with_doc_strings"
15192then with_doc_strings="yes"
15193fi
15194if test "$with_doc_strings" != "no"
15195then
15196
15197cat >>confdefs.h <<\_ACEOF
15198#define WITH_DOC_STRINGS 1
15199_ACEOF
15200
15201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15203echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015204
Neil Schemenauera35c6882001-02-27 04:45:05 +000015205# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015206{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15207echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015208
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015210if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015211 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015212if test "$withval" != no
15213then
15214
15215cat >>confdefs.h <<\_ACEOF
15216#define WITH_TSC 1
15217_ACEOF
15218
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219 { echo "$as_me:$LINENO: result: yes" >&5
15220echo "${ECHO_T}yes" >&6; }
15221else { echo "$as_me:$LINENO: result: no" >&5
15222echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015223fi
15224else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015225 { echo "$as_me:$LINENO: result: no" >&5
15226echo "${ECHO_T}no" >&6; }
15227fi
15228
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015229
15230# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015231{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15232echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015233
Martin v. Löwiseba40652007-08-30 20:10:57 +000015234# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015235if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015236 withval=$with_pymalloc;
15237fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015238
Neil Schemenauera35c6882001-02-27 04:45:05 +000015239
Neil Schemenauer16c22972002-03-22 15:34:49 +000015240if test -z "$with_pymalloc"
15241then with_pymalloc="yes"
15242fi
15243if test "$with_pymalloc" != "no"
15244then
Martin v. Löwis11437992002-04-12 09:54:03 +000015245
15246cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015247#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015248_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015249
15250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015251{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15252echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015253
Barry Warsawef82cd72000-06-30 16:21:01 +000015254# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015255{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15256echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015257
Martin v. Löwiseba40652007-08-30 20:10:57 +000015258# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015259if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015260 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015261if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015262then
15263
15264cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015265#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015266_ACEOF
15267
Martin v. Löwiseba40652007-08-30 20:10:57 +000015268 { echo "$as_me:$LINENO: result: yes" >&5
15269echo "${ECHO_T}yes" >&6; }
15270else { echo "$as_me:$LINENO: result: no" >&5
15271echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015272fi
15273else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015274 { echo "$as_me:$LINENO: result: no" >&5
15275echo "${ECHO_T}no" >&6; }
15276fi
15277
Barry Warsawef82cd72000-06-30 16:21:01 +000015278
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015279# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015280
Guido van Rossum98935bf2001-09-05 19:13:16 +000015281DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015282
Guido van Rossume97ee181999-12-20 21:27:22 +000015283# the dlopen() function means we might want to use dynload_shlib.o. some
15284# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015285
Thomas Wouters3a584202000-08-05 23:28:51 +000015286for ac_func in dlopen
15287do
Martin v. Löwis11437992002-04-12 09:54:03 +000015288as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015289{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15290echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15291if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015292 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015293else
Martin v. Löwis11437992002-04-12 09:54:03 +000015294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015295/* confdefs.h. */
15296_ACEOF
15297cat confdefs.h >>conftest.$ac_ext
15298cat >>conftest.$ac_ext <<_ACEOF
15299/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015300/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15301 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15302#define $ac_func innocuous_$ac_func
15303
Guido van Rossume97ee181999-12-20 21:27:22 +000015304/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015305 which can conflict with char $ac_func (); below.
15306 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015307 <limits.h> exists even on freestanding compilers. */
15308
15309#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015310# include <limits.h>
15311#else
15312# include <assert.h>
15313#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015314
15315#undef $ac_func
15316
Martin v. Löwiseba40652007-08-30 20:10:57 +000015317/* Override any GCC internal prototype to avoid an error.
15318 Use char because int might match the return type of a GCC
15319 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015320#ifdef __cplusplus
15321extern "C"
15322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015323char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015324/* The GNU C library defines this for functions which it implements
15325 to always fail with ENOSYS. Some functions are actually named
15326 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015327#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015328choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015329#endif
15330
Skip Montanaro6dead952003-09-25 14:50:04 +000015331int
15332main ()
15333{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015334return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015335 ;
15336 return 0;
15337}
15338_ACEOF
15339rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015340if { (ac_try="$ac_link"
15341case "(($ac_try" in
15342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15343 *) ac_try_echo=$ac_try;;
15344esac
15345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15346 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015348 grep -v '^ *+' conftest.er1 >conftest.err
15349 rm -f conftest.er1
15350 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015352 (exit $ac_status); } && {
15353 test -z "$ac_c_werror_flag" ||
15354 test ! -s conftest.err
15355 } && test -s conftest$ac_exeext &&
15356 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015357 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015358else
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015360sed 's/^/| /' conftest.$ac_ext >&5
15361
Martin v. Löwiseba40652007-08-30 20:10:57 +000015362 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015364
15365rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015366 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368ac_res=`eval echo '${'$as_ac_var'}'`
15369 { echo "$as_me:$LINENO: result: $ac_res" >&5
15370echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015371if test `eval echo '${'$as_ac_var'}'` = yes; then
15372 cat >>confdefs.h <<_ACEOF
15373#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15374_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015375
Guido van Rossume97ee181999-12-20 21:27:22 +000015376fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015377done
Guido van Rossume97ee181999-12-20 21:27:22 +000015378
Michael W. Hudson54241132001-12-07 15:38:26 +000015379
Guido van Rossume97ee181999-12-20 21:27:22 +000015380# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15381# loading of modules.
15382
Martin v. Löwiseba40652007-08-30 20:10:57 +000015383{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15384echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015385if test -z "$DYNLOADFILE"
15386then
15387 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015388 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15389 if test "$ac_cv_func_dlopen" = yes
15390 then DYNLOADFILE="dynload_shlib.o"
15391 else DYNLOADFILE="dynload_aix.o"
15392 fi
15393 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015394 BeOS*) DYNLOADFILE="dynload_beos.o";;
15395 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015396 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15397 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015398 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015399 *)
15400 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15401 # out any dynamic loading
15402 if test "$ac_cv_func_dlopen" = yes
15403 then DYNLOADFILE="dynload_shlib.o"
15404 else DYNLOADFILE="dynload_stub.o"
15405 fi
15406 ;;
15407 esac
15408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015409{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15410echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015411if test "$DYNLOADFILE" != "dynload_stub.o"
15412then
Martin v. Löwis11437992002-04-12 09:54:03 +000015413
15414cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015415#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015416_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015417
15418fi
15419
Neil Schemenauer4e425612001-06-19 15:44:15 +000015420# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15421
Michael W. Hudson54241132001-12-07 15:38:26 +000015422
Martin v. Löwiseba40652007-08-30 20:10:57 +000015423{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15424echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015425if test -z "$MACHDEP_OBJS"
15426then
Jack Jansene578a632001-08-15 01:27:14 +000015427 MACHDEP_OBJS=$extra_machdep_objs
15428else
15429 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015431{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15432echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015433
Guido van Rossum627b2d71993-12-24 10:39:16 +000015434# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000015506
Martin v. Löwisc3001752005-01-23 09:27:24 +000015507
15508
Neal Norwitz05a45592006-03-20 06:30:08 +000015509
15510
Martin v. Löwis382abef2007-02-19 10:55:19 +000015511
15512
Christian Heimes36281872007-11-30 21:11:28 +000015513
Martin v. Löwisaef18b12008-03-24 13:31:16 +000015514
15515
15516for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
15517 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015518 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015519 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015520 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015521 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015522 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015523 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015524 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015525 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015526 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015527 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015528do
Martin v. Löwis11437992002-04-12 09:54:03 +000015529as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015530{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15531echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15532if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015533 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015534else
Martin v. Löwis11437992002-04-12 09:54:03 +000015535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015536/* confdefs.h. */
15537_ACEOF
15538cat confdefs.h >>conftest.$ac_ext
15539cat >>conftest.$ac_ext <<_ACEOF
15540/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015541/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15542 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15543#define $ac_func innocuous_$ac_func
15544
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015545/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015546 which can conflict with char $ac_func (); below.
15547 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015548 <limits.h> exists even on freestanding compilers. */
15549
15550#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015551# include <limits.h>
15552#else
15553# include <assert.h>
15554#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015555
15556#undef $ac_func
15557
Martin v. Löwiseba40652007-08-30 20:10:57 +000015558/* Override any GCC internal prototype to avoid an error.
15559 Use char because int might match the return type of a GCC
15560 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015561#ifdef __cplusplus
15562extern "C"
15563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015564char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015565/* The GNU C library defines this for functions which it implements
15566 to always fail with ENOSYS. Some functions are actually named
15567 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015568#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015569choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015570#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015571
Skip Montanaro6dead952003-09-25 14:50:04 +000015572int
15573main ()
15574{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015575return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 ;
15577 return 0;
15578}
15579_ACEOF
15580rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015581if { (ac_try="$ac_link"
15582case "(($ac_try" in
15583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15584 *) ac_try_echo=$ac_try;;
15585esac
15586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15587 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015589 grep -v '^ *+' conftest.er1 >conftest.err
15590 rm -f conftest.er1
15591 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015593 (exit $ac_status); } && {
15594 test -z "$ac_c_werror_flag" ||
15595 test ! -s conftest.err
15596 } && test -s conftest$ac_exeext &&
15597 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015598 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015599else
Martin v. Löwis11437992002-04-12 09:54:03 +000015600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015601sed 's/^/| /' conftest.$ac_ext >&5
15602
Martin v. Löwiseba40652007-08-30 20:10:57 +000015603 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605
15606rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015607 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015609ac_res=`eval echo '${'$as_ac_var'}'`
15610 { echo "$as_me:$LINENO: result: $ac_res" >&5
15611echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015612if test `eval echo '${'$as_ac_var'}'` = yes; then
15613 cat >>confdefs.h <<_ACEOF
15614#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15615_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015616
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015617fi
15618done
15619
Michael W. Hudson54241132001-12-07 15:38:26 +000015620
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015621# For some functions, having a definition is not sufficient, since
15622# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015623{ echo "$as_me:$LINENO: checking for chroot" >&5
15624echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015626/* confdefs.h. */
15627_ACEOF
15628cat confdefs.h >>conftest.$ac_ext
15629cat >>conftest.$ac_ext <<_ACEOF
15630/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015631#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015632int
15633main ()
15634{
15635void *x=chroot
15636 ;
15637 return 0;
15638}
15639_ACEOF
15640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015641if { (ac_try="$ac_compile"
15642case "(($ac_try" in
15643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15644 *) ac_try_echo=$ac_try;;
15645esac
15646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015649 grep -v '^ *+' conftest.er1 >conftest.err
15650 rm -f conftest.er1
15651 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015653 (exit $ac_status); } && {
15654 test -z "$ac_c_werror_flag" ||
15655 test ! -s conftest.err
15656 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015657
15658cat >>confdefs.h <<\_ACEOF
15659#define HAVE_CHROOT 1
15660_ACEOF
15661
Martin v. Löwiseba40652007-08-30 20:10:57 +000015662 { echo "$as_me:$LINENO: result: yes" >&5
15663echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015664else
15665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015666sed 's/^/| /' conftest.$ac_ext >&5
15667
Martin v. Löwiseba40652007-08-30 20:10:57 +000015668 { echo "$as_me:$LINENO: result: no" >&5
15669echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015670
15671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015672
15673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15674{ echo "$as_me:$LINENO: checking for link" >&5
15675echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015676cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015677/* confdefs.h. */
15678_ACEOF
15679cat confdefs.h >>conftest.$ac_ext
15680cat >>conftest.$ac_ext <<_ACEOF
15681/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015682#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015683int
15684main ()
15685{
15686void *x=link
15687 ;
15688 return 0;
15689}
15690_ACEOF
15691rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015692if { (ac_try="$ac_compile"
15693case "(($ac_try" in
15694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15695 *) ac_try_echo=$ac_try;;
15696esac
15697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15698 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015699 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015700 grep -v '^ *+' conftest.er1 >conftest.err
15701 rm -f conftest.er1
15702 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015704 (exit $ac_status); } && {
15705 test -z "$ac_c_werror_flag" ||
15706 test ! -s conftest.err
15707 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015708
15709cat >>confdefs.h <<\_ACEOF
15710#define HAVE_LINK 1
15711_ACEOF
15712
Martin v. Löwiseba40652007-08-30 20:10:57 +000015713 { echo "$as_me:$LINENO: result: yes" >&5
15714echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015715else
15716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015717sed 's/^/| /' conftest.$ac_ext >&5
15718
Martin v. Löwiseba40652007-08-30 20:10:57 +000015719 { echo "$as_me:$LINENO: result: no" >&5
15720echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015721
15722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015723
15724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15725{ echo "$as_me:$LINENO: checking for symlink" >&5
15726echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015727cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015728/* confdefs.h. */
15729_ACEOF
15730cat confdefs.h >>conftest.$ac_ext
15731cat >>conftest.$ac_ext <<_ACEOF
15732/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015733#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015734int
15735main ()
15736{
15737void *x=symlink
15738 ;
15739 return 0;
15740}
15741_ACEOF
15742rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015743if { (ac_try="$ac_compile"
15744case "(($ac_try" in
15745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15746 *) ac_try_echo=$ac_try;;
15747esac
15748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15749 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015750 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015751 grep -v '^ *+' conftest.er1 >conftest.err
15752 rm -f conftest.er1
15753 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015755 (exit $ac_status); } && {
15756 test -z "$ac_c_werror_flag" ||
15757 test ! -s conftest.err
15758 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015759
15760cat >>confdefs.h <<\_ACEOF
15761#define HAVE_SYMLINK 1
15762_ACEOF
15763
Martin v. Löwiseba40652007-08-30 20:10:57 +000015764 { echo "$as_me:$LINENO: result: yes" >&5
15765echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015766else
15767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015768sed 's/^/| /' conftest.$ac_ext >&5
15769
Martin v. Löwiseba40652007-08-30 20:10:57 +000015770 { echo "$as_me:$LINENO: result: no" >&5
15771echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015772
15773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015774
15775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15776{ echo "$as_me:$LINENO: checking for fchdir" >&5
15777echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015778cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015779/* confdefs.h. */
15780_ACEOF
15781cat confdefs.h >>conftest.$ac_ext
15782cat >>conftest.$ac_ext <<_ACEOF
15783/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015784#include <unistd.h>
15785int
15786main ()
15787{
15788void *x=fchdir
15789 ;
15790 return 0;
15791}
15792_ACEOF
15793rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015794if { (ac_try="$ac_compile"
15795case "(($ac_try" in
15796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15797 *) ac_try_echo=$ac_try;;
15798esac
15799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015802 grep -v '^ *+' conftest.er1 >conftest.err
15803 rm -f conftest.er1
15804 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015806 (exit $ac_status); } && {
15807 test -z "$ac_c_werror_flag" ||
15808 test ! -s conftest.err
15809 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015810
15811cat >>confdefs.h <<\_ACEOF
15812#define HAVE_FCHDIR 1
15813_ACEOF
15814
Martin v. Löwiseba40652007-08-30 20:10:57 +000015815 { echo "$as_me:$LINENO: result: yes" >&5
15816echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015817else
15818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015819sed 's/^/| /' conftest.$ac_ext >&5
15820
Martin v. Löwiseba40652007-08-30 20:10:57 +000015821 { echo "$as_me:$LINENO: result: no" >&5
15822echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015823
15824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015825
15826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15827{ echo "$as_me:$LINENO: checking for fsync" >&5
15828echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015829cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015830/* confdefs.h. */
15831_ACEOF
15832cat confdefs.h >>conftest.$ac_ext
15833cat >>conftest.$ac_ext <<_ACEOF
15834/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015835#include <unistd.h>
15836int
15837main ()
15838{
15839void *x=fsync
15840 ;
15841 return 0;
15842}
15843_ACEOF
15844rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845if { (ac_try="$ac_compile"
15846case "(($ac_try" in
15847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15848 *) ac_try_echo=$ac_try;;
15849esac
15850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015853 grep -v '^ *+' conftest.er1 >conftest.err
15854 rm -f conftest.er1
15855 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015857 (exit $ac_status); } && {
15858 test -z "$ac_c_werror_flag" ||
15859 test ! -s conftest.err
15860 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015861
15862cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015863#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015864_ACEOF
15865
Martin v. Löwiseba40652007-08-30 20:10:57 +000015866 { echo "$as_me:$LINENO: result: yes" >&5
15867echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015868else
15869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015870sed 's/^/| /' conftest.$ac_ext >&5
15871
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872 { echo "$as_me:$LINENO: result: no" >&5
15873echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015874
15875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015876
15877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15878{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15879echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015880cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015881/* confdefs.h. */
15882_ACEOF
15883cat confdefs.h >>conftest.$ac_ext
15884cat >>conftest.$ac_ext <<_ACEOF
15885/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015886#include <unistd.h>
15887int
15888main ()
15889{
15890void *x=fdatasync
15891 ;
15892 return 0;
15893}
15894_ACEOF
15895rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015896if { (ac_try="$ac_compile"
15897case "(($ac_try" in
15898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15899 *) ac_try_echo=$ac_try;;
15900esac
15901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15902 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015904 grep -v '^ *+' conftest.er1 >conftest.err
15905 rm -f conftest.er1
15906 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015908 (exit $ac_status); } && {
15909 test -z "$ac_c_werror_flag" ||
15910 test ! -s conftest.err
15911 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015912
15913cat >>confdefs.h <<\_ACEOF
15914#define HAVE_FDATASYNC 1
15915_ACEOF
15916
Martin v. Löwiseba40652007-08-30 20:10:57 +000015917 { echo "$as_me:$LINENO: result: yes" >&5
15918echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015919else
15920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015921sed 's/^/| /' conftest.$ac_ext >&5
15922
Martin v. Löwiseba40652007-08-30 20:10:57 +000015923 { echo "$as_me:$LINENO: result: no" >&5
15924echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015925
15926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015927
15928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015929{ echo "$as_me:$LINENO: checking for epoll" >&5
15930echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
15931cat >conftest.$ac_ext <<_ACEOF
15932/* confdefs.h. */
15933_ACEOF
15934cat confdefs.h >>conftest.$ac_ext
15935cat >>conftest.$ac_ext <<_ACEOF
15936/* end confdefs.h. */
15937#include <sys/epoll.h>
15938int
15939main ()
15940{
15941void *x=epoll_create
15942 ;
15943 return 0;
15944}
15945_ACEOF
15946rm -f conftest.$ac_objext
15947if { (ac_try="$ac_compile"
15948case "(($ac_try" in
15949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15950 *) ac_try_echo=$ac_try;;
15951esac
15952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15953 (eval "$ac_compile") 2>conftest.er1
15954 ac_status=$?
15955 grep -v '^ *+' conftest.er1 >conftest.err
15956 rm -f conftest.er1
15957 cat conftest.err >&5
15958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15959 (exit $ac_status); } && {
15960 test -z "$ac_c_werror_flag" ||
15961 test ! -s conftest.err
15962 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015963
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015964cat >>confdefs.h <<\_ACEOF
15965#define HAVE_EPOLL 1
15966_ACEOF
15967
15968 { echo "$as_me:$LINENO: result: yes" >&5
15969echo "${ECHO_T}yes" >&6; }
15970else
15971 echo "$as_me: failed program was:" >&5
15972sed 's/^/| /' conftest.$ac_ext >&5
15973
15974 { echo "$as_me:$LINENO: result: no" >&5
15975echo "${ECHO_T}no" >&6; }
15976
15977fi
15978
15979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15980{ echo "$as_me:$LINENO: checking for kqueue" >&5
15981echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
15982cat >conftest.$ac_ext <<_ACEOF
15983/* confdefs.h. */
15984_ACEOF
15985cat confdefs.h >>conftest.$ac_ext
15986cat >>conftest.$ac_ext <<_ACEOF
15987/* end confdefs.h. */
15988
15989#include <sys/types.h>
15990#include <sys/event.h>
15991
15992int
15993main ()
15994{
15995int x=kqueue()
15996 ;
15997 return 0;
15998}
15999_ACEOF
16000rm -f conftest.$ac_objext
16001if { (ac_try="$ac_compile"
16002case "(($ac_try" in
16003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16004 *) ac_try_echo=$ac_try;;
16005esac
16006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16007 (eval "$ac_compile") 2>conftest.er1
16008 ac_status=$?
16009 grep -v '^ *+' conftest.er1 >conftest.err
16010 rm -f conftest.er1
16011 cat conftest.err >&5
16012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16013 (exit $ac_status); } && {
16014 test -z "$ac_c_werror_flag" ||
16015 test ! -s conftest.err
16016 } && test -s conftest.$ac_objext; then
16017
16018cat >>confdefs.h <<\_ACEOF
16019#define HAVE_KQUEUE 1
16020_ACEOF
16021
16022 { echo "$as_me:$LINENO: result: yes" >&5
16023echo "${ECHO_T}yes" >&6; }
16024else
16025 echo "$as_me: failed program was:" >&5
16026sed 's/^/| /' conftest.$ac_ext >&5
16027
16028 { echo "$as_me:$LINENO: result: no" >&5
16029echo "${ECHO_T}no" >&6; }
16030
16031fi
16032
16033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016034# On some systems (eg. FreeBSD 5), we would find a definition of the
16035# functions ctermid_r, setgroups in the library, but no prototype
16036# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16037# address to avoid compiler warnings and potential miscompilations
16038# because of the missing prototypes.
16039
Martin v. Löwiseba40652007-08-30 20:10:57 +000016040{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16041echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016042cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016043/* confdefs.h. */
16044_ACEOF
16045cat confdefs.h >>conftest.$ac_ext
16046cat >>conftest.$ac_ext <<_ACEOF
16047/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016048
16049#include "confdefs.h"
16050#include <stdio.h>
16051
Martin v. Löwisd5843682002-11-21 20:41:28 +000016052int
16053main ()
16054{
16055void* p = ctermid_r
16056 ;
16057 return 0;
16058}
16059_ACEOF
16060rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016061if { (ac_try="$ac_compile"
16062case "(($ac_try" in
16063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16064 *) ac_try_echo=$ac_try;;
16065esac
16066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016069 grep -v '^ *+' conftest.er1 >conftest.err
16070 rm -f conftest.er1
16071 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016073 (exit $ac_status); } && {
16074 test -z "$ac_c_werror_flag" ||
16075 test ! -s conftest.err
16076 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016077
16078cat >>confdefs.h <<\_ACEOF
16079#define HAVE_CTERMID_R 1
16080_ACEOF
16081
Martin v. Löwiseba40652007-08-30 20:10:57 +000016082 { echo "$as_me:$LINENO: result: yes" >&5
16083echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016084else
16085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016086sed 's/^/| /' conftest.$ac_ext >&5
16087
Martin v. Löwiseba40652007-08-30 20:10:57 +000016088 { echo "$as_me:$LINENO: result: no" >&5
16089echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016090
16091fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016092
Martin v. Löwiseba40652007-08-30 20:10:57 +000016093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16094
16095{ echo "$as_me:$LINENO: checking for flock" >&5
16096echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016097cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016098/* confdefs.h. */
16099_ACEOF
16100cat confdefs.h >>conftest.$ac_ext
16101cat >>conftest.$ac_ext <<_ACEOF
16102/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016103
16104#include "confdefs.h"
16105#include <sys/file.h>
16106
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016107int
16108main ()
16109{
16110void* p = flock
16111 ;
16112 return 0;
16113}
16114_ACEOF
16115rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016116if { (ac_try="$ac_compile"
16117case "(($ac_try" in
16118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16119 *) ac_try_echo=$ac_try;;
16120esac
16121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016124 grep -v '^ *+' conftest.er1 >conftest.err
16125 rm -f conftest.er1
16126 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016128 (exit $ac_status); } && {
16129 test -z "$ac_c_werror_flag" ||
16130 test ! -s conftest.err
16131 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016132
16133cat >>confdefs.h <<\_ACEOF
16134#define HAVE_FLOCK 1
16135_ACEOF
16136
Martin v. Löwiseba40652007-08-30 20:10:57 +000016137 { echo "$as_me:$LINENO: result: yes" >&5
16138echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016139else
16140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016141sed 's/^/| /' conftest.$ac_ext >&5
16142
Martin v. Löwiseba40652007-08-30 20:10:57 +000016143 { echo "$as_me:$LINENO: result: no" >&5
16144echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016145
16146fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016147
Martin v. Löwiseba40652007-08-30 20:10:57 +000016148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16149
16150{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16151echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016152cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016153/* confdefs.h. */
16154_ACEOF
16155cat confdefs.h >>conftest.$ac_ext
16156cat >>conftest.$ac_ext <<_ACEOF
16157/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016158
16159#include "confdefs.h"
16160#include <unistd.h>
16161
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016162int
16163main ()
16164{
16165void* p = getpagesize
16166 ;
16167 return 0;
16168}
16169_ACEOF
16170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016171if { (ac_try="$ac_compile"
16172case "(($ac_try" in
16173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16174 *) ac_try_echo=$ac_try;;
16175esac
16176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016179 grep -v '^ *+' conftest.er1 >conftest.err
16180 rm -f conftest.er1
16181 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016183 (exit $ac_status); } && {
16184 test -z "$ac_c_werror_flag" ||
16185 test ! -s conftest.err
16186 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016187
16188cat >>confdefs.h <<\_ACEOF
16189#define HAVE_GETPAGESIZE 1
16190_ACEOF
16191
Martin v. Löwiseba40652007-08-30 20:10:57 +000016192 { echo "$as_me:$LINENO: result: yes" >&5
16193echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016194else
16195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016196sed 's/^/| /' conftest.$ac_ext >&5
16197
Martin v. Löwiseba40652007-08-30 20:10:57 +000016198 { echo "$as_me:$LINENO: result: no" >&5
16199echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016200
16201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016202
16203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016204
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016205for ac_prog in true
16206do
16207 # Extract the first word of "$ac_prog", so it can be a program name with args.
16208set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016209{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16210echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016211if test "${ac_cv_prog_TRUE+set}" = set; then
16212 echo $ECHO_N "(cached) $ECHO_C" >&6
16213else
16214 if test -n "$TRUE"; then
16215 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16216else
16217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16218for as_dir in $PATH
16219do
16220 IFS=$as_save_IFS
16221 test -z "$as_dir" && as_dir=.
16222 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016223 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 +000016224 ac_cv_prog_TRUE="$ac_prog"
16225 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16226 break 2
16227 fi
16228done
16229done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016230IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016231
16232fi
16233fi
16234TRUE=$ac_cv_prog_TRUE
16235if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016236 { echo "$as_me:$LINENO: result: $TRUE" >&5
16237echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016238else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239 { echo "$as_me:$LINENO: result: no" >&5
16240echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016241fi
16242
Martin v. Löwiseba40652007-08-30 20:10:57 +000016243
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016244 test -n "$TRUE" && break
16245done
16246test -n "$TRUE" || TRUE="/bin/true"
16247
16248
Martin v. Löwiseba40652007-08-30 20:10:57 +000016249{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16250echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016251if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16252 echo $ECHO_N "(cached) $ECHO_C" >&6
16253else
16254 ac_check_lib_save_LIBS=$LIBS
16255LIBS="-lc $LIBS"
16256cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016257/* confdefs.h. */
16258_ACEOF
16259cat confdefs.h >>conftest.$ac_ext
16260cat >>conftest.$ac_ext <<_ACEOF
16261/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016262
Martin v. Löwiseba40652007-08-30 20:10:57 +000016263/* Override any GCC internal prototype to avoid an error.
16264 Use char because int might match the return type of a GCC
16265 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016266#ifdef __cplusplus
16267extern "C"
16268#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016269char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016270int
16271main ()
16272{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016273return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016274 ;
16275 return 0;
16276}
16277_ACEOF
16278rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016279if { (ac_try="$ac_link"
16280case "(($ac_try" in
16281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16282 *) ac_try_echo=$ac_try;;
16283esac
16284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16285 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016287 grep -v '^ *+' conftest.er1 >conftest.err
16288 rm -f conftest.er1
16289 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016291 (exit $ac_status); } && {
16292 test -z "$ac_c_werror_flag" ||
16293 test ! -s conftest.err
16294 } && test -s conftest$ac_exeext &&
16295 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016296 ac_cv_lib_c_inet_aton=yes
16297else
16298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016299sed 's/^/| /' conftest.$ac_ext >&5
16300
Martin v. Löwiseba40652007-08-30 20:10:57 +000016301 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016303
16304rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016305 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016306LIBS=$ac_check_lib_save_LIBS
16307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016308{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16309echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016310if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016311 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016312else
16313
Martin v. Löwiseba40652007-08-30 20:10:57 +000016314{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16315echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016316if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16317 echo $ECHO_N "(cached) $ECHO_C" >&6
16318else
16319 ac_check_lib_save_LIBS=$LIBS
16320LIBS="-lresolv $LIBS"
16321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016322/* confdefs.h. */
16323_ACEOF
16324cat confdefs.h >>conftest.$ac_ext
16325cat >>conftest.$ac_ext <<_ACEOF
16326/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016327
Martin v. Löwiseba40652007-08-30 20:10:57 +000016328/* Override any GCC internal prototype to avoid an error.
16329 Use char because int might match the return type of a GCC
16330 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016331#ifdef __cplusplus
16332extern "C"
16333#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016334char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016335int
16336main ()
16337{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016338return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016339 ;
16340 return 0;
16341}
16342_ACEOF
16343rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016344if { (ac_try="$ac_link"
16345case "(($ac_try" in
16346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16347 *) ac_try_echo=$ac_try;;
16348esac
16349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16350 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016352 grep -v '^ *+' conftest.er1 >conftest.err
16353 rm -f conftest.er1
16354 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016356 (exit $ac_status); } && {
16357 test -z "$ac_c_werror_flag" ||
16358 test ! -s conftest.err
16359 } && test -s conftest$ac_exeext &&
16360 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016361 ac_cv_lib_resolv_inet_aton=yes
16362else
16363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016364sed 's/^/| /' conftest.$ac_ext >&5
16365
Martin v. Löwiseba40652007-08-30 20:10:57 +000016366 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016368
16369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016371LIBS=$ac_check_lib_save_LIBS
16372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016373{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16374echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016375if test $ac_cv_lib_resolv_inet_aton = yes; then
16376 cat >>confdefs.h <<_ACEOF
16377#define HAVE_LIBRESOLV 1
16378_ACEOF
16379
16380 LIBS="-lresolv $LIBS"
16381
16382fi
16383
16384
16385fi
16386
16387
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016388# On Tru64, chflags seems to be present, but calling it will
16389# exit Python
16390{ echo "$as_me:$LINENO: checking for chflags" >&5
16391echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16392if test "$cross_compiling" = yes; then
16393 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16394See \`config.log' for more details." >&5
16395echo "$as_me: error: cannot run test program while cross compiling
16396See \`config.log' for more details." >&2;}
16397 { (exit 1); exit 1; }; }
16398else
16399 cat >conftest.$ac_ext <<_ACEOF
16400/* confdefs.h. */
16401_ACEOF
16402cat confdefs.h >>conftest.$ac_ext
16403cat >>conftest.$ac_ext <<_ACEOF
16404/* end confdefs.h. */
16405
16406#include <sys/stat.h>
16407#include <unistd.h>
16408int main(int argc, char*argv[])
16409{
16410 if(chflags(argv[0], 0) != 0)
16411 return 1;
16412 return 0;
16413}
16414
16415_ACEOF
16416rm -f conftest$ac_exeext
16417if { (ac_try="$ac_link"
16418case "(($ac_try" in
16419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16420 *) ac_try_echo=$ac_try;;
16421esac
16422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16423 (eval "$ac_link") 2>&5
16424 ac_status=$?
16425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16426 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16427 { (case "(($ac_try" in
16428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16429 *) ac_try_echo=$ac_try;;
16430esac
16431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16432 (eval "$ac_try") 2>&5
16433 ac_status=$?
16434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16435 (exit $ac_status); }; }; then
16436
16437cat >>confdefs.h <<\_ACEOF
16438#define HAVE_CHFLAGS 1
16439_ACEOF
16440
16441 { echo "$as_me:$LINENO: result: yes" >&5
16442echo "${ECHO_T}yes" >&6; }
16443else
16444 echo "$as_me: program exited with status $ac_status" >&5
16445echo "$as_me: failed program was:" >&5
16446sed 's/^/| /' conftest.$ac_ext >&5
16447
16448( exit $ac_status )
16449{ echo "$as_me:$LINENO: result: no" >&5
16450echo "${ECHO_T}no" >&6; }
16451
16452fi
16453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16454fi
16455
16456
16457
16458{ echo "$as_me:$LINENO: checking for lchflags" >&5
16459echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16460if test "$cross_compiling" = yes; then
16461 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16462See \`config.log' for more details." >&5
16463echo "$as_me: error: cannot run test program while cross compiling
16464See \`config.log' for more details." >&2;}
16465 { (exit 1); exit 1; }; }
16466else
16467 cat >conftest.$ac_ext <<_ACEOF
16468/* confdefs.h. */
16469_ACEOF
16470cat confdefs.h >>conftest.$ac_ext
16471cat >>conftest.$ac_ext <<_ACEOF
16472/* end confdefs.h. */
16473
16474#include <sys/stat.h>
16475#include <unistd.h>
16476int main(int argc, char*argv[])
16477{
16478 if(lchflags(argv[0], 0) != 0)
16479 return 1;
16480 return 0;
16481}
16482
16483_ACEOF
16484rm -f conftest$ac_exeext
16485if { (ac_try="$ac_link"
16486case "(($ac_try" in
16487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16488 *) ac_try_echo=$ac_try;;
16489esac
16490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16491 (eval "$ac_link") 2>&5
16492 ac_status=$?
16493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16494 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16495 { (case "(($ac_try" in
16496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16497 *) ac_try_echo=$ac_try;;
16498esac
16499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16500 (eval "$ac_try") 2>&5
16501 ac_status=$?
16502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16503 (exit $ac_status); }; }; then
16504
16505cat >>confdefs.h <<\_ACEOF
16506#define HAVE_LCHFLAGS 1
16507_ACEOF
16508
16509 { echo "$as_me:$LINENO: result: yes" >&5
16510echo "${ECHO_T}yes" >&6; }
16511else
16512 echo "$as_me: program exited with status $ac_status" >&5
16513echo "$as_me: failed program was:" >&5
16514sed 's/^/| /' conftest.$ac_ext >&5
16515
16516( exit $ac_status )
16517{ echo "$as_me:$LINENO: result: no" >&5
16518echo "${ECHO_T}no" >&6; }
16519
16520fi
16521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16522fi
16523
16524
16525
Ronald Oussorenf8752642006-07-06 10:13:35 +000016526case $ac_sys_system/$ac_sys_release in
16527Darwin/*)
16528 _CUR_CFLAGS="${CFLAGS}"
16529 _CUR_LDFLAGS="${LDFLAGS}"
16530 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16531 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16532 ;;
16533esac
16534
Martin v. Löwiseba40652007-08-30 20:10:57 +000016535{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16536echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016537if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16538 echo $ECHO_N "(cached) $ECHO_C" >&6
16539else
16540 ac_check_lib_save_LIBS=$LIBS
16541LIBS="-lz $LIBS"
16542cat >conftest.$ac_ext <<_ACEOF
16543/* confdefs.h. */
16544_ACEOF
16545cat confdefs.h >>conftest.$ac_ext
16546cat >>conftest.$ac_ext <<_ACEOF
16547/* end confdefs.h. */
16548
Martin v. Löwiseba40652007-08-30 20:10:57 +000016549/* Override any GCC internal prototype to avoid an error.
16550 Use char because int might match the return type of a GCC
16551 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016552#ifdef __cplusplus
16553extern "C"
16554#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016555char inflateCopy ();
16556int
16557main ()
16558{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016559return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016560 ;
16561 return 0;
16562}
16563_ACEOF
16564rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016565if { (ac_try="$ac_link"
16566case "(($ac_try" in
16567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16568 *) ac_try_echo=$ac_try;;
16569esac
16570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16571 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016572 ac_status=$?
16573 grep -v '^ *+' conftest.er1 >conftest.err
16574 rm -f conftest.er1
16575 cat conftest.err >&5
16576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016577 (exit $ac_status); } && {
16578 test -z "$ac_c_werror_flag" ||
16579 test ! -s conftest.err
16580 } && test -s conftest$ac_exeext &&
16581 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016582 ac_cv_lib_z_inflateCopy=yes
16583else
16584 echo "$as_me: failed program was:" >&5
16585sed 's/^/| /' conftest.$ac_ext >&5
16586
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016589
16590rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016591 conftest$ac_exeext conftest.$ac_ext
16592LIBS=$ac_check_lib_save_LIBS
16593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016594{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16595echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016596if test $ac_cv_lib_z_inflateCopy = yes; then
16597
16598cat >>confdefs.h <<\_ACEOF
16599#define HAVE_ZLIB_COPY 1
16600_ACEOF
16601
16602fi
16603
16604
Ronald Oussorenf8752642006-07-06 10:13:35 +000016605case $ac_sys_system/$ac_sys_release in
16606Darwin/*)
16607 CFLAGS="${_CUR_CFLAGS}"
16608 LDFLAGS="${_CUR_LDFLAGS}"
16609 ;;
16610esac
16611
Martin v. Löwiseba40652007-08-30 20:10:57 +000016612{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16613echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016615/* confdefs.h. */
16616_ACEOF
16617cat confdefs.h >>conftest.$ac_ext
16618cat >>conftest.$ac_ext <<_ACEOF
16619/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016620
16621#include "confdefs.h"
16622#include <netdb.h>
16623
Martin v. Löwise9416172003-05-03 10:12:45 +000016624int
16625main ()
16626{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016627void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016628 ;
16629 return 0;
16630}
16631_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016632rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016633if { (ac_try="$ac_link"
16634case "(($ac_try" in
16635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16636 *) ac_try_echo=$ac_try;;
16637esac
16638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16639 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016641 grep -v '^ *+' conftest.er1 >conftest.err
16642 rm -f conftest.er1
16643 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016645 (exit $ac_status); } && {
16646 test -z "$ac_c_werror_flag" ||
16647 test ! -s conftest.err
16648 } && test -s conftest$ac_exeext &&
16649 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016650
16651cat >>confdefs.h <<\_ACEOF
16652#define HAVE_HSTRERROR 1
16653_ACEOF
16654
Martin v. Löwiseba40652007-08-30 20:10:57 +000016655 { echo "$as_me:$LINENO: result: yes" >&5
16656echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016657else
16658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016659sed 's/^/| /' conftest.$ac_ext >&5
16660
Martin v. Löwiseba40652007-08-30 20:10:57 +000016661 { echo "$as_me:$LINENO: result: no" >&5
16662echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016663
16664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016665
16666rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016668
Martin v. Löwiseba40652007-08-30 20:10:57 +000016669{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16670echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016672/* confdefs.h. */
16673_ACEOF
16674cat confdefs.h >>conftest.$ac_ext
16675cat >>conftest.$ac_ext <<_ACEOF
16676/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016677
16678#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016679#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016680#include <sys/socket.h>
16681#include <netinet/in.h>
16682#include <arpa/inet.h>
16683
Martin v. Löwise9416172003-05-03 10:12:45 +000016684int
16685main ()
16686{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016687void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016688 ;
16689 return 0;
16690}
16691_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016692rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016693if { (ac_try="$ac_link"
16694case "(($ac_try" in
16695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16696 *) ac_try_echo=$ac_try;;
16697esac
16698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16699 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016701 grep -v '^ *+' conftest.er1 >conftest.err
16702 rm -f conftest.er1
16703 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016705 (exit $ac_status); } && {
16706 test -z "$ac_c_werror_flag" ||
16707 test ! -s conftest.err
16708 } && test -s conftest$ac_exeext &&
16709 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016710
16711cat >>confdefs.h <<\_ACEOF
16712#define HAVE_INET_ATON 1
16713_ACEOF
16714
Martin v. Löwiseba40652007-08-30 20:10:57 +000016715 { echo "$as_me:$LINENO: result: yes" >&5
16716echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016717else
16718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016719sed 's/^/| /' conftest.$ac_ext >&5
16720
Martin v. Löwiseba40652007-08-30 20:10:57 +000016721 { echo "$as_me:$LINENO: result: no" >&5
16722echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016723
16724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016725
16726rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016727 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016728
Martin v. Löwiseba40652007-08-30 20:10:57 +000016729{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16730echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016731cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016732/* confdefs.h. */
16733_ACEOF
16734cat confdefs.h >>conftest.$ac_ext
16735cat >>conftest.$ac_ext <<_ACEOF
16736/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016737
16738#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016739#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016740#include <sys/socket.h>
16741#include <netinet/in.h>
16742#include <arpa/inet.h>
16743
Martin v. Löwise9416172003-05-03 10:12:45 +000016744int
16745main ()
16746{
16747void* p = inet_pton
16748 ;
16749 return 0;
16750}
16751_ACEOF
16752rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016753if { (ac_try="$ac_compile"
16754case "(($ac_try" in
16755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16756 *) ac_try_echo=$ac_try;;
16757esac
16758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16759 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016761 grep -v '^ *+' conftest.er1 >conftest.err
16762 rm -f conftest.er1
16763 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016765 (exit $ac_status); } && {
16766 test -z "$ac_c_werror_flag" ||
16767 test ! -s conftest.err
16768 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016769
16770cat >>confdefs.h <<\_ACEOF
16771#define HAVE_INET_PTON 1
16772_ACEOF
16773
Martin v. Löwiseba40652007-08-30 20:10:57 +000016774 { echo "$as_me:$LINENO: result: yes" >&5
16775echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016776else
16777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016778sed 's/^/| /' conftest.$ac_ext >&5
16779
Martin v. Löwiseba40652007-08-30 20:10:57 +000016780 { echo "$as_me:$LINENO: result: no" >&5
16781echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016782
16783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016784
16785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016786
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016787# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016788{ echo "$as_me:$LINENO: checking for setgroups" >&5
16789echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016790cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016791/* confdefs.h. */
16792_ACEOF
16793cat confdefs.h >>conftest.$ac_ext
16794cat >>conftest.$ac_ext <<_ACEOF
16795/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016796
16797#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016798#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016799#ifdef HAVE_GRP_H
16800#include <grp.h>
16801#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016802
Martin v. Löwisd5843682002-11-21 20:41:28 +000016803int
16804main ()
16805{
16806void* p = setgroups
16807 ;
16808 return 0;
16809}
16810_ACEOF
16811rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016812if { (ac_try="$ac_compile"
16813case "(($ac_try" in
16814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16815 *) ac_try_echo=$ac_try;;
16816esac
16817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016820 grep -v '^ *+' conftest.er1 >conftest.err
16821 rm -f conftest.er1
16822 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824 (exit $ac_status); } && {
16825 test -z "$ac_c_werror_flag" ||
16826 test ! -s conftest.err
16827 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016828
16829cat >>confdefs.h <<\_ACEOF
16830#define HAVE_SETGROUPS 1
16831_ACEOF
16832
Martin v. Löwiseba40652007-08-30 20:10:57 +000016833 { echo "$as_me:$LINENO: result: yes" >&5
16834echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016835else
16836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016837sed 's/^/| /' conftest.$ac_ext >&5
16838
Martin v. Löwiseba40652007-08-30 20:10:57 +000016839 { echo "$as_me:$LINENO: result: no" >&5
16840echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016841
16842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016843
16844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016845
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016846# check for openpty and forkpty
16847
Martin v. Löwis11437992002-04-12 09:54:03 +000016848
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016849for ac_func in openpty
16850do
Martin v. Löwis11437992002-04-12 09:54:03 +000016851as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016852{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16853echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16854if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016856else
Martin v. Löwis11437992002-04-12 09:54:03 +000016857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016858/* confdefs.h. */
16859_ACEOF
16860cat confdefs.h >>conftest.$ac_ext
16861cat >>conftest.$ac_ext <<_ACEOF
16862/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016863/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16864 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16865#define $ac_func innocuous_$ac_func
16866
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016867/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016868 which can conflict with char $ac_func (); below.
16869 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016870 <limits.h> exists even on freestanding compilers. */
16871
16872#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016873# include <limits.h>
16874#else
16875# include <assert.h>
16876#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016877
16878#undef $ac_func
16879
Martin v. Löwiseba40652007-08-30 20:10:57 +000016880/* Override any GCC internal prototype to avoid an error.
16881 Use char because int might match the return type of a GCC
16882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016883#ifdef __cplusplus
16884extern "C"
16885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016886char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016887/* The GNU C library defines this for functions which it implements
16888 to always fail with ENOSYS. Some functions are actually named
16889 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016890#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016891choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016892#endif
16893
Skip Montanaro6dead952003-09-25 14:50:04 +000016894int
16895main ()
16896{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016897return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016898 ;
16899 return 0;
16900}
16901_ACEOF
16902rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016903if { (ac_try="$ac_link"
16904case "(($ac_try" in
16905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16906 *) ac_try_echo=$ac_try;;
16907esac
16908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16909 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016911 grep -v '^ *+' conftest.er1 >conftest.err
16912 rm -f conftest.er1
16913 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016915 (exit $ac_status); } && {
16916 test -z "$ac_c_werror_flag" ||
16917 test ! -s conftest.err
16918 } && test -s conftest$ac_exeext &&
16919 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016920 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016921else
Martin v. Löwis11437992002-04-12 09:54:03 +000016922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016923sed 's/^/| /' conftest.$ac_ext >&5
16924
Martin v. Löwiseba40652007-08-30 20:10:57 +000016925 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016927
16928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016929 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016931ac_res=`eval echo '${'$as_ac_var'}'`
16932 { echo "$as_me:$LINENO: result: $ac_res" >&5
16933echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016934if test `eval echo '${'$as_ac_var'}'` = yes; then
16935 cat >>confdefs.h <<_ACEOF
16936#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16937_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016938
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016939else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016940 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16941echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016942if test "${ac_cv_lib_util_openpty+set}" = set; then
16943 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016944else
Martin v. Löwis11437992002-04-12 09:54:03 +000016945 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016946LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016947cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016948/* confdefs.h. */
16949_ACEOF
16950cat confdefs.h >>conftest.$ac_ext
16951cat >>conftest.$ac_ext <<_ACEOF
16952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016953
Martin v. Löwiseba40652007-08-30 20:10:57 +000016954/* Override any GCC internal prototype to avoid an error.
16955 Use char because int might match the return type of a GCC
16956 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016957#ifdef __cplusplus
16958extern "C"
16959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016960char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016961int
16962main ()
16963{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016964return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016965 ;
16966 return 0;
16967}
16968_ACEOF
16969rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016970if { (ac_try="$ac_link"
16971case "(($ac_try" in
16972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16973 *) ac_try_echo=$ac_try;;
16974esac
16975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16976 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016978 grep -v '^ *+' conftest.er1 >conftest.err
16979 rm -f conftest.er1
16980 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016982 (exit $ac_status); } && {
16983 test -z "$ac_c_werror_flag" ||
16984 test ! -s conftest.err
16985 } && test -s conftest$ac_exeext &&
16986 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016987 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016988else
Martin v. Löwis11437992002-04-12 09:54:03 +000016989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016990sed 's/^/| /' conftest.$ac_ext >&5
16991
Martin v. Löwiseba40652007-08-30 20:10:57 +000016992 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016994
16995rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016997LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016999{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17000echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017001if test $ac_cv_lib_util_openpty = yes; then
17002 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017003#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017004_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017005 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017006else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017007 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17008echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017009if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17010 echo $ECHO_N "(cached) $ECHO_C" >&6
17011else
17012 ac_check_lib_save_LIBS=$LIBS
17013LIBS="-lbsd $LIBS"
17014cat >conftest.$ac_ext <<_ACEOF
17015/* confdefs.h. */
17016_ACEOF
17017cat confdefs.h >>conftest.$ac_ext
17018cat >>conftest.$ac_ext <<_ACEOF
17019/* end confdefs.h. */
17020
Martin v. Löwiseba40652007-08-30 20:10:57 +000017021/* Override any GCC internal prototype to avoid an error.
17022 Use char because int might match the return type of a GCC
17023 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017024#ifdef __cplusplus
17025extern "C"
17026#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017027char openpty ();
17028int
17029main ()
17030{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017031return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017032 ;
17033 return 0;
17034}
17035_ACEOF
17036rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017037if { (ac_try="$ac_link"
17038case "(($ac_try" in
17039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17040 *) ac_try_echo=$ac_try;;
17041esac
17042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17043 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017044 ac_status=$?
17045 grep -v '^ *+' conftest.er1 >conftest.err
17046 rm -f conftest.er1
17047 cat conftest.err >&5
17048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017049 (exit $ac_status); } && {
17050 test -z "$ac_c_werror_flag" ||
17051 test ! -s conftest.err
17052 } && test -s conftest$ac_exeext &&
17053 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017054 ac_cv_lib_bsd_openpty=yes
17055else
17056 echo "$as_me: failed program was:" >&5
17057sed 's/^/| /' conftest.$ac_ext >&5
17058
Martin v. Löwiseba40652007-08-30 20:10:57 +000017059 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017061
17062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017063 conftest$ac_exeext conftest.$ac_ext
17064LIBS=$ac_check_lib_save_LIBS
17065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017066{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17067echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017068if test $ac_cv_lib_bsd_openpty = yes; then
17069 cat >>confdefs.h <<\_ACEOF
17070#define HAVE_OPENPTY 1
17071_ACEOF
17072 LIBS="$LIBS -lbsd"
17073fi
17074
17075
17076fi
17077
Fred Drake8cef4cf2000-06-28 16:40:38 +000017078
17079fi
17080done
17081
Martin v. Löwis11437992002-04-12 09:54:03 +000017082
Fred Drake8cef4cf2000-06-28 16:40:38 +000017083for ac_func in forkpty
17084do
Martin v. Löwis11437992002-04-12 09:54:03 +000017085as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017086{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17087echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17088if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017089 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017090else
Martin v. Löwis11437992002-04-12 09:54:03 +000017091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017092/* confdefs.h. */
17093_ACEOF
17094cat confdefs.h >>conftest.$ac_ext
17095cat >>conftest.$ac_ext <<_ACEOF
17096/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017097/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17098 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17099#define $ac_func innocuous_$ac_func
17100
Fred Drake8cef4cf2000-06-28 16:40:38 +000017101/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017102 which can conflict with char $ac_func (); below.
17103 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017104 <limits.h> exists even on freestanding compilers. */
17105
17106#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017107# include <limits.h>
17108#else
17109# include <assert.h>
17110#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017111
17112#undef $ac_func
17113
Martin v. Löwiseba40652007-08-30 20:10:57 +000017114/* Override any GCC internal prototype to avoid an error.
17115 Use char because int might match the return type of a GCC
17116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017117#ifdef __cplusplus
17118extern "C"
17119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017120char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017121/* The GNU C library defines this for functions which it implements
17122 to always fail with ENOSYS. Some functions are actually named
17123 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017124#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017125choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017126#endif
17127
Skip Montanaro6dead952003-09-25 14:50:04 +000017128int
17129main ()
17130{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017131return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017132 ;
17133 return 0;
17134}
17135_ACEOF
17136rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017137if { (ac_try="$ac_link"
17138case "(($ac_try" in
17139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17140 *) ac_try_echo=$ac_try;;
17141esac
17142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17143 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017145 grep -v '^ *+' conftest.er1 >conftest.err
17146 rm -f conftest.er1
17147 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017149 (exit $ac_status); } && {
17150 test -z "$ac_c_werror_flag" ||
17151 test ! -s conftest.err
17152 } && test -s conftest$ac_exeext &&
17153 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017154 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017155else
Martin v. Löwis11437992002-04-12 09:54:03 +000017156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017157sed 's/^/| /' conftest.$ac_ext >&5
17158
Martin v. Löwiseba40652007-08-30 20:10:57 +000017159 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017161
17162rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017163 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017165ac_res=`eval echo '${'$as_ac_var'}'`
17166 { echo "$as_me:$LINENO: result: $ac_res" >&5
17167echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017168if test `eval echo '${'$as_ac_var'}'` = yes; then
17169 cat >>confdefs.h <<_ACEOF
17170#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17171_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017172
Fred Drake8cef4cf2000-06-28 16:40:38 +000017173else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017174 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17175echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017176if test "${ac_cv_lib_util_forkpty+set}" = set; then
17177 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017178else
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017180LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017181cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017182/* confdefs.h. */
17183_ACEOF
17184cat confdefs.h >>conftest.$ac_ext
17185cat >>conftest.$ac_ext <<_ACEOF
17186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017187
Martin v. Löwiseba40652007-08-30 20:10:57 +000017188/* Override any GCC internal prototype to avoid an error.
17189 Use char because int might match the return type of a GCC
17190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017191#ifdef __cplusplus
17192extern "C"
17193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017194char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017195int
17196main ()
17197{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017198return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017199 ;
17200 return 0;
17201}
17202_ACEOF
17203rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017204if { (ac_try="$ac_link"
17205case "(($ac_try" in
17206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17207 *) ac_try_echo=$ac_try;;
17208esac
17209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17210 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017212 grep -v '^ *+' conftest.er1 >conftest.err
17213 rm -f conftest.er1
17214 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017216 (exit $ac_status); } && {
17217 test -z "$ac_c_werror_flag" ||
17218 test ! -s conftest.err
17219 } && test -s conftest$ac_exeext &&
17220 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017221 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017222else
Martin v. Löwis11437992002-04-12 09:54:03 +000017223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017224sed 's/^/| /' conftest.$ac_ext >&5
17225
Martin v. Löwiseba40652007-08-30 20:10:57 +000017226 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017228
17229rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017230 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017231LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017233{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17234echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017235if test $ac_cv_lib_util_forkpty = yes; then
17236 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017237#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017238_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017239 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017240else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017241 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17242echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017243if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17244 echo $ECHO_N "(cached) $ECHO_C" >&6
17245else
17246 ac_check_lib_save_LIBS=$LIBS
17247LIBS="-lbsd $LIBS"
17248cat >conftest.$ac_ext <<_ACEOF
17249/* confdefs.h. */
17250_ACEOF
17251cat confdefs.h >>conftest.$ac_ext
17252cat >>conftest.$ac_ext <<_ACEOF
17253/* end confdefs.h. */
17254
Martin v. Löwiseba40652007-08-30 20:10:57 +000017255/* Override any GCC internal prototype to avoid an error.
17256 Use char because int might match the return type of a GCC
17257 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017258#ifdef __cplusplus
17259extern "C"
17260#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017261char forkpty ();
17262int
17263main ()
17264{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017265return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017266 ;
17267 return 0;
17268}
17269_ACEOF
17270rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017271if { (ac_try="$ac_link"
17272case "(($ac_try" in
17273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17274 *) ac_try_echo=$ac_try;;
17275esac
17276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17277 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017278 ac_status=$?
17279 grep -v '^ *+' conftest.er1 >conftest.err
17280 rm -f conftest.er1
17281 cat conftest.err >&5
17282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017283 (exit $ac_status); } && {
17284 test -z "$ac_c_werror_flag" ||
17285 test ! -s conftest.err
17286 } && test -s conftest$ac_exeext &&
17287 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017288 ac_cv_lib_bsd_forkpty=yes
17289else
17290 echo "$as_me: failed program was:" >&5
17291sed 's/^/| /' conftest.$ac_ext >&5
17292
Martin v. Löwiseba40652007-08-30 20:10:57 +000017293 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017295
17296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017297 conftest$ac_exeext conftest.$ac_ext
17298LIBS=$ac_check_lib_save_LIBS
17299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017300{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17301echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017302if test $ac_cv_lib_bsd_forkpty = yes; then
17303 cat >>confdefs.h <<\_ACEOF
17304#define HAVE_FORKPTY 1
17305_ACEOF
17306 LIBS="$LIBS -lbsd"
17307fi
17308
17309
17310fi
17311
Fred Drake8cef4cf2000-06-28 16:40:38 +000017312
17313fi
17314done
17315
Jack Jansendd19cf82001-12-06 22:36:17 +000017316
Brett Cannonaa5778d2008-03-18 04:09:00 +000017317# Stuff for expat.
17318
17319for ac_func in memmove
17320do
17321as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17322{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17323echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17324if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17325 echo $ECHO_N "(cached) $ECHO_C" >&6
17326else
17327 cat >conftest.$ac_ext <<_ACEOF
17328/* confdefs.h. */
17329_ACEOF
17330cat confdefs.h >>conftest.$ac_ext
17331cat >>conftest.$ac_ext <<_ACEOF
17332/* end confdefs.h. */
17333/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17334 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17335#define $ac_func innocuous_$ac_func
17336
17337/* System header to define __stub macros and hopefully few prototypes,
17338 which can conflict with char $ac_func (); below.
17339 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17340 <limits.h> exists even on freestanding compilers. */
17341
17342#ifdef __STDC__
17343# include <limits.h>
17344#else
17345# include <assert.h>
17346#endif
17347
17348#undef $ac_func
17349
17350/* Override any GCC internal prototype to avoid an error.
17351 Use char because int might match the return type of a GCC
17352 builtin and then its argument prototype would still apply. */
17353#ifdef __cplusplus
17354extern "C"
17355#endif
17356char $ac_func ();
17357/* The GNU C library defines this for functions which it implements
17358 to always fail with ENOSYS. Some functions are actually named
17359 something starting with __ and the normal name is an alias. */
17360#if defined __stub_$ac_func || defined __stub___$ac_func
17361choke me
17362#endif
17363
17364int
17365main ()
17366{
17367return $ac_func ();
17368 ;
17369 return 0;
17370}
17371_ACEOF
17372rm -f conftest.$ac_objext conftest$ac_exeext
17373if { (ac_try="$ac_link"
17374case "(($ac_try" in
17375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17376 *) ac_try_echo=$ac_try;;
17377esac
17378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17379 (eval "$ac_link") 2>conftest.er1
17380 ac_status=$?
17381 grep -v '^ *+' conftest.er1 >conftest.err
17382 rm -f conftest.er1
17383 cat conftest.err >&5
17384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17385 (exit $ac_status); } && {
17386 test -z "$ac_c_werror_flag" ||
17387 test ! -s conftest.err
17388 } && test -s conftest$ac_exeext &&
17389 $as_test_x conftest$ac_exeext; then
17390 eval "$as_ac_var=yes"
17391else
17392 echo "$as_me: failed program was:" >&5
17393sed 's/^/| /' conftest.$ac_ext >&5
17394
17395 eval "$as_ac_var=no"
17396fi
17397
17398rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17399 conftest$ac_exeext conftest.$ac_ext
17400fi
17401ac_res=`eval echo '${'$as_ac_var'}'`
17402 { echo "$as_me:$LINENO: result: $ac_res" >&5
17403echo "${ECHO_T}$ac_res" >&6; }
17404if test `eval echo '${'$as_ac_var'}'` = yes; then
17405 cat >>confdefs.h <<_ACEOF
17406#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17407_ACEOF
17408
17409fi
17410done
17411
17412
Michael W. Hudson54241132001-12-07 15:38:26 +000017413# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017414
17415
17416
17417
17418
17419
Fred Drake8cef4cf2000-06-28 16:40:38 +000017420for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17421do
Martin v. Löwis11437992002-04-12 09:54:03 +000017422as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017423{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17424echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17425if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017426 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017427else
Martin v. Löwis11437992002-04-12 09:54:03 +000017428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017429/* confdefs.h. */
17430_ACEOF
17431cat confdefs.h >>conftest.$ac_ext
17432cat >>conftest.$ac_ext <<_ACEOF
17433/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017434/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17435 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17436#define $ac_func innocuous_$ac_func
17437
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017438/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017439 which can conflict with char $ac_func (); below.
17440 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017441 <limits.h> exists even on freestanding compilers. */
17442
17443#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017444# include <limits.h>
17445#else
17446# include <assert.h>
17447#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017448
17449#undef $ac_func
17450
Martin v. Löwiseba40652007-08-30 20:10:57 +000017451/* Override any GCC internal prototype to avoid an error.
17452 Use char because int might match the return type of a GCC
17453 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017454#ifdef __cplusplus
17455extern "C"
17456#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017457char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017458/* The GNU C library defines this for functions which it implements
17459 to always fail with ENOSYS. Some functions are actually named
17460 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017461#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017462choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017463#endif
17464
Skip Montanaro6dead952003-09-25 14:50:04 +000017465int
17466main ()
17467{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017468return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017469 ;
17470 return 0;
17471}
17472_ACEOF
17473rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017474if { (ac_try="$ac_link"
17475case "(($ac_try" in
17476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17477 *) ac_try_echo=$ac_try;;
17478esac
17479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17480 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017482 grep -v '^ *+' conftest.er1 >conftest.err
17483 rm -f conftest.er1
17484 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017486 (exit $ac_status); } && {
17487 test -z "$ac_c_werror_flag" ||
17488 test ! -s conftest.err
17489 } && test -s conftest$ac_exeext &&
17490 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017491 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017492else
Martin v. Löwis11437992002-04-12 09:54:03 +000017493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017494sed 's/^/| /' conftest.$ac_ext >&5
17495
Martin v. Löwiseba40652007-08-30 20:10:57 +000017496 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017498
17499rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017500 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017502ac_res=`eval echo '${'$as_ac_var'}'`
17503 { echo "$as_me:$LINENO: result: $ac_res" >&5
17504echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017505if test `eval echo '${'$as_ac_var'}'` = yes; then
17506 cat >>confdefs.h <<_ACEOF
17507#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17508_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017509
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017510fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017511done
17512
Michael W. Hudson54241132001-12-07 15:38:26 +000017513
Martin v. Löwis11437992002-04-12 09:54:03 +000017514
17515
17516
Brett Cannonaa5778d2008-03-18 04:09:00 +000017517for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000017518do
Martin v. Löwis11437992002-04-12 09:54:03 +000017519as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017520{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17521echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17522if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017523 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017524else
Martin v. Löwis11437992002-04-12 09:54:03 +000017525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017526/* confdefs.h. */
17527_ACEOF
17528cat confdefs.h >>conftest.$ac_ext
17529cat >>conftest.$ac_ext <<_ACEOF
17530/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017531/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17532 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17533#define $ac_func innocuous_$ac_func
17534
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017535/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017536 which can conflict with char $ac_func (); below.
17537 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017538 <limits.h> exists even on freestanding compilers. */
17539
17540#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017541# include <limits.h>
17542#else
17543# include <assert.h>
17544#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017545
17546#undef $ac_func
17547
Martin v. Löwiseba40652007-08-30 20:10:57 +000017548/* Override any GCC internal prototype to avoid an error.
17549 Use char because int might match the return type of a GCC
17550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017551#ifdef __cplusplus
17552extern "C"
17553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017554char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017555/* The GNU C library defines this for functions which it implements
17556 to always fail with ENOSYS. Some functions are actually named
17557 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017558#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017559choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017560#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017561
Skip Montanaro6dead952003-09-25 14:50:04 +000017562int
17563main ()
17564{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017565return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017566 ;
17567 return 0;
17568}
17569_ACEOF
17570rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017571if { (ac_try="$ac_link"
17572case "(($ac_try" in
17573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17574 *) ac_try_echo=$ac_try;;
17575esac
17576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17577 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017579 grep -v '^ *+' conftest.er1 >conftest.err
17580 rm -f conftest.er1
17581 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017583 (exit $ac_status); } && {
17584 test -z "$ac_c_werror_flag" ||
17585 test ! -s conftest.err
17586 } && test -s conftest$ac_exeext &&
17587 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017588 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017589else
Martin v. Löwis11437992002-04-12 09:54:03 +000017590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017591sed 's/^/| /' conftest.$ac_ext >&5
17592
Martin v. Löwiseba40652007-08-30 20:10:57 +000017593 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017595
17596rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017597 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017599ac_res=`eval echo '${'$as_ac_var'}'`
17600 { echo "$as_me:$LINENO: result: $ac_res" >&5
17601echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017602if test `eval echo '${'$as_ac_var'}'` = yes; then
17603 cat >>confdefs.h <<_ACEOF
17604#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17605_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017606
Martin v. Löwis1142de32002-03-29 16:28:31 +000017607else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017608 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017609 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017610 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17611 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017612esac
17613
Martin v. Löwis1142de32002-03-29 16:28:31 +000017614fi
17615done
17616
17617
Martin v. Löwis11437992002-04-12 09:54:03 +000017618
Martin v. Löwis1142de32002-03-29 16:28:31 +000017619for ac_func in getpgrp
17620do
Martin v. Löwis11437992002-04-12 09:54:03 +000017621as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017622{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17623echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17624if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017625 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017626else
Martin v. Löwis11437992002-04-12 09:54:03 +000017627 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017628/* confdefs.h. */
17629_ACEOF
17630cat confdefs.h >>conftest.$ac_ext
17631cat >>conftest.$ac_ext <<_ACEOF
17632/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017633/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17634 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17635#define $ac_func innocuous_$ac_func
17636
Martin v. Löwis1142de32002-03-29 16:28:31 +000017637/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017638 which can conflict with char $ac_func (); below.
17639 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017640 <limits.h> exists even on freestanding compilers. */
17641
17642#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017643# include <limits.h>
17644#else
17645# include <assert.h>
17646#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017647
17648#undef $ac_func
17649
Martin v. Löwiseba40652007-08-30 20:10:57 +000017650/* Override any GCC internal prototype to avoid an error.
17651 Use char because int might match the return type of a GCC
17652 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017653#ifdef __cplusplus
17654extern "C"
17655#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017656char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017657/* The GNU C library defines this for functions which it implements
17658 to always fail with ENOSYS. Some functions are actually named
17659 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017660#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017661choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017662#endif
17663
Skip Montanaro6dead952003-09-25 14:50:04 +000017664int
17665main ()
17666{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017667return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017668 ;
17669 return 0;
17670}
17671_ACEOF
17672rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017673if { (ac_try="$ac_link"
17674case "(($ac_try" in
17675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17676 *) ac_try_echo=$ac_try;;
17677esac
17678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17679 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017681 grep -v '^ *+' conftest.er1 >conftest.err
17682 rm -f conftest.er1
17683 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017685 (exit $ac_status); } && {
17686 test -z "$ac_c_werror_flag" ||
17687 test ! -s conftest.err
17688 } && test -s conftest$ac_exeext &&
17689 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017690 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017691else
Martin v. Löwis11437992002-04-12 09:54:03 +000017692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017693sed 's/^/| /' conftest.$ac_ext >&5
17694
Martin v. Löwiseba40652007-08-30 20:10:57 +000017695 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017697
17698rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017699 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017701ac_res=`eval echo '${'$as_ac_var'}'`
17702 { echo "$as_me:$LINENO: result: $ac_res" >&5
17703echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017704if test `eval echo '${'$as_ac_var'}'` = yes; then
17705 cat >>confdefs.h <<_ACEOF
17706#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17707_ACEOF
17708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017709/* confdefs.h. */
17710_ACEOF
17711cat confdefs.h >>conftest.$ac_ext
17712cat >>conftest.$ac_ext <<_ACEOF
17713/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017714#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017715int
17716main ()
17717{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017718getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017719 ;
17720 return 0;
17721}
17722_ACEOF
17723rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017724if { (ac_try="$ac_compile"
17725case "(($ac_try" in
17726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17727 *) ac_try_echo=$ac_try;;
17728esac
17729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017732 grep -v '^ *+' conftest.er1 >conftest.err
17733 rm -f conftest.er1
17734 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017736 (exit $ac_status); } && {
17737 test -z "$ac_c_werror_flag" ||
17738 test ! -s conftest.err
17739 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017740
17741cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017742#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017743_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017744
Martin v. Löwis11437992002-04-12 09:54:03 +000017745
Guido van Rossumf78abae1997-01-21 22:02:36 +000017746else
Martin v. Löwis11437992002-04-12 09:54:03 +000017747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017748sed 's/^/| /' conftest.$ac_ext >&5
17749
Martin v. Löwiseba40652007-08-30 20:10:57 +000017750
Guido van Rossum627b2d71993-12-24 10:39:16 +000017751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017752
17753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017754
Guido van Rossum627b2d71993-12-24 10:39:16 +000017755fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017756done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017757
Jack Jansen150753c2003-03-29 22:07:47 +000017758
17759for ac_func in setpgrp
17760do
17761as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017762{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17763echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17764if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017766else
Martin v. Löwis11437992002-04-12 09:54:03 +000017767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017768/* confdefs.h. */
17769_ACEOF
17770cat confdefs.h >>conftest.$ac_ext
17771cat >>conftest.$ac_ext <<_ACEOF
17772/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017773/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17774 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17775#define $ac_func innocuous_$ac_func
17776
Jack Jansen150753c2003-03-29 22:07:47 +000017777/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017778 which can conflict with char $ac_func (); below.
17779 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017780 <limits.h> exists even on freestanding compilers. */
17781
17782#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017783# include <limits.h>
17784#else
17785# include <assert.h>
17786#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017787
17788#undef $ac_func
17789
Martin v. Löwiseba40652007-08-30 20:10:57 +000017790/* Override any GCC internal prototype to avoid an error.
17791 Use char because int might match the return type of a GCC
17792 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017793#ifdef __cplusplus
17794extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017795#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017796char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017797/* The GNU C library defines this for functions which it implements
17798 to always fail with ENOSYS. Some functions are actually named
17799 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017800#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017801choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017802#endif
17803
Skip Montanaro6dead952003-09-25 14:50:04 +000017804int
17805main ()
17806{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017807return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017808 ;
17809 return 0;
17810}
17811_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017812rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017813if { (ac_try="$ac_link"
17814case "(($ac_try" in
17815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17816 *) ac_try_echo=$ac_try;;
17817esac
17818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17819 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017821 grep -v '^ *+' conftest.er1 >conftest.err
17822 rm -f conftest.er1
17823 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017825 (exit $ac_status); } && {
17826 test -z "$ac_c_werror_flag" ||
17827 test ! -s conftest.err
17828 } && test -s conftest$ac_exeext &&
17829 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017830 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017831else
Jack Jansen150753c2003-03-29 22:07:47 +000017832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017833sed 's/^/| /' conftest.$ac_ext >&5
17834
Martin v. Löwiseba40652007-08-30 20:10:57 +000017835 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017837
17838rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017839 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017841ac_res=`eval echo '${'$as_ac_var'}'`
17842 { echo "$as_me:$LINENO: result: $ac_res" >&5
17843echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017844if test `eval echo '${'$as_ac_var'}'` = yes; then
17845 cat >>confdefs.h <<_ACEOF
17846#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17847_ACEOF
17848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017849/* confdefs.h. */
17850_ACEOF
17851cat confdefs.h >>conftest.$ac_ext
17852cat >>conftest.$ac_ext <<_ACEOF
17853/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017854#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017855int
17856main ()
17857{
17858setpgrp(0,0);
17859 ;
17860 return 0;
17861}
17862_ACEOF
17863rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017864if { (ac_try="$ac_compile"
17865case "(($ac_try" in
17866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17867 *) ac_try_echo=$ac_try;;
17868esac
17869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17870 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017872 grep -v '^ *+' conftest.er1 >conftest.err
17873 rm -f conftest.er1
17874 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017876 (exit $ac_status); } && {
17877 test -z "$ac_c_werror_flag" ||
17878 test ! -s conftest.err
17879 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017880
17881cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017882#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017883_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017884
Jack Jansen150753c2003-03-29 22:07:47 +000017885
17886else
17887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017888sed 's/^/| /' conftest.$ac_ext >&5
17889
Martin v. Löwiseba40652007-08-30 20:10:57 +000017890
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017892
17893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017894
17895fi
17896done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017897
Martin v. Löwis11437992002-04-12 09:54:03 +000017898
Thomas Wouters3a584202000-08-05 23:28:51 +000017899for ac_func in gettimeofday
17900do
Martin v. Löwis11437992002-04-12 09:54:03 +000017901as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017902{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17903echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17904if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017906else
Martin v. Löwis11437992002-04-12 09:54:03 +000017907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017908/* confdefs.h. */
17909_ACEOF
17910cat confdefs.h >>conftest.$ac_ext
17911cat >>conftest.$ac_ext <<_ACEOF
17912/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017913/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17914 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17915#define $ac_func innocuous_$ac_func
17916
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017917/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017918 which can conflict with char $ac_func (); below.
17919 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017920 <limits.h> exists even on freestanding compilers. */
17921
17922#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017923# include <limits.h>
17924#else
17925# include <assert.h>
17926#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017927
17928#undef $ac_func
17929
Martin v. Löwiseba40652007-08-30 20:10:57 +000017930/* Override any GCC internal prototype to avoid an error.
17931 Use char because int might match the return type of a GCC
17932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017933#ifdef __cplusplus
17934extern "C"
17935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017936char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017937/* The GNU C library defines this for functions which it implements
17938 to always fail with ENOSYS. Some functions are actually named
17939 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017940#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017941choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017942#endif
17943
Skip Montanaro6dead952003-09-25 14:50:04 +000017944int
17945main ()
17946{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017947return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017948 ;
17949 return 0;
17950}
17951_ACEOF
17952rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017953if { (ac_try="$ac_link"
17954case "(($ac_try" in
17955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17956 *) ac_try_echo=$ac_try;;
17957esac
17958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17959 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017961 grep -v '^ *+' conftest.er1 >conftest.err
17962 rm -f conftest.er1
17963 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017965 (exit $ac_status); } && {
17966 test -z "$ac_c_werror_flag" ||
17967 test ! -s conftest.err
17968 } && test -s conftest$ac_exeext &&
17969 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017970 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017971else
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017973sed 's/^/| /' conftest.$ac_ext >&5
17974
Martin v. Löwiseba40652007-08-30 20:10:57 +000017975 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017977
17978rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017979 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017981ac_res=`eval echo '${'$as_ac_var'}'`
17982 { echo "$as_me:$LINENO: result: $ac_res" >&5
17983echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017984if test `eval echo '${'$as_ac_var'}'` = yes; then
17985 cat >>confdefs.h <<_ACEOF
17986#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17987_ACEOF
17988 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017989/* confdefs.h. */
17990_ACEOF
17991cat confdefs.h >>conftest.$ac_ext
17992cat >>conftest.$ac_ext <<_ACEOF
17993/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017994#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017995int
17996main ()
17997{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017998gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017999 ;
18000 return 0;
18001}
18002_ACEOF
18003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018004if { (ac_try="$ac_compile"
18005case "(($ac_try" in
18006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18007 *) ac_try_echo=$ac_try;;
18008esac
18009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018012 grep -v '^ *+' conftest.er1 >conftest.err
18013 rm -f conftest.er1
18014 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018016 (exit $ac_status); } && {
18017 test -z "$ac_c_werror_flag" ||
18018 test ! -s conftest.err
18019 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018020 :
18021else
Martin v. Löwis11437992002-04-12 09:54:03 +000018022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018023sed 's/^/| /' conftest.$ac_ext >&5
18024
Martin v. Löwis11437992002-04-12 09:54:03 +000018025
18026cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018027#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018028_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018029
Martin v. Löwis11437992002-04-12 09:54:03 +000018030
Guido van Rossum627b2d71993-12-24 10:39:16 +000018031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018032
18033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018034
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018035fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018036done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018037
Michael W. Hudson54241132001-12-07 15:38:26 +000018038
Martin v. Löwiseba40652007-08-30 20:10:57 +000018039{ echo "$as_me:$LINENO: checking for major" >&5
18040echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018041cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018042/* confdefs.h. */
18043_ACEOF
18044cat confdefs.h >>conftest.$ac_ext
18045cat >>conftest.$ac_ext <<_ACEOF
18046/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018047
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018048#if defined(MAJOR_IN_MKDEV)
18049#include <sys/mkdev.h>
18050#elif defined(MAJOR_IN_SYSMACROS)
18051#include <sys/sysmacros.h>
18052#else
18053#include <sys/types.h>
18054#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018055
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018056int
18057main ()
18058{
18059
18060 makedev(major(0),minor(0));
18061
18062 ;
18063 return 0;
18064}
18065_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018066rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018067if { (ac_try="$ac_link"
18068case "(($ac_try" in
18069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18070 *) ac_try_echo=$ac_try;;
18071esac
18072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18073 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018075 grep -v '^ *+' conftest.er1 >conftest.err
18076 rm -f conftest.er1
18077 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018079 (exit $ac_status); } && {
18080 test -z "$ac_c_werror_flag" ||
18081 test ! -s conftest.err
18082 } && test -s conftest$ac_exeext &&
18083 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018084
18085
18086cat >>confdefs.h <<\_ACEOF
18087#define HAVE_DEVICE_MACROS 1
18088_ACEOF
18089
Martin v. Löwiseba40652007-08-30 20:10:57 +000018090 { echo "$as_me:$LINENO: result: yes" >&5
18091echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018092
18093else
18094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018095sed 's/^/| /' conftest.$ac_ext >&5
18096
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018097
Martin v. Löwiseba40652007-08-30 20:10:57 +000018098 { echo "$as_me:$LINENO: result: no" >&5
18099echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018100
18101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018102
18103rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018104 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018105
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018106# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018107# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018108{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18109echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018111/* confdefs.h. */
18112_ACEOF
18113cat confdefs.h >>conftest.$ac_ext
18114cat >>conftest.$ac_ext <<_ACEOF
18115/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018116
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018117#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018118#include <sys/socket.h>
18119#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018120#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018121
Martin v. Löwis11437992002-04-12 09:54:03 +000018122int
18123main ()
18124{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018125
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018126getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018127
Martin v. Löwis11437992002-04-12 09:54:03 +000018128 ;
18129 return 0;
18130}
18131_ACEOF
18132rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018133if { (ac_try="$ac_link"
18134case "(($ac_try" in
18135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18136 *) ac_try_echo=$ac_try;;
18137esac
18138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18139 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018141 grep -v '^ *+' conftest.er1 >conftest.err
18142 rm -f conftest.er1
18143 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018145 (exit $ac_status); } && {
18146 test -z "$ac_c_werror_flag" ||
18147 test ! -s conftest.err
18148 } && test -s conftest$ac_exeext &&
18149 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018150
Martin v. Löwiseba40652007-08-30 20:10:57 +000018151{ echo "$as_me:$LINENO: result: yes" >&5
18152echo "${ECHO_T}yes" >&6; }
18153{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18154echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018155if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018156 { echo "$as_me:$LINENO: result: buggy" >&5
18157echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018158buggygetaddrinfo=yes
18159else
Martin v. Löwis11437992002-04-12 09:54:03 +000018160 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018161/* confdefs.h. */
18162_ACEOF
18163cat confdefs.h >>conftest.$ac_ext
18164cat >>conftest.$ac_ext <<_ACEOF
18165/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018166
18167#include <sys/types.h>
18168#include <netdb.h>
18169#include <string.h>
18170#include <sys/socket.h>
18171#include <netinet/in.h>
18172
18173main()
18174{
18175 int passive, gaierr, inet4 = 0, inet6 = 0;
18176 struct addrinfo hints, *ai, *aitop;
18177 char straddr[INET6_ADDRSTRLEN], strport[16];
18178
18179 for (passive = 0; passive <= 1; passive++) {
18180 memset(&hints, 0, sizeof(hints));
18181 hints.ai_family = AF_UNSPEC;
18182 hints.ai_flags = passive ? AI_PASSIVE : 0;
18183 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018184 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018185 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18186 (void)gai_strerror(gaierr);
18187 goto bad;
18188 }
18189 for (ai = aitop; ai; ai = ai->ai_next) {
18190 if (ai->ai_addr == NULL ||
18191 ai->ai_addrlen == 0 ||
18192 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18193 straddr, sizeof(straddr), strport, sizeof(strport),
18194 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18195 goto bad;
18196 }
18197 switch (ai->ai_family) {
18198 case AF_INET:
18199 if (strcmp(strport, "54321") != 0) {
18200 goto bad;
18201 }
18202 if (passive) {
18203 if (strcmp(straddr, "0.0.0.0") != 0) {
18204 goto bad;
18205 }
18206 } else {
18207 if (strcmp(straddr, "127.0.0.1") != 0) {
18208 goto bad;
18209 }
18210 }
18211 inet4++;
18212 break;
18213 case AF_INET6:
18214 if (strcmp(strport, "54321") != 0) {
18215 goto bad;
18216 }
18217 if (passive) {
18218 if (strcmp(straddr, "::") != 0) {
18219 goto bad;
18220 }
18221 } else {
18222 if (strcmp(straddr, "::1") != 0) {
18223 goto bad;
18224 }
18225 }
18226 inet6++;
18227 break;
18228 case AF_UNSPEC:
18229 goto bad;
18230 break;
18231 default:
18232 /* another family support? */
18233 break;
18234 }
18235 }
18236 }
18237
18238 if (!(inet4 == 0 || inet4 == 2))
18239 goto bad;
18240 if (!(inet6 == 0 || inet6 == 2))
18241 goto bad;
18242
18243 if (aitop)
18244 freeaddrinfo(aitop);
18245 exit(0);
18246
18247 bad:
18248 if (aitop)
18249 freeaddrinfo(aitop);
18250 exit(1);
18251}
18252
Martin v. Löwis11437992002-04-12 09:54:03 +000018253_ACEOF
18254rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018255if { (ac_try="$ac_link"
18256case "(($ac_try" in
18257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18258 *) ac_try_echo=$ac_try;;
18259esac
18260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18261 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018262 ac_status=$?
18263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18264 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018265 { (case "(($ac_try" in
18266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18267 *) ac_try_echo=$ac_try;;
18268esac
18269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18270 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018271 ac_status=$?
18272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18273 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018274 { echo "$as_me:$LINENO: result: good" >&5
18275echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018276buggygetaddrinfo=no
18277else
Martin v. Löwis11437992002-04-12 09:54:03 +000018278 echo "$as_me: program exited with status $ac_status" >&5
18279echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018280sed 's/^/| /' conftest.$ac_ext >&5
18281
Martin v. Löwis11437992002-04-12 09:54:03 +000018282( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018283{ echo "$as_me:$LINENO: result: buggy" >&5
18284echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018285buggygetaddrinfo=yes
18286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018287rm -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 +000018288fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018289
18290
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018291else
Martin v. Löwis11437992002-04-12 09:54:03 +000018292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018293sed 's/^/| /' conftest.$ac_ext >&5
18294
Martin v. Löwis11437992002-04-12 09:54:03 +000018295
Martin v. Löwiseba40652007-08-30 20:10:57 +000018296{ echo "$as_me:$LINENO: result: no" >&5
18297echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018298buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018299
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018301
18302rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018303 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018304
18305if test "$buggygetaddrinfo" = "yes"; then
18306 if test "$ipv6" = "yes"; then
18307 echo 'Fatal: You must get working getaddrinfo() function.'
18308 echo ' or you can specify "--disable-ipv6"'.
18309 exit 1
18310 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018311else
Martin v. Löwis11437992002-04-12 09:54:03 +000018312
18313cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018314#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018315_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018316
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018317fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018318
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018319for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018320do
Martin v. Löwis11437992002-04-12 09:54:03 +000018321as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018322{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18323echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18324if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018325 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018326else
Martin v. Löwis11437992002-04-12 09:54:03 +000018327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018328/* confdefs.h. */
18329_ACEOF
18330cat confdefs.h >>conftest.$ac_ext
18331cat >>conftest.$ac_ext <<_ACEOF
18332/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018333/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18334 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18335#define $ac_func innocuous_$ac_func
18336
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018337/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018338 which can conflict with char $ac_func (); below.
18339 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018340 <limits.h> exists even on freestanding compilers. */
18341
18342#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018343# include <limits.h>
18344#else
18345# include <assert.h>
18346#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018347
18348#undef $ac_func
18349
Martin v. Löwiseba40652007-08-30 20:10:57 +000018350/* Override any GCC internal prototype to avoid an error.
18351 Use char because int might match the return type of a GCC
18352 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018353#ifdef __cplusplus
18354extern "C"
18355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018356char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018357/* The GNU C library defines this for functions which it implements
18358 to always fail with ENOSYS. Some functions are actually named
18359 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018360#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018361choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018362#endif
18363
Skip Montanaro6dead952003-09-25 14:50:04 +000018364int
18365main ()
18366{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018367return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018368 ;
18369 return 0;
18370}
18371_ACEOF
18372rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018373if { (ac_try="$ac_link"
18374case "(($ac_try" in
18375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18376 *) ac_try_echo=$ac_try;;
18377esac
18378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18379 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018381 grep -v '^ *+' conftest.er1 >conftest.err
18382 rm -f conftest.er1
18383 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018385 (exit $ac_status); } && {
18386 test -z "$ac_c_werror_flag" ||
18387 test ! -s conftest.err
18388 } && test -s conftest$ac_exeext &&
18389 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018390 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018391else
Martin v. Löwis11437992002-04-12 09:54:03 +000018392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018393sed 's/^/| /' conftest.$ac_ext >&5
18394
Martin v. Löwiseba40652007-08-30 20:10:57 +000018395 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018397
18398rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018399 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018401ac_res=`eval echo '${'$as_ac_var'}'`
18402 { echo "$as_me:$LINENO: result: $ac_res" >&5
18403echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018404if test `eval echo '${'$as_ac_var'}'` = yes; then
18405 cat >>confdefs.h <<_ACEOF
18406#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18407_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018408
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018409fi
18410done
18411
Michael W. Hudson54241132001-12-07 15:38:26 +000018412
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018413# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018414{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18415echo $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 +000018416if test "${ac_cv_header_time+set}" = set; then
18417 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018418else
Martin v. Löwis11437992002-04-12 09:54:03 +000018419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018420/* confdefs.h. */
18421_ACEOF
18422cat confdefs.h >>conftest.$ac_ext
18423cat >>conftest.$ac_ext <<_ACEOF
18424/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018425#include <sys/types.h>
18426#include <sys/time.h>
18427#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018428
Martin v. Löwis11437992002-04-12 09:54:03 +000018429int
18430main ()
18431{
18432if ((struct tm *) 0)
18433return 0;
18434 ;
18435 return 0;
18436}
18437_ACEOF
18438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018439if { (ac_try="$ac_compile"
18440case "(($ac_try" in
18441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18442 *) ac_try_echo=$ac_try;;
18443esac
18444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018447 grep -v '^ *+' conftest.er1 >conftest.err
18448 rm -f conftest.er1
18449 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018451 (exit $ac_status); } && {
18452 test -z "$ac_c_werror_flag" ||
18453 test ! -s conftest.err
18454 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018455 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018456else
Martin v. Löwis11437992002-04-12 09:54:03 +000018457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018458sed 's/^/| /' conftest.$ac_ext >&5
18459
Martin v. Löwiseba40652007-08-30 20:10:57 +000018460 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018462
18463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018465{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18466echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018467if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018468
18469cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018470#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018471_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018472
18473fi
18474
Martin v. Löwiseba40652007-08-30 20:10:57 +000018475{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18476echo $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 +000018477if test "${ac_cv_struct_tm+set}" = set; then
18478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018479else
Martin v. Löwis11437992002-04-12 09:54:03 +000018480 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018481/* confdefs.h. */
18482_ACEOF
18483cat confdefs.h >>conftest.$ac_ext
18484cat >>conftest.$ac_ext <<_ACEOF
18485/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018486#include <sys/types.h>
18487#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018488
Martin v. Löwis11437992002-04-12 09:54:03 +000018489int
18490main ()
18491{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018492struct tm tm;
18493 int *p = &tm.tm_sec;
18494 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018495 ;
18496 return 0;
18497}
18498_ACEOF
18499rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018500if { (ac_try="$ac_compile"
18501case "(($ac_try" in
18502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18503 *) ac_try_echo=$ac_try;;
18504esac
18505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018508 grep -v '^ *+' conftest.er1 >conftest.err
18509 rm -f conftest.er1
18510 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018512 (exit $ac_status); } && {
18513 test -z "$ac_c_werror_flag" ||
18514 test ! -s conftest.err
18515 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018516 ac_cv_struct_tm=time.h
18517else
Martin v. Löwis11437992002-04-12 09:54:03 +000018518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018519sed 's/^/| /' conftest.$ac_ext >&5
18520
Martin v. Löwiseba40652007-08-30 20:10:57 +000018521 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018523
18524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018526{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18527echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018528if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018529
18530cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018531#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018532_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018533
18534fi
18535
Martin v. Löwiseba40652007-08-30 20:10:57 +000018536{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18537echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018538if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18539 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018540else
Martin v. Löwis11437992002-04-12 09:54:03 +000018541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018542/* confdefs.h. */
18543_ACEOF
18544cat confdefs.h >>conftest.$ac_ext
18545cat >>conftest.$ac_ext <<_ACEOF
18546/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018547#include <sys/types.h>
18548#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018549
18550
Martin v. Löwis11437992002-04-12 09:54:03 +000018551int
18552main ()
18553{
18554static struct tm ac_aggr;
18555if (ac_aggr.tm_zone)
18556return 0;
18557 ;
18558 return 0;
18559}
18560_ACEOF
18561rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018562if { (ac_try="$ac_compile"
18563case "(($ac_try" in
18564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18565 *) ac_try_echo=$ac_try;;
18566esac
18567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018570 grep -v '^ *+' conftest.er1 >conftest.err
18571 rm -f conftest.er1
18572 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018574 (exit $ac_status); } && {
18575 test -z "$ac_c_werror_flag" ||
18576 test ! -s conftest.err
18577 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018578 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018579else
Martin v. Löwis11437992002-04-12 09:54:03 +000018580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018581sed 's/^/| /' conftest.$ac_ext >&5
18582
Martin v. Löwiseba40652007-08-30 20:10:57 +000018583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018584/* confdefs.h. */
18585_ACEOF
18586cat confdefs.h >>conftest.$ac_ext
18587cat >>conftest.$ac_ext <<_ACEOF
18588/* end confdefs.h. */
18589#include <sys/types.h>
18590#include <$ac_cv_struct_tm>
18591
18592
18593int
18594main ()
18595{
18596static struct tm ac_aggr;
18597if (sizeof ac_aggr.tm_zone)
18598return 0;
18599 ;
18600 return 0;
18601}
18602_ACEOF
18603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018604if { (ac_try="$ac_compile"
18605case "(($ac_try" in
18606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18607 *) ac_try_echo=$ac_try;;
18608esac
18609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18610 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018612 grep -v '^ *+' conftest.er1 >conftest.err
18613 rm -f conftest.er1
18614 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018616 (exit $ac_status); } && {
18617 test -z "$ac_c_werror_flag" ||
18618 test ! -s conftest.err
18619 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018620 ac_cv_member_struct_tm_tm_zone=yes
18621else
18622 echo "$as_me: failed program was:" >&5
18623sed 's/^/| /' conftest.$ac_ext >&5
18624
Martin v. Löwiseba40652007-08-30 20:10:57 +000018625 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018627
18628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018630
18631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018633{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18634echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018635if test $ac_cv_member_struct_tm_tm_zone = yes; then
18636
18637cat >>confdefs.h <<_ACEOF
18638#define HAVE_STRUCT_TM_TM_ZONE 1
18639_ACEOF
18640
18641
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018642fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018643
Martin v. Löwis11437992002-04-12 09:54:03 +000018644if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18645
18646cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018647#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018648_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018649
18650else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018651 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18652echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18653if test "${ac_cv_have_decl_tzname+set}" = set; then
18654 echo $ECHO_N "(cached) $ECHO_C" >&6
18655else
18656 cat >conftest.$ac_ext <<_ACEOF
18657/* confdefs.h. */
18658_ACEOF
18659cat confdefs.h >>conftest.$ac_ext
18660cat >>conftest.$ac_ext <<_ACEOF
18661/* end confdefs.h. */
18662#include <time.h>
18663
18664int
18665main ()
18666{
18667#ifndef tzname
18668 (void) tzname;
18669#endif
18670
18671 ;
18672 return 0;
18673}
18674_ACEOF
18675rm -f conftest.$ac_objext
18676if { (ac_try="$ac_compile"
18677case "(($ac_try" in
18678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18679 *) ac_try_echo=$ac_try;;
18680esac
18681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18682 (eval "$ac_compile") 2>conftest.er1
18683 ac_status=$?
18684 grep -v '^ *+' conftest.er1 >conftest.err
18685 rm -f conftest.er1
18686 cat conftest.err >&5
18687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18688 (exit $ac_status); } && {
18689 test -z "$ac_c_werror_flag" ||
18690 test ! -s conftest.err
18691 } && test -s conftest.$ac_objext; then
18692 ac_cv_have_decl_tzname=yes
18693else
18694 echo "$as_me: failed program was:" >&5
18695sed 's/^/| /' conftest.$ac_ext >&5
18696
18697 ac_cv_have_decl_tzname=no
18698fi
18699
18700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18701fi
18702{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18703echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18704if test $ac_cv_have_decl_tzname = yes; then
18705
18706cat >>confdefs.h <<_ACEOF
18707#define HAVE_DECL_TZNAME 1
18708_ACEOF
18709
18710
18711else
18712 cat >>confdefs.h <<_ACEOF
18713#define HAVE_DECL_TZNAME 0
18714_ACEOF
18715
18716
18717fi
18718
18719
18720 { echo "$as_me:$LINENO: checking for tzname" >&5
18721echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018722if test "${ac_cv_var_tzname+set}" = set; then
18723 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018724else
Martin v. Löwis11437992002-04-12 09:54:03 +000018725 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018726/* confdefs.h. */
18727_ACEOF
18728cat confdefs.h >>conftest.$ac_ext
18729cat >>conftest.$ac_ext <<_ACEOF
18730/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018731#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018732#if !HAVE_DECL_TZNAME
18733extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018735
Martin v. Löwis11437992002-04-12 09:54:03 +000018736int
18737main ()
18738{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018739return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018740 ;
18741 return 0;
18742}
18743_ACEOF
18744rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018745if { (ac_try="$ac_link"
18746case "(($ac_try" in
18747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18748 *) ac_try_echo=$ac_try;;
18749esac
18750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18751 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018753 grep -v '^ *+' conftest.er1 >conftest.err
18754 rm -f conftest.er1
18755 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018757 (exit $ac_status); } && {
18758 test -z "$ac_c_werror_flag" ||
18759 test ! -s conftest.err
18760 } && test -s conftest$ac_exeext &&
18761 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018762 ac_cv_var_tzname=yes
18763else
Martin v. Löwis11437992002-04-12 09:54:03 +000018764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018765sed 's/^/| /' conftest.$ac_ext >&5
18766
Martin v. Löwiseba40652007-08-30 20:10:57 +000018767 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018769
18770rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018771 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018773{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18774echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018775 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018776
18777cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018778#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018779_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018780
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018781 fi
18782fi
18783
Martin v. Löwiseba40652007-08-30 20:10:57 +000018784{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18785echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018786if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18787 echo $ECHO_N "(cached) $ECHO_C" >&6
18788else
18789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018790/* confdefs.h. */
18791_ACEOF
18792cat confdefs.h >>conftest.$ac_ext
18793cat >>conftest.$ac_ext <<_ACEOF
18794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018795$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018796int
18797main ()
18798{
18799static struct stat ac_aggr;
18800if (ac_aggr.st_rdev)
18801return 0;
18802 ;
18803 return 0;
18804}
18805_ACEOF
18806rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018807if { (ac_try="$ac_compile"
18808case "(($ac_try" in
18809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18810 *) ac_try_echo=$ac_try;;
18811esac
18812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18813 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018815 grep -v '^ *+' conftest.er1 >conftest.err
18816 rm -f conftest.er1
18817 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018819 (exit $ac_status); } && {
18820 test -z "$ac_c_werror_flag" ||
18821 test ! -s conftest.err
18822 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018823 ac_cv_member_struct_stat_st_rdev=yes
18824else
18825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018826sed 's/^/| /' conftest.$ac_ext >&5
18827
Martin v. Löwiseba40652007-08-30 20:10:57 +000018828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018829/* confdefs.h. */
18830_ACEOF
18831cat confdefs.h >>conftest.$ac_ext
18832cat >>conftest.$ac_ext <<_ACEOF
18833/* end confdefs.h. */
18834$ac_includes_default
18835int
18836main ()
18837{
18838static struct stat ac_aggr;
18839if (sizeof ac_aggr.st_rdev)
18840return 0;
18841 ;
18842 return 0;
18843}
18844_ACEOF
18845rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018846if { (ac_try="$ac_compile"
18847case "(($ac_try" in
18848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18849 *) ac_try_echo=$ac_try;;
18850esac
18851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18852 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018854 grep -v '^ *+' conftest.er1 >conftest.err
18855 rm -f conftest.er1
18856 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018858 (exit $ac_status); } && {
18859 test -z "$ac_c_werror_flag" ||
18860 test ! -s conftest.err
18861 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018862 ac_cv_member_struct_stat_st_rdev=yes
18863else
18864 echo "$as_me: failed program was:" >&5
18865sed 's/^/| /' conftest.$ac_ext >&5
18866
Martin v. Löwiseba40652007-08-30 20:10:57 +000018867 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018869
18870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018872
18873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018875{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18876echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018877if test $ac_cv_member_struct_stat_st_rdev = yes; then
18878
18879cat >>confdefs.h <<_ACEOF
18880#define HAVE_STRUCT_STAT_ST_RDEV 1
18881_ACEOF
18882
18883
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018884fi
18885
Martin v. Löwiseba40652007-08-30 20:10:57 +000018886{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18887echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018888if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18889 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018890else
Martin v. Löwis11437992002-04-12 09:54:03 +000018891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018892/* confdefs.h. */
18893_ACEOF
18894cat confdefs.h >>conftest.$ac_ext
18895cat >>conftest.$ac_ext <<_ACEOF
18896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018897$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018898int
18899main ()
18900{
18901static struct stat ac_aggr;
18902if (ac_aggr.st_blksize)
18903return 0;
18904 ;
18905 return 0;
18906}
18907_ACEOF
18908rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018909if { (ac_try="$ac_compile"
18910case "(($ac_try" in
18911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18912 *) ac_try_echo=$ac_try;;
18913esac
18914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18915 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018917 grep -v '^ *+' conftest.er1 >conftest.err
18918 rm -f conftest.er1
18919 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018921 (exit $ac_status); } && {
18922 test -z "$ac_c_werror_flag" ||
18923 test ! -s conftest.err
18924 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018925 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018926else
Martin v. Löwis11437992002-04-12 09:54:03 +000018927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018928sed 's/^/| /' conftest.$ac_ext >&5
18929
Martin v. Löwiseba40652007-08-30 20:10:57 +000018930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018931/* confdefs.h. */
18932_ACEOF
18933cat confdefs.h >>conftest.$ac_ext
18934cat >>conftest.$ac_ext <<_ACEOF
18935/* end confdefs.h. */
18936$ac_includes_default
18937int
18938main ()
18939{
18940static struct stat ac_aggr;
18941if (sizeof ac_aggr.st_blksize)
18942return 0;
18943 ;
18944 return 0;
18945}
18946_ACEOF
18947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018948if { (ac_try="$ac_compile"
18949case "(($ac_try" in
18950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18951 *) ac_try_echo=$ac_try;;
18952esac
18953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18954 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018956 grep -v '^ *+' conftest.er1 >conftest.err
18957 rm -f conftest.er1
18958 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018960 (exit $ac_status); } && {
18961 test -z "$ac_c_werror_flag" ||
18962 test ! -s conftest.err
18963 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018964 ac_cv_member_struct_stat_st_blksize=yes
18965else
18966 echo "$as_me: failed program was:" >&5
18967sed 's/^/| /' conftest.$ac_ext >&5
18968
Martin v. Löwiseba40652007-08-30 20:10:57 +000018969 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018971
18972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018974
18975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018977{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
18978echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018979if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018980
Martin v. Löwis11437992002-04-12 09:54:03 +000018981cat >>confdefs.h <<_ACEOF
18982#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
18983_ACEOF
18984
18985
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018986fi
18987
Martin v. Löwiseba40652007-08-30 20:10:57 +000018988{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
18989echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018990if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
18991 echo $ECHO_N "(cached) $ECHO_C" >&6
18992else
18993 cat >conftest.$ac_ext <<_ACEOF
18994/* confdefs.h. */
18995_ACEOF
18996cat confdefs.h >>conftest.$ac_ext
18997cat >>conftest.$ac_ext <<_ACEOF
18998/* end confdefs.h. */
18999$ac_includes_default
19000int
19001main ()
19002{
19003static struct stat ac_aggr;
19004if (ac_aggr.st_flags)
19005return 0;
19006 ;
19007 return 0;
19008}
19009_ACEOF
19010rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019011if { (ac_try="$ac_compile"
19012case "(($ac_try" in
19013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19014 *) ac_try_echo=$ac_try;;
19015esac
19016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19017 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019018 ac_status=$?
19019 grep -v '^ *+' conftest.er1 >conftest.err
19020 rm -f conftest.er1
19021 cat conftest.err >&5
19022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019023 (exit $ac_status); } && {
19024 test -z "$ac_c_werror_flag" ||
19025 test ! -s conftest.err
19026 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019027 ac_cv_member_struct_stat_st_flags=yes
19028else
19029 echo "$as_me: failed program was:" >&5
19030sed 's/^/| /' conftest.$ac_ext >&5
19031
Martin v. Löwiseba40652007-08-30 20:10:57 +000019032 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019033/* confdefs.h. */
19034_ACEOF
19035cat confdefs.h >>conftest.$ac_ext
19036cat >>conftest.$ac_ext <<_ACEOF
19037/* end confdefs.h. */
19038$ac_includes_default
19039int
19040main ()
19041{
19042static struct stat ac_aggr;
19043if (sizeof ac_aggr.st_flags)
19044return 0;
19045 ;
19046 return 0;
19047}
19048_ACEOF
19049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019050if { (ac_try="$ac_compile"
19051case "(($ac_try" in
19052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19053 *) ac_try_echo=$ac_try;;
19054esac
19055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19056 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019057 ac_status=$?
19058 grep -v '^ *+' conftest.er1 >conftest.err
19059 rm -f conftest.er1
19060 cat conftest.err >&5
19061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019062 (exit $ac_status); } && {
19063 test -z "$ac_c_werror_flag" ||
19064 test ! -s conftest.err
19065 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019066 ac_cv_member_struct_stat_st_flags=yes
19067else
19068 echo "$as_me: failed program was:" >&5
19069sed 's/^/| /' conftest.$ac_ext >&5
19070
Martin v. Löwiseba40652007-08-30 20:10:57 +000019071 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019073
19074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019076
19077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019079{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19080echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019081if test $ac_cv_member_struct_stat_st_flags = yes; then
19082
19083cat >>confdefs.h <<_ACEOF
19084#define HAVE_STRUCT_STAT_ST_FLAGS 1
19085_ACEOF
19086
19087
19088fi
19089
Martin v. Löwiseba40652007-08-30 20:10:57 +000019090{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19091echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019092if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19093 echo $ECHO_N "(cached) $ECHO_C" >&6
19094else
19095 cat >conftest.$ac_ext <<_ACEOF
19096/* confdefs.h. */
19097_ACEOF
19098cat confdefs.h >>conftest.$ac_ext
19099cat >>conftest.$ac_ext <<_ACEOF
19100/* end confdefs.h. */
19101$ac_includes_default
19102int
19103main ()
19104{
19105static struct stat ac_aggr;
19106if (ac_aggr.st_gen)
19107return 0;
19108 ;
19109 return 0;
19110}
19111_ACEOF
19112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019113if { (ac_try="$ac_compile"
19114case "(($ac_try" in
19115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19116 *) ac_try_echo=$ac_try;;
19117esac
19118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019120 ac_status=$?
19121 grep -v '^ *+' conftest.er1 >conftest.err
19122 rm -f conftest.er1
19123 cat conftest.err >&5
19124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019125 (exit $ac_status); } && {
19126 test -z "$ac_c_werror_flag" ||
19127 test ! -s conftest.err
19128 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019129 ac_cv_member_struct_stat_st_gen=yes
19130else
19131 echo "$as_me: failed program was:" >&5
19132sed 's/^/| /' conftest.$ac_ext >&5
19133
Martin v. Löwiseba40652007-08-30 20:10:57 +000019134 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019135/* confdefs.h. */
19136_ACEOF
19137cat confdefs.h >>conftest.$ac_ext
19138cat >>conftest.$ac_ext <<_ACEOF
19139/* end confdefs.h. */
19140$ac_includes_default
19141int
19142main ()
19143{
19144static struct stat ac_aggr;
19145if (sizeof ac_aggr.st_gen)
19146return 0;
19147 ;
19148 return 0;
19149}
19150_ACEOF
19151rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019152if { (ac_try="$ac_compile"
19153case "(($ac_try" in
19154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19155 *) ac_try_echo=$ac_try;;
19156esac
19157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019159 ac_status=$?
19160 grep -v '^ *+' conftest.er1 >conftest.err
19161 rm -f conftest.er1
19162 cat conftest.err >&5
19163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019164 (exit $ac_status); } && {
19165 test -z "$ac_c_werror_flag" ||
19166 test ! -s conftest.err
19167 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019168 ac_cv_member_struct_stat_st_gen=yes
19169else
19170 echo "$as_me: failed program was:" >&5
19171sed 's/^/| /' conftest.$ac_ext >&5
19172
Martin v. Löwiseba40652007-08-30 20:10:57 +000019173 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019175
19176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019178
19179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019181{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19182echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019183if test $ac_cv_member_struct_stat_st_gen = yes; then
19184
19185cat >>confdefs.h <<_ACEOF
19186#define HAVE_STRUCT_STAT_ST_GEN 1
19187_ACEOF
19188
19189
19190fi
19191
Martin v. Löwiseba40652007-08-30 20:10:57 +000019192{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19193echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019194if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19195 echo $ECHO_N "(cached) $ECHO_C" >&6
19196else
19197 cat >conftest.$ac_ext <<_ACEOF
19198/* confdefs.h. */
19199_ACEOF
19200cat confdefs.h >>conftest.$ac_ext
19201cat >>conftest.$ac_ext <<_ACEOF
19202/* end confdefs.h. */
19203$ac_includes_default
19204int
19205main ()
19206{
19207static struct stat ac_aggr;
19208if (ac_aggr.st_birthtime)
19209return 0;
19210 ;
19211 return 0;
19212}
19213_ACEOF
19214rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019215if { (ac_try="$ac_compile"
19216case "(($ac_try" in
19217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19218 *) ac_try_echo=$ac_try;;
19219esac
19220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019222 ac_status=$?
19223 grep -v '^ *+' conftest.er1 >conftest.err
19224 rm -f conftest.er1
19225 cat conftest.err >&5
19226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019227 (exit $ac_status); } && {
19228 test -z "$ac_c_werror_flag" ||
19229 test ! -s conftest.err
19230 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019231 ac_cv_member_struct_stat_st_birthtime=yes
19232else
19233 echo "$as_me: failed program was:" >&5
19234sed 's/^/| /' conftest.$ac_ext >&5
19235
Martin v. Löwiseba40652007-08-30 20:10:57 +000019236 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019237/* confdefs.h. */
19238_ACEOF
19239cat confdefs.h >>conftest.$ac_ext
19240cat >>conftest.$ac_ext <<_ACEOF
19241/* end confdefs.h. */
19242$ac_includes_default
19243int
19244main ()
19245{
19246static struct stat ac_aggr;
19247if (sizeof ac_aggr.st_birthtime)
19248return 0;
19249 ;
19250 return 0;
19251}
19252_ACEOF
19253rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019254if { (ac_try="$ac_compile"
19255case "(($ac_try" in
19256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19257 *) ac_try_echo=$ac_try;;
19258esac
19259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19260 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019261 ac_status=$?
19262 grep -v '^ *+' conftest.er1 >conftest.err
19263 rm -f conftest.er1
19264 cat conftest.err >&5
19265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019266 (exit $ac_status); } && {
19267 test -z "$ac_c_werror_flag" ||
19268 test ! -s conftest.err
19269 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019270 ac_cv_member_struct_stat_st_birthtime=yes
19271else
19272 echo "$as_me: failed program was:" >&5
19273sed 's/^/| /' conftest.$ac_ext >&5
19274
Martin v. Löwiseba40652007-08-30 20:10:57 +000019275 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019277
19278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019280
19281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019283{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19284echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019285if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19286
19287cat >>confdefs.h <<_ACEOF
19288#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19289_ACEOF
19290
19291
19292fi
19293
Martin v. Löwiseba40652007-08-30 20:10:57 +000019294{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19295echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019296if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19297 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019298else
Martin v. Löwis11437992002-04-12 09:54:03 +000019299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019300/* confdefs.h. */
19301_ACEOF
19302cat confdefs.h >>conftest.$ac_ext
19303cat >>conftest.$ac_ext <<_ACEOF
19304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019305$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019306int
19307main ()
19308{
19309static struct stat ac_aggr;
19310if (ac_aggr.st_blocks)
19311return 0;
19312 ;
19313 return 0;
19314}
19315_ACEOF
19316rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019317if { (ac_try="$ac_compile"
19318case "(($ac_try" in
19319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19320 *) ac_try_echo=$ac_try;;
19321esac
19322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019325 grep -v '^ *+' conftest.er1 >conftest.err
19326 rm -f conftest.er1
19327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019329 (exit $ac_status); } && {
19330 test -z "$ac_c_werror_flag" ||
19331 test ! -s conftest.err
19332 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019333 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019334else
Martin v. Löwis11437992002-04-12 09:54:03 +000019335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019336sed 's/^/| /' conftest.$ac_ext >&5
19337
Martin v. Löwiseba40652007-08-30 20:10:57 +000019338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019339/* confdefs.h. */
19340_ACEOF
19341cat confdefs.h >>conftest.$ac_ext
19342cat >>conftest.$ac_ext <<_ACEOF
19343/* end confdefs.h. */
19344$ac_includes_default
19345int
19346main ()
19347{
19348static struct stat ac_aggr;
19349if (sizeof ac_aggr.st_blocks)
19350return 0;
19351 ;
19352 return 0;
19353}
19354_ACEOF
19355rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019356if { (ac_try="$ac_compile"
19357case "(($ac_try" in
19358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19359 *) ac_try_echo=$ac_try;;
19360esac
19361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19362 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019364 grep -v '^ *+' conftest.er1 >conftest.err
19365 rm -f conftest.er1
19366 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019368 (exit $ac_status); } && {
19369 test -z "$ac_c_werror_flag" ||
19370 test ! -s conftest.err
19371 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019372 ac_cv_member_struct_stat_st_blocks=yes
19373else
19374 echo "$as_me: failed program was:" >&5
19375sed 's/^/| /' conftest.$ac_ext >&5
19376
Martin v. Löwiseba40652007-08-30 20:10:57 +000019377 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019379
19380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019382
19383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019385{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19386echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019387if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019388
Martin v. Löwis11437992002-04-12 09:54:03 +000019389cat >>confdefs.h <<_ACEOF
19390#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19391_ACEOF
19392
19393
19394cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019395#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019396_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019397
19398else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019399 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019400 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019401 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19402 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019403esac
19404
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019405fi
19406
Michael W. Hudson54241132001-12-07 15:38:26 +000019407
Martin v. Löwis11437992002-04-12 09:54:03 +000019408
Martin v. Löwiseba40652007-08-30 20:10:57 +000019409{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19410echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019411if test "${ac_cv_header_time_altzone+set}" = set; then
19412 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019413else
Martin v. Löwis11437992002-04-12 09:54:03 +000019414 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019415/* confdefs.h. */
19416_ACEOF
19417cat confdefs.h >>conftest.$ac_ext
19418cat >>conftest.$ac_ext <<_ACEOF
19419/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019420#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019421int
19422main ()
19423{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019424return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019425 ;
19426 return 0;
19427}
19428_ACEOF
19429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019430if { (ac_try="$ac_compile"
19431case "(($ac_try" in
19432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19433 *) ac_try_echo=$ac_try;;
19434esac
19435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019438 grep -v '^ *+' conftest.er1 >conftest.err
19439 rm -f conftest.er1
19440 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019442 (exit $ac_status); } && {
19443 test -z "$ac_c_werror_flag" ||
19444 test ! -s conftest.err
19445 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019446 ac_cv_header_time_altzone=yes
19447else
Martin v. Löwis11437992002-04-12 09:54:03 +000019448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019449sed 's/^/| /' conftest.$ac_ext >&5
19450
Martin v. Löwiseba40652007-08-30 20:10:57 +000019451 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019452fi
19453
Martin v. Löwiseba40652007-08-30 20:10:57 +000019454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19455fi
19456
19457{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19458echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019459if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019460
19461cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019462#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019463_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019464
19465fi
19466
Guido van Rossumda88dad1995-01-26 00:46:29 +000019467was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019468{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19469echo $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 +000019470cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019471/* confdefs.h. */
19472_ACEOF
19473cat confdefs.h >>conftest.$ac_ext
19474cat >>conftest.$ac_ext <<_ACEOF
19475/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019476
19477#include <sys/types.h>
19478#include <sys/select.h>
19479#include <sys/time.h>
19480
Martin v. Löwis11437992002-04-12 09:54:03 +000019481int
19482main ()
19483{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019484;
Martin v. Löwis11437992002-04-12 09:54:03 +000019485 ;
19486 return 0;
19487}
19488_ACEOF
19489rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019490if { (ac_try="$ac_compile"
19491case "(($ac_try" in
19492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19493 *) ac_try_echo=$ac_try;;
19494esac
19495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019498 grep -v '^ *+' conftest.er1 >conftest.err
19499 rm -f conftest.er1
19500 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019502 (exit $ac_status); } && {
19503 test -z "$ac_c_werror_flag" ||
19504 test ! -s conftest.err
19505 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019506
19507
19508cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019509#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019510_ACEOF
19511
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019512 was_it_defined=yes
19513
Guido van Rossumf78abae1997-01-21 22:02:36 +000019514else
Martin v. Löwis11437992002-04-12 09:54:03 +000019515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019516sed 's/^/| /' conftest.$ac_ext >&5
19517
Brett Cannon19fab762007-06-02 03:02:29 +000019518
Martin v. Löwiseba40652007-08-30 20:10:57 +000019519fi
19520
19521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19522{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19523echo "${ECHO_T}$was_it_defined" >&6; }
19524
19525{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19526echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019527if test "${ac_cv_struct_addrinfo+set}" = set; then
19528 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019529else
Martin v. Löwis11437992002-04-12 09:54:03 +000019530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019531/* confdefs.h. */
19532_ACEOF
19533cat confdefs.h >>conftest.$ac_ext
19534cat >>conftest.$ac_ext <<_ACEOF
19535/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019536
19537# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019538int
19539main ()
19540{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019541struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019542 ;
19543 return 0;
19544}
19545_ACEOF
19546rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019547if { (ac_try="$ac_compile"
19548case "(($ac_try" in
19549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19550 *) ac_try_echo=$ac_try;;
19551esac
19552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019555 grep -v '^ *+' conftest.er1 >conftest.err
19556 rm -f conftest.er1
19557 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019559 (exit $ac_status); } && {
19560 test -z "$ac_c_werror_flag" ||
19561 test ! -s conftest.err
19562 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019563 ac_cv_struct_addrinfo=yes
19564else
Martin v. Löwis11437992002-04-12 09:54:03 +000019565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019566sed 's/^/| /' conftest.$ac_ext >&5
19567
Martin v. Löwiseba40652007-08-30 20:10:57 +000019568 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019569fi
19570
Martin v. Löwiseba40652007-08-30 20:10:57 +000019571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19572fi
19573
19574{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19575echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019576if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019577
19578cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019579#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019580_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019581
19582fi
19583
Martin v. Löwiseba40652007-08-30 20:10:57 +000019584{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19585echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019586if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19587 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019588else
Martin v. Löwis11437992002-04-12 09:54:03 +000019589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019590/* confdefs.h. */
19591_ACEOF
19592cat confdefs.h >>conftest.$ac_ext
19593cat >>conftest.$ac_ext <<_ACEOF
19594/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019595
19596# include <sys/types.h>
19597# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019598int
19599main ()
19600{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019601struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019602 ;
19603 return 0;
19604}
19605_ACEOF
19606rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019607if { (ac_try="$ac_compile"
19608case "(($ac_try" in
19609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19610 *) ac_try_echo=$ac_try;;
19611esac
19612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019615 grep -v '^ *+' conftest.er1 >conftest.err
19616 rm -f conftest.er1
19617 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019619 (exit $ac_status); } && {
19620 test -z "$ac_c_werror_flag" ||
19621 test ! -s conftest.err
19622 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019623 ac_cv_struct_sockaddr_storage=yes
19624else
Martin v. Löwis11437992002-04-12 09:54:03 +000019625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019626sed 's/^/| /' conftest.$ac_ext >&5
19627
Martin v. Löwiseba40652007-08-30 20:10:57 +000019628 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019629fi
19630
Martin v. Löwiseba40652007-08-30 20:10:57 +000019631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19632fi
19633
19634{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19635echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019636if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019637
19638cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019639#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019640_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019641
19642fi
19643
Guido van Rossum627b2d71993-12-24 10:39:16 +000019644# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019645
Michael W. Hudson54241132001-12-07 15:38:26 +000019646
Martin v. Löwiseba40652007-08-30 20:10:57 +000019647{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19648echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019649if test "${ac_cv_c_char_unsigned+set}" = set; then
19650 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019651else
Martin v. Löwis11437992002-04-12 09:54:03 +000019652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019653/* confdefs.h. */
19654_ACEOF
19655cat confdefs.h >>conftest.$ac_ext
19656cat >>conftest.$ac_ext <<_ACEOF
19657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019658$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019659int
19660main ()
19661{
19662static int test_array [1 - 2 * !(((char) -1) < 0)];
19663test_array [0] = 0
19664
19665 ;
19666 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019667}
Martin v. Löwis11437992002-04-12 09:54:03 +000019668_ACEOF
19669rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019670if { (ac_try="$ac_compile"
19671case "(($ac_try" in
19672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19673 *) ac_try_echo=$ac_try;;
19674esac
19675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019678 grep -v '^ *+' conftest.er1 >conftest.err
19679 rm -f conftest.er1
19680 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019682 (exit $ac_status); } && {
19683 test -z "$ac_c_werror_flag" ||
19684 test ! -s conftest.err
19685 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019686 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019687else
19688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019689sed 's/^/| /' conftest.$ac_ext >&5
19690
Martin v. Löwiseba40652007-08-30 20:10:57 +000019691 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019693
19694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019696{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19697echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019698if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019699 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019700#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019701_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019702
19703fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019704
Martin v. Löwiseba40652007-08-30 20:10:57 +000019705{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19706echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019707if test "${ac_cv_c_const+set}" = set; then
19708 echo $ECHO_N "(cached) $ECHO_C" >&6
19709else
19710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019711/* confdefs.h. */
19712_ACEOF
19713cat confdefs.h >>conftest.$ac_ext
19714cat >>conftest.$ac_ext <<_ACEOF
19715/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019716
Martin v. Löwis11437992002-04-12 09:54:03 +000019717int
19718main ()
19719{
19720/* FIXME: Include the comments suggested by Paul. */
19721#ifndef __cplusplus
19722 /* Ultrix mips cc rejects this. */
19723 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019724 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019725 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019726 char const *const *pcpcc;
19727 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019728 /* NEC SVR4.0.2 mips cc rejects this. */
19729 struct point {int x, y;};
19730 static struct point const zero = {0,0};
19731 /* AIX XL C 1.02.0.0 rejects this.
19732 It does not let you subtract one const X* pointer from another in
19733 an arm of an if-expression whose if-part is not a constant
19734 expression */
19735 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019736 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019737 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019738 ++pcpcc;
19739 ppc = (char**) pcpcc;
19740 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019741 { /* SCO 3.2v4 cc rejects this. */
19742 char *t;
19743 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019744
Martin v. Löwis11437992002-04-12 09:54:03 +000019745 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019746 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019747 }
19748 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19749 int x[] = {25, 17};
19750 const int *foo = &x[0];
19751 ++foo;
19752 }
19753 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19754 typedef const int *iptr;
19755 iptr p = 0;
19756 ++p;
19757 }
19758 { /* AIX XL C 1.02.0.0 rejects this saying
19759 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19760 struct s { int j; const int *ap[3]; };
19761 struct s *b; b->j = 5;
19762 }
19763 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19764 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019765 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019766 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019767 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019768#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019769
Martin v. Löwis11437992002-04-12 09:54:03 +000019770 ;
19771 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019772}
Martin v. Löwis11437992002-04-12 09:54:03 +000019773_ACEOF
19774rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019775if { (ac_try="$ac_compile"
19776case "(($ac_try" in
19777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19778 *) ac_try_echo=$ac_try;;
19779esac
19780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019783 grep -v '^ *+' conftest.er1 >conftest.err
19784 rm -f conftest.er1
19785 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019787 (exit $ac_status); } && {
19788 test -z "$ac_c_werror_flag" ||
19789 test ! -s conftest.err
19790 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019791 ac_cv_c_const=yes
19792else
Martin v. Löwis11437992002-04-12 09:54:03 +000019793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019794sed 's/^/| /' conftest.$ac_ext >&5
19795
Martin v. Löwiseba40652007-08-30 20:10:57 +000019796 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019798
19799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019801{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19802echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019803if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019804
19805cat >>confdefs.h <<\_ACEOF
19806#define const
19807_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019808
19809fi
19810
Michael W. Hudson54241132001-12-07 15:38:26 +000019811
Guido van Rossumda88dad1995-01-26 00:46:29 +000019812works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019813{ echo "$as_me:$LINENO: checking for working volatile" >&5
19814echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019815cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019816/* confdefs.h. */
19817_ACEOF
19818cat confdefs.h >>conftest.$ac_ext
19819cat >>conftest.$ac_ext <<_ACEOF
19820/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019821
Martin v. Löwis11437992002-04-12 09:54:03 +000019822int
19823main ()
19824{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019825volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019826 ;
19827 return 0;
19828}
19829_ACEOF
19830rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019831if { (ac_try="$ac_compile"
19832case "(($ac_try" in
19833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19834 *) ac_try_echo=$ac_try;;
19835esac
19836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019839 grep -v '^ *+' conftest.er1 >conftest.err
19840 rm -f conftest.er1
19841 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019843 (exit $ac_status); } && {
19844 test -z "$ac_c_werror_flag" ||
19845 test ! -s conftest.err
19846 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019847 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019848else
Martin v. Löwis11437992002-04-12 09:54:03 +000019849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019850sed 's/^/| /' conftest.$ac_ext >&5
19851
Martin v. Löwis11437992002-04-12 09:54:03 +000019852
19853cat >>confdefs.h <<\_ACEOF
19854#define volatile
19855_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019856
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019857
Guido van Rossum627b2d71993-12-24 10:39:16 +000019858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019859
19860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19861{ echo "$as_me:$LINENO: result: $works" >&5
19862echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019863
Guido van Rossumda88dad1995-01-26 00:46:29 +000019864works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019865{ echo "$as_me:$LINENO: checking for working signed char" >&5
19866echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019867cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019868/* confdefs.h. */
19869_ACEOF
19870cat confdefs.h >>conftest.$ac_ext
19871cat >>conftest.$ac_ext <<_ACEOF
19872/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019873
Martin v. Löwis11437992002-04-12 09:54:03 +000019874int
19875main ()
19876{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019877signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019878 ;
19879 return 0;
19880}
19881_ACEOF
19882rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019883if { (ac_try="$ac_compile"
19884case "(($ac_try" in
19885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19886 *) ac_try_echo=$ac_try;;
19887esac
19888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019891 grep -v '^ *+' conftest.er1 >conftest.err
19892 rm -f conftest.er1
19893 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019895 (exit $ac_status); } && {
19896 test -z "$ac_c_werror_flag" ||
19897 test ! -s conftest.err
19898 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019899 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019900else
Martin v. Löwis11437992002-04-12 09:54:03 +000019901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019902sed 's/^/| /' conftest.$ac_ext >&5
19903
Martin v. Löwis11437992002-04-12 09:54:03 +000019904
19905cat >>confdefs.h <<\_ACEOF
19906#define signed
19907_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019908
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019909
Guido van Rossum7f43da71994-08-01 12:15:30 +000019910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019911
19912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19913{ echo "$as_me:$LINENO: result: $works" >&5
19914echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019915
Guido van Rossumda88dad1995-01-26 00:46:29 +000019916have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019917{ echo "$as_me:$LINENO: checking for prototypes" >&5
19918echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019920/* confdefs.h. */
19921_ACEOF
19922cat confdefs.h >>conftest.$ac_ext
19923cat >>conftest.$ac_ext <<_ACEOF
19924/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019925int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019926int
19927main ()
19928{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019929return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019930 ;
19931 return 0;
19932}
19933_ACEOF
19934rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019935if { (ac_try="$ac_compile"
19936case "(($ac_try" in
19937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19938 *) ac_try_echo=$ac_try;;
19939esac
19940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019943 grep -v '^ *+' conftest.er1 >conftest.err
19944 rm -f conftest.er1
19945 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019947 (exit $ac_status); } && {
19948 test -z "$ac_c_werror_flag" ||
19949 test ! -s conftest.err
19950 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019951
19952
19953cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019954#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019955_ACEOF
19956
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019957 have_prototypes=yes
19958
Guido van Rossumf78abae1997-01-21 22:02:36 +000019959else
Martin v. Löwis11437992002-04-12 09:54:03 +000019960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019961sed 's/^/| /' conftest.$ac_ext >&5
19962
Martin v. Löwiseba40652007-08-30 20:10:57 +000019963
Guido van Rossum7f43da71994-08-01 12:15:30 +000019964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019965
19966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19967{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
19968echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019969
Guido van Rossumda88dad1995-01-26 00:46:29 +000019970works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019971{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
19972echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019973cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019974/* confdefs.h. */
19975_ACEOF
19976cat confdefs.h >>conftest.$ac_ext
19977cat >>conftest.$ac_ext <<_ACEOF
19978/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019979
19980#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019981int foo(int x, ...) {
19982 va_list va;
19983 va_start(va, x);
19984 va_arg(va, int);
19985 va_arg(va, char *);
19986 va_arg(va, double);
19987 return 0;
19988}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019989
Martin v. Löwis11437992002-04-12 09:54:03 +000019990int
19991main ()
19992{
Guido van Rossum90eea071996-08-30 20:58:57 +000019993return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000019994 ;
19995 return 0;
19996}
19997_ACEOF
19998rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019999if { (ac_try="$ac_compile"
20000case "(($ac_try" in
20001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20002 *) ac_try_echo=$ac_try;;
20003esac
20004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020007 grep -v '^ *+' conftest.er1 >conftest.err
20008 rm -f conftest.er1
20009 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020011 (exit $ac_status); } && {
20012 test -z "$ac_c_werror_flag" ||
20013 test ! -s conftest.err
20014 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020015
20016
20017cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020018#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020019_ACEOF
20020
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020021 works=yes
20022
Guido van Rossumf78abae1997-01-21 22:02:36 +000020023else
Martin v. Löwis11437992002-04-12 09:54:03 +000020024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020025sed 's/^/| /' conftest.$ac_ext >&5
20026
Martin v. Löwiseba40652007-08-30 20:10:57 +000020027
Guido van Rossum627b2d71993-12-24 10:39:16 +000020028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020029
20030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20031{ echo "$as_me:$LINENO: result: $works" >&5
20032echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020033
Martin v. Löwisd6320502004-08-12 13:45:08 +000020034# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020035{ echo "$as_me:$LINENO: checking for socketpair" >&5
20036echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020037cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020038/* confdefs.h. */
20039_ACEOF
20040cat confdefs.h >>conftest.$ac_ext
20041cat >>conftest.$ac_ext <<_ACEOF
20042/* end confdefs.h. */
20043
20044#include <sys/types.h>
20045#include <sys/socket.h>
20046
20047int
20048main ()
20049{
20050void *x=socketpair
20051 ;
20052 return 0;
20053}
20054_ACEOF
20055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020056if { (ac_try="$ac_compile"
20057case "(($ac_try" in
20058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20059 *) ac_try_echo=$ac_try;;
20060esac
20061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020064 grep -v '^ *+' conftest.er1 >conftest.err
20065 rm -f conftest.er1
20066 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020068 (exit $ac_status); } && {
20069 test -z "$ac_c_werror_flag" ||
20070 test ! -s conftest.err
20071 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020072
20073cat >>confdefs.h <<\_ACEOF
20074#define HAVE_SOCKETPAIR 1
20075_ACEOF
20076
Martin v. Löwiseba40652007-08-30 20:10:57 +000020077 { echo "$as_me:$LINENO: result: yes" >&5
20078echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020079else
20080 echo "$as_me: failed program was:" >&5
20081sed 's/^/| /' conftest.$ac_ext >&5
20082
Martin v. Löwiseba40652007-08-30 20:10:57 +000020083 { echo "$as_me:$LINENO: result: no" >&5
20084echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020085
20086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020087
20088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020089
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020090# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020091{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20092echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020094/* confdefs.h. */
20095_ACEOF
20096cat confdefs.h >>conftest.$ac_ext
20097cat >>conftest.$ac_ext <<_ACEOF
20098/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020099#include <sys/types.h>
20100#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020101int
20102main ()
20103{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020104struct sockaddr x;
20105x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020106 ;
20107 return 0;
20108}
20109_ACEOF
20110rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020111if { (ac_try="$ac_compile"
20112case "(($ac_try" in
20113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20114 *) ac_try_echo=$ac_try;;
20115esac
20116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20117 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020119 grep -v '^ *+' conftest.er1 >conftest.err
20120 rm -f conftest.er1
20121 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020123 (exit $ac_status); } && {
20124 test -z "$ac_c_werror_flag" ||
20125 test ! -s conftest.err
20126 } && test -s conftest.$ac_objext; then
20127 { echo "$as_me:$LINENO: result: yes" >&5
20128echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020129
20130cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020131#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020132_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020133
20134else
Martin v. Löwis11437992002-04-12 09:54:03 +000020135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020136sed 's/^/| /' conftest.$ac_ext >&5
20137
Martin v. Löwiseba40652007-08-30 20:10:57 +000020138 { echo "$as_me:$LINENO: result: no" >&5
20139echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020141
20142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020143
Guido van Rossumda88dad1995-01-26 00:46:29 +000020144va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020145{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20146echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020148/* confdefs.h. */
20149_ACEOF
20150cat confdefs.h >>conftest.$ac_ext
20151cat >>conftest.$ac_ext <<_ACEOF
20152/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020153
20154#ifdef HAVE_STDARG_PROTOTYPES
20155#include <stdarg.h>
20156#else
20157#include <varargs.h>
20158#endif
20159
Martin v. Löwis11437992002-04-12 09:54:03 +000020160int
20161main ()
20162{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020163va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020164 ;
20165 return 0;
20166}
20167_ACEOF
20168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020169if { (ac_try="$ac_compile"
20170case "(($ac_try" in
20171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20172 *) ac_try_echo=$ac_try;;
20173esac
20174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020177 grep -v '^ *+' conftest.er1 >conftest.err
20178 rm -f conftest.er1
20179 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020181 (exit $ac_status); } && {
20182 test -z "$ac_c_werror_flag" ||
20183 test ! -s conftest.err
20184 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020185 :
20186else
Martin v. Löwis11437992002-04-12 09:54:03 +000020187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020188sed 's/^/| /' conftest.$ac_ext >&5
20189
Martin v. Löwis11437992002-04-12 09:54:03 +000020190
20191
20192cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020193#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020194_ACEOF
20195
Guido van Rossumda88dad1995-01-26 00:46:29 +000020196 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020197
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020199
20200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20201{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20202echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020203
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020204# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020205
20206
20207
Martin v. Löwiseba40652007-08-30 20:10:57 +000020208{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20209echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020210if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20211 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020212else
Martin v. Löwis11437992002-04-12 09:54:03 +000020213 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020214/* confdefs.h. */
20215_ACEOF
20216cat confdefs.h >>conftest.$ac_ext
20217cat >>conftest.$ac_ext <<_ACEOF
20218/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020219/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20220 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20221#define gethostbyname_r innocuous_gethostbyname_r
20222
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020223/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020224 which can conflict with char gethostbyname_r (); below.
20225 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020226 <limits.h> exists even on freestanding compilers. */
20227
20228#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020229# include <limits.h>
20230#else
20231# include <assert.h>
20232#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020233
20234#undef gethostbyname_r
20235
Martin v. Löwiseba40652007-08-30 20:10:57 +000020236/* Override any GCC internal prototype to avoid an error.
20237 Use char because int might match the return type of a GCC
20238 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020239#ifdef __cplusplus
20240extern "C"
20241#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020242char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020243/* The GNU C library defines this for functions which it implements
20244 to always fail with ENOSYS. Some functions are actually named
20245 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020246#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020247choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020248#endif
20249
Skip Montanaro6dead952003-09-25 14:50:04 +000020250int
20251main ()
20252{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020253return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020254 ;
20255 return 0;
20256}
20257_ACEOF
20258rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020259if { (ac_try="$ac_link"
20260case "(($ac_try" in
20261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20262 *) ac_try_echo=$ac_try;;
20263esac
20264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20265 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020267 grep -v '^ *+' conftest.er1 >conftest.err
20268 rm -f conftest.er1
20269 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020271 (exit $ac_status); } && {
20272 test -z "$ac_c_werror_flag" ||
20273 test ! -s conftest.err
20274 } && test -s conftest$ac_exeext &&
20275 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020276 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020277else
Martin v. Löwis11437992002-04-12 09:54:03 +000020278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020279sed 's/^/| /' conftest.$ac_ext >&5
20280
Martin v. Löwiseba40652007-08-30 20:10:57 +000020281 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020283
20284rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020285 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020287{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20288echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020289if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020290
Martin v. Löwis11437992002-04-12 09:54:03 +000020291 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020292#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020293_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020294
Martin v. Löwiseba40652007-08-30 20:10:57 +000020295 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20296echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020297 OLD_CFLAGS=$CFLAGS
20298 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020300/* confdefs.h. */
20301_ACEOF
20302cat confdefs.h >>conftest.$ac_ext
20303cat >>conftest.$ac_ext <<_ACEOF
20304/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020305
20306# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020307
Martin v. Löwis11437992002-04-12 09:54:03 +000020308int
20309main ()
20310{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020311
20312 char *name;
20313 struct hostent *he, *res;
20314 char buffer[2048];
20315 int buflen = 2048;
20316 int h_errnop;
20317
20318 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020319
20320 ;
20321 return 0;
20322}
20323_ACEOF
20324rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020325if { (ac_try="$ac_compile"
20326case "(($ac_try" in
20327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20328 *) ac_try_echo=$ac_try;;
20329esac
20330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20331 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020333 grep -v '^ *+' conftest.er1 >conftest.err
20334 rm -f conftest.er1
20335 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020337 (exit $ac_status); } && {
20338 test -z "$ac_c_werror_flag" ||
20339 test ! -s conftest.err
20340 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020341
20342 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020343#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020344_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020345
Martin v. Löwis11437992002-04-12 09:54:03 +000020346
20347cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020348#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020349_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020350
Martin v. Löwiseba40652007-08-30 20:10:57 +000020351 { echo "$as_me:$LINENO: result: yes" >&5
20352echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020353
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020354else
Martin v. Löwis11437992002-04-12 09:54:03 +000020355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020356sed 's/^/| /' conftest.$ac_ext >&5
20357
Martin v. Löwis11437992002-04-12 09:54:03 +000020358
Martin v. Löwiseba40652007-08-30 20:10:57 +000020359 { echo "$as_me:$LINENO: result: no" >&5
20360echo "${ECHO_T}no" >&6; }
20361 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20362echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020364/* confdefs.h. */
20365_ACEOF
20366cat confdefs.h >>conftest.$ac_ext
20367cat >>conftest.$ac_ext <<_ACEOF
20368/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020369
20370# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020371
Martin v. Löwis11437992002-04-12 09:54:03 +000020372int
20373main ()
20374{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020375
20376 char *name;
20377 struct hostent *he;
20378 char buffer[2048];
20379 int buflen = 2048;
20380 int h_errnop;
20381
20382 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020383
20384 ;
20385 return 0;
20386}
20387_ACEOF
20388rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020389if { (ac_try="$ac_compile"
20390case "(($ac_try" in
20391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20392 *) ac_try_echo=$ac_try;;
20393esac
20394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20395 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020396 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020397 grep -v '^ *+' conftest.er1 >conftest.err
20398 rm -f conftest.er1
20399 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020401 (exit $ac_status); } && {
20402 test -z "$ac_c_werror_flag" ||
20403 test ! -s conftest.err
20404 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020405
20406 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020407#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020408_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020409
Martin v. Löwis11437992002-04-12 09:54:03 +000020410
20411cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020412#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020413_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020414
Martin v. Löwiseba40652007-08-30 20:10:57 +000020415 { echo "$as_me:$LINENO: result: yes" >&5
20416echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020417
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020418else
Martin v. Löwis11437992002-04-12 09:54:03 +000020419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020420sed 's/^/| /' conftest.$ac_ext >&5
20421
Martin v. Löwis11437992002-04-12 09:54:03 +000020422
Martin v. Löwiseba40652007-08-30 20:10:57 +000020423 { echo "$as_me:$LINENO: result: no" >&5
20424echo "${ECHO_T}no" >&6; }
20425 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20426echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020428/* confdefs.h. */
20429_ACEOF
20430cat confdefs.h >>conftest.$ac_ext
20431cat >>conftest.$ac_ext <<_ACEOF
20432/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020433
20434# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020435
Martin v. Löwis11437992002-04-12 09:54:03 +000020436int
20437main ()
20438{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020439
20440 char *name;
20441 struct hostent *he;
20442 struct hostent_data data;
20443
20444 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020445
20446 ;
20447 return 0;
20448}
20449_ACEOF
20450rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020451if { (ac_try="$ac_compile"
20452case "(($ac_try" in
20453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20454 *) ac_try_echo=$ac_try;;
20455esac
20456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020459 grep -v '^ *+' conftest.er1 >conftest.err
20460 rm -f conftest.er1
20461 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020463 (exit $ac_status); } && {
20464 test -z "$ac_c_werror_flag" ||
20465 test ! -s conftest.err
20466 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020467
20468 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020469#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020470_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020471
Martin v. Löwis11437992002-04-12 09:54:03 +000020472
20473cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020474#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020475_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020476
Martin v. Löwiseba40652007-08-30 20:10:57 +000020477 { echo "$as_me:$LINENO: result: yes" >&5
20478echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020479
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020480else
Martin v. Löwis11437992002-04-12 09:54:03 +000020481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020482sed 's/^/| /' conftest.$ac_ext >&5
20483
Martin v. Löwis11437992002-04-12 09:54:03 +000020484
Martin v. Löwiseba40652007-08-30 20:10:57 +000020485 { echo "$as_me:$LINENO: result: no" >&5
20486echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020487
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020489
20490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020491
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020493
20494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020497
20498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020499 CFLAGS=$OLD_CFLAGS
20500
20501else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020502
Martin v. Löwis11437992002-04-12 09:54:03 +000020503
20504for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020505do
Martin v. Löwis11437992002-04-12 09:54:03 +000020506as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020507{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20508echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20509if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020510 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020511else
Martin v. Löwis11437992002-04-12 09:54:03 +000020512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020513/* confdefs.h. */
20514_ACEOF
20515cat confdefs.h >>conftest.$ac_ext
20516cat >>conftest.$ac_ext <<_ACEOF
20517/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020518/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20519 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20520#define $ac_func innocuous_$ac_func
20521
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020522/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020523 which can conflict with char $ac_func (); below.
20524 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020525 <limits.h> exists even on freestanding compilers. */
20526
20527#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020528# include <limits.h>
20529#else
20530# include <assert.h>
20531#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020532
20533#undef $ac_func
20534
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535/* Override any GCC internal prototype to avoid an error.
20536 Use char because int might match the return type of a GCC
20537 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020538#ifdef __cplusplus
20539extern "C"
20540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020541char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020542/* The GNU C library defines this for functions which it implements
20543 to always fail with ENOSYS. Some functions are actually named
20544 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020545#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020546choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020547#endif
20548
Skip Montanaro6dead952003-09-25 14:50:04 +000020549int
20550main ()
20551{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020552return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020553 ;
20554 return 0;
20555}
20556_ACEOF
20557rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020558if { (ac_try="$ac_link"
20559case "(($ac_try" in
20560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20561 *) ac_try_echo=$ac_try;;
20562esac
20563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20564 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020566 grep -v '^ *+' conftest.er1 >conftest.err
20567 rm -f conftest.er1
20568 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020570 (exit $ac_status); } && {
20571 test -z "$ac_c_werror_flag" ||
20572 test ! -s conftest.err
20573 } && test -s conftest$ac_exeext &&
20574 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020575 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020576else
Martin v. Löwis11437992002-04-12 09:54:03 +000020577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020578sed 's/^/| /' conftest.$ac_ext >&5
20579
Martin v. Löwiseba40652007-08-30 20:10:57 +000020580 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020582
20583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020584 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020586ac_res=`eval echo '${'$as_ac_var'}'`
20587 { echo "$as_me:$LINENO: result: $ac_res" >&5
20588echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020589if test `eval echo '${'$as_ac_var'}'` = yes; then
20590 cat >>confdefs.h <<_ACEOF
20591#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20592_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020593
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020594fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020595done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020596
Michael W. Hudson54241132001-12-07 15:38:26 +000020597
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020598fi
20599
Michael W. Hudson54241132001-12-07 15:38:26 +000020600
20601
20602
20603
20604
20605
Guido van Rossum627b2d71993-12-24 10:39:16 +000020606# checks for system services
20607# (none yet)
20608
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020609# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020610{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20611echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020612if test "${ac_cv_func___fpu_control+set}" = set; then
20613 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020614else
Martin v. Löwis11437992002-04-12 09:54:03 +000020615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020616/* confdefs.h. */
20617_ACEOF
20618cat confdefs.h >>conftest.$ac_ext
20619cat >>conftest.$ac_ext <<_ACEOF
20620/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020621/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20622 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20623#define __fpu_control innocuous___fpu_control
20624
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020625/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020626 which can conflict with char __fpu_control (); below.
20627 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020628 <limits.h> exists even on freestanding compilers. */
20629
20630#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020631# include <limits.h>
20632#else
20633# include <assert.h>
20634#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020635
20636#undef __fpu_control
20637
Martin v. Löwiseba40652007-08-30 20:10:57 +000020638/* Override any GCC internal prototype to avoid an error.
20639 Use char because int might match the return type of a GCC
20640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020641#ifdef __cplusplus
20642extern "C"
20643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020644char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020645/* The GNU C library defines this for functions which it implements
20646 to always fail with ENOSYS. Some functions are actually named
20647 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020648#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020649choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020650#endif
20651
Skip Montanaro6dead952003-09-25 14:50:04 +000020652int
20653main ()
20654{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020655return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020656 ;
20657 return 0;
20658}
20659_ACEOF
20660rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020661if { (ac_try="$ac_link"
20662case "(($ac_try" in
20663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20664 *) ac_try_echo=$ac_try;;
20665esac
20666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20667 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020669 grep -v '^ *+' conftest.er1 >conftest.err
20670 rm -f conftest.er1
20671 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020673 (exit $ac_status); } && {
20674 test -z "$ac_c_werror_flag" ||
20675 test ! -s conftest.err
20676 } && test -s conftest$ac_exeext &&
20677 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020678 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020679else
Martin v. Löwis11437992002-04-12 09:54:03 +000020680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020681sed 's/^/| /' conftest.$ac_ext >&5
20682
Martin v. Löwiseba40652007-08-30 20:10:57 +000020683 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020685
20686rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020687 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020689{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20690echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020691if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020692 :
20693else
Martin v. Löwis11437992002-04-12 09:54:03 +000020694
Martin v. Löwiseba40652007-08-30 20:10:57 +000020695{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20696echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020697if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20698 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020699else
Martin v. Löwis11437992002-04-12 09:54:03 +000020700 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020701LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020703/* confdefs.h. */
20704_ACEOF
20705cat confdefs.h >>conftest.$ac_ext
20706cat >>conftest.$ac_ext <<_ACEOF
20707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020708
Martin v. Löwiseba40652007-08-30 20:10:57 +000020709/* Override any GCC internal prototype to avoid an error.
20710 Use char because int might match the return type of a GCC
20711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020712#ifdef __cplusplus
20713extern "C"
20714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020715char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020716int
20717main ()
20718{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020719return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020720 ;
20721 return 0;
20722}
20723_ACEOF
20724rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020725if { (ac_try="$ac_link"
20726case "(($ac_try" in
20727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20728 *) ac_try_echo=$ac_try;;
20729esac
20730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20731 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020733 grep -v '^ *+' conftest.er1 >conftest.err
20734 rm -f conftest.er1
20735 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020737 (exit $ac_status); } && {
20738 test -z "$ac_c_werror_flag" ||
20739 test ! -s conftest.err
20740 } && test -s conftest$ac_exeext &&
20741 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020742 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020743else
Martin v. Löwis11437992002-04-12 09:54:03 +000020744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020745sed 's/^/| /' conftest.$ac_ext >&5
20746
Martin v. Löwiseba40652007-08-30 20:10:57 +000020747 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020749
20750rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020752LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020754{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20755echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020756if test $ac_cv_lib_ieee___fpu_control = yes; then
20757 cat >>confdefs.h <<_ACEOF
20758#define HAVE_LIBIEEE 1
20759_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020760
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020761 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020762
Guido van Rossum627b2d71993-12-24 10:39:16 +000020763fi
20764
Michael W. Hudson54241132001-12-07 15:38:26 +000020765
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020766fi
20767
Michael W. Hudson54241132001-12-07 15:38:26 +000020768
Guido van Rossum7f253911997-05-09 02:42:48 +000020769# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020770{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20771echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020772
Martin v. Löwiseba40652007-08-30 20:10:57 +000020773# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020774if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020775 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020776if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020777then
20778
20779cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020780#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020781_ACEOF
20782
Martin v. Löwiseba40652007-08-30 20:10:57 +000020783 { echo "$as_me:$LINENO: result: yes" >&5
20784echo "${ECHO_T}yes" >&6; }
20785else { echo "$as_me:$LINENO: result: no" >&5
20786echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020787fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020788else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020789 { echo "$as_me:$LINENO: result: no" >&5
20790echo "${ECHO_T}no" >&6; }
20791fi
20792
Guido van Rossum7f253911997-05-09 02:42:48 +000020793
Guido van Rossum7f43da71994-08-01 12:15:30 +000020794# check for --with-libm=...
20795
Guido van Rossum563e7081996-09-10 18:20:48 +000020796case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020797Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020798BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020799*) LIBM=-lm
20800esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020801{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20802echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020803
Martin v. Löwiseba40652007-08-30 20:10:57 +000020804# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020805if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020806 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020807if test "$withval" = no
20808then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020809 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20810echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020811elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020812then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020813 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20814echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020815else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20816echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20817 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020818fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020819else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020820 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20821echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20822fi
20823
Guido van Rossum7f43da71994-08-01 12:15:30 +000020824
20825# check for --with-libc=...
20826
Martin v. Löwiseba40652007-08-30 20:10:57 +000020827{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20828echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020829
Martin v. Löwiseba40652007-08-30 20:10:57 +000020830# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020831if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020832 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020833if test "$withval" = no
20834then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020835 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20836echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020837elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020838then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020839 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20840echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020841else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20842echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20843 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020844fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020845else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020846 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20847echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20848fi
20849
Guido van Rossum7f43da71994-08-01 12:15:30 +000020850
Christian Heimes0a8143f2007-12-18 23:22:54 +000020851# ************************************
20852# * Check for mathematical functions *
20853# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000020854
20855# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
20856# -0. on some architectures.
20857{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
20858echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
20859if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
20860 echo $ECHO_N "(cached) $ECHO_C" >&6
20861else
20862
20863if test "$cross_compiling" = yes; then
20864 ac_cv_tanh_preserves_zero_sign=no
20865else
20866 cat >conftest.$ac_ext <<_ACEOF
20867/* confdefs.h. */
20868_ACEOF
20869cat confdefs.h >>conftest.$ac_ext
20870cat >>conftest.$ac_ext <<_ACEOF
20871/* end confdefs.h. */
20872
20873#include <math.h>
20874int main() {
20875 /* return 0 if either negative zeros don't exist
20876 on this platform or if negative zeros exist
20877 and tanh(-0.) == -0. */
20878 if (atan2(0., -1.) == atan2(-0., -1.) ||
20879 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
20880 else exit(1);
20881}
20882
20883_ACEOF
20884rm -f conftest$ac_exeext
20885if { (ac_try="$ac_link"
20886case "(($ac_try" in
20887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20888 *) ac_try_echo=$ac_try;;
20889esac
20890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20891 (eval "$ac_link") 2>&5
20892 ac_status=$?
20893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20894 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20895 { (case "(($ac_try" in
20896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20897 *) ac_try_echo=$ac_try;;
20898esac
20899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20900 (eval "$ac_try") 2>&5
20901 ac_status=$?
20902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20903 (exit $ac_status); }; }; then
20904 ac_cv_tanh_preserves_zero_sign=yes
20905else
20906 echo "$as_me: program exited with status $ac_status" >&5
20907echo "$as_me: failed program was:" >&5
20908sed 's/^/| /' conftest.$ac_ext >&5
20909
20910( exit $ac_status )
20911ac_cv_tanh_preserves_zero_sign=no
20912fi
20913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20914fi
20915
20916
20917fi
20918
20919{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
20920echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
20921if test "$ac_cv_tanh_preserves_zero_sign" = yes
20922then
20923
20924cat >>confdefs.h <<\_ACEOF
20925#define TANH_PRESERVES_ZERO_SIGN 1
20926_ACEOF
20927
20928fi
20929
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020930LIBS_SAVE=$LIBS
20931LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000020932
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020933for ac_func in hypot
20934do
Martin v. Löwis11437992002-04-12 09:54:03 +000020935as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020936{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20937echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20938if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020940else
Martin v. Löwis11437992002-04-12 09:54:03 +000020941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020942/* confdefs.h. */
20943_ACEOF
20944cat confdefs.h >>conftest.$ac_ext
20945cat >>conftest.$ac_ext <<_ACEOF
20946/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020947/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20948 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20949#define $ac_func innocuous_$ac_func
20950
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020951/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020952 which can conflict with char $ac_func (); below.
20953 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020954 <limits.h> exists even on freestanding compilers. */
20955
20956#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020957# include <limits.h>
20958#else
20959# include <assert.h>
20960#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020961
20962#undef $ac_func
20963
Martin v. Löwiseba40652007-08-30 20:10:57 +000020964/* Override any GCC internal prototype to avoid an error.
20965 Use char because int might match the return type of a GCC
20966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020967#ifdef __cplusplus
20968extern "C"
20969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020970char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020971/* The GNU C library defines this for functions which it implements
20972 to always fail with ENOSYS. Some functions are actually named
20973 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020974#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020975choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020976#endif
20977
Skip Montanaro6dead952003-09-25 14:50:04 +000020978int
20979main ()
20980{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020981return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020982 ;
20983 return 0;
20984}
20985_ACEOF
20986rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020987if { (ac_try="$ac_link"
20988case "(($ac_try" in
20989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20990 *) ac_try_echo=$ac_try;;
20991esac
20992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20993 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020995 grep -v '^ *+' conftest.er1 >conftest.err
20996 rm -f conftest.er1
20997 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020999 (exit $ac_status); } && {
21000 test -z "$ac_c_werror_flag" ||
21001 test ! -s conftest.err
21002 } && test -s conftest$ac_exeext &&
21003 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021004 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021005else
Martin v. Löwis11437992002-04-12 09:54:03 +000021006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021007sed 's/^/| /' conftest.$ac_ext >&5
21008
Martin v. Löwiseba40652007-08-30 20:10:57 +000021009 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021011
21012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021013 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021015ac_res=`eval echo '${'$as_ac_var'}'`
21016 { echo "$as_me:$LINENO: result: $ac_res" >&5
21017echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021018if test `eval echo '${'$as_ac_var'}'` = yes; then
21019 cat >>confdefs.h <<_ACEOF
21020#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21021_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000021022
Michael W. Hudson54241132001-12-07 15:38:26 +000021023else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021024 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021025 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021026 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21027 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021028esac
21029
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021030fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021031done
21032
Michael W. Hudson54241132001-12-07 15:38:26 +000021033
Christian Heimes0a8143f2007-12-18 23:22:54 +000021034
21035
21036
21037
21038
Christian Heimes48723512008-01-20 14:28:28 +000021039
21040
21041
21042
21043
21044for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021045do
21046as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21047{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21048echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21049if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21050 echo $ECHO_N "(cached) $ECHO_C" >&6
21051else
21052 cat >conftest.$ac_ext <<_ACEOF
21053/* confdefs.h. */
21054_ACEOF
21055cat confdefs.h >>conftest.$ac_ext
21056cat >>conftest.$ac_ext <<_ACEOF
21057/* end confdefs.h. */
21058/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21059 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21060#define $ac_func innocuous_$ac_func
21061
21062/* System header to define __stub macros and hopefully few prototypes,
21063 which can conflict with char $ac_func (); below.
21064 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21065 <limits.h> exists even on freestanding compilers. */
21066
21067#ifdef __STDC__
21068# include <limits.h>
21069#else
21070# include <assert.h>
21071#endif
21072
21073#undef $ac_func
21074
21075/* Override any GCC internal prototype to avoid an error.
21076 Use char because int might match the return type of a GCC
21077 builtin and then its argument prototype would still apply. */
21078#ifdef __cplusplus
21079extern "C"
21080#endif
21081char $ac_func ();
21082/* The GNU C library defines this for functions which it implements
21083 to always fail with ENOSYS. Some functions are actually named
21084 something starting with __ and the normal name is an alias. */
21085#if defined __stub_$ac_func || defined __stub___$ac_func
21086choke me
21087#endif
21088
21089int
21090main ()
21091{
21092return $ac_func ();
21093 ;
21094 return 0;
21095}
21096_ACEOF
21097rm -f conftest.$ac_objext conftest$ac_exeext
21098if { (ac_try="$ac_link"
21099case "(($ac_try" in
21100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21101 *) ac_try_echo=$ac_try;;
21102esac
21103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21104 (eval "$ac_link") 2>conftest.er1
21105 ac_status=$?
21106 grep -v '^ *+' conftest.er1 >conftest.err
21107 rm -f conftest.er1
21108 cat conftest.err >&5
21109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21110 (exit $ac_status); } && {
21111 test -z "$ac_c_werror_flag" ||
21112 test ! -s conftest.err
21113 } && test -s conftest$ac_exeext &&
21114 $as_test_x conftest$ac_exeext; then
21115 eval "$as_ac_var=yes"
21116else
21117 echo "$as_me: failed program was:" >&5
21118sed 's/^/| /' conftest.$ac_ext >&5
21119
21120 eval "$as_ac_var=no"
21121fi
21122
21123rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21124 conftest$ac_exeext conftest.$ac_ext
21125fi
21126ac_res=`eval echo '${'$as_ac_var'}'`
21127 { echo "$as_me:$LINENO: result: $ac_res" >&5
21128echo "${ECHO_T}$ac_res" >&6; }
21129if test `eval echo '${'$as_ac_var'}'` = yes; then
21130 cat >>confdefs.h <<_ACEOF
21131#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21132_ACEOF
21133
21134fi
21135done
21136
21137
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021138LIBS=$LIBS_SAVE
21139
Guido van Rossumef2255b2000-03-10 22:30:29 +000021140# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021141if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021142 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21143echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021144if test "${ac_cv_header_wchar_h+set}" = set; then
21145 echo $ECHO_N "(cached) $ECHO_C" >&6
21146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021147{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21148echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021149else
Martin v. Löwis11437992002-04-12 09:54:03 +000021150 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021151{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21152echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021153cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021154/* confdefs.h. */
21155_ACEOF
21156cat confdefs.h >>conftest.$ac_ext
21157cat >>conftest.$ac_ext <<_ACEOF
21158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021159$ac_includes_default
21160#include <wchar.h>
21161_ACEOF
21162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021163if { (ac_try="$ac_compile"
21164case "(($ac_try" in
21165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21166 *) ac_try_echo=$ac_try;;
21167esac
21168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021171 grep -v '^ *+' conftest.er1 >conftest.err
21172 rm -f conftest.er1
21173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021175 (exit $ac_status); } && {
21176 test -z "$ac_c_werror_flag" ||
21177 test ! -s conftest.err
21178 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021179 ac_header_compiler=yes
21180else
21181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021182sed 's/^/| /' conftest.$ac_ext >&5
21183
Martin v. Löwiseba40652007-08-30 20:10:57 +000021184 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021186
21187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21188{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21189echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021190
21191# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021192{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21193echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021195/* confdefs.h. */
21196_ACEOF
21197cat confdefs.h >>conftest.$ac_ext
21198cat >>conftest.$ac_ext <<_ACEOF
21199/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021200#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021201_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021202if { (ac_try="$ac_cpp conftest.$ac_ext"
21203case "(($ac_try" in
21204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21205 *) ac_try_echo=$ac_try;;
21206esac
21207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21208 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021209 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021210 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021211 rm -f conftest.er1
21212 cat conftest.err >&5
21213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021214 (exit $ac_status); } >/dev/null && {
21215 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21216 test ! -s conftest.err
21217 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021218 ac_header_preproc=yes
21219else
21220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021221sed 's/^/| /' conftest.$ac_ext >&5
21222
Martin v. Löwis11437992002-04-12 09:54:03 +000021223 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021225
Martin v. Löwis11437992002-04-12 09:54:03 +000021226rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021227{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21228echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021229
21230# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021231case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21232 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021233 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21234echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021235 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21236echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21237 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021238 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021239 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021240 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21241echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021242 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21243echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21244 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21245echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21246 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21247echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021248 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21249echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021250 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21251echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021252 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021253## ------------------------------------------------ ##
21254## Report this to http://www.python.org/python-bugs ##
21255## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021256_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021257 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021258 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021259esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021260{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21261echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021262if test "${ac_cv_header_wchar_h+set}" = set; then
21263 echo $ECHO_N "(cached) $ECHO_C" >&6
21264else
21265 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021267{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21268echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021269
21270fi
21271if test $ac_cv_header_wchar_h = yes; then
21272
21273
21274cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021275#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021276_ACEOF
21277
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021278 wchar_h="yes"
21279
Guido van Rossumef2255b2000-03-10 22:30:29 +000021280else
Martin v. Löwis11437992002-04-12 09:54:03 +000021281 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021282
21283fi
21284
Michael W. Hudson54241132001-12-07 15:38:26 +000021285
Martin v. Löwis11437992002-04-12 09:54:03 +000021286
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021287# determine wchar_t size
21288if test "$wchar_h" = yes
21289then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021290 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21291echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021292if test "${ac_cv_type_wchar_t+set}" = set; then
21293 echo $ECHO_N "(cached) $ECHO_C" >&6
21294else
21295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021296/* confdefs.h. */
21297_ACEOF
21298cat confdefs.h >>conftest.$ac_ext
21299cat >>conftest.$ac_ext <<_ACEOF
21300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021301#include <wchar.h>
21302
Martin v. Löwiseba40652007-08-30 20:10:57 +000021303typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021304int
21305main ()
21306{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021307if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021308 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021309if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021310 return 0;
21311 ;
21312 return 0;
21313}
21314_ACEOF
21315rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021316if { (ac_try="$ac_compile"
21317case "(($ac_try" in
21318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21319 *) ac_try_echo=$ac_try;;
21320esac
21321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021324 grep -v '^ *+' conftest.er1 >conftest.err
21325 rm -f conftest.er1
21326 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021328 (exit $ac_status); } && {
21329 test -z "$ac_c_werror_flag" ||
21330 test ! -s conftest.err
21331 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021332 ac_cv_type_wchar_t=yes
21333else
21334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021335sed 's/^/| /' conftest.$ac_ext >&5
21336
Martin v. Löwiseba40652007-08-30 20:10:57 +000021337 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021338fi
Brett Cannon19fab762007-06-02 03:02:29 +000021339
Martin v. Löwiseba40652007-08-30 20:10:57 +000021340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21341fi
21342{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21343echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21344
21345# The cast to long int works around a bug in the HP C Compiler
21346# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21347# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21348# This bug is HP SR number 8606223364.
21349{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21350echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021351if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21352 echo $ECHO_N "(cached) $ECHO_C" >&6
21353else
Martin v. Löwis11437992002-04-12 09:54:03 +000021354 if test "$cross_compiling" = yes; then
21355 # Depending upon the size, compute the lo and hi bounds.
21356cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021357/* confdefs.h. */
21358_ACEOF
21359cat confdefs.h >>conftest.$ac_ext
21360cat >>conftest.$ac_ext <<_ACEOF
21361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021362#include <wchar.h>
21363
Martin v. Löwiseba40652007-08-30 20:10:57 +000021364 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021365int
21366main ()
21367{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021368static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021369test_array [0] = 0
21370
21371 ;
21372 return 0;
21373}
21374_ACEOF
21375rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021376if { (ac_try="$ac_compile"
21377case "(($ac_try" in
21378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21379 *) ac_try_echo=$ac_try;;
21380esac
21381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021384 grep -v '^ *+' conftest.er1 >conftest.err
21385 rm -f conftest.er1
21386 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021388 (exit $ac_status); } && {
21389 test -z "$ac_c_werror_flag" ||
21390 test ! -s conftest.err
21391 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021392 ac_lo=0 ac_mid=0
21393 while :; do
21394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021395/* confdefs.h. */
21396_ACEOF
21397cat confdefs.h >>conftest.$ac_ext
21398cat >>conftest.$ac_ext <<_ACEOF
21399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021400#include <wchar.h>
21401
Martin v. Löwiseba40652007-08-30 20:10:57 +000021402 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021403int
21404main ()
21405{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021406static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021407test_array [0] = 0
21408
21409 ;
21410 return 0;
21411}
21412_ACEOF
21413rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021414if { (ac_try="$ac_compile"
21415case "(($ac_try" in
21416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21417 *) ac_try_echo=$ac_try;;
21418esac
21419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021422 grep -v '^ *+' conftest.er1 >conftest.err
21423 rm -f conftest.er1
21424 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021426 (exit $ac_status); } && {
21427 test -z "$ac_c_werror_flag" ||
21428 test ! -s conftest.err
21429 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021430 ac_hi=$ac_mid; break
21431else
21432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021433sed 's/^/| /' conftest.$ac_ext >&5
21434
Martin v. Löwiseba40652007-08-30 20:10:57 +000021435 ac_lo=`expr $ac_mid + 1`
21436 if test $ac_lo -le $ac_mid; then
21437 ac_lo= ac_hi=
21438 break
21439 fi
21440 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021442
21443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021444 done
21445else
21446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021447sed 's/^/| /' conftest.$ac_ext >&5
21448
Martin v. Löwiseba40652007-08-30 20:10:57 +000021449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021450/* confdefs.h. */
21451_ACEOF
21452cat confdefs.h >>conftest.$ac_ext
21453cat >>conftest.$ac_ext <<_ACEOF
21454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021455#include <wchar.h>
21456
Martin v. Löwiseba40652007-08-30 20:10:57 +000021457 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021458int
21459main ()
21460{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021461static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021462test_array [0] = 0
21463
21464 ;
21465 return 0;
21466}
21467_ACEOF
21468rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021469if { (ac_try="$ac_compile"
21470case "(($ac_try" in
21471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21472 *) ac_try_echo=$ac_try;;
21473esac
21474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021477 grep -v '^ *+' conftest.er1 >conftest.err
21478 rm -f conftest.er1
21479 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021481 (exit $ac_status); } && {
21482 test -z "$ac_c_werror_flag" ||
21483 test ! -s conftest.err
21484 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021485 ac_hi=-1 ac_mid=-1
21486 while :; do
21487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021488/* confdefs.h. */
21489_ACEOF
21490cat confdefs.h >>conftest.$ac_ext
21491cat >>conftest.$ac_ext <<_ACEOF
21492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021493#include <wchar.h>
21494
Martin v. Löwiseba40652007-08-30 20:10:57 +000021495 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021496int
21497main ()
21498{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021499static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021500test_array [0] = 0
21501
21502 ;
21503 return 0;
21504}
21505_ACEOF
21506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021507if { (ac_try="$ac_compile"
21508case "(($ac_try" in
21509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21510 *) ac_try_echo=$ac_try;;
21511esac
21512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021515 grep -v '^ *+' conftest.er1 >conftest.err
21516 rm -f conftest.er1
21517 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021519 (exit $ac_status); } && {
21520 test -z "$ac_c_werror_flag" ||
21521 test ! -s conftest.err
21522 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021523 ac_lo=$ac_mid; break
21524else
21525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021526sed 's/^/| /' conftest.$ac_ext >&5
21527
Martin v. Löwiseba40652007-08-30 20:10:57 +000021528 ac_hi=`expr '(' $ac_mid ')' - 1`
21529 if test $ac_mid -le $ac_hi; then
21530 ac_lo= ac_hi=
21531 break
21532 fi
21533 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000021534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021535
21536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021537 done
21538else
21539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021540sed 's/^/| /' conftest.$ac_ext >&5
21541
Martin v. Löwiseba40652007-08-30 20:10:57 +000021542 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021544
21545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021547
21548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021549# Binary search between lo and hi bounds.
21550while test "x$ac_lo" != "x$ac_hi"; do
21551 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021553/* confdefs.h. */
21554_ACEOF
21555cat confdefs.h >>conftest.$ac_ext
21556cat >>conftest.$ac_ext <<_ACEOF
21557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021558#include <wchar.h>
21559
Martin v. Löwiseba40652007-08-30 20:10:57 +000021560 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021561int
21562main ()
21563{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021564static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021565test_array [0] = 0
21566
21567 ;
21568 return 0;
21569}
21570_ACEOF
21571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021572if { (ac_try="$ac_compile"
21573case "(($ac_try" in
21574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21575 *) ac_try_echo=$ac_try;;
21576esac
21577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021580 grep -v '^ *+' conftest.er1 >conftest.err
21581 rm -f conftest.er1
21582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021584 (exit $ac_status); } && {
21585 test -z "$ac_c_werror_flag" ||
21586 test ! -s conftest.err
21587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021588 ac_hi=$ac_mid
21589else
21590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021591sed 's/^/| /' conftest.$ac_ext >&5
21592
Martin v. Löwiseba40652007-08-30 20:10:57 +000021593 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021595
21596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021597done
21598case $ac_lo in
21599?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021600'') if test "$ac_cv_type_wchar_t" = yes; then
21601 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021602See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021603echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021604See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021605 { (exit 77); exit 77; }; }
21606 else
21607 ac_cv_sizeof_wchar_t=0
21608 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021609esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021610else
Martin v. Löwis11437992002-04-12 09:54:03 +000021611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021612/* confdefs.h. */
21613_ACEOF
21614cat confdefs.h >>conftest.$ac_ext
21615cat >>conftest.$ac_ext <<_ACEOF
21616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021617#include <wchar.h>
21618
Martin v. Löwiseba40652007-08-30 20:10:57 +000021619 typedef wchar_t ac__type_sizeof_;
21620static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21621static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021622#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021623#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021624int
21625main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021626{
Martin v. Löwis11437992002-04-12 09:54:03 +000021627
21628 FILE *f = fopen ("conftest.val", "w");
21629 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021630 return 1;
21631 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021632 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021633 long int i = longval ();
21634 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21635 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021636 fprintf (f, "%ld\n", i);
21637 }
21638 else
21639 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021640 unsigned long int i = ulongval ();
21641 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21642 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021643 fprintf (f, "%lu\n", i);
21644 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021645 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021646
21647 ;
21648 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021649}
Martin v. Löwis11437992002-04-12 09:54:03 +000021650_ACEOF
21651rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021652if { (ac_try="$ac_link"
21653case "(($ac_try" in
21654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21655 *) ac_try_echo=$ac_try;;
21656esac
21657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21658 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021659 ac_status=$?
21660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021662 { (case "(($ac_try" in
21663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21664 *) ac_try_echo=$ac_try;;
21665esac
21666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21667 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021668 ac_status=$?
21669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21670 (exit $ac_status); }; }; then
21671 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021672else
Martin v. Löwis11437992002-04-12 09:54:03 +000021673 echo "$as_me: program exited with status $ac_status" >&5
21674echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021675sed 's/^/| /' conftest.$ac_ext >&5
21676
Martin v. Löwis11437992002-04-12 09:54:03 +000021677( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021678if test "$ac_cv_type_wchar_t" = yes; then
21679 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021680See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021681echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021682See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021683 { (exit 77); exit 77; }; }
21684 else
21685 ac_cv_sizeof_wchar_t=0
21686 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021688rm -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 +000021689fi
21690rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021692{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21693echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21694
21695
21696
Martin v. Löwis11437992002-04-12 09:54:03 +000021697cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021698#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021699_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021700
Michael W. Hudson54241132001-12-07 15:38:26 +000021701
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021702fi
21703
Martin v. Löwiseba40652007-08-30 20:10:57 +000021704{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21705echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021706have_ucs4_tcl=no
21707cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021708/* confdefs.h. */
21709_ACEOF
21710cat confdefs.h >>conftest.$ac_ext
21711cat >>conftest.$ac_ext <<_ACEOF
21712/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021713
21714#include <tcl.h>
21715#if TCL_UTF_MAX != 6
21716# error "NOT UCS4_TCL"
21717#endif
21718int
21719main ()
21720{
21721
21722 ;
21723 return 0;
21724}
21725_ACEOF
21726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021727if { (ac_try="$ac_compile"
21728case "(($ac_try" in
21729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21730 *) ac_try_echo=$ac_try;;
21731esac
21732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021735 grep -v '^ *+' conftest.er1 >conftest.err
21736 rm -f conftest.er1
21737 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021739 (exit $ac_status); } && {
21740 test -z "$ac_c_werror_flag" ||
21741 test ! -s conftest.err
21742 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021743
21744
21745cat >>confdefs.h <<\_ACEOF
21746#define HAVE_UCS4_TCL 1
21747_ACEOF
21748
21749 have_ucs4_tcl=yes
21750
21751else
21752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021753sed 's/^/| /' conftest.$ac_ext >&5
21754
Martin v. Löwiseba40652007-08-30 20:10:57 +000021755
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021757
21758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21759{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21760echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021761
Skip Montanaro6dead952003-09-25 14:50:04 +000021762# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021763if test "$wchar_h" = yes
21764then
21765 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021766 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21767echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021768 if test "${ac_cv_wchar_t_signed+set}" = set; then
21769 echo $ECHO_N "(cached) $ECHO_C" >&6
21770else
21771
21772 if test "$cross_compiling" = yes; then
21773 ac_cv_wchar_t_signed=yes
21774else
21775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021776/* confdefs.h. */
21777_ACEOF
21778cat confdefs.h >>conftest.$ac_ext
21779cat >>conftest.$ac_ext <<_ACEOF
21780/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021781
21782 #include <wchar.h>
21783 int main()
21784 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021785 /* Success: exit code 0 */
21786 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021787 }
21788
21789_ACEOF
21790rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021791if { (ac_try="$ac_link"
21792case "(($ac_try" in
21793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21794 *) ac_try_echo=$ac_try;;
21795esac
21796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21797 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021798 ac_status=$?
21799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021801 { (case "(($ac_try" in
21802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21803 *) ac_try_echo=$ac_try;;
21804esac
21805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21806 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021807 ac_status=$?
21808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21809 (exit $ac_status); }; }; then
21810 ac_cv_wchar_t_signed=yes
21811else
21812 echo "$as_me: program exited with status $ac_status" >&5
21813echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021814sed 's/^/| /' conftest.$ac_ext >&5
21815
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021816( exit $ac_status )
21817ac_cv_wchar_t_signed=no
21818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021819rm -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 +000021820fi
21821
Martin v. Löwiseba40652007-08-30 20:10:57 +000021822
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021823fi
21824
Martin v. Löwiseba40652007-08-30 20:10:57 +000021825 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21826echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21827fi
21828
21829{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21830echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21831# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021832if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021833 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021834else
21835 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021836fi
21837
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021838
21839if test $enable_unicode = yes
21840then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021841 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021842 case "$have_ucs4_tcl" in
21843 yes) enable_unicode="ucs4"
21844 ;;
21845 *) enable_unicode="ucs2"
21846 ;;
21847 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021848fi
21849
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021850
21851
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021852case "$enable_unicode" in
21853ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021854 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021855#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021856_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021857
21858 ;;
21859ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021860 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021861#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021862_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021863
21864 ;;
21865esac
21866
Michael W. Hudson54241132001-12-07 15:38:26 +000021867
Martin v. Löwis11437992002-04-12 09:54:03 +000021868
21869
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021870
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021871if test "$enable_unicode" = "no"
21872then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021873 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021874 { echo "$as_me:$LINENO: result: not used" >&5
21875echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021876else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021877 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021878
21879cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021880#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021881_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021882
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021883
21884 # wchar_t is only usable if it maps to an unsigned type
21885 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021886 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021887 then
21888 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021889
Martin v. Löwis11437992002-04-12 09:54:03 +000021890cat >>confdefs.h <<\_ACEOF
21891#define HAVE_USABLE_WCHAR_T 1
21892_ACEOF
21893
21894 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021895#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021896_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021897
21898 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21899 then
21900 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021901 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021902#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021903_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021904
21905 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21906 then
21907 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021908 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021909#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021910_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021911
21912 else
21913 PY_UNICODE_TYPE="no type found"
21914 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021915 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21916echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021917fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021918
21919# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021920{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21921echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021922if test "${ac_cv_c_bigendian+set}" = set; then
21923 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021924else
Martin v. Löwis11437992002-04-12 09:54:03 +000021925 # See if sys/param.h defines the BYTE_ORDER macro.
21926cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021927/* confdefs.h. */
21928_ACEOF
21929cat confdefs.h >>conftest.$ac_ext
21930cat >>conftest.$ac_ext <<_ACEOF
21931/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021932#include <sys/types.h>
21933#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021934
Martin v. Löwis11437992002-04-12 09:54:03 +000021935int
21936main ()
21937{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021938#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21939 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021940 bogus endian macros
21941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021942
21943 ;
21944 return 0;
21945}
21946_ACEOF
21947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021948if { (ac_try="$ac_compile"
21949case "(($ac_try" in
21950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21951 *) ac_try_echo=$ac_try;;
21952esac
21953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021956 grep -v '^ *+' conftest.er1 >conftest.err
21957 rm -f conftest.er1
21958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021960 (exit $ac_status); } && {
21961 test -z "$ac_c_werror_flag" ||
21962 test ! -s conftest.err
21963 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021964 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000021965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021966/* confdefs.h. */
21967_ACEOF
21968cat confdefs.h >>conftest.$ac_ext
21969cat >>conftest.$ac_ext <<_ACEOF
21970/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021971#include <sys/types.h>
21972#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021973
Martin v. Löwis11437992002-04-12 09:54:03 +000021974int
21975main ()
21976{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021977#if BYTE_ORDER != BIG_ENDIAN
21978 not big endian
21979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021980
21981 ;
21982 return 0;
21983}
21984_ACEOF
21985rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021986if { (ac_try="$ac_compile"
21987case "(($ac_try" in
21988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21989 *) ac_try_echo=$ac_try;;
21990esac
21991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021994 grep -v '^ *+' conftest.er1 >conftest.err
21995 rm -f conftest.er1
21996 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021998 (exit $ac_status); } && {
21999 test -z "$ac_c_werror_flag" ||
22000 test ! -s conftest.err
22001 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022002 ac_cv_c_bigendian=yes
22003else
Martin v. Löwis11437992002-04-12 09:54:03 +000022004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022005sed 's/^/| /' conftest.$ac_ext >&5
22006
Martin v. Löwiseba40652007-08-30 20:10:57 +000022007 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022009
22010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022011else
Martin v. Löwis11437992002-04-12 09:54:03 +000022012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022013sed 's/^/| /' conftest.$ac_ext >&5
22014
Martin v. Löwiseba40652007-08-30 20:10:57 +000022015 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022016if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022017 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022018 ac_cv_c_bigendian=unknown
22019 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022020/* confdefs.h. */
22021_ACEOF
22022cat confdefs.h >>conftest.$ac_ext
22023cat >>conftest.$ac_ext <<_ACEOF
22024/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022025short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22026short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022027void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022028short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22029short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022030void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022031int
22032main ()
22033{
22034 _ascii (); _ebcdic ();
22035 ;
22036 return 0;
22037}
22038_ACEOF
22039rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022040if { (ac_try="$ac_compile"
22041case "(($ac_try" in
22042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22043 *) ac_try_echo=$ac_try;;
22044esac
22045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022048 grep -v '^ *+' conftest.er1 >conftest.err
22049 rm -f conftest.er1
22050 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022052 (exit $ac_status); } && {
22053 test -z "$ac_c_werror_flag" ||
22054 test ! -s conftest.err
22055 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022056 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022057 ac_cv_c_bigendian=yes
22058fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022059if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022060 if test "$ac_cv_c_bigendian" = unknown; then
22061 ac_cv_c_bigendian=no
22062 else
22063 # finding both strings is unlikely to happen, but who knows?
22064 ac_cv_c_bigendian=unknown
22065 fi
22066fi
22067else
22068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022069sed 's/^/| /' conftest.$ac_ext >&5
22070
Martin v. Löwiseba40652007-08-30 20:10:57 +000022071
Martin v. Löwis11437992002-04-12 09:54:03 +000022072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022073
22074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022075else
22076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022077/* confdefs.h. */
22078_ACEOF
22079cat confdefs.h >>conftest.$ac_ext
22080cat >>conftest.$ac_ext <<_ACEOF
22081/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022082$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022083int
22084main ()
22085{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022086
Guido van Rossumef2255b2000-03-10 22:30:29 +000022087 /* Are we little or big endian? From Harbison&Steele. */
22088 union
22089 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022090 long int l;
22091 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022092 } u;
22093 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022094 return u.c[sizeof (long int) - 1] == 1;
22095
22096 ;
22097 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022098}
Martin v. Löwis11437992002-04-12 09:54:03 +000022099_ACEOF
22100rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022101if { (ac_try="$ac_link"
22102case "(($ac_try" in
22103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22104 *) ac_try_echo=$ac_try;;
22105esac
22106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22107 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022108 ac_status=$?
22109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22110 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022111 { (case "(($ac_try" in
22112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22113 *) ac_try_echo=$ac_try;;
22114esac
22115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22116 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022117 ac_status=$?
22118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22119 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022120 ac_cv_c_bigendian=no
22121else
Martin v. Löwis11437992002-04-12 09:54:03 +000022122 echo "$as_me: program exited with status $ac_status" >&5
22123echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022124sed 's/^/| /' conftest.$ac_ext >&5
22125
Martin v. Löwis11437992002-04-12 09:54:03 +000022126( exit $ac_status )
22127ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022129rm -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 +000022130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022131
22132
Martin v. Löwis11437992002-04-12 09:54:03 +000022133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022134
22135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022137{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22138echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022139case $ac_cv_c_bigendian in
22140 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022141
Martin v. Löwis11437992002-04-12 09:54:03 +000022142cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022143#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022144_ACEOF
22145 ;;
22146 no)
22147 ;;
22148 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022149 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022150presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022151echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022152presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22153 { (exit 1); exit 1; }; } ;;
22154esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022155
Michael W. Hudson54241132001-12-07 15:38:26 +000022156
Ronald Oussoren988117f2006-04-29 11:31:35 +000022157
22158
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022159# Check whether right shifting a negative integer extends the sign bit
22160# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022161{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22162echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022163if test "${ac_cv_rshift_extends_sign+set}" = set; then
22164 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022165else
Martin v. Löwis11437992002-04-12 09:54:03 +000022166
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022167if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022168 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022169else
Martin v. Löwis11437992002-04-12 09:54:03 +000022170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022171/* confdefs.h. */
22172_ACEOF
22173cat confdefs.h >>conftest.$ac_ext
22174cat >>conftest.$ac_ext <<_ACEOF
22175/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022176
22177int main()
22178{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022179 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022180}
22181
Martin v. Löwis11437992002-04-12 09:54:03 +000022182_ACEOF
22183rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022184if { (ac_try="$ac_link"
22185case "(($ac_try" in
22186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22187 *) ac_try_echo=$ac_try;;
22188esac
22189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22190 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022191 ac_status=$?
22192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22193 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022194 { (case "(($ac_try" in
22195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22196 *) ac_try_echo=$ac_try;;
22197esac
22198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22199 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022200 ac_status=$?
22201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22202 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022203 ac_cv_rshift_extends_sign=yes
22204else
Martin v. Löwis11437992002-04-12 09:54:03 +000022205 echo "$as_me: program exited with status $ac_status" >&5
22206echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022207sed 's/^/| /' conftest.$ac_ext >&5
22208
Martin v. Löwis11437992002-04-12 09:54:03 +000022209( exit $ac_status )
22210ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022212rm -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 +000022213fi
22214
Martin v. Löwiseba40652007-08-30 20:10:57 +000022215
22216fi
22217
22218{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22219echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022220if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022221then
Martin v. Löwis11437992002-04-12 09:54:03 +000022222
22223cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022224#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022225_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022226
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022227fi
22228
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022229# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022230{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22231echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022232if test "${ac_cv_have_getc_unlocked+set}" = set; then
22233 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022234else
Martin v. Löwis11437992002-04-12 09:54:03 +000022235
22236cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022237/* confdefs.h. */
22238_ACEOF
22239cat confdefs.h >>conftest.$ac_ext
22240cat >>conftest.$ac_ext <<_ACEOF
22241/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022242#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022243int
22244main ()
22245{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022246
22247 FILE *f = fopen("/dev/null", "r");
22248 flockfile(f);
22249 getc_unlocked(f);
22250 funlockfile(f);
22251
Martin v. Löwis11437992002-04-12 09:54:03 +000022252 ;
22253 return 0;
22254}
22255_ACEOF
22256rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022257if { (ac_try="$ac_link"
22258case "(($ac_try" in
22259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22260 *) ac_try_echo=$ac_try;;
22261esac
22262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22263 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022265 grep -v '^ *+' conftest.er1 >conftest.err
22266 rm -f conftest.er1
22267 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022269 (exit $ac_status); } && {
22270 test -z "$ac_c_werror_flag" ||
22271 test ! -s conftest.err
22272 } && test -s conftest$ac_exeext &&
22273 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022274 ac_cv_have_getc_unlocked=yes
22275else
Martin v. Löwis11437992002-04-12 09:54:03 +000022276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022277sed 's/^/| /' conftest.$ac_ext >&5
22278
Martin v. Löwiseba40652007-08-30 20:10:57 +000022279 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022281
22282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022283 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022284fi
22285
Martin v. Löwiseba40652007-08-30 20:10:57 +000022286{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22287echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022288if test "$ac_cv_have_getc_unlocked" = yes
22289then
Martin v. Löwis11437992002-04-12 09:54:03 +000022290
22291cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022292#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022293_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022294
22295fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022296
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022297# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022298# save the value of LIBS so we don't actually link Python with readline
22299LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022300
Martin v. Löwiseba40652007-08-30 20:10:57 +000022301{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22302echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022303if test "${ac_cv_lib_readline_readline+set}" = set; then
22304 echo $ECHO_N "(cached) $ECHO_C" >&6
22305else
22306 ac_check_lib_save_LIBS=$LIBS
22307LIBS="-lreadline $LIBS"
22308cat >conftest.$ac_ext <<_ACEOF
22309/* confdefs.h. */
22310_ACEOF
22311cat confdefs.h >>conftest.$ac_ext
22312cat >>conftest.$ac_ext <<_ACEOF
22313/* end confdefs.h. */
22314
Martin v. Löwiseba40652007-08-30 20:10:57 +000022315/* Override any GCC internal prototype to avoid an error.
22316 Use char because int might match the return type of a GCC
22317 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022318#ifdef __cplusplus
22319extern "C"
22320#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022321char readline ();
22322int
22323main ()
22324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022325return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022326 ;
22327 return 0;
22328}
22329_ACEOF
22330rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022331if { (ac_try="$ac_link"
22332case "(($ac_try" in
22333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22334 *) ac_try_echo=$ac_try;;
22335esac
22336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22337 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022338 ac_status=$?
22339 grep -v '^ *+' conftest.er1 >conftest.err
22340 rm -f conftest.er1
22341 cat conftest.err >&5
22342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022343 (exit $ac_status); } && {
22344 test -z "$ac_c_werror_flag" ||
22345 test ! -s conftest.err
22346 } && test -s conftest$ac_exeext &&
22347 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022348 ac_cv_lib_readline_readline=yes
22349else
22350 echo "$as_me: failed program was:" >&5
22351sed 's/^/| /' conftest.$ac_ext >&5
22352
Martin v. Löwiseba40652007-08-30 20:10:57 +000022353 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022355
22356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022357 conftest$ac_exeext conftest.$ac_ext
22358LIBS=$ac_check_lib_save_LIBS
22359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022360{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22361echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022362if test $ac_cv_lib_readline_readline = yes; then
22363 cat >>confdefs.h <<_ACEOF
22364#define HAVE_LIBREADLINE 1
22365_ACEOF
22366
22367 LIBS="-lreadline $LIBS"
22368
22369fi
22370
22371if test "$ac_cv_have_readline_readline" = no
22372then
22373
Martin v. Löwiseba40652007-08-30 20:10:57 +000022374{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22375echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022376if test "${ac_cv_lib_termcap_readline+set}" = set; then
22377 echo $ECHO_N "(cached) $ECHO_C" >&6
22378else
22379 ac_check_lib_save_LIBS=$LIBS
22380LIBS="-ltermcap $LIBS"
22381cat >conftest.$ac_ext <<_ACEOF
22382/* confdefs.h. */
22383_ACEOF
22384cat confdefs.h >>conftest.$ac_ext
22385cat >>conftest.$ac_ext <<_ACEOF
22386/* end confdefs.h. */
22387
Martin v. Löwiseba40652007-08-30 20:10:57 +000022388/* Override any GCC internal prototype to avoid an error.
22389 Use char because int might match the return type of a GCC
22390 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022391#ifdef __cplusplus
22392extern "C"
22393#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022394char readline ();
22395int
22396main ()
22397{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022398return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022399 ;
22400 return 0;
22401}
22402_ACEOF
22403rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022404if { (ac_try="$ac_link"
22405case "(($ac_try" in
22406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22407 *) ac_try_echo=$ac_try;;
22408esac
22409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22410 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022411 ac_status=$?
22412 grep -v '^ *+' conftest.er1 >conftest.err
22413 rm -f conftest.er1
22414 cat conftest.err >&5
22415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022416 (exit $ac_status); } && {
22417 test -z "$ac_c_werror_flag" ||
22418 test ! -s conftest.err
22419 } && test -s conftest$ac_exeext &&
22420 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022421 ac_cv_lib_termcap_readline=yes
22422else
22423 echo "$as_me: failed program was:" >&5
22424sed 's/^/| /' conftest.$ac_ext >&5
22425
Martin v. Löwiseba40652007-08-30 20:10:57 +000022426 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022428
22429rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022430 conftest$ac_exeext conftest.$ac_ext
22431LIBS=$ac_check_lib_save_LIBS
22432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022433{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22434echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022435if test $ac_cv_lib_termcap_readline = yes; then
22436 cat >>confdefs.h <<_ACEOF
22437#define HAVE_LIBTERMCAP 1
22438_ACEOF
22439
22440 LIBS="-ltermcap $LIBS"
22441
22442fi
22443
22444fi
22445
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022446# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022447{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22448echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022449if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22450 echo $ECHO_N "(cached) $ECHO_C" >&6
22451else
22452 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022453LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022454cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022455/* confdefs.h. */
22456_ACEOF
22457cat confdefs.h >>conftest.$ac_ext
22458cat >>conftest.$ac_ext <<_ACEOF
22459/* end confdefs.h. */
22460
Martin v. Löwiseba40652007-08-30 20:10:57 +000022461/* Override any GCC internal prototype to avoid an error.
22462 Use char because int might match the return type of a GCC
22463 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022464#ifdef __cplusplus
22465extern "C"
22466#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022467char rl_callback_handler_install ();
22468int
22469main ()
22470{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022471return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022472 ;
22473 return 0;
22474}
22475_ACEOF
22476rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022477if { (ac_try="$ac_link"
22478case "(($ac_try" in
22479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22480 *) ac_try_echo=$ac_try;;
22481esac
22482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22483 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022485 grep -v '^ *+' conftest.er1 >conftest.err
22486 rm -f conftest.er1
22487 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022489 (exit $ac_status); } && {
22490 test -z "$ac_c_werror_flag" ||
22491 test ! -s conftest.err
22492 } && test -s conftest$ac_exeext &&
22493 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022494 ac_cv_lib_readline_rl_callback_handler_install=yes
22495else
22496 echo "$as_me: failed program was:" >&5
22497sed 's/^/| /' conftest.$ac_ext >&5
22498
Martin v. Löwiseba40652007-08-30 20:10:57 +000022499 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022501
22502rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022503 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022504LIBS=$ac_check_lib_save_LIBS
22505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022506{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22507echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022508if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22509
22510cat >>confdefs.h <<\_ACEOF
22511#define HAVE_RL_CALLBACK 1
22512_ACEOF
22513
22514fi
22515
22516
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022517# check for readline 2.2
22518cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022519/* confdefs.h. */
22520_ACEOF
22521cat confdefs.h >>conftest.$ac_ext
22522cat >>conftest.$ac_ext <<_ACEOF
22523/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022524#include <readline/readline.h>
22525_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022526if { (ac_try="$ac_cpp conftest.$ac_ext"
22527case "(($ac_try" in
22528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22529 *) ac_try_echo=$ac_try;;
22530esac
22531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22532 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022533 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022534 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022535 rm -f conftest.er1
22536 cat conftest.err >&5
22537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022538 (exit $ac_status); } >/dev/null && {
22539 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22540 test ! -s conftest.err
22541 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022542 have_readline=yes
22543else
22544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022545sed 's/^/| /' conftest.$ac_ext >&5
22546
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022547 have_readline=no
22548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022549
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022550rm -f conftest.err conftest.$ac_ext
22551if test $have_readline = yes
22552then
22553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022554/* confdefs.h. */
22555_ACEOF
22556cat confdefs.h >>conftest.$ac_ext
22557cat >>conftest.$ac_ext <<_ACEOF
22558/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022559#include <readline/readline.h>
22560
22561_ACEOF
22562if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022563 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022564
22565cat >>confdefs.h <<\_ACEOF
22566#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22567_ACEOF
22568
22569fi
22570rm -f conftest*
22571
22572fi
22573
Martin v. Löwis0daad592001-09-30 21:09:59 +000022574# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022575{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22576echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022577if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22578 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022579else
Martin v. Löwis11437992002-04-12 09:54:03 +000022580 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022581LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022582cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022583/* confdefs.h. */
22584_ACEOF
22585cat confdefs.h >>conftest.$ac_ext
22586cat >>conftest.$ac_ext <<_ACEOF
22587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022588
Martin v. Löwiseba40652007-08-30 20:10:57 +000022589/* Override any GCC internal prototype to avoid an error.
22590 Use char because int might match the return type of a GCC
22591 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022592#ifdef __cplusplus
22593extern "C"
22594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022595char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022596int
22597main ()
22598{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022599return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022600 ;
22601 return 0;
22602}
22603_ACEOF
22604rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022605if { (ac_try="$ac_link"
22606case "(($ac_try" in
22607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22608 *) ac_try_echo=$ac_try;;
22609esac
22610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22611 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022613 grep -v '^ *+' conftest.er1 >conftest.err
22614 rm -f conftest.er1
22615 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022617 (exit $ac_status); } && {
22618 test -z "$ac_c_werror_flag" ||
22619 test ! -s conftest.err
22620 } && test -s conftest$ac_exeext &&
22621 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022622 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022623else
Martin v. Löwis11437992002-04-12 09:54:03 +000022624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022625sed 's/^/| /' conftest.$ac_ext >&5
22626
Martin v. Löwiseba40652007-08-30 20:10:57 +000022627 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022629
22630rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022631 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022632LIBS=$ac_check_lib_save_LIBS
22633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022634{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22635echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022636if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022637
Martin v. Löwis11437992002-04-12 09:54:03 +000022638cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022639#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022640_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022641
Martin v. Löwis0daad592001-09-30 21:09:59 +000022642fi
22643
Michael W. Hudson54241132001-12-07 15:38:26 +000022644
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022645# also in 4.0
22646{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22647echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22648if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22649 echo $ECHO_N "(cached) $ECHO_C" >&6
22650else
22651 ac_check_lib_save_LIBS=$LIBS
22652LIBS="-lreadline $LIBS"
22653cat >conftest.$ac_ext <<_ACEOF
22654/* confdefs.h. */
22655_ACEOF
22656cat confdefs.h >>conftest.$ac_ext
22657cat >>conftest.$ac_ext <<_ACEOF
22658/* end confdefs.h. */
22659
22660/* Override any GCC internal prototype to avoid an error.
22661 Use char because int might match the return type of a GCC
22662 builtin and then its argument prototype would still apply. */
22663#ifdef __cplusplus
22664extern "C"
22665#endif
22666char rl_completion_display_matches_hook ();
22667int
22668main ()
22669{
22670return rl_completion_display_matches_hook ();
22671 ;
22672 return 0;
22673}
22674_ACEOF
22675rm -f conftest.$ac_objext conftest$ac_exeext
22676if { (ac_try="$ac_link"
22677case "(($ac_try" in
22678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22679 *) ac_try_echo=$ac_try;;
22680esac
22681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22682 (eval "$ac_link") 2>conftest.er1
22683 ac_status=$?
22684 grep -v '^ *+' conftest.er1 >conftest.err
22685 rm -f conftest.er1
22686 cat conftest.err >&5
22687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22688 (exit $ac_status); } && {
22689 test -z "$ac_c_werror_flag" ||
22690 test ! -s conftest.err
22691 } && test -s conftest$ac_exeext &&
22692 $as_test_x conftest$ac_exeext; then
22693 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22694else
22695 echo "$as_me: failed program was:" >&5
22696sed 's/^/| /' conftest.$ac_ext >&5
22697
22698 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22699fi
22700
22701rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22702 conftest$ac_exeext conftest.$ac_ext
22703LIBS=$ac_check_lib_save_LIBS
22704fi
22705{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22706echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22707if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22708
22709cat >>confdefs.h <<\_ACEOF
22710#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22711_ACEOF
22712
22713fi
22714
22715
Martin v. Löwis0daad592001-09-30 21:09:59 +000022716# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022717{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22718echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022719if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22720 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022721else
Martin v. Löwis11437992002-04-12 09:54:03 +000022722 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022723LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022724cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022725/* confdefs.h. */
22726_ACEOF
22727cat confdefs.h >>conftest.$ac_ext
22728cat >>conftest.$ac_ext <<_ACEOF
22729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022730
Martin v. Löwiseba40652007-08-30 20:10:57 +000022731/* Override any GCC internal prototype to avoid an error.
22732 Use char because int might match the return type of a GCC
22733 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022734#ifdef __cplusplus
22735extern "C"
22736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022737char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022738int
22739main ()
22740{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022741return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022742 ;
22743 return 0;
22744}
22745_ACEOF
22746rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022747if { (ac_try="$ac_link"
22748case "(($ac_try" in
22749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22750 *) ac_try_echo=$ac_try;;
22751esac
22752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22753 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022754 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022755 grep -v '^ *+' conftest.er1 >conftest.err
22756 rm -f conftest.er1
22757 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022759 (exit $ac_status); } && {
22760 test -z "$ac_c_werror_flag" ||
22761 test ! -s conftest.err
22762 } && test -s conftest$ac_exeext &&
22763 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022764 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022765else
Martin v. Löwis11437992002-04-12 09:54:03 +000022766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022767sed 's/^/| /' conftest.$ac_ext >&5
22768
Martin v. Löwiseba40652007-08-30 20:10:57 +000022769 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022771
22772rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022774LIBS=$ac_check_lib_save_LIBS
22775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022776{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22777echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022778if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022779
Martin v. Löwis11437992002-04-12 09:54:03 +000022780cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022781#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022782_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022783
Guido van Rossum353ae582001-07-10 16:45:32 +000022784fi
22785
Jack Jansendd19cf82001-12-06 22:36:17 +000022786
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022787# also in readline 4.2
22788cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022789/* confdefs.h. */
22790_ACEOF
22791cat confdefs.h >>conftest.$ac_ext
22792cat >>conftest.$ac_ext <<_ACEOF
22793/* end confdefs.h. */
22794#include <readline/readline.h>
22795_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022796if { (ac_try="$ac_cpp conftest.$ac_ext"
22797case "(($ac_try" in
22798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22799 *) ac_try_echo=$ac_try;;
22800esac
22801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22802 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022803 ac_status=$?
22804 grep -v '^ *+' conftest.er1 >conftest.err
22805 rm -f conftest.er1
22806 cat conftest.err >&5
22807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022808 (exit $ac_status); } >/dev/null && {
22809 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22810 test ! -s conftest.err
22811 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022812 have_readline=yes
22813else
22814 echo "$as_me: failed program was:" >&5
22815sed 's/^/| /' conftest.$ac_ext >&5
22816
22817 have_readline=no
22818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022819
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022820rm -f conftest.err conftest.$ac_ext
22821if test $have_readline = yes
22822then
22823 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022824/* confdefs.h. */
22825_ACEOF
22826cat confdefs.h >>conftest.$ac_ext
22827cat >>conftest.$ac_ext <<_ACEOF
22828/* end confdefs.h. */
22829#include <readline/readline.h>
22830
22831_ACEOF
22832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22833 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22834
22835cat >>confdefs.h <<\_ACEOF
22836#define HAVE_RL_CATCH_SIGNAL 1
22837_ACEOF
22838
22839fi
22840rm -f conftest*
22841
22842fi
22843
Martin v. Löwis82bca632006-02-10 20:49:30 +000022844# End of readline checks: restore LIBS
22845LIBS=$LIBS_no_readline
22846
Martin v. Löwiseba40652007-08-30 20:10:57 +000022847{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22848echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022849if test "${ac_cv_broken_nice+set}" = set; then
22850 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022851else
Martin v. Löwis11437992002-04-12 09:54:03 +000022852
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022853if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022854 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022855else
Martin v. Löwis11437992002-04-12 09:54:03 +000022856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022857/* confdefs.h. */
22858_ACEOF
22859cat confdefs.h >>conftest.$ac_ext
22860cat >>conftest.$ac_ext <<_ACEOF
22861/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022862
22863int main()
22864{
22865 int val1 = nice(1);
22866 if (val1 != -1 && val1 == nice(2))
22867 exit(0);
22868 exit(1);
22869}
22870
Martin v. Löwis11437992002-04-12 09:54:03 +000022871_ACEOF
22872rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022873if { (ac_try="$ac_link"
22874case "(($ac_try" in
22875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22876 *) ac_try_echo=$ac_try;;
22877esac
22878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22879 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022880 ac_status=$?
22881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22882 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022883 { (case "(($ac_try" in
22884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22885 *) ac_try_echo=$ac_try;;
22886esac
22887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22888 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022889 ac_status=$?
22890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22891 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022892 ac_cv_broken_nice=yes
22893else
Martin v. Löwis11437992002-04-12 09:54:03 +000022894 echo "$as_me: program exited with status $ac_status" >&5
22895echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022896sed 's/^/| /' conftest.$ac_ext >&5
22897
Martin v. Löwis11437992002-04-12 09:54:03 +000022898( exit $ac_status )
22899ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022901rm -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 +000022902fi
22903
Martin v. Löwiseba40652007-08-30 20:10:57 +000022904
22905fi
22906
22907{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22908echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022909if test "$ac_cv_broken_nice" = yes
22910then
Martin v. Löwis11437992002-04-12 09:54:03 +000022911
22912cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022913#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022914_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022915
22916fi
22917
Martin v. Löwiseba40652007-08-30 20:10:57 +000022918{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22919echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022920if test "$cross_compiling" = yes; then
22921 ac_cv_broken_poll=no
22922else
22923 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022924/* confdefs.h. */
22925_ACEOF
22926cat confdefs.h >>conftest.$ac_ext
22927cat >>conftest.$ac_ext <<_ACEOF
22928/* end confdefs.h. */
22929
22930#include <poll.h>
22931
22932int main (void)
22933 {
22934 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22935
22936 close (42);
22937
22938 int poll_test = poll (&poll_struct, 1, 0);
22939
22940 if (poll_test < 0)
22941 {
22942 exit(0);
22943 }
22944 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22945 {
22946 exit(0);
22947 }
22948 else
22949 {
22950 exit(1);
22951 }
22952 }
22953
22954_ACEOF
22955rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022956if { (ac_try="$ac_link"
22957case "(($ac_try" in
22958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22959 *) ac_try_echo=$ac_try;;
22960esac
22961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22962 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022963 ac_status=$?
22964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22965 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022966 { (case "(($ac_try" in
22967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22968 *) ac_try_echo=$ac_try;;
22969esac
22970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22971 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022972 ac_status=$?
22973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22974 (exit $ac_status); }; }; then
22975 ac_cv_broken_poll=yes
22976else
22977 echo "$as_me: program exited with status $ac_status" >&5
22978echo "$as_me: failed program was:" >&5
22979sed 's/^/| /' conftest.$ac_ext >&5
22980
22981( exit $ac_status )
22982ac_cv_broken_poll=no
22983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022984rm -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 +000022985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022986
22987
22988{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
22989echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022990if test "$ac_cv_broken_poll" = yes
22991then
22992
22993cat >>confdefs.h <<\_ACEOF
22994#define HAVE_BROKEN_POLL 1
22995_ACEOF
22996
22997fi
22998
Brett Cannon43802422005-02-10 20:48:03 +000022999# 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 +000023000# (which is not required by ISO C or UNIX spec) and/or if we support
23001# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23003echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023004if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23005 echo $ECHO_N "(cached) $ECHO_C" >&6
23006else
23007 cat >conftest.$ac_ext <<_ACEOF
23008/* confdefs.h. */
23009_ACEOF
23010cat confdefs.h >>conftest.$ac_ext
23011cat >>conftest.$ac_ext <<_ACEOF
23012/* end confdefs.h. */
23013#include <sys/types.h>
23014#include <$ac_cv_struct_tm>
23015
23016
23017int
23018main ()
23019{
23020static struct tm ac_aggr;
23021if (ac_aggr.tm_zone)
23022return 0;
23023 ;
23024 return 0;
23025}
23026_ACEOF
23027rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023028if { (ac_try="$ac_compile"
23029case "(($ac_try" in
23030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23031 *) ac_try_echo=$ac_try;;
23032esac
23033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23034 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023035 ac_status=$?
23036 grep -v '^ *+' conftest.er1 >conftest.err
23037 rm -f conftest.er1
23038 cat conftest.err >&5
23039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023040 (exit $ac_status); } && {
23041 test -z "$ac_c_werror_flag" ||
23042 test ! -s conftest.err
23043 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023044 ac_cv_member_struct_tm_tm_zone=yes
23045else
23046 echo "$as_me: failed program was:" >&5
23047sed 's/^/| /' conftest.$ac_ext >&5
23048
Martin v. Löwiseba40652007-08-30 20:10:57 +000023049 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023050/* confdefs.h. */
23051_ACEOF
23052cat confdefs.h >>conftest.$ac_ext
23053cat >>conftest.$ac_ext <<_ACEOF
23054/* end confdefs.h. */
23055#include <sys/types.h>
23056#include <$ac_cv_struct_tm>
23057
23058
23059int
23060main ()
23061{
23062static struct tm ac_aggr;
23063if (sizeof ac_aggr.tm_zone)
23064return 0;
23065 ;
23066 return 0;
23067}
23068_ACEOF
23069rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023070if { (ac_try="$ac_compile"
23071case "(($ac_try" in
23072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23073 *) ac_try_echo=$ac_try;;
23074esac
23075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23076 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023077 ac_status=$?
23078 grep -v '^ *+' conftest.er1 >conftest.err
23079 rm -f conftest.er1
23080 cat conftest.err >&5
23081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023082 (exit $ac_status); } && {
23083 test -z "$ac_c_werror_flag" ||
23084 test ! -s conftest.err
23085 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023086 ac_cv_member_struct_tm_tm_zone=yes
23087else
23088 echo "$as_me: failed program was:" >&5
23089sed 's/^/| /' conftest.$ac_ext >&5
23090
Martin v. Löwiseba40652007-08-30 20:10:57 +000023091 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023093
23094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023096
23097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023099{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23100echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023101if test $ac_cv_member_struct_tm_tm_zone = yes; then
23102
23103cat >>confdefs.h <<_ACEOF
23104#define HAVE_STRUCT_TM_TM_ZONE 1
23105_ACEOF
23106
23107
23108fi
23109
23110if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23111
23112cat >>confdefs.h <<\_ACEOF
23113#define HAVE_TM_ZONE 1
23114_ACEOF
23115
23116else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023117 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23118echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23119if test "${ac_cv_have_decl_tzname+set}" = set; then
23120 echo $ECHO_N "(cached) $ECHO_C" >&6
23121else
23122 cat >conftest.$ac_ext <<_ACEOF
23123/* confdefs.h. */
23124_ACEOF
23125cat confdefs.h >>conftest.$ac_ext
23126cat >>conftest.$ac_ext <<_ACEOF
23127/* end confdefs.h. */
23128#include <time.h>
23129
23130int
23131main ()
23132{
23133#ifndef tzname
23134 (void) tzname;
23135#endif
23136
23137 ;
23138 return 0;
23139}
23140_ACEOF
23141rm -f conftest.$ac_objext
23142if { (ac_try="$ac_compile"
23143case "(($ac_try" in
23144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23145 *) ac_try_echo=$ac_try;;
23146esac
23147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23148 (eval "$ac_compile") 2>conftest.er1
23149 ac_status=$?
23150 grep -v '^ *+' conftest.er1 >conftest.err
23151 rm -f conftest.er1
23152 cat conftest.err >&5
23153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23154 (exit $ac_status); } && {
23155 test -z "$ac_c_werror_flag" ||
23156 test ! -s conftest.err
23157 } && test -s conftest.$ac_objext; then
23158 ac_cv_have_decl_tzname=yes
23159else
23160 echo "$as_me: failed program was:" >&5
23161sed 's/^/| /' conftest.$ac_ext >&5
23162
23163 ac_cv_have_decl_tzname=no
23164fi
23165
23166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23167fi
23168{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23169echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23170if test $ac_cv_have_decl_tzname = yes; then
23171
23172cat >>confdefs.h <<_ACEOF
23173#define HAVE_DECL_TZNAME 1
23174_ACEOF
23175
23176
23177else
23178 cat >>confdefs.h <<_ACEOF
23179#define HAVE_DECL_TZNAME 0
23180_ACEOF
23181
23182
23183fi
23184
23185
23186 { echo "$as_me:$LINENO: checking for tzname" >&5
23187echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023188if test "${ac_cv_var_tzname+set}" = set; then
23189 echo $ECHO_N "(cached) $ECHO_C" >&6
23190else
23191 cat >conftest.$ac_ext <<_ACEOF
23192/* confdefs.h. */
23193_ACEOF
23194cat confdefs.h >>conftest.$ac_ext
23195cat >>conftest.$ac_ext <<_ACEOF
23196/* end confdefs.h. */
23197#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023198#if !HAVE_DECL_TZNAME
23199extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023200#endif
23201
23202int
23203main ()
23204{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023205return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023206 ;
23207 return 0;
23208}
23209_ACEOF
23210rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023211if { (ac_try="$ac_link"
23212case "(($ac_try" in
23213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23214 *) ac_try_echo=$ac_try;;
23215esac
23216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23217 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023218 ac_status=$?
23219 grep -v '^ *+' conftest.er1 >conftest.err
23220 rm -f conftest.er1
23221 cat conftest.err >&5
23222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023223 (exit $ac_status); } && {
23224 test -z "$ac_c_werror_flag" ||
23225 test ! -s conftest.err
23226 } && test -s conftest$ac_exeext &&
23227 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023228 ac_cv_var_tzname=yes
23229else
23230 echo "$as_me: failed program was:" >&5
23231sed 's/^/| /' conftest.$ac_ext >&5
23232
Martin v. Löwiseba40652007-08-30 20:10:57 +000023233 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023235
23236rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023237 conftest$ac_exeext conftest.$ac_ext
23238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023239{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23240echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023241 if test $ac_cv_var_tzname = yes; then
23242
23243cat >>confdefs.h <<\_ACEOF
23244#define HAVE_TZNAME 1
23245_ACEOF
23246
23247 fi
23248fi
23249
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023250
Martin v. Löwis1d459062005-03-14 21:23:33 +000023251# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023252{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23253echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023254if test "${ac_cv_working_tzset+set}" = set; then
23255 echo $ECHO_N "(cached) $ECHO_C" >&6
23256else
23257
23258if test "$cross_compiling" = yes; then
23259 ac_cv_working_tzset=no
23260else
23261 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023262/* confdefs.h. */
23263_ACEOF
23264cat confdefs.h >>conftest.$ac_ext
23265cat >>conftest.$ac_ext <<_ACEOF
23266/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023267
23268#include <stdlib.h>
23269#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023270#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023271
23272#if HAVE_TZNAME
23273extern char *tzname[];
23274#endif
23275
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023276int main()
23277{
Brett Cannon18367812003-09-19 00:59:16 +000023278 /* Note that we need to ensure that not only does tzset(3)
23279 do 'something' with localtime, but it works as documented
23280 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023281 This includes making sure that tzname is set properly if
23282 tm->tm_zone does not exist since it is the alternative way
23283 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023284
23285 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023286 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023287 */
23288
Martin v. Löwis1d459062005-03-14 21:23:33 +000023289 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023290 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23291
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023292 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023293 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023294 if (localtime(&groundhogday)->tm_hour != 0)
23295 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023296#if HAVE_TZNAME
23297 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23298 if (strcmp(tzname[0], "UTC") ||
23299 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23300 exit(1);
23301#endif
Brett Cannon18367812003-09-19 00:59:16 +000023302
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023303 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023304 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023305 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023306 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023307#if HAVE_TZNAME
23308 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23309 exit(1);
23310#endif
Brett Cannon18367812003-09-19 00:59:16 +000023311
23312 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23313 tzset();
23314 if (localtime(&groundhogday)->tm_hour != 11)
23315 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023316#if HAVE_TZNAME
23317 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23318 exit(1);
23319#endif
23320
23321#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023322 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23323 exit(1);
23324 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23325 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023326#endif
Brett Cannon18367812003-09-19 00:59:16 +000023327
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023328 exit(0);
23329}
23330
23331_ACEOF
23332rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023333if { (ac_try="$ac_link"
23334case "(($ac_try" in
23335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23336 *) ac_try_echo=$ac_try;;
23337esac
23338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23339 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023340 ac_status=$?
23341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23342 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023343 { (case "(($ac_try" in
23344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23345 *) ac_try_echo=$ac_try;;
23346esac
23347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23348 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023349 ac_status=$?
23350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23351 (exit $ac_status); }; }; then
23352 ac_cv_working_tzset=yes
23353else
23354 echo "$as_me: program exited with status $ac_status" >&5
23355echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023356sed 's/^/| /' conftest.$ac_ext >&5
23357
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023358( exit $ac_status )
23359ac_cv_working_tzset=no
23360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023361rm -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 +000023362fi
23363
Martin v. Löwiseba40652007-08-30 20:10:57 +000023364
23365fi
23366
23367{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23368echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023369if test "$ac_cv_working_tzset" = yes
23370then
23371
23372cat >>confdefs.h <<\_ACEOF
23373#define HAVE_WORKING_TZSET 1
23374_ACEOF
23375
23376fi
23377
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023378# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023379{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23380echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023381if test "${ac_cv_stat_tv_nsec+set}" = set; then
23382 echo $ECHO_N "(cached) $ECHO_C" >&6
23383else
23384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023385/* confdefs.h. */
23386_ACEOF
23387cat confdefs.h >>conftest.$ac_ext
23388cat >>conftest.$ac_ext <<_ACEOF
23389/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023390#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023391int
23392main ()
23393{
23394
23395struct stat st;
23396st.st_mtim.tv_nsec = 1;
23397
23398 ;
23399 return 0;
23400}
23401_ACEOF
23402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023403if { (ac_try="$ac_compile"
23404case "(($ac_try" in
23405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23406 *) ac_try_echo=$ac_try;;
23407esac
23408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023411 grep -v '^ *+' conftest.er1 >conftest.err
23412 rm -f conftest.er1
23413 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023415 (exit $ac_status); } && {
23416 test -z "$ac_c_werror_flag" ||
23417 test ! -s conftest.err
23418 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023419 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023420else
23421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023422sed 's/^/| /' conftest.$ac_ext >&5
23423
Martin v. Löwiseba40652007-08-30 20:10:57 +000023424 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023425fi
23426
Martin v. Löwiseba40652007-08-30 20:10:57 +000023427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23428fi
23429
23430{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23431echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023432if test "$ac_cv_stat_tv_nsec" = yes
23433then
23434
23435cat >>confdefs.h <<\_ACEOF
23436#define HAVE_STAT_TV_NSEC 1
23437_ACEOF
23438
23439fi
23440
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023441# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023442{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23443echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023444if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23445 echo $ECHO_N "(cached) $ECHO_C" >&6
23446else
23447 cat >conftest.$ac_ext <<_ACEOF
23448/* confdefs.h. */
23449_ACEOF
23450cat confdefs.h >>conftest.$ac_ext
23451cat >>conftest.$ac_ext <<_ACEOF
23452/* end confdefs.h. */
23453#include <sys/stat.h>
23454int
23455main ()
23456{
23457
23458struct stat st;
23459st.st_mtimespec.tv_nsec = 1;
23460
23461 ;
23462 return 0;
23463}
23464_ACEOF
23465rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023466if { (ac_try="$ac_compile"
23467case "(($ac_try" in
23468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23469 *) ac_try_echo=$ac_try;;
23470esac
23471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023473 ac_status=$?
23474 grep -v '^ *+' conftest.er1 >conftest.err
23475 rm -f conftest.er1
23476 cat conftest.err >&5
23477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023478 (exit $ac_status); } && {
23479 test -z "$ac_c_werror_flag" ||
23480 test ! -s conftest.err
23481 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023482 ac_cv_stat_tv_nsec2=yes
23483else
23484 echo "$as_me: failed program was:" >&5
23485sed 's/^/| /' conftest.$ac_ext >&5
23486
Martin v. Löwiseba40652007-08-30 20:10:57 +000023487 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023488fi
23489
Martin v. Löwiseba40652007-08-30 20:10:57 +000023490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23491fi
23492
23493{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23494echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023495if test "$ac_cv_stat_tv_nsec2" = yes
23496then
23497
23498cat >>confdefs.h <<\_ACEOF
23499#define HAVE_STAT_TV_NSEC2 1
23500_ACEOF
23501
23502fi
23503
Jack Jansen666b1e72001-10-31 12:11:48 +000023504# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023505{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23506echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023507if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23508 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023509else
Martin v. Löwis11437992002-04-12 09:54:03 +000023510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023511/* confdefs.h. */
23512_ACEOF
23513cat confdefs.h >>conftest.$ac_ext
23514cat >>conftest.$ac_ext <<_ACEOF
23515/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023516#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023517int
23518main ()
23519{
Jack Jansen666b1e72001-10-31 12:11:48 +000023520
23521 int rtn;
23522 rtn = mvwdelch(0,0,0);
23523
Martin v. Löwis11437992002-04-12 09:54:03 +000023524 ;
23525 return 0;
23526}
23527_ACEOF
23528rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023529if { (ac_try="$ac_compile"
23530case "(($ac_try" in
23531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23532 *) ac_try_echo=$ac_try;;
23533esac
23534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023537 grep -v '^ *+' conftest.er1 >conftest.err
23538 rm -f conftest.er1
23539 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023541 (exit $ac_status); } && {
23542 test -z "$ac_c_werror_flag" ||
23543 test ! -s conftest.err
23544 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023545 ac_cv_mvwdelch_is_expression=yes
23546else
Martin v. Löwis11437992002-04-12 09:54:03 +000023547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023548sed 's/^/| /' conftest.$ac_ext >&5
23549
Martin v. Löwiseba40652007-08-30 20:10:57 +000023550 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023551fi
23552
Martin v. Löwiseba40652007-08-30 20:10:57 +000023553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23554fi
23555
23556{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23557echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023558
23559if test "$ac_cv_mvwdelch_is_expression" = yes
23560then
Martin v. Löwis11437992002-04-12 09:54:03 +000023561
23562cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023563#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023564_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023565
23566fi
23567
Martin v. Löwiseba40652007-08-30 20:10:57 +000023568{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23569echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023570if test "${ac_cv_window_has_flags+set}" = set; then
23571 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023572else
Martin v. Löwis11437992002-04-12 09:54:03 +000023573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023574/* confdefs.h. */
23575_ACEOF
23576cat confdefs.h >>conftest.$ac_ext
23577cat >>conftest.$ac_ext <<_ACEOF
23578/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023579#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023580int
23581main ()
23582{
Jack Jansen666b1e72001-10-31 12:11:48 +000023583
23584 WINDOW *w;
23585 w->_flags = 0;
23586
Martin v. Löwis11437992002-04-12 09:54:03 +000023587 ;
23588 return 0;
23589}
23590_ACEOF
23591rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023592if { (ac_try="$ac_compile"
23593case "(($ac_try" in
23594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23595 *) ac_try_echo=$ac_try;;
23596esac
23597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023600 grep -v '^ *+' conftest.er1 >conftest.err
23601 rm -f conftest.er1
23602 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023604 (exit $ac_status); } && {
23605 test -z "$ac_c_werror_flag" ||
23606 test ! -s conftest.err
23607 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023608 ac_cv_window_has_flags=yes
23609else
Martin v. Löwis11437992002-04-12 09:54:03 +000023610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023611sed 's/^/| /' conftest.$ac_ext >&5
23612
Martin v. Löwiseba40652007-08-30 20:10:57 +000023613 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023614fi
23615
Martin v. Löwiseba40652007-08-30 20:10:57 +000023616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23617fi
23618
23619{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23620echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023621
Jack Jansen666b1e72001-10-31 12:11:48 +000023622
23623if test "$ac_cv_window_has_flags" = yes
23624then
Martin v. Löwis11437992002-04-12 09:54:03 +000023625
23626cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023627#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023628_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023629
23630fi
23631
Martin v. Löwiseba40652007-08-30 20:10:57 +000023632{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23633echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023634cat >conftest.$ac_ext <<_ACEOF
23635/* confdefs.h. */
23636_ACEOF
23637cat confdefs.h >>conftest.$ac_ext
23638cat >>conftest.$ac_ext <<_ACEOF
23639/* end confdefs.h. */
23640#include <curses.h>
23641int
23642main ()
23643{
23644void *x=is_term_resized
23645 ;
23646 return 0;
23647}
23648_ACEOF
23649rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023650if { (ac_try="$ac_compile"
23651case "(($ac_try" in
23652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23653 *) ac_try_echo=$ac_try;;
23654esac
23655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23656 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023657 ac_status=$?
23658 grep -v '^ *+' conftest.er1 >conftest.err
23659 rm -f conftest.er1
23660 cat conftest.err >&5
23661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023662 (exit $ac_status); } && {
23663 test -z "$ac_c_werror_flag" ||
23664 test ! -s conftest.err
23665 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023666
23667cat >>confdefs.h <<\_ACEOF
23668#define HAVE_CURSES_IS_TERM_RESIZED 1
23669_ACEOF
23670
Martin v. Löwiseba40652007-08-30 20:10:57 +000023671 { echo "$as_me:$LINENO: result: yes" >&5
23672echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023673else
23674 echo "$as_me: failed program was:" >&5
23675sed 's/^/| /' conftest.$ac_ext >&5
23676
Martin v. Löwiseba40652007-08-30 20:10:57 +000023677 { echo "$as_me:$LINENO: result: no" >&5
23678echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023679
23680fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023681
Martin v. Löwiseba40652007-08-30 20:10:57 +000023682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23683
23684{ echo "$as_me:$LINENO: checking for resize_term" >&5
23685echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023686cat >conftest.$ac_ext <<_ACEOF
23687/* confdefs.h. */
23688_ACEOF
23689cat confdefs.h >>conftest.$ac_ext
23690cat >>conftest.$ac_ext <<_ACEOF
23691/* end confdefs.h. */
23692#include <curses.h>
23693int
23694main ()
23695{
23696void *x=resize_term
23697 ;
23698 return 0;
23699}
23700_ACEOF
23701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023702if { (ac_try="$ac_compile"
23703case "(($ac_try" in
23704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23705 *) ac_try_echo=$ac_try;;
23706esac
23707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23708 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023709 ac_status=$?
23710 grep -v '^ *+' conftest.er1 >conftest.err
23711 rm -f conftest.er1
23712 cat conftest.err >&5
23713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023714 (exit $ac_status); } && {
23715 test -z "$ac_c_werror_flag" ||
23716 test ! -s conftest.err
23717 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023718
23719cat >>confdefs.h <<\_ACEOF
23720#define HAVE_CURSES_RESIZE_TERM 1
23721_ACEOF
23722
Martin v. Löwiseba40652007-08-30 20:10:57 +000023723 { echo "$as_me:$LINENO: result: yes" >&5
23724echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023725else
23726 echo "$as_me: failed program was:" >&5
23727sed 's/^/| /' conftest.$ac_ext >&5
23728
Martin v. Löwiseba40652007-08-30 20:10:57 +000023729 { echo "$as_me:$LINENO: result: no" >&5
23730echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023731
23732fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023733
Martin v. Löwiseba40652007-08-30 20:10:57 +000023734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23735
23736{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23737echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023738cat >conftest.$ac_ext <<_ACEOF
23739/* confdefs.h. */
23740_ACEOF
23741cat confdefs.h >>conftest.$ac_ext
23742cat >>conftest.$ac_ext <<_ACEOF
23743/* end confdefs.h. */
23744#include <curses.h>
23745int
23746main ()
23747{
23748void *x=resizeterm
23749 ;
23750 return 0;
23751}
23752_ACEOF
23753rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023754if { (ac_try="$ac_compile"
23755case "(($ac_try" in
23756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23757 *) ac_try_echo=$ac_try;;
23758esac
23759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23760 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023761 ac_status=$?
23762 grep -v '^ *+' conftest.er1 >conftest.err
23763 rm -f conftest.er1
23764 cat conftest.err >&5
23765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023766 (exit $ac_status); } && {
23767 test -z "$ac_c_werror_flag" ||
23768 test ! -s conftest.err
23769 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023770
23771cat >>confdefs.h <<\_ACEOF
23772#define HAVE_CURSES_RESIZETERM 1
23773_ACEOF
23774
Martin v. Löwiseba40652007-08-30 20:10:57 +000023775 { echo "$as_me:$LINENO: result: yes" >&5
23776echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023777else
23778 echo "$as_me: failed program was:" >&5
23779sed 's/^/| /' conftest.$ac_ext >&5
23780
Martin v. Löwiseba40652007-08-30 20:10:57 +000023781 { echo "$as_me:$LINENO: result: no" >&5
23782echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023783
23784fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023785
Martin v. Löwiseba40652007-08-30 20:10:57 +000023786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23787
23788{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23789echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023790
23791if test -r /dev/ptmx
23792then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023793 { echo "$as_me:$LINENO: result: yes" >&5
23794echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023795
23796cat >>confdefs.h <<\_ACEOF
23797#define HAVE_DEV_PTMX 1
23798_ACEOF
23799
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023800else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023801 { echo "$as_me:$LINENO: result: no" >&5
23802echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023803fi
23804
Martin v. Löwiseba40652007-08-30 20:10:57 +000023805{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23806echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023807
23808if test -r /dev/ptc
23809then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023810 { echo "$as_me:$LINENO: result: yes" >&5
23811echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023812
23813cat >>confdefs.h <<\_ACEOF
23814#define HAVE_DEV_PTC 1
23815_ACEOF
23816
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023817else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023818 { echo "$as_me:$LINENO: result: no" >&5
23819echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023820fi
23821
Martin v. Löwiseba40652007-08-30 20:10:57 +000023822{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23823echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023824if test "$cross_compiling" = yes; then
23825 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23826See \`config.log' for more details." >&5
23827echo "$as_me: error: cannot run test program while cross compiling
23828See \`config.log' for more details." >&2;}
23829 { (exit 1); exit 1; }; }
23830else
23831 cat >conftest.$ac_ext <<_ACEOF
23832/* confdefs.h. */
23833_ACEOF
23834cat confdefs.h >>conftest.$ac_ext
23835cat >>conftest.$ac_ext <<_ACEOF
23836/* end confdefs.h. */
23837#include <stdio.h>
23838#include <stddef.h>
23839#include <string.h>
23840
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023841#ifdef HAVE_SYS_TYPES_H
23842#include <sys/types.h>
23843#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023844
23845#ifdef HAVE_SSIZE_T
23846typedef ssize_t Py_ssize_t;
23847#elif SIZEOF_VOID_P == SIZEOF_LONG
23848typedef long Py_ssize_t;
23849#else
23850typedef int Py_ssize_t;
23851#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023852
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023853int main()
23854{
23855 char buffer[256];
23856
Brett Cannon09d12362006-05-11 05:11:33 +000023857 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23858 return 1;
23859
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023860 if (strcmp(buffer, "123"))
23861 return 1;
23862
23863 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23864 return 1;
23865
23866 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023867 return 1;
23868
23869 return 0;
23870}
23871_ACEOF
23872rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023873if { (ac_try="$ac_link"
23874case "(($ac_try" in
23875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23876 *) ac_try_echo=$ac_try;;
23877esac
23878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23879 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023880 ac_status=$?
23881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23882 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023883 { (case "(($ac_try" in
23884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23885 *) ac_try_echo=$ac_try;;
23886esac
23887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23888 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023889 ac_status=$?
23890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23891 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023892 { echo "$as_me:$LINENO: result: yes" >&5
23893echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023894
23895cat >>confdefs.h <<\_ACEOF
23896#define PY_FORMAT_SIZE_T "z"
23897_ACEOF
23898
23899else
23900 echo "$as_me: program exited with status $ac_status" >&5
23901echo "$as_me: failed program was:" >&5
23902sed 's/^/| /' conftest.$ac_ext >&5
23903
23904( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023905{ echo "$as_me:$LINENO: result: no" >&5
23906echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023908rm -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 +000023909fi
23910
Martin v. Löwiseba40652007-08-30 20:10:57 +000023911
23912
23913{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23914echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023915if test "${ac_cv_type_socklen_t+set}" = set; then
23916 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023917else
Martin v. Löwis11437992002-04-12 09:54:03 +000023918 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023919/* confdefs.h. */
23920_ACEOF
23921cat confdefs.h >>conftest.$ac_ext
23922cat >>conftest.$ac_ext <<_ACEOF
23923/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023924
23925#ifdef HAVE_SYS_TYPES_H
23926#include <sys/types.h>
23927#endif
23928#ifdef HAVE_SYS_SOCKET_H
23929#include <sys/socket.h>
23930#endif
23931
23932
Martin v. Löwiseba40652007-08-30 20:10:57 +000023933typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023934int
23935main ()
23936{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023937if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023938 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023939if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023940 return 0;
23941 ;
23942 return 0;
23943}
23944_ACEOF
23945rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023946if { (ac_try="$ac_compile"
23947case "(($ac_try" in
23948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23949 *) ac_try_echo=$ac_try;;
23950esac
23951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023954 grep -v '^ *+' conftest.er1 >conftest.err
23955 rm -f conftest.er1
23956 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023958 (exit $ac_status); } && {
23959 test -z "$ac_c_werror_flag" ||
23960 test ! -s conftest.err
23961 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000023962 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000023963else
Martin v. Löwis11437992002-04-12 09:54:03 +000023964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023965sed 's/^/| /' conftest.$ac_ext >&5
23966
Martin v. Löwiseba40652007-08-30 20:10:57 +000023967 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000023968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023969
23970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023972{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
23973echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023974if test $ac_cv_type_socklen_t = yes; then
23975 :
23976else
Guido van Rossum95713eb2000-05-18 20:53:31 +000023977
Martin v. Löwis01c04012002-11-11 14:58:44 +000023978cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023979#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000023980_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023981
23982fi
23983
Michael W. Hudson54241132001-12-07 15:38:26 +000023984
Michael W. Hudson54241132001-12-07 15:38:26 +000023985
23986
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000023987for h in `(cd $srcdir;echo Python/thread_*.h)`
23988do
23989 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
23990done
23991
Michael W. Hudson54241132001-12-07 15:38:26 +000023992
Neal Norwitzd24499d2005-12-18 21:36:39 +000023993SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023994{ echo "$as_me:$LINENO: checking for build directories" >&5
23995echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023996for dir in $SRCDIRS; do
23997 if test ! -d $dir; then
23998 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000023999 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024000done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024001{ echo "$as_me:$LINENO: result: done" >&5
24002echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024003
Guido van Rossum627b2d71993-12-24 10:39:16 +000024004# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024005ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024006
Martin v. Löwis11437992002-04-12 09:54:03 +000024007cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024008# This file is a shell script that caches the results of configure
24009# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024010# scripts and configure runs, see configure's option --config-cache.
24011# It is not useful on other systems. If it contains results you don't
24012# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024013#
Martin v. Löwis11437992002-04-12 09:54:03 +000024014# config.status only pays attention to the cache file if you give it
24015# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024016#
Skip Montanaro6dead952003-09-25 14:50:04 +000024017# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024018# loading this file, other *unset* `ac_cv_foo' will be assigned the
24019# following values.
24020
24021_ACEOF
24022
Guido van Rossumf78abae1997-01-21 22:02:36 +000024023# The following way of writing the cache mishandles newlines in values,
24024# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024025# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024026# Ultrix sh set writes to stderr and can't be redirected directly,
24027# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024028(
24029 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24030 eval ac_val=\$$ac_var
24031 case $ac_val in #(
24032 *${as_nl}*)
24033 case $ac_var in #(
24034 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24035echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24036 esac
24037 case $ac_var in #(
24038 _ | IFS | as_nl) ;; #(
24039 *) $as_unset $ac_var ;;
24040 esac ;;
24041 esac
24042 done
24043
Martin v. Löwis11437992002-04-12 09:54:03 +000024044 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024045 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24046 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024047 # `set' does not quote correctly, so add quotes (double-quote
24048 # substitution turns \\\\ into \\, and sed turns \\ into \).
24049 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024050 "s/'/'\\\\''/g;
24051 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024052 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024053 *)
24054 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024055 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024056 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024057 esac |
24058 sort
24059) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024060 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024061 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024062 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024063 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024064 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24065 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024066 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24067 :end' >>confcache
24068if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24069 if test -w "$cache_file"; then
24070 test "x$cache_file" != "x/dev/null" &&
24071 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24072echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024073 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024074 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024075 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24076echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024077 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024078fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024079rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024080
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024081test "x$prefix" = xNONE && prefix=$ac_default_prefix
24082# Let make expand exec_prefix.
24083test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024084
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024085DEFS=-DHAVE_CONFIG_H
24086
Skip Montanaro6dead952003-09-25 14:50:04 +000024087ac_libobjs=
24088ac_ltlibobjs=
24089for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24090 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024091 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24092 ac_i=`echo "$ac_i" | sed "$ac_script"`
24093 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24094 # will be set to the directory where LIBOBJS objects are built.
24095 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24096 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024097done
24098LIBOBJS=$ac_libobjs
24099
24100LTLIBOBJS=$ac_ltlibobjs
24101
24102
Martin v. Löwis11437992002-04-12 09:54:03 +000024103
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024104: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024105ac_clean_files_save=$ac_clean_files
24106ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24107{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24108echo "$as_me: creating $CONFIG_STATUS" >&6;}
24109cat >$CONFIG_STATUS <<_ACEOF
24110#! $SHELL
24111# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024112# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024113# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024114# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024115
Martin v. Löwis11437992002-04-12 09:54:03 +000024116debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024117ac_cs_recheck=false
24118ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024119SHELL=\${CONFIG_SHELL-$SHELL}
24120_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024121
Martin v. Löwis11437992002-04-12 09:54:03 +000024122cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024123## --------------------- ##
24124## M4sh Initialization. ##
24125## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024126
Martin v. Löwiseba40652007-08-30 20:10:57 +000024127# Be more Bourne compatible
24128DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024129if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24130 emulate sh
24131 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024132 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24133 # is contrary to our usage. Disable this feature.
24134 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024135 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024136else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024137 case `(set -o) 2>/dev/null` in
24138 *posix*) set -o posix ;;
24139esac
24140
Martin v. Löwis11437992002-04-12 09:54:03 +000024141fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024142
Skip Montanaro6dead952003-09-25 14:50:04 +000024143
Martin v. Löwis11437992002-04-12 09:54:03 +000024144
24145
Martin v. Löwiseba40652007-08-30 20:10:57 +000024146# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024147# Avoid depending upon Character Ranges.
24148as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24149as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24150as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24151as_cr_digits='0123456789'
24152as_cr_alnum=$as_cr_Letters$as_cr_digits
24153
24154# The user is always right.
24155if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024156 echo "#! /bin/sh" >conf$$.sh
24157 echo "exit 0" >>conf$$.sh
24158 chmod +x conf$$.sh
24159 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024160 PATH_SEPARATOR=';'
24161 else
24162 PATH_SEPARATOR=:
24163 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024164 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024165fi
24166
Martin v. Löwiseba40652007-08-30 20:10:57 +000024167# Support unset when possible.
24168if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24169 as_unset=unset
24170else
24171 as_unset=false
24172fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024173
Martin v. Löwiseba40652007-08-30 20:10:57 +000024174
24175# IFS
24176# We need space, tab and new line, in precisely that order. Quoting is
24177# there to prevent editors from complaining about space-tab.
24178# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24179# splitting by setting IFS to empty value.)
24180as_nl='
24181'
24182IFS=" "" $as_nl"
24183
24184# Find who we are. Look in the path if we contain no directory separator.
24185case $0 in
24186 *[\\/]* ) as_myself=$0 ;;
24187 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024188for as_dir in $PATH
24189do
24190 IFS=$as_save_IFS
24191 test -z "$as_dir" && as_dir=.
24192 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24193done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024194IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024195
Martin v. Löwiseba40652007-08-30 20:10:57 +000024196 ;;
24197esac
24198# We did not find ourselves, most probably we were run as `sh COMMAND'
24199# in which case we are not to be found in the path.
24200if test "x$as_myself" = x; then
24201 as_myself=$0
24202fi
24203if test ! -f "$as_myself"; then
24204 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24205 { (exit 1); exit 1; }
24206fi
24207
24208# Work around bugs in pre-3.0 UWIN ksh.
24209for as_var in ENV MAIL MAILPATH
24210do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24211done
24212PS1='$ '
24213PS2='> '
24214PS4='+ '
24215
24216# NLS nuisances.
24217for as_var in \
24218 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24219 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24220 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024221do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024222 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24223 eval $as_var=C; export $as_var
24224 else
24225 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24226 fi
24227done
24228
24229# Required to use basename.
24230if expr a : '\(a\)' >/dev/null 2>&1 &&
24231 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24232 as_expr=expr
24233else
24234 as_expr=false
24235fi
24236
24237if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24238 as_basename=basename
24239else
24240 as_basename=false
24241fi
24242
24243
24244# Name of the executable.
24245as_me=`$as_basename -- "$0" ||
24246$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24247 X"$0" : 'X\(//\)$' \| \
24248 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24249echo X/"$0" |
24250 sed '/^.*\/\([^/][^/]*\)\/*$/{
24251 s//\1/
24252 q
24253 }
24254 /^X\/\(\/\/\)$/{
24255 s//\1/
24256 q
24257 }
24258 /^X\/\(\/\).*/{
24259 s//\1/
24260 q
24261 }
24262 s/.*/./; q'`
24263
24264# CDPATH.
24265$as_unset CDPATH
24266
24267
24268
Martin v. Löwis11437992002-04-12 09:54:03 +000024269 as_lineno_1=$LINENO
24270 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024271 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024272 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024273
Martin v. Löwis11437992002-04-12 09:54:03 +000024274 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24275 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024276 # line-number line after each line using $LINENO; the second 'sed'
24277 # does the real work. The second script uses 'N' to pair each
24278 # line-number line with the line containing $LINENO, and appends
24279 # trailing '-' during substitution so that $LINENO is not a special
24280 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024281 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024282 # scripts with optimization help from Paolo Bonzini. Blame Lee
24283 # E. McMahon (1931-1989) for sed's syntax. :-)
24284 sed -n '
24285 p
24286 /[$]LINENO/=
24287 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024288 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024289 s/[$]LINENO.*/&-/
24290 t lineno
24291 b
24292 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024293 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024294 :loop
24295 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024296 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024297 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024298 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024299 chmod +x "$as_me.lineno" ||
24300 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024301 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024302
Martin v. Löwis11437992002-04-12 09:54:03 +000024303 # Don't try to exec as it changes $[0], causing all sort of problems
24304 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024305 # original and so on. Autoconf is especially sensitive to this).
24306 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024307 # Exit status is that of the last command.
24308 exit
24309}
24310
24311
Martin v. Löwiseba40652007-08-30 20:10:57 +000024312if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24313 as_dirname=dirname
24314else
24315 as_dirname=false
24316fi
24317
24318ECHO_C= ECHO_N= ECHO_T=
24319case `echo -n x` in
24320-n*)
24321 case `echo 'x\c'` in
24322 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24323 *) ECHO_C='\c';;
24324 esac;;
24325*)
24326 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024327esac
24328
Martin v. Löwiseba40652007-08-30 20:10:57 +000024329if expr a : '\(a\)' >/dev/null 2>&1 &&
24330 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024331 as_expr=expr
24332else
24333 as_expr=false
24334fi
24335
24336rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024337if test -d conf$$.dir; then
24338 rm -f conf$$.dir/conf$$.file
24339else
24340 rm -f conf$$.dir
24341 mkdir conf$$.dir
24342fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024343echo >conf$$.file
24344if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024345 as_ln_s='ln -s'
24346 # ... but there are two gotchas:
24347 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24348 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24349 # In both cases, we have to default to `cp -p'.
24350 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024351 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024352elif ln conf$$.file conf$$ 2>/dev/null; then
24353 as_ln_s=ln
24354else
24355 as_ln_s='cp -p'
24356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024357rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24358rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024359
Skip Montanaro6dead952003-09-25 14:50:04 +000024360if mkdir -p . 2>/dev/null; then
24361 as_mkdir_p=:
24362else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024363 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024364 as_mkdir_p=false
24365fi
24366
Martin v. Löwiseba40652007-08-30 20:10:57 +000024367if test -x / >/dev/null 2>&1; then
24368 as_test_x='test -x'
24369else
24370 if ls -dL / >/dev/null 2>&1; then
24371 as_ls_L_option=L
24372 else
24373 as_ls_L_option=
24374 fi
24375 as_test_x='
24376 eval sh -c '\''
24377 if test -d "$1"; then
24378 test -d "$1/.";
24379 else
24380 case $1 in
24381 -*)set "./$1";;
24382 esac;
24383 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24384 ???[sx]*):;;*)false;;esac;fi
24385 '\'' sh
24386 '
24387fi
24388as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024389
24390# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024391as_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 +000024392
24393# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024394as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024395
24396
Martin v. Löwis11437992002-04-12 09:54:03 +000024397exec 6>&1
24398
Martin v. Löwiseba40652007-08-30 20:10:57 +000024399# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024400# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024401# values after options handling.
24402ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024403This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024404generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024405
24406 CONFIG_FILES = $CONFIG_FILES
24407 CONFIG_HEADERS = $CONFIG_HEADERS
24408 CONFIG_LINKS = $CONFIG_LINKS
24409 CONFIG_COMMANDS = $CONFIG_COMMANDS
24410 $ $0 $@
24411
Martin v. Löwiseba40652007-08-30 20:10:57 +000024412on `(hostname || uname -n) 2>/dev/null | sed 1q`
24413"
24414
Martin v. Löwis11437992002-04-12 09:54:03 +000024415_ACEOF
24416
Martin v. Löwiseba40652007-08-30 20:10:57 +000024417cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024418# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024419config_files="$ac_config_files"
24420config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024421
Martin v. Löwiseba40652007-08-30 20:10:57 +000024422_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024423
24424cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024425ac_cs_usage="\
24426\`$as_me' instantiates files from templates according to the
24427current configuration.
24428
24429Usage: $0 [OPTIONS] [FILE]...
24430
24431 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024432 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024433 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024434 -d, --debug don't remove temporary files
24435 --recheck update $as_me by reconfiguring in the same conditions
24436 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024437 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024438 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024439 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024440
24441Configuration files:
24442$config_files
24443
24444Configuration headers:
24445$config_headers
24446
24447Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024448
Martin v. Löwiseba40652007-08-30 20:10:57 +000024449_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024450cat >>$CONFIG_STATUS <<_ACEOF
24451ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024452python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024453configured by $0, generated by GNU Autoconf 2.61,
24454 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024455
Martin v. Löwiseba40652007-08-30 20:10:57 +000024456Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024457This config.status script is free software; the Free Software Foundation
24458gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024459
24460ac_pwd='$ac_pwd'
24461srcdir='$srcdir'
24462INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024463_ACEOF
24464
24465cat >>$CONFIG_STATUS <<\_ACEOF
24466# If no file are specified by the user, then we need to provide default
24467# value. By we need to know if files were specified by the user.
24468ac_need_defaults=:
24469while test $# != 0
24470do
24471 case $1 in
24472 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024473 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24474 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024475 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024476 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024477 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024478 ac_option=$1
24479 ac_optarg=$2
24480 ac_shift=shift
24481 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024482 esac
24483
Skip Montanaro6dead952003-09-25 14:50:04 +000024484 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024485 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024486 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24487 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024488 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24489 echo "$ac_cs_version"; exit ;;
24490 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024491 debug=: ;;
24492 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024493 $ac_shift
24494 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024495 ac_need_defaults=false;;
24496 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024497 $ac_shift
24498 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024499 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024500 --he | --h)
24501 # Conflict between --help and --header
24502 { echo "$as_me: error: ambiguous option: $1
24503Try \`$0 --help' for more information." >&2
24504 { (exit 1); exit 1; }; };;
24505 --help | --hel | -h )
24506 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024507 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24508 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24509 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024510
24511 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024512 -*) { echo "$as_me: error: unrecognized option: $1
24513Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024514 { (exit 1); exit 1; }; } ;;
24515
Martin v. Löwiseba40652007-08-30 20:10:57 +000024516 *) ac_config_targets="$ac_config_targets $1"
24517 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024518
24519 esac
24520 shift
24521done
24522
Skip Montanaro6dead952003-09-25 14:50:04 +000024523ac_configure_extra_args=
24524
24525if $ac_cs_silent; then
24526 exec 6>/dev/null
24527 ac_configure_extra_args="$ac_configure_extra_args --silent"
24528fi
24529
24530_ACEOF
24531cat >>$CONFIG_STATUS <<_ACEOF
24532if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024533 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24534 CONFIG_SHELL=$SHELL
24535 export CONFIG_SHELL
24536 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024537fi
24538
Martin v. Löwis11437992002-04-12 09:54:03 +000024539_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024540cat >>$CONFIG_STATUS <<\_ACEOF
24541exec 5>>config.log
24542{
24543 echo
24544 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24545## Running $as_me. ##
24546_ASBOX
24547 echo "$ac_log"
24548} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024549
Martin v. Löwiseba40652007-08-30 20:10:57 +000024550_ACEOF
24551cat >>$CONFIG_STATUS <<_ACEOF
24552_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024553
24554cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024555
24556# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024557for ac_config_target in $ac_config_targets
24558do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024559 case $ac_config_target in
24560 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24561 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24562 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24563 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
24564 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24565 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24566
Martin v. Löwis11437992002-04-12 09:54:03 +000024567 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24568echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24569 { (exit 1); exit 1; }; };;
24570 esac
24571done
24572
Martin v. Löwiseba40652007-08-30 20:10:57 +000024573
Martin v. Löwis11437992002-04-12 09:54:03 +000024574# If the user did not use the arguments to specify the items to instantiate,
24575# then the envvar interface is used. Set only those that are not.
24576# We use the long form for the default assignment because of an extremely
24577# bizarre bug on SunOS 4.1.3.
24578if $ac_need_defaults; then
24579 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24580 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24581fi
24582
Skip Montanaro6dead952003-09-25 14:50:04 +000024583# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024584# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024585# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024586# Hook for its removal unless debugging.
24587# Note that there is a small window in which the directory will not be cleaned:
24588# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024589$debug ||
24590{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024591 tmp=
24592 trap 'exit_status=$?
24593 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24594' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024595 trap '{ (exit 1); exit 1; }' 1 2 13 15
24596}
Martin v. Löwis11437992002-04-12 09:54:03 +000024597# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024598
Martin v. Löwis11437992002-04-12 09:54:03 +000024599{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024600 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024601 test -n "$tmp" && test -d "$tmp"
24602} ||
24603{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024604 tmp=./conf$$-$RANDOM
24605 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024606} ||
24607{
Skip Montanaro6dead952003-09-25 14:50:04 +000024608 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024609 { (exit 1); exit 1; }
24610}
24611
Martin v. Löwis11437992002-04-12 09:54:03 +000024612#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024613# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024614#
24615
24616# No need to generate the scripts if there are no CONFIG_FILES.
24617# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024618if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024619
24620_ACEOF
24621
Martin v. Löwiseba40652007-08-30 20:10:57 +000024622
24623
24624ac_delim='%!_!# '
24625for ac_last_try in false false false false false :; do
24626 cat >conf$$subs.sed <<_ACEOF
24627SHELL!$SHELL$ac_delim
24628PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24629PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24630PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24631PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24632PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24633PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24634exec_prefix!$exec_prefix$ac_delim
24635prefix!$prefix$ac_delim
24636program_transform_name!$program_transform_name$ac_delim
24637bindir!$bindir$ac_delim
24638sbindir!$sbindir$ac_delim
24639libexecdir!$libexecdir$ac_delim
24640datarootdir!$datarootdir$ac_delim
24641datadir!$datadir$ac_delim
24642sysconfdir!$sysconfdir$ac_delim
24643sharedstatedir!$sharedstatedir$ac_delim
24644localstatedir!$localstatedir$ac_delim
24645includedir!$includedir$ac_delim
24646oldincludedir!$oldincludedir$ac_delim
24647docdir!$docdir$ac_delim
24648infodir!$infodir$ac_delim
24649htmldir!$htmldir$ac_delim
24650dvidir!$dvidir$ac_delim
24651pdfdir!$pdfdir$ac_delim
24652psdir!$psdir$ac_delim
24653libdir!$libdir$ac_delim
24654localedir!$localedir$ac_delim
24655mandir!$mandir$ac_delim
24656DEFS!$DEFS$ac_delim
24657ECHO_C!$ECHO_C$ac_delim
24658ECHO_N!$ECHO_N$ac_delim
24659ECHO_T!$ECHO_T$ac_delim
24660LIBS!$LIBS$ac_delim
24661build_alias!$build_alias$ac_delim
24662host_alias!$host_alias$ac_delim
24663target_alias!$target_alias$ac_delim
24664VERSION!$VERSION$ac_delim
24665SOVERSION!$SOVERSION$ac_delim
24666CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24667UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24668PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
24669PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24670PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24671PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24672FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24673FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24674FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24675FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24676FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24677MACHDEP!$MACHDEP$ac_delim
24678SGI_ABI!$SGI_ABI$ac_delim
24679EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24680EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24681CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24682EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24683CC!$CC$ac_delim
24684CFLAGS!$CFLAGS$ac_delim
24685LDFLAGS!$LDFLAGS$ac_delim
24686CPPFLAGS!$CPPFLAGS$ac_delim
24687ac_ct_CC!$ac_ct_CC$ac_delim
24688EXEEXT!$EXEEXT$ac_delim
24689OBJEXT!$OBJEXT$ac_delim
24690CXX!$CXX$ac_delim
24691MAINCC!$MAINCC$ac_delim
24692CPP!$CPP$ac_delim
24693GREP!$GREP$ac_delim
24694EGREP!$EGREP$ac_delim
24695BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24696LIBRARY!$LIBRARY$ac_delim
24697LDLIBRARY!$LDLIBRARY$ac_delim
24698DLLLIBRARY!$DLLLIBRARY$ac_delim
24699BLDLIBRARY!$BLDLIBRARY$ac_delim
24700LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24701INSTSONAME!$INSTSONAME$ac_delim
24702RUNSHARED!$RUNSHARED$ac_delim
24703LINKCC!$LINKCC$ac_delim
24704RANLIB!$RANLIB$ac_delim
24705AR!$AR$ac_delim
24706SVNVERSION!$SVNVERSION$ac_delim
24707INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24708INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24709INSTALL_DATA!$INSTALL_DATA$ac_delim
24710LN!$LN$ac_delim
24711OPT!$OPT$ac_delim
24712BASECFLAGS!$BASECFLAGS$ac_delim
24713OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24714LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24715SO!$SO$ac_delim
24716LDSHARED!$LDSHARED$ac_delim
24717BLDSHARED!$BLDSHARED$ac_delim
24718CCSHARED!$CCSHARED$ac_delim
24719LINKFORSHARED!$LINKFORSHARED$ac_delim
24720CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24721SHLIBS!$SHLIBS$ac_delim
24722USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
24723SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
24724_ACEOF
24725
24726 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24727 break
24728 elif $ac_last_try; then
24729 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24730echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24731 { (exit 1); exit 1; }; }
24732 else
24733 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024734 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024735done
24736
24737ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24738if test -n "$ac_eof"; then
24739 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24740 ac_eof=`expr $ac_eof + 1`
24741fi
24742
24743cat >>$CONFIG_STATUS <<_ACEOF
24744cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24745/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24746_ACEOF
24747sed '
24748s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24749s/^/s,@/; s/!/@,|#_!!_#|/
24750:n
24751t n
24752s/'"$ac_delim"'$/,g/; t
24753s/$/\\/; p
24754N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24755' >>$CONFIG_STATUS <conf$$subs.sed
24756rm -f conf$$subs.sed
24757cat >>$CONFIG_STATUS <<_ACEOF
24758CEOF$ac_eof
24759_ACEOF
24760
24761
24762ac_delim='%!_!# '
24763for ac_last_try in false false false false false :; do
24764 cat >conf$$subs.sed <<_ACEOF
24765USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24766LDLAST!$LDLAST$ac_delim
24767THREADOBJ!$THREADOBJ$ac_delim
24768DLINCLDIR!$DLINCLDIR$ac_delim
24769DYNLOADFILE!$DYNLOADFILE$ac_delim
24770MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24771TRUE!$TRUE$ac_delim
24772LIBOBJS!$LIBOBJS$ac_delim
24773HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24774HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24775HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24776HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24777HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24778LIBM!$LIBM$ac_delim
24779LIBC!$LIBC$ac_delim
24780UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24781THREADHEADERS!$THREADHEADERS$ac_delim
24782SRCDIRS!$SRCDIRS$ac_delim
24783LTLIBOBJS!$LTLIBOBJS$ac_delim
24784_ACEOF
24785
24786 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
24787 break
24788 elif $ac_last_try; then
24789 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24790echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24791 { (exit 1); exit 1; }; }
24792 else
24793 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24794 fi
24795done
24796
24797ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24798if test -n "$ac_eof"; then
24799 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24800 ac_eof=`expr $ac_eof + 1`
24801fi
24802
24803cat >>$CONFIG_STATUS <<_ACEOF
24804cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24805/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24806_ACEOF
24807sed '
24808s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24809s/^/s,@/; s/!/@,|#_!!_#|/
24810:n
24811t n
24812s/'"$ac_delim"'$/,g/; t
24813s/$/\\/; p
24814N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24815' >>$CONFIG_STATUS <conf$$subs.sed
24816rm -f conf$$subs.sed
24817cat >>$CONFIG_STATUS <<_ACEOF
24818:end
24819s/|#_!!_#|//g
24820CEOF$ac_eof
24821_ACEOF
24822
24823
24824# VPATH may cause trouble with some makes, so we remove $(srcdir),
24825# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24826# trailing colons and then remove the whole line if VPATH becomes empty
24827# (actually we leave an empty line to preserve line numbers).
24828if test "x$srcdir" = x.; then
24829 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24830s/:*\$(srcdir):*/:/
24831s/:*\${srcdir}:*/:/
24832s/:*@srcdir@:*/:/
24833s/^\([^=]*=[ ]*\):*/\1/
24834s/:*$//
24835s/^[^=]*=[ ]*$//
24836}'
24837fi
24838
24839cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024840fi # test -n "$CONFIG_FILES"
24841
Martin v. Löwiseba40652007-08-30 20:10:57 +000024842
24843for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24844do
24845 case $ac_tag in
24846 :[FHLC]) ac_mode=$ac_tag; continue;;
24847 esac
24848 case $ac_mode$ac_tag in
24849 :[FHL]*:*);;
24850 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24851echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24852 { (exit 1); exit 1; }; };;
24853 :[FH]-) ac_tag=-:-;;
24854 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24855 esac
24856 ac_save_IFS=$IFS
24857 IFS=:
24858 set x $ac_tag
24859 IFS=$ac_save_IFS
24860 shift
24861 ac_file=$1
24862 shift
24863
24864 case $ac_mode in
24865 :L) ac_source=$1;;
24866 :[FH])
24867 ac_file_inputs=
24868 for ac_f
24869 do
24870 case $ac_f in
24871 -) ac_f="$tmp/stdin";;
24872 *) # Look for the file first in the build tree, then in the source tree
24873 # (if the path is not absolute). The absolute path cannot be DOS-style,
24874 # because $ac_f cannot contain `:'.
24875 test -f "$ac_f" ||
24876 case $ac_f in
24877 [\\/$]*) false;;
24878 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24879 esac ||
24880 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24881echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24882 { (exit 1); exit 1; }; };;
24883 esac
24884 ac_file_inputs="$ac_file_inputs $ac_f"
24885 done
24886
24887 # Let's still pretend it is `configure' which instantiates (i.e., don't
24888 # use $as_me), people would be surprised to read:
24889 # /* config.h. Generated by config.status. */
24890 configure_input="Generated from "`IFS=:
24891 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24892 if test x"$ac_file" != x-; then
24893 configure_input="$ac_file. $configure_input"
24894 { echo "$as_me:$LINENO: creating $ac_file" >&5
24895echo "$as_me: creating $ac_file" >&6;}
24896 fi
24897
24898 case $ac_tag in
24899 *:-:* | *:-) cat >"$tmp/stdin";;
24900 esac
24901 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024902 esac
24903
Martin v. Löwiseba40652007-08-30 20:10:57 +000024904 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024905$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024906 X"$ac_file" : 'X\(//\)[^/]' \| \
24907 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024908 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024909echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024910 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24911 s//\1/
24912 q
24913 }
24914 /^X\(\/\/\)[^/].*/{
24915 s//\1/
24916 q
24917 }
24918 /^X\(\/\/\)$/{
24919 s//\1/
24920 q
24921 }
24922 /^X\(\/\).*/{
24923 s//\1/
24924 q
24925 }
24926 s/.*/./; q'`
24927 { as_dir="$ac_dir"
24928 case $as_dir in #(
24929 -*) as_dir=./$as_dir;;
24930 esac
24931 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024932 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024933 while :; do
24934 case $as_dir in #(
24935 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24936 *) as_qdir=$as_dir;;
24937 esac
24938 as_dirs="'$as_qdir' $as_dirs"
24939 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024940$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024941 X"$as_dir" : 'X\(//\)[^/]' \| \
24942 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024943 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024944echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024945 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24946 s//\1/
24947 q
24948 }
24949 /^X\(\/\/\)[^/].*/{
24950 s//\1/
24951 q
24952 }
24953 /^X\(\/\/\)$/{
24954 s//\1/
24955 q
24956 }
24957 /^X\(\/\).*/{
24958 s//\1/
24959 q
24960 }
24961 s/.*/./; q'`
24962 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000024963 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024964 test -z "$as_dirs" || eval "mkdir $as_dirs"
24965 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24966echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000024967 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024968 ac_builddir=.
24969
Martin v. Löwiseba40652007-08-30 20:10:57 +000024970case "$ac_dir" in
24971.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24972*)
Martin v. Löwis11437992002-04-12 09:54:03 +000024973 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000024974 # A ".." for each directory in $ac_dir_suffix.
24975 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24976 case $ac_top_builddir_sub in
24977 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24978 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24979 esac ;;
24980esac
24981ac_abs_top_builddir=$ac_pwd
24982ac_abs_builddir=$ac_pwd$ac_dir_suffix
24983# for backward compatibility:
24984ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000024985
24986case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024987 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000024988 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024989 ac_top_srcdir=$ac_top_builddir_sub
24990 ac_abs_top_srcdir=$ac_pwd ;;
24991 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000024992 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024993 ac_top_srcdir=$srcdir
24994 ac_abs_top_srcdir=$srcdir ;;
24995 *) # Relative name.
24996 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24997 ac_top_srcdir=$ac_top_build_prefix$srcdir
24998 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024999esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025000ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025001
Martin v. Löwis11437992002-04-12 09:54:03 +000025002
Martin v. Löwiseba40652007-08-30 20:10:57 +000025003 case $ac_mode in
25004 :F)
25005 #
25006 # CONFIG_FILE
25007 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025008
25009 case $INSTALL in
25010 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025011 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025012 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025013_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025014
25015cat >>$CONFIG_STATUS <<\_ACEOF
25016# If the template does not know about datarootdir, expand it.
25017# FIXME: This hack should be removed a few years after 2.60.
25018ac_datarootdir_hack=; ac_datarootdir_seen=
25019
25020case `sed -n '/datarootdir/ {
25021 p
25022 q
25023}
25024/@datadir@/p
25025/@docdir@/p
25026/@infodir@/p
25027/@localedir@/p
25028/@mandir@/p
25029' $ac_file_inputs` in
25030*datarootdir*) ac_datarootdir_seen=yes;;
25031*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25032 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25033echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25034_ACEOF
25035cat >>$CONFIG_STATUS <<_ACEOF
25036 ac_datarootdir_hack='
25037 s&@datadir@&$datadir&g
25038 s&@docdir@&$docdir&g
25039 s&@infodir@&$infodir&g
25040 s&@localedir@&$localedir&g
25041 s&@mandir@&$mandir&g
25042 s&\\\${datarootdir}&$datarootdir&g' ;;
25043esac
25044_ACEOF
25045
25046# Neutralize VPATH when `$srcdir' = `.'.
25047# Shell code in configure.ac might set extrasub.
25048# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025049cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025050 sed "$ac_vpsub
25051$extrasub
25052_ACEOF
25053cat >>$CONFIG_STATUS <<\_ACEOF
25054:t
25055/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025056s&@configure_input@&$configure_input&;t t
25057s&@top_builddir@&$ac_top_builddir_sub&;t t
25058s&@srcdir@&$ac_srcdir&;t t
25059s&@abs_srcdir@&$ac_abs_srcdir&;t t
25060s&@top_srcdir@&$ac_top_srcdir&;t t
25061s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25062s&@builddir@&$ac_builddir&;t t
25063s&@abs_builddir@&$ac_abs_builddir&;t t
25064s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25065s&@INSTALL@&$ac_INSTALL&;t t
25066$ac_datarootdir_hack
25067" $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 +000025068
Martin v. Löwiseba40652007-08-30 20:10:57 +000025069test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25070 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25071 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25072 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25073which seems to be undefined. Please make sure it is defined." >&5
25074echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25075which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025076
Martin v. Löwiseba40652007-08-30 20:10:57 +000025077 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025078 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025079 -) cat "$tmp/out"; rm -f "$tmp/out";;
25080 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025081 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025082 ;;
25083 :H)
25084 #
25085 # CONFIG_HEADER
25086 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025087_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025088
Martin v. Löwiseba40652007-08-30 20:10:57 +000025089# Transform confdefs.h into a sed script `conftest.defines', that
25090# substitutes the proper values into config.h.in to produce config.h.
25091rm -f conftest.defines conftest.tail
25092# First, append a space to every undef/define line, to ease matching.
25093echo 's/$/ /' >conftest.defines
25094# Then, protect against being on the right side of a sed subst, or in
25095# an unquoted here document, in config.status. If some macros were
25096# called several times there might be several #defines for the same
25097# symbol, which is useless. But do not sort them, since the last
25098# AC_DEFINE must be honored.
25099ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25100# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25101# NAME is the cpp macro being defined, VALUE is the value it is being given.
25102# PARAMS is the parameter list in the macro definition--in most cases, it's
25103# just an empty string.
25104ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25105ac_dB='\\)[ (].*,\\1define\\2'
25106ac_dC=' '
25107ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025108
Martin v. Löwiseba40652007-08-30 20:10:57 +000025109uniq confdefs.h |
25110 sed -n '
25111 t rset
25112 :rset
25113 s/^[ ]*#[ ]*define[ ][ ]*//
25114 t ok
25115 d
25116 :ok
25117 s/[\\&,]/\\&/g
25118 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25119 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25120 ' >>conftest.defines
25121
25122# Remove the space that was appended to ease matching.
25123# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025124# example, in the case of _POSIX_SOURCE, which is predefined and required
25125# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025126# (The regexp can be short, since the line contains either #define or #undef.)
25127echo 's/ $//
25128s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025129
Martin v. Löwiseba40652007-08-30 20:10:57 +000025130# Break up conftest.defines:
25131ac_max_sed_lines=50
25132
25133# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25134# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25135# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25136# et cetera.
25137ac_in='$ac_file_inputs'
25138ac_out='"$tmp/out1"'
25139ac_nxt='"$tmp/out2"'
25140
25141while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025142do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025143 # Write a here document:
25144 cat >>$CONFIG_STATUS <<_ACEOF
25145 # First, check the format of the line:
25146 cat >"\$tmp/defines.sed" <<\\CEOF
25147/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25148/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25149b
25150:def
25151_ACEOF
25152 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025153 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025154 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25155 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25156 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25157 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025158 rm -f conftest.defines
25159 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025160done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025161rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025162
Martin v. Löwiseba40652007-08-30 20:10:57 +000025163echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025164cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025165 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025166 echo "/* $configure_input */" >"$tmp/config.h"
25167 cat "$ac_result" >>"$tmp/config.h"
25168 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025169 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25170echo "$as_me: $ac_file is unchanged" >&6;}
25171 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025172 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025173 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025174 fi
25175 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025176 echo "/* $configure_input */"
25177 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025178 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025179 rm -f "$tmp/out12"
25180 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025181
Martin v. Löwiseba40652007-08-30 20:10:57 +000025182
25183 esac
25184
25185done # for ac_tag
25186
Guido van Rossum627b2d71993-12-24 10:39:16 +000025187
Martin v. Löwis11437992002-04-12 09:54:03 +000025188{ (exit 0); exit 0; }
25189_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025190chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025191ac_clean_files=$ac_clean_files_save
25192
25193
25194# configure is writing to config.log, and then calls config.status.
25195# config.status does its own redirection, appending to config.log.
25196# Unfortunately, on DOS this fails, as config.log is still kept open
25197# by configure, so config.status won't be able to write to it; its
25198# output is simply discarded. So we exec the FD to /dev/null,
25199# effectively closing config.log, so it can be properly (re)opened and
25200# appended to by config.status. When coming back to configure, we
25201# need to make the FD available again.
25202if test "$no_create" != yes; then
25203 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025204 ac_config_status_args=
25205 test "$silent" = yes &&
25206 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025207 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025208 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025209 exec 5>>config.log
25210 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25211 # would make configure fail if this is the last instruction.
25212 $ac_cs_success || { (exit 1); exit 1; }
25213fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025214
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025215
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025216echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025217if test ! -f Modules/Setup
25218then
25219 cp $srcdir/Modules/Setup.dist Modules/Setup
25220fi
25221
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025222echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025223if test ! -f Modules/Setup.local
25224then
25225 echo "# Edit this file for local setup changes" >Modules/Setup.local
25226fi
25227
25228echo "creating Makefile"
25229$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25230 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025231 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025232
25233case $ac_sys_system in
25234BeOS)
25235 { echo "$as_me:$LINENO: WARNING:
25236
25237 Support for BeOS is deprecated as of Python 2.6.
25238 See PEP 11 for the gory details.
25239 " >&5
25240echo "$as_me: WARNING:
25241
25242 Support for BeOS is deprecated as of Python 2.6.
25243 See PEP 11 for the gory details.
25244 " >&2;}
25245 ;;
25246*) ;;
25247esac
25248
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025249mv config.c Modules