blob: ad9f5629f3eb9d51ae1603c763d061b02e833f8c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00002# From configure.in Revision: 61847 .
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 ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012420 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012421 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012422 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012423 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12424 if test "$enable_framework" ; then
12425 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012426 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12427 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012428 else
12429 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012430 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012431 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012432 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012433 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12434 if test "$enable_framework" ; then
12435 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012436 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12437 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012438 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012439 # No framework, use the Python app as bundle-loader
12440 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012441 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012442 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012443 Darwin/*)
12444 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12445 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012446 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012447 if test ${cur_target} '>' 10.2; then
12448 cur_target=10.3
12449 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012450 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012451
12452 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12453 # environment with a value that is the same as what we'll use
12454 # in the Makefile to ensure that we'll get the same compiler
12455 # environment during configure and build time.
12456 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12457 export MACOSX_DEPLOYMENT_TARGET
12458
Ronald Oussoren988117f2006-04-29 11:31:35 +000012459 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012460 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012461 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012462 if test "${enable_universalsdk}"; then
12463 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12464 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012465 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12466 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012467 else
12468 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12469 if test "$enable_framework" ; then
12470 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012471 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12472 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012473 else
12474 # No framework, use the Python app as bundle-loader
12475 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12476 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12477 fi
12478 fi
12479 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012480 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012481 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012482 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012483 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012484 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012485 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012486 else
12487 LDSHARED="ld -Bshareable ${LDFLAGS}"
12488 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012489 OpenBSD*)
12490 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12491 then
12492 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12493 else
12494 case `uname -r` in
12495 [01].* | 2.[0-7] | 2.[0-7].*)
12496 LDSHARED="ld -Bshareable ${LDFLAGS}"
12497 ;;
12498 *)
12499 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12500 ;;
12501 esac
12502 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012503 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012504 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012505 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012506 then LDSHARED='$(CC) -shared'
12507 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012508 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012509 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012510 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012511 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012512 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012513 *) LDSHARED="ld";;
12514 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012516{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12517echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012518BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012519# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012520# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012521{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12522echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012523if test -z "$CCSHARED"
12524then
Guido van Rossum07397971997-04-29 21:49:50 +000012525 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012526 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012527 then CCSHARED="-fPIC";
12528 elif test `uname -p` = sparc;
12529 then CCSHARED="-xcode=pic32";
12530 else CCSHARED="-Kpic";
12531 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012532 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012533 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012534 else CCSHARED="+z";
12535 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012536 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012537 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012538 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012539 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012540 if test "$GCC" = "yes"
12541 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012542 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012543 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012544 SCO_SV*)
12545 if test "$GCC" = "yes"
12546 then CCSHARED="-fPIC"
12547 else CCSHARED="-Kpic -belf"
12548 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012549 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012550 IRIX*/6*) case $CC in
12551 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012552 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012553 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012554 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012555 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012557{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12558echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012559# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012560# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012561{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12562echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012563if test -z "$LINKFORSHARED"
12564then
Guido van Rossum07397971997-04-29 21:49:50 +000012565 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012566 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012567 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012568 LINKFORSHARED="-Wl,-E -Wl,+s";;
12569# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012570 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012571 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012572 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012573 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012574 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12575 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012576 # not used by the core itself but which needs to be in the core so
12577 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012578 # -prebind is no longer used, because it actually seems to give a
12579 # slowdown in stead of a speedup, maybe due to the large number of
12580 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012581
12582 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012583 if test "$enable_framework"
12584 then
Jack Jansenda49e192005-01-07 13:08:22 +000012585 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012586 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012587 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012588 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012589 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012590 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012591 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012592 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12593 then
12594 LINKFORSHARED="-Wl,--export-dynamic"
12595 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012596 SunOS/5*) case $CC in
12597 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012598 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012599 then
12600 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012601 fi;;
12602 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012603 CYGWIN*)
12604 if test $enable_shared = "no"
12605 then
12606 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12607 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012608 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012610{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12611echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012612
Michael W. Hudson54241132001-12-07 15:38:26 +000012613
Martin v. Löwiseba40652007-08-30 20:10:57 +000012614{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12615echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012616if test ! "$LIBRARY" = "$LDLIBRARY"
12617then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012618 case $ac_sys_system in
12619 CYGWIN*)
12620 # Cygwin needs CCSHARED when building extension DLLs
12621 # but not when building the interpreter DLL.
12622 CFLAGSFORSHARED='';;
12623 *)
12624 CFLAGSFORSHARED='$(CCSHARED)'
12625 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012627{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12628echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012629
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012630# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12631# library (with --enable-shared).
12632# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012633# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12634# if it is not required, since it creates a dependency of the shared library
12635# to LIBS. This, in turn, means that applications linking the shared libpython
12636# don't need to link LIBS explicitly. The default should be only changed
12637# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012638
Martin v. Löwiseba40652007-08-30 20:10:57 +000012639{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12640echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012641case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012642 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012643 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012644esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012645{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12646echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012647
12648
Guido van Rossum627b2d71993-12-24 10:39:16 +000012649# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012650
Martin v. Löwiseba40652007-08-30 20:10:57 +000012651{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12652echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012653if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12654 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012655else
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012657LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012659/* confdefs.h. */
12660_ACEOF
12661cat confdefs.h >>conftest.$ac_ext
12662cat >>conftest.$ac_ext <<_ACEOF
12663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012664
Martin v. Löwiseba40652007-08-30 20:10:57 +000012665/* Override any GCC internal prototype to avoid an error.
12666 Use char because int might match the return type of a GCC
12667 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012668#ifdef __cplusplus
12669extern "C"
12670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012671char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012672int
12673main ()
12674{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012675return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012676 ;
12677 return 0;
12678}
12679_ACEOF
12680rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012681if { (ac_try="$ac_link"
12682case "(($ac_try" in
12683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12684 *) ac_try_echo=$ac_try;;
12685esac
12686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12687 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012689 grep -v '^ *+' conftest.er1 >conftest.err
12690 rm -f conftest.er1
12691 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012693 (exit $ac_status); } && {
12694 test -z "$ac_c_werror_flag" ||
12695 test ! -s conftest.err
12696 } && test -s conftest$ac_exeext &&
12697 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012699else
Martin v. Löwis11437992002-04-12 09:54:03 +000012700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012701sed 's/^/| /' conftest.$ac_ext >&5
12702
Martin v. Löwiseba40652007-08-30 20:10:57 +000012703 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012705
12706rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012707 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012708LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012709fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012710{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12711echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012712if test $ac_cv_lib_dl_dlopen = yes; then
12713 cat >>confdefs.h <<_ACEOF
12714#define HAVE_LIBDL 1
12715_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012716
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012717 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012718
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719fi
12720 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
Martin v. Löwiseba40652007-08-30 20:10:57 +000012722{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12723echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012724if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12725 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726else
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012728LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012729cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012730/* confdefs.h. */
12731_ACEOF
12732cat confdefs.h >>conftest.$ac_ext
12733cat >>conftest.$ac_ext <<_ACEOF
12734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012735
Martin v. Löwiseba40652007-08-30 20:10:57 +000012736/* Override any GCC internal prototype to avoid an error.
12737 Use char because int might match the return type of a GCC
12738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012739#ifdef __cplusplus
12740extern "C"
12741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012742char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012743int
12744main ()
12745{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012746return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ;
12748 return 0;
12749}
12750_ACEOF
12751rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012752if { (ac_try="$ac_link"
12753case "(($ac_try" in
12754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12755 *) ac_try_echo=$ac_try;;
12756esac
12757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12758 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012760 grep -v '^ *+' conftest.er1 >conftest.err
12761 rm -f conftest.er1
12762 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012764 (exit $ac_status); } && {
12765 test -z "$ac_c_werror_flag" ||
12766 test ! -s conftest.err
12767 } && test -s conftest$ac_exeext &&
12768 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012770else
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012772sed 's/^/| /' conftest.$ac_ext >&5
12773
Martin v. Löwiseba40652007-08-30 20:10:57 +000012774 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012776
12777rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012778 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012779LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012781{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12782echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012783if test $ac_cv_lib_dld_shl_load = yes; then
12784 cat >>confdefs.h <<_ACEOF
12785#define HAVE_LIBDLD 1
12786_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012787
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012788 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012789
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012790fi
12791 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012792
12793# only check for sem_ini if thread support is requested
12794if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012795 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12796echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012797if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012799else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012800 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012801cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012802/* confdefs.h. */
12803_ACEOF
12804cat confdefs.h >>conftest.$ac_ext
12805cat >>conftest.$ac_ext <<_ACEOF
12806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012807
Martin v. Löwiseba40652007-08-30 20:10:57 +000012808/* Override any GCC internal prototype to avoid an error.
12809 Use char because int might match the return type of a GCC
12810 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012811#ifdef __cplusplus
12812extern "C"
12813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012814char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012815int
12816main ()
12817{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012818return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 ;
12820 return 0;
12821}
12822_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012823for ac_lib in '' pthread rt posix4; do
12824 if test -z "$ac_lib"; then
12825 ac_res="none required"
12826 else
12827 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012828 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012829 fi
12830 rm -f conftest.$ac_objext conftest$ac_exeext
12831if { (ac_try="$ac_link"
12832case "(($ac_try" in
12833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12834 *) ac_try_echo=$ac_try;;
12835esac
12836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12837 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012838 ac_status=$?
12839 grep -v '^ *+' conftest.er1 >conftest.err
12840 rm -f conftest.er1
12841 cat conftest.err >&5
12842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012843 (exit $ac_status); } && {
12844 test -z "$ac_c_werror_flag" ||
12845 test ! -s conftest.err
12846 } && test -s conftest$ac_exeext &&
12847 $as_test_x conftest$ac_exeext; then
12848 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012849else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012850 echo "$as_me: failed program was:" >&5
12851sed 's/^/| /' conftest.$ac_ext >&5
12852
Martin v. Löwiseba40652007-08-30 20:10:57 +000012853
Brett Cannon19fab762007-06-02 03:02:29 +000012854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012855
12856rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12857 conftest$ac_exeext
12858 if test "${ac_cv_search_sem_init+set}" = set; then
12859 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012861done
12862if test "${ac_cv_search_sem_init+set}" = set; then
12863 :
12864else
12865 ac_cv_search_sem_init=no
12866fi
12867rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012868LIBS=$ac_func_search_save_LIBS
12869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012870{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12871echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12872ac_res=$ac_cv_search_sem_init
12873if test "$ac_res" != no; then
12874 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012875
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012876fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012877 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012878 # posix4 on Solaris 2.6
12879 # pthread (first!) on Linux
12880fi
12881
Martin v. Löwis19d17342003-06-14 21:03:05 +000012882# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012883{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12884echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012885if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12886 echo $ECHO_N "(cached) $ECHO_C" >&6
12887else
12888 ac_check_lib_save_LIBS=$LIBS
12889LIBS="-lintl $LIBS"
12890cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012891/* confdefs.h. */
12892_ACEOF
12893cat confdefs.h >>conftest.$ac_ext
12894cat >>conftest.$ac_ext <<_ACEOF
12895/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012896
Martin v. Löwiseba40652007-08-30 20:10:57 +000012897/* Override any GCC internal prototype to avoid an error.
12898 Use char because int might match the return type of a GCC
12899 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012900#ifdef __cplusplus
12901extern "C"
12902#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012903char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012904int
12905main ()
12906{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012907return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012908 ;
12909 return 0;
12910}
12911_ACEOF
12912rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012913if { (ac_try="$ac_link"
12914case "(($ac_try" in
12915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12916 *) ac_try_echo=$ac_try;;
12917esac
12918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12919 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012921 grep -v '^ *+' conftest.er1 >conftest.err
12922 rm -f conftest.er1
12923 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012925 (exit $ac_status); } && {
12926 test -z "$ac_c_werror_flag" ||
12927 test ! -s conftest.err
12928 } && test -s conftest$ac_exeext &&
12929 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012930 ac_cv_lib_intl_textdomain=yes
12931else
12932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012933sed 's/^/| /' conftest.$ac_ext >&5
12934
Martin v. Löwiseba40652007-08-30 20:10:57 +000012935 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012937
12938rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012939 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012940LIBS=$ac_check_lib_save_LIBS
12941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012942{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12943echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012944if test $ac_cv_lib_intl_textdomain = yes; then
12945
12946cat >>confdefs.h <<\_ACEOF
12947#define WITH_LIBINTL 1
12948_ACEOF
12949
12950fi
12951
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012952
12953# checks for system dependent C++ extensions support
12954case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000012955 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12956echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012958/* confdefs.h. */
12959_ACEOF
12960cat confdefs.h >>conftest.$ac_ext
12961cat >>conftest.$ac_ext <<_ACEOF
12962/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012963#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012964int
12965main ()
12966{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012967loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012968 ;
12969 return 0;
12970}
12971_ACEOF
12972rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012973if { (ac_try="$ac_link"
12974case "(($ac_try" in
12975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12976 *) ac_try_echo=$ac_try;;
12977esac
12978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12979 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012981 grep -v '^ *+' conftest.er1 >conftest.err
12982 rm -f conftest.er1
12983 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012985 (exit $ac_status); } && {
12986 test -z "$ac_c_werror_flag" ||
12987 test ! -s conftest.err
12988 } && test -s conftest$ac_exeext &&
12989 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012990
Martin v. Löwis11437992002-04-12 09:54:03 +000012991cat >>confdefs.h <<\_ACEOF
12992#define AIX_GENUINE_CPLUSPLUS 1
12993_ACEOF
12994
Martin v. Löwiseba40652007-08-30 20:10:57 +000012995 { echo "$as_me:$LINENO: result: yes" >&5
12996echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012997else
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012999sed 's/^/| /' conftest.$ac_ext >&5
13000
Martin v. Löwiseba40652007-08-30 20:10:57 +000013001 { echo "$as_me:$LINENO: result: no" >&5
13002echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013004
13005rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013006 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013007 *) ;;
13008esac
13009
Guido van Rossum70c7f481998-03-26 18:44:10 +000013010# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013011# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013012{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13013echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013014if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13015 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013016else
Martin v. Löwis11437992002-04-12 09:54:03 +000013017 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013018LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013019cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013020/* confdefs.h. */
13021_ACEOF
13022cat confdefs.h >>conftest.$ac_ext
13023cat >>conftest.$ac_ext <<_ACEOF
13024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013025
Martin v. Löwiseba40652007-08-30 20:10:57 +000013026/* Override any GCC internal prototype to avoid an error.
13027 Use char because int might match the return type of a GCC
13028 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013029#ifdef __cplusplus
13030extern "C"
13031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013032char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013033int
13034main ()
13035{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013036return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013037 ;
13038 return 0;
13039}
13040_ACEOF
13041rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013042if { (ac_try="$ac_link"
13043case "(($ac_try" in
13044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13045 *) ac_try_echo=$ac_try;;
13046esac
13047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13048 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013050 grep -v '^ *+' conftest.er1 >conftest.err
13051 rm -f conftest.er1
13052 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013054 (exit $ac_status); } && {
13055 test -z "$ac_c_werror_flag" ||
13056 test ! -s conftest.err
13057 } && test -s conftest$ac_exeext &&
13058 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013059 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013060else
Martin v. Löwis11437992002-04-12 09:54:03 +000013061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013062sed 's/^/| /' conftest.$ac_ext >&5
13063
Martin v. Löwiseba40652007-08-30 20:10:57 +000013064 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013066
13067rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013068 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013069LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013071{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13072echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013073if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013074 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013075fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013076 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013077{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13078echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013079if test "${ac_cv_lib_socket_socket+set}" = set; then
13080 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013081else
Martin v. Löwis11437992002-04-12 09:54:03 +000013082 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013083LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013084cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013085/* confdefs.h. */
13086_ACEOF
13087cat confdefs.h >>conftest.$ac_ext
13088cat >>conftest.$ac_ext <<_ACEOF
13089/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013090
Martin v. Löwiseba40652007-08-30 20:10:57 +000013091/* Override any GCC internal prototype to avoid an error.
13092 Use char because int might match the return type of a GCC
13093 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013094#ifdef __cplusplus
13095extern "C"
13096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013097char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013098int
13099main ()
13100{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013101return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 ;
13103 return 0;
13104}
13105_ACEOF
13106rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013107if { (ac_try="$ac_link"
13108case "(($ac_try" in
13109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13110 *) ac_try_echo=$ac_try;;
13111esac
13112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13113 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013115 grep -v '^ *+' conftest.er1 >conftest.err
13116 rm -f conftest.er1
13117 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013119 (exit $ac_status); } && {
13120 test -z "$ac_c_werror_flag" ||
13121 test ! -s conftest.err
13122 } && test -s conftest$ac_exeext &&
13123 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013124 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013125else
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013127sed 's/^/| /' conftest.$ac_ext >&5
13128
Martin v. Löwiseba40652007-08-30 20:10:57 +000013129 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013131
13132rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013134LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013136{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13137echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013138if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013139 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013140fi
13141 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013142
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013143case "$ac_sys_system" in
13144BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013145{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13146echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013147if test "${ac_cv_lib_net_socket+set}" = set; then
13148 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013149else
Martin v. Löwis11437992002-04-12 09:54:03 +000013150 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013151LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013152cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013153/* confdefs.h. */
13154_ACEOF
13155cat confdefs.h >>conftest.$ac_ext
13156cat >>conftest.$ac_ext <<_ACEOF
13157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013158
Martin v. Löwiseba40652007-08-30 20:10:57 +000013159/* Override any GCC internal prototype to avoid an error.
13160 Use char because int might match the return type of a GCC
13161 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013162#ifdef __cplusplus
13163extern "C"
13164#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013165char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013166int
13167main ()
13168{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013169return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013170 ;
13171 return 0;
13172}
13173_ACEOF
13174rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013175if { (ac_try="$ac_link"
13176case "(($ac_try" in
13177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13178 *) ac_try_echo=$ac_try;;
13179esac
13180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13181 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013183 grep -v '^ *+' conftest.er1 >conftest.err
13184 rm -f conftest.er1
13185 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013187 (exit $ac_status); } && {
13188 test -z "$ac_c_werror_flag" ||
13189 test ! -s conftest.err
13190 } && test -s conftest$ac_exeext &&
13191 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013192 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013193else
Martin v. Löwis11437992002-04-12 09:54:03 +000013194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013195sed 's/^/| /' conftest.$ac_ext >&5
13196
Martin v. Löwiseba40652007-08-30 20:10:57 +000013197 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013199
13200rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013201 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013202LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013204{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13205echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013206if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013207 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013208fi
13209 # BeOS
13210;;
13211esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013212
Martin v. Löwiseba40652007-08-30 20:10:57 +000013213{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13214echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013215
Martin v. Löwiseba40652007-08-30 20:10:57 +000013216# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013217if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013218 withval=$with_libs;
13219{ echo "$as_me:$LINENO: result: $withval" >&5
13220echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013221LIBS="$withval $LIBS"
13222
13223else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013224 { echo "$as_me:$LINENO: result: no" >&5
13225echo "${ECHO_T}no" >&6; }
13226fi
13227
Guido van Rossum7f43da71994-08-01 12:15:30 +000013228
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013229# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013230{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13231echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013232
Martin v. Löwiseba40652007-08-30 20:10:57 +000013233# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013234if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013235 withval=$with_system_ffi;
13236fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013237
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013238
Martin v. Löwiseba40652007-08-30 20:10:57 +000013239{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13240echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013241
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013242# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013243
13244
Martin v. Löwiseba40652007-08-30 20:10:57 +000013245{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13246echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013247
Martin v. Löwiseba40652007-08-30 20:10:57 +000013248# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013249if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013250 withval=$with_signal_module;
13251fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013252
13253
13254if test -z "$with_signal_module"
13255then with_signal_module="yes"
13256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013257{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13258echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013259
13260if test "${with_signal_module}" = "yes"; then
13261 USE_SIGNAL_MODULE=""
13262 SIGNAL_OBJS=""
13263else
13264 USE_SIGNAL_MODULE="#"
13265 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13266fi
13267
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013268# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013269
Barry Warsawc0d24d82000-06-29 16:12:00 +000013270USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013271
Martin v. Löwiseba40652007-08-30 20:10:57 +000013272{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13273echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013274
Guido van Rossumec2f0731997-01-22 20:54:01 +000013275
Martin v. Löwiseba40652007-08-30 20:10:57 +000013276# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013277if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013278 withval=$with_dec_threads;
13279{ echo "$as_me:$LINENO: result: $withval" >&5
13280echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013281LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013282if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013283 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013284fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013285else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013286 { echo "$as_me:$LINENO: result: no" >&5
13287echo "${ECHO_T}no" >&6; }
13288fi
13289
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
13291# Templates for things AC_DEFINEd more than once.
13292# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013293
13294
Martin v. Löwis11437992002-04-12 09:54:03 +000013295
13296
13297
13298
13299
Martin v. Löwiseba40652007-08-30 20:10:57 +000013300{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13301echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013302
Martin v. Löwiseba40652007-08-30 20:10:57 +000013303# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013304if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013305 withval=$with_threads;
13306fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013307
13308
Barry Warsawc0d24d82000-06-29 16:12:00 +000013309# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013310
Martin v. Löwiseba40652007-08-30 20:10:57 +000013311# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013312if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013313 withval=$with_thread; with_threads=$with_thread
13314fi
13315
Barry Warsawc0d24d82000-06-29 16:12:00 +000013316
13317if test -z "$with_threads"
13318then with_threads="yes"
13319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013320{ echo "$as_me:$LINENO: result: $with_threads" >&5
13321echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013322
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013323
Barry Warsawc0d24d82000-06-29 16:12:00 +000013324if test "$with_threads" = "no"
13325then
13326 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013327elif test "$ac_cv_pthread_is_default" = yes
13328then
Martin v. Löwis11437992002-04-12 09:54:03 +000013329 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013330#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013331_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013332
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013333 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013334 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013335#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013336_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013337
13338 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013339 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013340elif test "$ac_cv_kpthread" = "yes"
13341then
13342 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013343 if test "$ac_cv_cxx_thread" = "yes"; then
13344 CXX="$CXX -Kpthread"
13345 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013347#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013348_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013349
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013350 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013351 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013352elif test "$ac_cv_kthread" = "yes"
13353then
13354 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013355 if test "$ac_cv_cxx_thread" = "yes"; then
13356 CXX="$CXX -Kthread"
13357 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013358 cat >>confdefs.h <<\_ACEOF
13359#define WITH_THREAD 1
13360_ACEOF
13361
13362 posix_threads=yes
13363 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013364elif test "$ac_cv_pthread" = "yes"
13365then
13366 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013367 if test "$ac_cv_cxx_thread" = "yes"; then
13368 CXX="$CXX -pthread"
13369 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013370 cat >>confdefs.h <<\_ACEOF
13371#define WITH_THREAD 1
13372_ACEOF
13373
13374 posix_threads=yes
13375 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013376else
13377 if test ! -z "$with_threads" -a -d "$with_threads"
13378 then LDFLAGS="$LDFLAGS -L$with_threads"
13379 fi
13380 if test ! -z "$withval" -a -d "$withval"
13381 then LDFLAGS="$LDFLAGS -L$withval"
13382 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013383
13384 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013385 # define _POSIX_THREADS in unistd.h. Some apparently don't
13386 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013387 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13388echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013390/* confdefs.h. */
13391_ACEOF
13392cat confdefs.h >>conftest.$ac_ext
13393cat >>conftest.$ac_ext <<_ACEOF
13394/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013395
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013396#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013397#ifdef _POSIX_THREADS
13398yes
13399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013400
13401_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013403 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013404 unistd_defines_pthreads=yes
13405else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013406 unistd_defines_pthreads=no
13407fi
13408rm -f conftest*
13409
Martin v. Löwiseba40652007-08-30 20:10:57 +000013410 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13411echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013414#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013415_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013416
Martin v. Löwis11437992002-04-12 09:54:03 +000013417 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013418 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13419echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013420if test "${ac_cv_header_cthreads_h+set}" = set; then
13421 echo $ECHO_N "(cached) $ECHO_C" >&6
13422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13424echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013425else
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013427{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13428echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013429cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013430/* confdefs.h. */
13431_ACEOF
13432cat confdefs.h >>conftest.$ac_ext
13433cat >>conftest.$ac_ext <<_ACEOF
13434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013435$ac_includes_default
13436#include <cthreads.h>
13437_ACEOF
13438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013439if { (ac_try="$ac_compile"
13440case "(($ac_try" in
13441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13442 *) ac_try_echo=$ac_try;;
13443esac
13444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013447 grep -v '^ *+' conftest.er1 >conftest.err
13448 rm -f conftest.er1
13449 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013451 (exit $ac_status); } && {
13452 test -z "$ac_c_werror_flag" ||
13453 test ! -s conftest.err
13454 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013455 ac_header_compiler=yes
13456else
13457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013458sed 's/^/| /' conftest.$ac_ext >&5
13459
Martin v. Löwiseba40652007-08-30 20:10:57 +000013460 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013462
13463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13464{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13465echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013466
13467# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013468{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13469echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013470cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013471/* confdefs.h. */
13472_ACEOF
13473cat confdefs.h >>conftest.$ac_ext
13474cat >>conftest.$ac_ext <<_ACEOF
13475/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013476#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013477_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013478if { (ac_try="$ac_cpp conftest.$ac_ext"
13479case "(($ac_try" in
13480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13481 *) ac_try_echo=$ac_try;;
13482esac
13483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13484 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013485 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013486 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013487 rm -f conftest.er1
13488 cat conftest.err >&5
13489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013490 (exit $ac_status); } >/dev/null && {
13491 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13492 test ! -s conftest.err
13493 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013494 ac_header_preproc=yes
13495else
13496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013497sed 's/^/| /' conftest.$ac_ext >&5
13498
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013501
Martin v. Löwis11437992002-04-12 09:54:03 +000013502rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013503{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13504echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013505
13506# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013507case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13508 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013509 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13510echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013511 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13512echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13513 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013514 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013515 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013516 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13517echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013518 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13519echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13520 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13521echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13522 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13523echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013524 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13525echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013526 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13527echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013528 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013529## ------------------------------------------------ ##
13530## Report this to http://www.python.org/python-bugs ##
13531## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013532_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013533 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013534 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013535esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013536{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13537echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013538if test "${ac_cv_header_cthreads_h+set}" = set; then
13539 echo $ECHO_N "(cached) $ECHO_C" >&6
13540else
13541 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013543{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13544echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
13546fi
13547if test $ac_cv_header_cthreads_h = yes; then
13548 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013549#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013550_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013551
Martin v. Löwis11437992002-04-12 09:54:03 +000013552 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013553#define C_THREADS 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
13557cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013558#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013559_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013560
13561 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013562 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013563else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013564
Martin v. Löwis11437992002-04-12 09:54:03 +000013565 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013566 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13567echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013568if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13569 echo $ECHO_N "(cached) $ECHO_C" >&6
13570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013571{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13572echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013573else
Martin v. Löwis11437992002-04-12 09:54:03 +000013574 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013575{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13576echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013577cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013578/* confdefs.h. */
13579_ACEOF
13580cat confdefs.h >>conftest.$ac_ext
13581cat >>conftest.$ac_ext <<_ACEOF
13582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013583$ac_includes_default
13584#include <mach/cthreads.h>
13585_ACEOF
13586rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013587if { (ac_try="$ac_compile"
13588case "(($ac_try" in
13589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13590 *) ac_try_echo=$ac_try;;
13591esac
13592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13593 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013595 grep -v '^ *+' conftest.er1 >conftest.err
13596 rm -f conftest.er1
13597 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013599 (exit $ac_status); } && {
13600 test -z "$ac_c_werror_flag" ||
13601 test ! -s conftest.err
13602 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013603 ac_header_compiler=yes
13604else
13605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013606sed 's/^/| /' conftest.$ac_ext >&5
13607
Martin v. Löwiseba40652007-08-30 20:10:57 +000013608 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013610
13611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13612{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13613echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013614
13615# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013616{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13617echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013619/* confdefs.h. */
13620_ACEOF
13621cat confdefs.h >>conftest.$ac_ext
13622cat >>conftest.$ac_ext <<_ACEOF
13623/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013624#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013625_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013626if { (ac_try="$ac_cpp conftest.$ac_ext"
13627case "(($ac_try" in
13628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13629 *) ac_try_echo=$ac_try;;
13630esac
13631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13632 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013633 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013634 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013635 rm -f conftest.er1
13636 cat conftest.err >&5
13637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013638 (exit $ac_status); } >/dev/null && {
13639 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13640 test ! -s conftest.err
13641 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013642 ac_header_preproc=yes
13643else
13644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013645sed 's/^/| /' conftest.$ac_ext >&5
13646
Martin v. Löwis11437992002-04-12 09:54:03 +000013647 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013649
Martin v. Löwis11437992002-04-12 09:54:03 +000013650rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013651{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13652echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013653
13654# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013655case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13656 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013657 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13658echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013659 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13660echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13661 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013662 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013663 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013664 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13665echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013666 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13667echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13668 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13669echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13670 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13671echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013672 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13673echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013674 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13675echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013676 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013677## ------------------------------------------------ ##
13678## Report this to http://www.python.org/python-bugs ##
13679## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013680_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013681 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013682 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013683esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013684{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13685echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013686if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13687 echo $ECHO_N "(cached) $ECHO_C" >&6
13688else
13689 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013691{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13692echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013693
13694fi
13695if test $ac_cv_header_mach_cthreads_h = yes; then
13696 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013697#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013698_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013699
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013701#define C_THREADS 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
13705cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013706#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013707_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013708
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013709 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013710else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013711
Martin v. Löwiseba40652007-08-30 20:10:57 +000013712 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13713echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013714
Martin v. Löwiseba40652007-08-30 20:10:57 +000013715# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013716if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013717 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13718echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013719 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013720#define WITH_THREAD 1
13721_ACEOF
13722
13723
13724cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013725#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013726_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013727
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013728 LIBS="-lpth $LIBS"
13729 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013730else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013731 { echo "$as_me:$LINENO: result: no" >&5
13732echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013733
13734 # Just looking for pthread_create in libpthread is not enough:
13735 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13736 # So we really have to include pthread.h, and then link.
13737 _libs=$LIBS
13738 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013739 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13740echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013742/* confdefs.h. */
13743_ACEOF
13744cat confdefs.h >>conftest.$ac_ext
13745cat >>conftest.$ac_ext <<_ACEOF
13746/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013747#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013748
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013749void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013750int
13751main ()
13752{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013753
13754pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013755 ;
13756 return 0;
13757}
13758_ACEOF
13759rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013760if { (ac_try="$ac_link"
13761case "(($ac_try" in
13762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13763 *) ac_try_echo=$ac_try;;
13764esac
13765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13766 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013768 grep -v '^ *+' conftest.er1 >conftest.err
13769 rm -f conftest.er1
13770 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013772 (exit $ac_status); } && {
13773 test -z "$ac_c_werror_flag" ||
13774 test ! -s conftest.err
13775 } && test -s conftest$ac_exeext &&
13776 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013777
Martin v. Löwiseba40652007-08-30 20:10:57 +000013778 { echo "$as_me:$LINENO: result: yes" >&5
13779echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013781#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013782_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013783
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013784 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013785 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013786else
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013788sed 's/^/| /' conftest.$ac_ext >&5
13789
Martin v. Löwis11437992002-04-12 09:54:03 +000013790
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013791 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013792 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13793echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013794if test "${ac_cv_func_pthread_detach+set}" = set; then
13795 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013796else
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013798/* confdefs.h. */
13799_ACEOF
13800cat confdefs.h >>conftest.$ac_ext
13801cat >>conftest.$ac_ext <<_ACEOF
13802/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013803/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13804 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13805#define pthread_detach innocuous_pthread_detach
13806
Guido van Rossumad678af1998-10-02 14:42:15 +000013807/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013808 which can conflict with char pthread_detach (); below.
13809 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013810 <limits.h> exists even on freestanding compilers. */
13811
13812#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013813# include <limits.h>
13814#else
13815# include <assert.h>
13816#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013817
13818#undef pthread_detach
13819
Martin v. Löwiseba40652007-08-30 20:10:57 +000013820/* Override any GCC internal prototype to avoid an error.
13821 Use char because int might match the return type of a GCC
13822 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013823#ifdef __cplusplus
13824extern "C"
13825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013826char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013827/* The GNU C library defines this for functions which it implements
13828 to always fail with ENOSYS. Some functions are actually named
13829 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013830#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013831choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013832#endif
13833
Skip Montanaro6dead952003-09-25 14:50:04 +000013834int
13835main ()
13836{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013837return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 ;
13839 return 0;
13840}
13841_ACEOF
13842rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013843if { (ac_try="$ac_link"
13844case "(($ac_try" in
13845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13846 *) ac_try_echo=$ac_try;;
13847esac
13848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13849 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013851 grep -v '^ *+' conftest.er1 >conftest.err
13852 rm -f conftest.er1
13853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013855 (exit $ac_status); } && {
13856 test -z "$ac_c_werror_flag" ||
13857 test ! -s conftest.err
13858 } && test -s conftest$ac_exeext &&
13859 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013860 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013861else
Martin v. Löwis11437992002-04-12 09:54:03 +000013862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013863sed 's/^/| /' conftest.$ac_ext >&5
13864
Martin v. Löwiseba40652007-08-30 20:10:57 +000013865 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013867
13868rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013869 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013871{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13872echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013873if test $ac_cv_func_pthread_detach = yes; then
13874 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013875#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013876_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013877
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013878 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013879 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013880else
Guido van Rossumad678af1998-10-02 14:42:15 +000013881
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013882 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013883 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13884echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013885if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13886 echo $ECHO_N "(cached) $ECHO_C" >&6
13887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013888{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13889echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013890else
13891 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013892{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13893echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013895/* confdefs.h. */
13896_ACEOF
13897cat confdefs.h >>conftest.$ac_ext
13898cat >>conftest.$ac_ext <<_ACEOF
13899/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013900$ac_includes_default
13901#include <atheos/threads.h>
13902_ACEOF
13903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013904if { (ac_try="$ac_compile"
13905case "(($ac_try" in
13906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13907 *) ac_try_echo=$ac_try;;
13908esac
13909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013912 grep -v '^ *+' conftest.er1 >conftest.err
13913 rm -f conftest.er1
13914 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013916 (exit $ac_status); } && {
13917 test -z "$ac_c_werror_flag" ||
13918 test ! -s conftest.err
13919 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013920 ac_header_compiler=yes
13921else
13922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013923sed 's/^/| /' conftest.$ac_ext >&5
13924
Martin v. Löwiseba40652007-08-30 20:10:57 +000013925 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013927
13928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13929{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13930echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013931
13932# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013933{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13934echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013935cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013936/* confdefs.h. */
13937_ACEOF
13938cat confdefs.h >>conftest.$ac_ext
13939cat >>conftest.$ac_ext <<_ACEOF
13940/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013941#include <atheos/threads.h>
13942_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013943if { (ac_try="$ac_cpp conftest.$ac_ext"
13944case "(($ac_try" in
13945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13946 *) ac_try_echo=$ac_try;;
13947esac
13948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13949 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013950 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013951 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013952 rm -f conftest.er1
13953 cat conftest.err >&5
13954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013955 (exit $ac_status); } >/dev/null && {
13956 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13957 test ! -s conftest.err
13958 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013959 ac_header_preproc=yes
13960else
13961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013962sed 's/^/| /' conftest.$ac_ext >&5
13963
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013964 ac_header_preproc=no
13965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013966
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013967rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013968{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13969echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013970
13971# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013972case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13973 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013974 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13975echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013976 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
13977echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
13978 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013979 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013980 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013981 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
13982echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013983 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
13984echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
13985 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
13986echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
13987 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
13988echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013989 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
13990echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013991 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
13992echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013993 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013994## ------------------------------------------------ ##
13995## Report this to http://www.python.org/python-bugs ##
13996## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013997_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013998 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013999 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014000esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014001{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14002echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014003if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14004 echo $ECHO_N "(cached) $ECHO_C" >&6
14005else
14006 ac_cv_header_atheos_threads_h=$ac_header_preproc
14007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014008{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14009echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014010
14011fi
14012if test $ac_cv_header_atheos_threads_h = yes; then
14013 cat >>confdefs.h <<\_ACEOF
14014#define WITH_THREAD 1
14015_ACEOF
14016
14017
14018cat >>confdefs.h <<\_ACEOF
14019#define ATHEOS_THREADS 1
14020_ACEOF
14021
14022 THREADOBJ="Python/thread.o"
14023else
14024
Martin v. Löwis11437992002-04-12 09:54:03 +000014025 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014026 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14027echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014028if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14029 echo $ECHO_N "(cached) $ECHO_C" >&6
14030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014031{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14032echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014033else
Martin v. Löwis11437992002-04-12 09:54:03 +000014034 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014035{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14036echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014037cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014038/* confdefs.h. */
14039_ACEOF
14040cat confdefs.h >>conftest.$ac_ext
14041cat >>conftest.$ac_ext <<_ACEOF
14042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014043$ac_includes_default
14044#include <kernel/OS.h>
14045_ACEOF
14046rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014047if { (ac_try="$ac_compile"
14048case "(($ac_try" in
14049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14050 *) ac_try_echo=$ac_try;;
14051esac
14052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14053 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014055 grep -v '^ *+' conftest.er1 >conftest.err
14056 rm -f conftest.er1
14057 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014059 (exit $ac_status); } && {
14060 test -z "$ac_c_werror_flag" ||
14061 test ! -s conftest.err
14062 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 ac_header_compiler=yes
14064else
14065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014066sed 's/^/| /' conftest.$ac_ext >&5
14067
Martin v. Löwiseba40652007-08-30 20:10:57 +000014068 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014070
14071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14072{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14073echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014074
14075# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014076{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14077echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014078cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014079/* confdefs.h. */
14080_ACEOF
14081cat confdefs.h >>conftest.$ac_ext
14082cat >>conftest.$ac_ext <<_ACEOF
14083/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014084#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014085_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014086if { (ac_try="$ac_cpp conftest.$ac_ext"
14087case "(($ac_try" in
14088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14089 *) ac_try_echo=$ac_try;;
14090esac
14091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14092 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014093 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014094 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014095 rm -f conftest.er1
14096 cat conftest.err >&5
14097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014098 (exit $ac_status); } >/dev/null && {
14099 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14100 test ! -s conftest.err
14101 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014102 ac_header_preproc=yes
14103else
14104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014105sed 's/^/| /' conftest.$ac_ext >&5
14106
Martin v. Löwis11437992002-04-12 09:54:03 +000014107 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014108fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014109
Martin v. Löwis11437992002-04-12 09:54:03 +000014110rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014111{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14112echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014113
Martin v. Löwis11437992002-04-12 09:54:03 +000014114# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014115case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14116 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014117 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14118echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014119 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14120echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14121 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014122 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014123 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014124 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14125echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014126 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14127echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14128 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14129echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14130 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14131echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014132 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14133echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014134 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14135echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014136 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014137## ------------------------------------------------ ##
14138## Report this to http://www.python.org/python-bugs ##
14139## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014140_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014141 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014142 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014143esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014144{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14145echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014146if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14147 echo $ECHO_N "(cached) $ECHO_C" >&6
14148else
14149 ac_cv_header_kernel_OS_h=$ac_header_preproc
14150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014151{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14152echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014153
14154fi
14155if test $ac_cv_header_kernel_OS_h = yes; then
14156 cat >>confdefs.h <<\_ACEOF
14157#define WITH_THREAD 1
14158_ACEOF
14159
14160
14161cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014162#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014163_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014164
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014165 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014166else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014167
Martin v. Löwiseba40652007-08-30 20:10:57 +000014168 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14169echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014170if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014172else
Martin v. Löwis11437992002-04-12 09:54:03 +000014173 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014174LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014175cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014176/* confdefs.h. */
14177_ACEOF
14178cat confdefs.h >>conftest.$ac_ext
14179cat >>conftest.$ac_ext <<_ACEOF
14180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014181
Martin v. Löwiseba40652007-08-30 20:10:57 +000014182/* Override any GCC internal prototype to avoid an error.
14183 Use char because int might match the return type of a GCC
14184 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014185#ifdef __cplusplus
14186extern "C"
14187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014188char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014189int
14190main ()
14191{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014192return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014193 ;
14194 return 0;
14195}
14196_ACEOF
14197rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014198if { (ac_try="$ac_link"
14199case "(($ac_try" in
14200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14201 *) ac_try_echo=$ac_try;;
14202esac
14203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14204 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014206 grep -v '^ *+' conftest.er1 >conftest.err
14207 rm -f conftest.er1
14208 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014210 (exit $ac_status); } && {
14211 test -z "$ac_c_werror_flag" ||
14212 test ! -s conftest.err
14213 } && test -s conftest$ac_exeext &&
14214 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014215 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014216else
Martin v. Löwis11437992002-04-12 09:54:03 +000014217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014218sed 's/^/| /' conftest.$ac_ext >&5
14219
Martin v. Löwiseba40652007-08-30 20:10:57 +000014220 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014222
14223rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014224 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014225LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014227{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14228echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014229if test $ac_cv_lib_pthreads_pthread_create = yes; then
14230 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014231#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014232_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014233
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014234 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014235 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014236 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014237else
Greg Steinadf63d62000-07-05 10:38:09 +000014238
Martin v. Löwiseba40652007-08-30 20:10:57 +000014239 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14240echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014241if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14242 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014243else
Martin v. Löwis11437992002-04-12 09:54:03 +000014244 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014245LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014247/* confdefs.h. */
14248_ACEOF
14249cat confdefs.h >>conftest.$ac_ext
14250cat >>conftest.$ac_ext <<_ACEOF
14251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014252
Martin v. Löwiseba40652007-08-30 20:10:57 +000014253/* Override any GCC internal prototype to avoid an error.
14254 Use char because int might match the return type of a GCC
14255 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014256#ifdef __cplusplus
14257extern "C"
14258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014259char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014260int
14261main ()
14262{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014263return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014264 ;
14265 return 0;
14266}
14267_ACEOF
14268rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014269if { (ac_try="$ac_link"
14270case "(($ac_try" in
14271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14272 *) ac_try_echo=$ac_try;;
14273esac
14274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14275 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014277 grep -v '^ *+' conftest.er1 >conftest.err
14278 rm -f conftest.er1
14279 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014281 (exit $ac_status); } && {
14282 test -z "$ac_c_werror_flag" ||
14283 test ! -s conftest.err
14284 } && test -s conftest$ac_exeext &&
14285 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014286 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014287else
Martin v. Löwis11437992002-04-12 09:54:03 +000014288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014289sed 's/^/| /' conftest.$ac_ext >&5
14290
Martin v. Löwiseba40652007-08-30 20:10:57 +000014291 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014293
14294rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014295 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014296LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014298{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14299echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014300if test $ac_cv_lib_c_r_pthread_create = yes; then
14301 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014302#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014303_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014304
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014305 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014306 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014307 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014308else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014309
Martin v. Löwiseba40652007-08-30 20:10:57 +000014310 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14311echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014312if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14313 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014314else
Martin v. Löwis11437992002-04-12 09:54:03 +000014315 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014316LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014318/* confdefs.h. */
14319_ACEOF
14320cat confdefs.h >>conftest.$ac_ext
14321cat >>conftest.$ac_ext <<_ACEOF
14322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014323
Martin v. Löwiseba40652007-08-30 20:10:57 +000014324/* Override any GCC internal prototype to avoid an error.
14325 Use char because int might match the return type of a GCC
14326 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014327#ifdef __cplusplus
14328extern "C"
14329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014330char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014331int
14332main ()
14333{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014334return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014335 ;
14336 return 0;
14337}
14338_ACEOF
14339rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014340if { (ac_try="$ac_link"
14341case "(($ac_try" in
14342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14343 *) ac_try_echo=$ac_try;;
14344esac
14345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14346 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014348 grep -v '^ *+' conftest.er1 >conftest.err
14349 rm -f conftest.er1
14350 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014352 (exit $ac_status); } && {
14353 test -z "$ac_c_werror_flag" ||
14354 test ! -s conftest.err
14355 } && test -s conftest$ac_exeext &&
14356 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014358else
Martin v. Löwis11437992002-04-12 09:54:03 +000014359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014360sed 's/^/| /' conftest.$ac_ext >&5
14361
Martin v. Löwiseba40652007-08-30 20:10:57 +000014362 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014364
14365rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014366 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014367LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014369{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14370echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014371if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14372 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014373#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014374_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014376 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014377 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014378 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014379else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014380
Martin v. Löwiseba40652007-08-30 20:10:57 +000014381 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14382echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014383if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014385else
Martin v. Löwis11437992002-04-12 09:54:03 +000014386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014387LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014388cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014389/* confdefs.h. */
14390_ACEOF
14391cat confdefs.h >>conftest.$ac_ext
14392cat >>conftest.$ac_ext <<_ACEOF
14393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014394
Martin v. Löwiseba40652007-08-30 20:10:57 +000014395/* Override any GCC internal prototype to avoid an error.
14396 Use char because int might match the return type of a GCC
14397 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014398#ifdef __cplusplus
14399extern "C"
14400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014401char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014402int
14403main ()
14404{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014405return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014406 ;
14407 return 0;
14408}
14409_ACEOF
14410rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014411if { (ac_try="$ac_link"
14412case "(($ac_try" in
14413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14414 *) ac_try_echo=$ac_try;;
14415esac
14416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14417 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014419 grep -v '^ *+' conftest.er1 >conftest.err
14420 rm -f conftest.er1
14421 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014423 (exit $ac_status); } && {
14424 test -z "$ac_c_werror_flag" ||
14425 test ! -s conftest.err
14426 } && test -s conftest$ac_exeext &&
14427 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014428 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014429else
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014431sed 's/^/| /' conftest.$ac_ext >&5
14432
Martin v. Löwiseba40652007-08-30 20:10:57 +000014433 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014435
14436rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014438LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014440{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14441echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014442if test $ac_cv_lib_cma_pthread_create = yes; then
14443 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014444#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014445_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014446
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014447 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014448 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014449 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014450else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014451
Martin v. Löwis130fb172001-07-19 11:00:41 +000014452 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014453fi
14454
Guido van Rossum627b2d71993-12-24 10:39:16 +000014455
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014456fi
14457
Guido van Rossum0be3e491997-05-22 20:33:33 +000014458fi
14459
Guido van Rossum49545951997-12-02 19:28:29 +000014460fi
14461
Guido van Rossumb93a8621998-05-07 13:27:32 +000014462fi
14463
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014464
Michael W. Hudson54241132001-12-07 15:38:26 +000014465fi
14466
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014467
14468fi
14469
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014471
14472rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014473 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014474fi
14475
Martin v. Löwis11437992002-04-12 09:54:03 +000014476fi
14477
14478
14479fi
14480
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014481
Michael W. Hudson54241132001-12-07 15:38:26 +000014482
Martin v. Löwiseba40652007-08-30 20:10:57 +000014483 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14484echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014485if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14486 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014487else
Martin v. Löwis11437992002-04-12 09:54:03 +000014488 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014489LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014490cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014491/* confdefs.h. */
14492_ACEOF
14493cat confdefs.h >>conftest.$ac_ext
14494cat >>conftest.$ac_ext <<_ACEOF
14495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014496
Martin v. Löwiseba40652007-08-30 20:10:57 +000014497/* Override any GCC internal prototype to avoid an error.
14498 Use char because int might match the return type of a GCC
14499 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014500#ifdef __cplusplus
14501extern "C"
14502#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014503char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014504int
14505main ()
14506{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014507return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014508 ;
14509 return 0;
14510}
14511_ACEOF
14512rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014513if { (ac_try="$ac_link"
14514case "(($ac_try" in
14515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14516 *) ac_try_echo=$ac_try;;
14517esac
14518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14519 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014521 grep -v '^ *+' conftest.er1 >conftest.err
14522 rm -f conftest.er1
14523 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014525 (exit $ac_status); } && {
14526 test -z "$ac_c_werror_flag" ||
14527 test ! -s conftest.err
14528 } && test -s conftest$ac_exeext &&
14529 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014530 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014531else
Martin v. Löwis11437992002-04-12 09:54:03 +000014532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014533sed 's/^/| /' conftest.$ac_ext >&5
14534
Martin v. Löwiseba40652007-08-30 20:10:57 +000014535 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014537
14538rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014540LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014542{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14543echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014544if test $ac_cv_lib_mpc_usconfig = yes; then
14545 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014546#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014547_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014548
Martin v. Löwis130fb172001-07-19 11:00:41 +000014549 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014550 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014551 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014552fi
14553
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014554
Neal Norwitza978ab02002-11-02 16:58:05 +000014555 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014556 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14557echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014558if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14559 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014560else
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014562LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014564/* confdefs.h. */
14565_ACEOF
14566cat confdefs.h >>conftest.$ac_ext
14567cat >>conftest.$ac_ext <<_ACEOF
14568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014569
Martin v. Löwiseba40652007-08-30 20:10:57 +000014570/* Override any GCC internal prototype to avoid an error.
14571 Use char because int might match the return type of a GCC
14572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014573#ifdef __cplusplus
14574extern "C"
14575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014576char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014577int
14578main ()
14579{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014580return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014581 ;
14582 return 0;
14583}
14584_ACEOF
14585rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014586if { (ac_try="$ac_link"
14587case "(($ac_try" in
14588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14589 *) ac_try_echo=$ac_try;;
14590esac
14591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14592 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014594 grep -v '^ *+' conftest.er1 >conftest.err
14595 rm -f conftest.er1
14596 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014598 (exit $ac_status); } && {
14599 test -z "$ac_c_werror_flag" ||
14600 test ! -s conftest.err
14601 } && test -s conftest$ac_exeext &&
14602 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014603 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014604else
Martin v. Löwis11437992002-04-12 09:54:03 +000014605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014606sed 's/^/| /' conftest.$ac_ext >&5
14607
Martin v. Löwiseba40652007-08-30 20:10:57 +000014608 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014610
14611rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014612 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014613LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014615{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14616echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014617if test $ac_cv_lib_thread_thr_create = yes; then
14618 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014619#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014620_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014621
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014622 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014623 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014624 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014625fi
14626
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014627 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014628
Martin v. Löwis130fb172001-07-19 11:00:41 +000014629 if test "$USE_THREAD_MODULE" != "#"
14630 then
14631 # If the above checks didn't disable threads, (at least) OSF1
14632 # needs this '-threads' argument during linking.
14633 case $ac_sys_system in
14634 OSF1) LDLAST=-threads;;
14635 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014636 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014637fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014638
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014639if test "$posix_threads" = "yes"; then
14640 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014641
14642cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014643#define _POSIX_THREADS 1
14644_ACEOF
14645
14646 fi
14647
14648 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14649 case $ac_sys_system/$ac_sys_release in
14650 SunOS/5.6)
14651cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014652#define HAVE_PTHREAD_DESTRUCTOR 1
14653_ACEOF
14654
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014655 ;;
14656 SunOS/5.8)
14657cat >>confdefs.h <<\_ACEOF
14658#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14659_ACEOF
14660
14661 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014662 AIX/5)
14663cat >>confdefs.h <<\_ACEOF
14664#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14665_ACEOF
14666
14667 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014668 esac
14669
Martin v. Löwiseba40652007-08-30 20:10:57 +000014670 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14671echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014672 if test "${ac_cv_pthread_system_supported+set}" = set; then
14673 echo $ECHO_N "(cached) $ECHO_C" >&6
14674else
14675 if test "$cross_compiling" = yes; then
14676 ac_cv_pthread_system_supported=no
14677else
14678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014679/* confdefs.h. */
14680_ACEOF
14681cat confdefs.h >>conftest.$ac_ext
14682cat >>conftest.$ac_ext <<_ACEOF
14683/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014684#include <pthread.h>
14685 void *foo(void *parm) {
14686 return NULL;
14687 }
14688 main() {
14689 pthread_attr_t attr;
14690 pthread_t id;
14691 if (pthread_attr_init(&attr)) exit(-1);
14692 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14693 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14694 exit(0);
14695 }
14696_ACEOF
14697rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014698if { (ac_try="$ac_link"
14699case "(($ac_try" in
14700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14701 *) ac_try_echo=$ac_try;;
14702esac
14703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14704 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014705 ac_status=$?
14706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14707 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014708 { (case "(($ac_try" in
14709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14710 *) ac_try_echo=$ac_try;;
14711esac
14712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14713 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014714 ac_status=$?
14715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14716 (exit $ac_status); }; }; then
14717 ac_cv_pthread_system_supported=yes
14718else
14719 echo "$as_me: program exited with status $ac_status" >&5
14720echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014721sed 's/^/| /' conftest.$ac_ext >&5
14722
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014723( exit $ac_status )
14724ac_cv_pthread_system_supported=no
14725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014726rm -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 +000014727fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014728
Martin v. Löwiseba40652007-08-30 20:10:57 +000014729
14730
Guido van Rossum627b2d71993-12-24 10:39:16 +000014731fi
14732
Martin v. Löwiseba40652007-08-30 20:10:57 +000014733 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14734echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014735 if test "$ac_cv_pthread_system_supported" = "yes"; then
14736
14737cat >>confdefs.h <<\_ACEOF
14738#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14739_ACEOF
14740
14741 fi
14742
14743for ac_func in pthread_sigmask
14744do
14745as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014746{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14747echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14748if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014749 echo $ECHO_N "(cached) $ECHO_C" >&6
14750else
14751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014752/* confdefs.h. */
14753_ACEOF
14754cat confdefs.h >>conftest.$ac_ext
14755cat >>conftest.$ac_ext <<_ACEOF
14756/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014757/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14758 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14759#define $ac_func innocuous_$ac_func
14760
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014761/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014762 which can conflict with char $ac_func (); below.
14763 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014764 <limits.h> exists even on freestanding compilers. */
14765
14766#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014767# include <limits.h>
14768#else
14769# include <assert.h>
14770#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014771
14772#undef $ac_func
14773
Martin v. Löwiseba40652007-08-30 20:10:57 +000014774/* Override any GCC internal prototype to avoid an error.
14775 Use char because int might match the return type of a GCC
14776 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014777#ifdef __cplusplus
14778extern "C"
14779#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014780char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014781/* The GNU C library defines this for functions which it implements
14782 to always fail with ENOSYS. Some functions are actually named
14783 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014784#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014785choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014786#endif
14787
Skip Montanaro6dead952003-09-25 14:50:04 +000014788int
14789main ()
14790{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014791return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014792 ;
14793 return 0;
14794}
14795_ACEOF
14796rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014797if { (ac_try="$ac_link"
14798case "(($ac_try" in
14799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14800 *) ac_try_echo=$ac_try;;
14801esac
14802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14803 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014805 grep -v '^ *+' conftest.er1 >conftest.err
14806 rm -f conftest.er1
14807 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014809 (exit $ac_status); } && {
14810 test -z "$ac_c_werror_flag" ||
14811 test ! -s conftest.err
14812 } && test -s conftest$ac_exeext &&
14813 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014814 eval "$as_ac_var=yes"
14815else
14816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014817sed 's/^/| /' conftest.$ac_ext >&5
14818
Martin v. Löwiseba40652007-08-30 20:10:57 +000014819 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014821
14822rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014823 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014825ac_res=`eval echo '${'$as_ac_var'}'`
14826 { echo "$as_me:$LINENO: result: $ac_res" >&5
14827echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014828if test `eval echo '${'$as_ac_var'}'` = yes; then
14829 cat >>confdefs.h <<_ACEOF
14830#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14831_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014832 case $ac_sys_system in
14833 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014834
Jason Tishlerfac083d2003-07-22 15:20:49 +000014835cat >>confdefs.h <<\_ACEOF
14836#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14837_ACEOF
14838
14839 ;;
14840 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014841fi
14842done
14843
14844fi
14845
14846
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014847# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014848
14849
Martin v. Löwiseba40652007-08-30 20:10:57 +000014850{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14851echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14852# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014853if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014854 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014855 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014856 { echo "$as_me:$LINENO: result: no" >&5
14857echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014858 ipv6=no
14859 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014860 *) { echo "$as_me:$LINENO: result: yes" >&5
14861echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014862 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014863#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014864_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014865
14866 ipv6=yes
14867 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014868 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014869else
Martin v. Löwis11437992002-04-12 09:54:03 +000014870
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014871 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014872 { echo "$as_me:$LINENO: result: no" >&5
14873echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014874 ipv6=no
14875
14876else
Martin v. Löwis11437992002-04-12 09:54:03 +000014877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014878/* confdefs.h. */
14879_ACEOF
14880cat confdefs.h >>conftest.$ac_ext
14881cat >>conftest.$ac_ext <<_ACEOF
14882/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014883 /* AF_INET6 available check */
14884#include <sys/types.h>
14885#include <sys/socket.h>
14886main()
14887{
14888 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14889 exit(1);
14890 else
14891 exit(0);
14892}
14893
Martin v. Löwis11437992002-04-12 09:54:03 +000014894_ACEOF
14895rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014896if { (ac_try="$ac_link"
14897case "(($ac_try" in
14898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14899 *) ac_try_echo=$ac_try;;
14900esac
14901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14902 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014903 ac_status=$?
14904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14905 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014906 { (case "(($ac_try" in
14907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14908 *) ac_try_echo=$ac_try;;
14909esac
14910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14911 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014912 ac_status=$?
14913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14914 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014915 { echo "$as_me:$LINENO: result: yes" >&5
14916echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014917 ipv6=yes
14918else
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 echo "$as_me: program exited with status $ac_status" >&5
14920echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014921sed 's/^/| /' conftest.$ac_ext >&5
14922
Martin v. Löwis11437992002-04-12 09:54:03 +000014923( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014924{ echo "$as_me:$LINENO: result: no" >&5
14925echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014926 ipv6=no
14927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014928rm -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 +000014929fi
14930
Martin v. Löwiseba40652007-08-30 20:10:57 +000014931
14932
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014933if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014934 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14935echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014937/* confdefs.h. */
14938_ACEOF
14939cat confdefs.h >>conftest.$ac_ext
14940cat >>conftest.$ac_ext <<_ACEOF
14941/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014942#include <sys/types.h>
14943#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014944int
14945main ()
14946{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014947struct sockaddr_in6 x;
14948x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014949 ;
14950 return 0;
14951}
14952_ACEOF
14953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014954if { (ac_try="$ac_compile"
14955case "(($ac_try" in
14956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14957 *) ac_try_echo=$ac_try;;
14958esac
14959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014962 grep -v '^ *+' conftest.er1 >conftest.err
14963 rm -f conftest.er1
14964 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014966 (exit $ac_status); } && {
14967 test -z "$ac_c_werror_flag" ||
14968 test ! -s conftest.err
14969 } && test -s conftest.$ac_objext; then
14970 { echo "$as_me:$LINENO: result: yes" >&5
14971echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014972 ipv6=yes
14973else
Martin v. Löwis11437992002-04-12 09:54:03 +000014974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014975sed 's/^/| /' conftest.$ac_ext >&5
14976
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977 { echo "$as_me:$LINENO: result: no" >&5
14978echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014979 ipv6=no
14980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014981
14982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014983fi
14984
14985if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014986 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014987#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014988_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014989
14990fi
14991
Martin v. Löwiseba40652007-08-30 20:10:57 +000014992fi
14993
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014994
14995ipv6type=unknown
14996ipv6lib=none
14997ipv6trylibc=no
14998
14999if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015000 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15001echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015002 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15003 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015004 case $i in
15005 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015007/* confdefs.h. */
15008_ACEOF
15009cat confdefs.h >>conftest.$ac_ext
15010cat >>conftest.$ac_ext <<_ACEOF
15011/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015012
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015013#include <netinet/in.h>
15014#ifdef IPV6_INRIA_VERSION
15015yes
15016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015017_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015019 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015020 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015021fi
15022rm -f conftest*
15023
15024 ;;
15025 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015027/* confdefs.h. */
15028_ACEOF
15029cat confdefs.h >>conftest.$ac_ext
15030cat >>conftest.$ac_ext <<_ACEOF
15031/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015032
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015033#include <netinet/in.h>
15034#ifdef __KAME__
15035yes
15036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015037_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015039 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015040 ipv6type=$i;
15041 ipv6lib=inet6
15042 ipv6libdir=/usr/local/v6/lib
15043 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015044fi
15045rm -f conftest*
15046
15047 ;;
15048 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015050/* confdefs.h. */
15051_ACEOF
15052cat confdefs.h >>conftest.$ac_ext
15053cat >>conftest.$ac_ext <<_ACEOF
15054/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015055
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015056#include <features.h>
15057#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15058yes
15059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015060_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015062 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015063 ipv6type=$i;
15064 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015065fi
15066rm -f conftest*
15067
15068 ;;
15069 linux-inet6)
15070 if test -d /usr/inet6; then
15071 ipv6type=$i
15072 ipv6lib=inet6
15073 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015074 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015075 fi
15076 ;;
15077 solaris)
15078 if test -f /etc/netconfig; then
15079 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15080 ipv6type=$i
15081 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015082 fi
15083 fi
15084 ;;
15085 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015087/* confdefs.h. */
15088_ACEOF
15089cat confdefs.h >>conftest.$ac_ext
15090cat >>conftest.$ac_ext <<_ACEOF
15091/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015092
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015093#include <sys/param.h>
15094#ifdef _TOSHIBA_INET6
15095yes
15096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015097_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015099 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015100 ipv6type=$i;
15101 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015102 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015103fi
15104rm -f conftest*
15105
15106 ;;
15107 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015109/* confdefs.h. */
15110_ACEOF
15111cat confdefs.h >>conftest.$ac_ext
15112cat >>conftest.$ac_ext <<_ACEOF
15113/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015114
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015115#include </usr/local/v6/include/sys/v6config.h>
15116#ifdef __V6D__
15117yes
15118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015119_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015121 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015122 ipv6type=$i;
15123 ipv6lib=v6;
15124 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015125 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015126fi
15127rm -f conftest*
15128
15129 ;;
15130 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015132/* confdefs.h. */
15133_ACEOF
15134cat confdefs.h >>conftest.$ac_ext
15135cat >>conftest.$ac_ext <<_ACEOF
15136/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015137
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015138#include <sys/param.h>
15139#ifdef _ZETA_MINAMI_INET6
15140yes
15141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015142_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015144 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015145 ipv6type=$i;
15146 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015147 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015148fi
15149rm -f conftest*
15150
15151 ;;
15152 esac
15153 if test "$ipv6type" != "unknown"; then
15154 break
15155 fi
15156 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015157 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15158echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015159fi
15160
15161if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15162 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15163 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15164 echo "using lib$ipv6lib"
15165 else
15166 if test $ipv6trylibc = "yes"; then
15167 echo "using libc"
15168 else
15169 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15170 echo "You need to fetch lib$ipv6lib.a from appropriate"
15171 echo 'ipv6 kit and compile beforehand.'
15172 exit 1
15173 fi
15174 fi
15175fi
15176
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015177# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015178{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15179echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015180
Martin v. Löwiseba40652007-08-30 20:10:57 +000015181# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015182if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015183 withval=$with_doc_strings;
15184fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015185
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015186
15187if test -z "$with_doc_strings"
15188then with_doc_strings="yes"
15189fi
15190if test "$with_doc_strings" != "no"
15191then
15192
15193cat >>confdefs.h <<\_ACEOF
15194#define WITH_DOC_STRINGS 1
15195_ACEOF
15196
15197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15199echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015200
Neil Schemenauera35c6882001-02-27 04:45:05 +000015201# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15203echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015204
Martin v. Löwiseba40652007-08-30 20:10:57 +000015205# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015206if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015207 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015208if test "$withval" != no
15209then
15210
15211cat >>confdefs.h <<\_ACEOF
15212#define WITH_TSC 1
15213_ACEOF
15214
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215 { echo "$as_me:$LINENO: result: yes" >&5
15216echo "${ECHO_T}yes" >&6; }
15217else { echo "$as_me:$LINENO: result: no" >&5
15218echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015219fi
15220else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015221 { echo "$as_me:$LINENO: result: no" >&5
15222echo "${ECHO_T}no" >&6; }
15223fi
15224
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015225
15226# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15228echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015229
Martin v. Löwiseba40652007-08-30 20:10:57 +000015230# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015231if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015232 withval=$with_pymalloc;
15233fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015234
Neil Schemenauera35c6882001-02-27 04:45:05 +000015235
Neil Schemenauer16c22972002-03-22 15:34:49 +000015236if test -z "$with_pymalloc"
15237then with_pymalloc="yes"
15238fi
15239if test "$with_pymalloc" != "no"
15240then
Martin v. Löwis11437992002-04-12 09:54:03 +000015241
15242cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015243#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015244_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015245
15246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015247{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15248echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015249
Barry Warsawef82cd72000-06-30 16:21:01 +000015250# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015251{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15252echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015253
Martin v. Löwiseba40652007-08-30 20:10:57 +000015254# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015255if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015256 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015257if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015258then
15259
15260cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015261#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015262_ACEOF
15263
Martin v. Löwiseba40652007-08-30 20:10:57 +000015264 { echo "$as_me:$LINENO: result: yes" >&5
15265echo "${ECHO_T}yes" >&6; }
15266else { echo "$as_me:$LINENO: result: no" >&5
15267echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015268fi
15269else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015270 { echo "$as_me:$LINENO: result: no" >&5
15271echo "${ECHO_T}no" >&6; }
15272fi
15273
Barry Warsawef82cd72000-06-30 16:21:01 +000015274
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015275# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015276
Guido van Rossum98935bf2001-09-05 19:13:16 +000015277DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015278
Guido van Rossume97ee181999-12-20 21:27:22 +000015279# the dlopen() function means we might want to use dynload_shlib.o. some
15280# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015281
Thomas Wouters3a584202000-08-05 23:28:51 +000015282for ac_func in dlopen
15283do
Martin v. Löwis11437992002-04-12 09:54:03 +000015284as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015285{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15286echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15287if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015289else
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015291/* confdefs.h. */
15292_ACEOF
15293cat confdefs.h >>conftest.$ac_ext
15294cat >>conftest.$ac_ext <<_ACEOF
15295/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015296/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15297 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15298#define $ac_func innocuous_$ac_func
15299
Guido van Rossume97ee181999-12-20 21:27:22 +000015300/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015301 which can conflict with char $ac_func (); below.
15302 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015303 <limits.h> exists even on freestanding compilers. */
15304
15305#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015306# include <limits.h>
15307#else
15308# include <assert.h>
15309#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015310
15311#undef $ac_func
15312
Martin v. Löwiseba40652007-08-30 20:10:57 +000015313/* Override any GCC internal prototype to avoid an error.
15314 Use char because int might match the return type of a GCC
15315 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015316#ifdef __cplusplus
15317extern "C"
15318#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015319char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015320/* The GNU C library defines this for functions which it implements
15321 to always fail with ENOSYS. Some functions are actually named
15322 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015323#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015324choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015325#endif
15326
Skip Montanaro6dead952003-09-25 14:50:04 +000015327int
15328main ()
15329{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015330return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015331 ;
15332 return 0;
15333}
15334_ACEOF
15335rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015336if { (ac_try="$ac_link"
15337case "(($ac_try" in
15338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15339 *) ac_try_echo=$ac_try;;
15340esac
15341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15342 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015344 grep -v '^ *+' conftest.er1 >conftest.err
15345 rm -f conftest.er1
15346 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015348 (exit $ac_status); } && {
15349 test -z "$ac_c_werror_flag" ||
15350 test ! -s conftest.err
15351 } && test -s conftest$ac_exeext &&
15352 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015353 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015354else
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015356sed 's/^/| /' conftest.$ac_ext >&5
15357
Martin v. Löwiseba40652007-08-30 20:10:57 +000015358 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015360
15361rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015362 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015364ac_res=`eval echo '${'$as_ac_var'}'`
15365 { echo "$as_me:$LINENO: result: $ac_res" >&5
15366echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015367if test `eval echo '${'$as_ac_var'}'` = yes; then
15368 cat >>confdefs.h <<_ACEOF
15369#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15370_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015371
Guido van Rossume97ee181999-12-20 21:27:22 +000015372fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015373done
Guido van Rossume97ee181999-12-20 21:27:22 +000015374
Michael W. Hudson54241132001-12-07 15:38:26 +000015375
Guido van Rossume97ee181999-12-20 21:27:22 +000015376# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15377# loading of modules.
15378
Martin v. Löwiseba40652007-08-30 20:10:57 +000015379{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15380echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015381if test -z "$DYNLOADFILE"
15382then
15383 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015384 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15385 if test "$ac_cv_func_dlopen" = yes
15386 then DYNLOADFILE="dynload_shlib.o"
15387 else DYNLOADFILE="dynload_aix.o"
15388 fi
15389 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015390 BeOS*) DYNLOADFILE="dynload_beos.o";;
15391 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015392 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15393 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015394 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015395 *)
15396 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15397 # out any dynamic loading
15398 if test "$ac_cv_func_dlopen" = yes
15399 then DYNLOADFILE="dynload_shlib.o"
15400 else DYNLOADFILE="dynload_stub.o"
15401 fi
15402 ;;
15403 esac
15404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015405{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15406echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015407if test "$DYNLOADFILE" != "dynload_stub.o"
15408then
Martin v. Löwis11437992002-04-12 09:54:03 +000015409
15410cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015411#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015412_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015413
15414fi
15415
Neil Schemenauer4e425612001-06-19 15:44:15 +000015416# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15417
Michael W. Hudson54241132001-12-07 15:38:26 +000015418
Martin v. Löwiseba40652007-08-30 20:10:57 +000015419{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15420echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015421if test -z "$MACHDEP_OBJS"
15422then
Jack Jansene578a632001-08-15 01:27:14 +000015423 MACHDEP_OBJS=$extra_machdep_objs
15424else
15425 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015427{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15428echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015429
Guido van Rossum627b2d71993-12-24 10:39:16 +000015430# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015431
15432
15433
15434
15435
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000015502
Martin v. Löwisc3001752005-01-23 09:27:24 +000015503
15504
Neal Norwitz05a45592006-03-20 06:30:08 +000015505
15506
Martin v. Löwis382abef2007-02-19 10:55:19 +000015507
15508
Christian Heimes36281872007-11-30 21:11:28 +000015509
Martin v. Löwisaef18b12008-03-24 13:31:16 +000015510
15511
15512for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
15513 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015514 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015515 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015516 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015517 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015518 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015519 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015520 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015521 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015522 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015523 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015524do
Martin v. Löwis11437992002-04-12 09:54:03 +000015525as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015526{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15527echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15528if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015529 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015530else
Martin v. Löwis11437992002-04-12 09:54:03 +000015531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015532/* confdefs.h. */
15533_ACEOF
15534cat confdefs.h >>conftest.$ac_ext
15535cat >>conftest.$ac_ext <<_ACEOF
15536/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015537/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15538 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15539#define $ac_func innocuous_$ac_func
15540
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015541/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015542 which can conflict with char $ac_func (); below.
15543 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015544 <limits.h> exists even on freestanding compilers. */
15545
15546#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015547# include <limits.h>
15548#else
15549# include <assert.h>
15550#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015551
15552#undef $ac_func
15553
Martin v. Löwiseba40652007-08-30 20:10:57 +000015554/* Override any GCC internal prototype to avoid an error.
15555 Use char because int might match the return type of a GCC
15556 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015557#ifdef __cplusplus
15558extern "C"
15559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015560char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015561/* The GNU C library defines this for functions which it implements
15562 to always fail with ENOSYS. Some functions are actually named
15563 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015564#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015565choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015566#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015567
Skip Montanaro6dead952003-09-25 14:50:04 +000015568int
15569main ()
15570{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015571return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015572 ;
15573 return 0;
15574}
15575_ACEOF
15576rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577if { (ac_try="$ac_link"
15578case "(($ac_try" in
15579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15580 *) ac_try_echo=$ac_try;;
15581esac
15582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15583 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015585 grep -v '^ *+' conftest.er1 >conftest.err
15586 rm -f conftest.er1
15587 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015589 (exit $ac_status); } && {
15590 test -z "$ac_c_werror_flag" ||
15591 test ! -s conftest.err
15592 } && test -s conftest$ac_exeext &&
15593 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015594 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015595else
Martin v. Löwis11437992002-04-12 09:54:03 +000015596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015597sed 's/^/| /' conftest.$ac_ext >&5
15598
Martin v. Löwiseba40652007-08-30 20:10:57 +000015599 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015601
15602rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015603 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605ac_res=`eval echo '${'$as_ac_var'}'`
15606 { echo "$as_me:$LINENO: result: $ac_res" >&5
15607echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015608if test `eval echo '${'$as_ac_var'}'` = yes; then
15609 cat >>confdefs.h <<_ACEOF
15610#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15611_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015612
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015613fi
15614done
15615
Michael W. Hudson54241132001-12-07 15:38:26 +000015616
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015617# For some functions, having a definition is not sufficient, since
15618# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015619{ echo "$as_me:$LINENO: checking for chroot" >&5
15620echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015622/* confdefs.h. */
15623_ACEOF
15624cat confdefs.h >>conftest.$ac_ext
15625cat >>conftest.$ac_ext <<_ACEOF
15626/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015627#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015628int
15629main ()
15630{
15631void *x=chroot
15632 ;
15633 return 0;
15634}
15635_ACEOF
15636rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015637if { (ac_try="$ac_compile"
15638case "(($ac_try" in
15639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15640 *) ac_try_echo=$ac_try;;
15641esac
15642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015645 grep -v '^ *+' conftest.er1 >conftest.err
15646 rm -f conftest.er1
15647 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015649 (exit $ac_status); } && {
15650 test -z "$ac_c_werror_flag" ||
15651 test ! -s conftest.err
15652 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015653
15654cat >>confdefs.h <<\_ACEOF
15655#define HAVE_CHROOT 1
15656_ACEOF
15657
Martin v. Löwiseba40652007-08-30 20:10:57 +000015658 { echo "$as_me:$LINENO: result: yes" >&5
15659echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015660else
15661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015662sed 's/^/| /' conftest.$ac_ext >&5
15663
Martin v. Löwiseba40652007-08-30 20:10:57 +000015664 { echo "$as_me:$LINENO: result: no" >&5
15665echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015666
15667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015668
15669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15670{ echo "$as_me:$LINENO: checking for link" >&5
15671echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015673/* confdefs.h. */
15674_ACEOF
15675cat confdefs.h >>conftest.$ac_ext
15676cat >>conftest.$ac_ext <<_ACEOF
15677/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015678#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015679int
15680main ()
15681{
15682void *x=link
15683 ;
15684 return 0;
15685}
15686_ACEOF
15687rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015688if { (ac_try="$ac_compile"
15689case "(($ac_try" in
15690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15691 *) ac_try_echo=$ac_try;;
15692esac
15693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15694 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015696 grep -v '^ *+' conftest.er1 >conftest.err
15697 rm -f conftest.er1
15698 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015700 (exit $ac_status); } && {
15701 test -z "$ac_c_werror_flag" ||
15702 test ! -s conftest.err
15703 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015704
15705cat >>confdefs.h <<\_ACEOF
15706#define HAVE_LINK 1
15707_ACEOF
15708
Martin v. Löwiseba40652007-08-30 20:10:57 +000015709 { echo "$as_me:$LINENO: result: yes" >&5
15710echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015711else
15712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015713sed 's/^/| /' conftest.$ac_ext >&5
15714
Martin v. Löwiseba40652007-08-30 20:10:57 +000015715 { echo "$as_me:$LINENO: result: no" >&5
15716echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015717
15718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015719
15720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15721{ echo "$as_me:$LINENO: checking for symlink" >&5
15722echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015723cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015724/* confdefs.h. */
15725_ACEOF
15726cat confdefs.h >>conftest.$ac_ext
15727cat >>conftest.$ac_ext <<_ACEOF
15728/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015729#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015730int
15731main ()
15732{
15733void *x=symlink
15734 ;
15735 return 0;
15736}
15737_ACEOF
15738rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015739if { (ac_try="$ac_compile"
15740case "(($ac_try" in
15741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15742 *) ac_try_echo=$ac_try;;
15743esac
15744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015747 grep -v '^ *+' conftest.er1 >conftest.err
15748 rm -f conftest.er1
15749 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015751 (exit $ac_status); } && {
15752 test -z "$ac_c_werror_flag" ||
15753 test ! -s conftest.err
15754 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015755
15756cat >>confdefs.h <<\_ACEOF
15757#define HAVE_SYMLINK 1
15758_ACEOF
15759
Martin v. Löwiseba40652007-08-30 20:10:57 +000015760 { echo "$as_me:$LINENO: result: yes" >&5
15761echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015762else
15763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015764sed 's/^/| /' conftest.$ac_ext >&5
15765
Martin v. Löwiseba40652007-08-30 20:10:57 +000015766 { echo "$as_me:$LINENO: result: no" >&5
15767echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015768
15769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015770
15771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15772{ echo "$as_me:$LINENO: checking for fchdir" >&5
15773echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015774cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015775/* confdefs.h. */
15776_ACEOF
15777cat confdefs.h >>conftest.$ac_ext
15778cat >>conftest.$ac_ext <<_ACEOF
15779/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015780#include <unistd.h>
15781int
15782main ()
15783{
15784void *x=fchdir
15785 ;
15786 return 0;
15787}
15788_ACEOF
15789rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015790if { (ac_try="$ac_compile"
15791case "(($ac_try" in
15792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15793 *) ac_try_echo=$ac_try;;
15794esac
15795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15796 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015798 grep -v '^ *+' conftest.er1 >conftest.err
15799 rm -f conftest.er1
15800 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015802 (exit $ac_status); } && {
15803 test -z "$ac_c_werror_flag" ||
15804 test ! -s conftest.err
15805 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015806
15807cat >>confdefs.h <<\_ACEOF
15808#define HAVE_FCHDIR 1
15809_ACEOF
15810
Martin v. Löwiseba40652007-08-30 20:10:57 +000015811 { echo "$as_me:$LINENO: result: yes" >&5
15812echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015813else
15814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015815sed 's/^/| /' conftest.$ac_ext >&5
15816
Martin v. Löwiseba40652007-08-30 20:10:57 +000015817 { echo "$as_me:$LINENO: result: no" >&5
15818echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015819
15820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015821
15822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15823{ echo "$as_me:$LINENO: checking for fsync" >&5
15824echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015825cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015826/* confdefs.h. */
15827_ACEOF
15828cat confdefs.h >>conftest.$ac_ext
15829cat >>conftest.$ac_ext <<_ACEOF
15830/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015831#include <unistd.h>
15832int
15833main ()
15834{
15835void *x=fsync
15836 ;
15837 return 0;
15838}
15839_ACEOF
15840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015841if { (ac_try="$ac_compile"
15842case "(($ac_try" in
15843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15844 *) ac_try_echo=$ac_try;;
15845esac
15846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015849 grep -v '^ *+' conftest.er1 >conftest.err
15850 rm -f conftest.er1
15851 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015853 (exit $ac_status); } && {
15854 test -z "$ac_c_werror_flag" ||
15855 test ! -s conftest.err
15856 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015857
15858cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015859#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015860_ACEOF
15861
Martin v. Löwiseba40652007-08-30 20:10:57 +000015862 { echo "$as_me:$LINENO: result: yes" >&5
15863echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015864else
15865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015866sed 's/^/| /' conftest.$ac_ext >&5
15867
Martin v. Löwiseba40652007-08-30 20:10:57 +000015868 { echo "$as_me:$LINENO: result: no" >&5
15869echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015870
15871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872
15873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15874{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15875echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015876cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015877/* confdefs.h. */
15878_ACEOF
15879cat confdefs.h >>conftest.$ac_ext
15880cat >>conftest.$ac_ext <<_ACEOF
15881/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015882#include <unistd.h>
15883int
15884main ()
15885{
15886void *x=fdatasync
15887 ;
15888 return 0;
15889}
15890_ACEOF
15891rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015892if { (ac_try="$ac_compile"
15893case "(($ac_try" in
15894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15895 *) ac_try_echo=$ac_try;;
15896esac
15897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015900 grep -v '^ *+' conftest.er1 >conftest.err
15901 rm -f conftest.er1
15902 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015904 (exit $ac_status); } && {
15905 test -z "$ac_c_werror_flag" ||
15906 test ! -s conftest.err
15907 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015908
15909cat >>confdefs.h <<\_ACEOF
15910#define HAVE_FDATASYNC 1
15911_ACEOF
15912
Martin v. Löwiseba40652007-08-30 20:10:57 +000015913 { echo "$as_me:$LINENO: result: yes" >&5
15914echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015915else
15916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015917sed 's/^/| /' conftest.$ac_ext >&5
15918
Martin v. Löwiseba40652007-08-30 20:10:57 +000015919 { echo "$as_me:$LINENO: result: no" >&5
15920echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015921
15922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015923
15924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015925{ echo "$as_me:$LINENO: checking for epoll" >&5
15926echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
15927cat >conftest.$ac_ext <<_ACEOF
15928/* confdefs.h. */
15929_ACEOF
15930cat confdefs.h >>conftest.$ac_ext
15931cat >>conftest.$ac_ext <<_ACEOF
15932/* end confdefs.h. */
15933#include <sys/epoll.h>
15934int
15935main ()
15936{
15937void *x=epoll_create
15938 ;
15939 return 0;
15940}
15941_ACEOF
15942rm -f conftest.$ac_objext
15943if { (ac_try="$ac_compile"
15944case "(($ac_try" in
15945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15946 *) ac_try_echo=$ac_try;;
15947esac
15948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15949 (eval "$ac_compile") 2>conftest.er1
15950 ac_status=$?
15951 grep -v '^ *+' conftest.er1 >conftest.err
15952 rm -f conftest.er1
15953 cat conftest.err >&5
15954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15955 (exit $ac_status); } && {
15956 test -z "$ac_c_werror_flag" ||
15957 test ! -s conftest.err
15958 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015959
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015960cat >>confdefs.h <<\_ACEOF
15961#define HAVE_EPOLL 1
15962_ACEOF
15963
15964 { echo "$as_me:$LINENO: result: yes" >&5
15965echo "${ECHO_T}yes" >&6; }
15966else
15967 echo "$as_me: failed program was:" >&5
15968sed 's/^/| /' conftest.$ac_ext >&5
15969
15970 { echo "$as_me:$LINENO: result: no" >&5
15971echo "${ECHO_T}no" >&6; }
15972
15973fi
15974
15975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15976{ echo "$as_me:$LINENO: checking for kqueue" >&5
15977echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
15978cat >conftest.$ac_ext <<_ACEOF
15979/* confdefs.h. */
15980_ACEOF
15981cat confdefs.h >>conftest.$ac_ext
15982cat >>conftest.$ac_ext <<_ACEOF
15983/* end confdefs.h. */
15984
15985#include <sys/types.h>
15986#include <sys/event.h>
15987
15988int
15989main ()
15990{
15991int x=kqueue()
15992 ;
15993 return 0;
15994}
15995_ACEOF
15996rm -f conftest.$ac_objext
15997if { (ac_try="$ac_compile"
15998case "(($ac_try" in
15999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16000 *) ac_try_echo=$ac_try;;
16001esac
16002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16003 (eval "$ac_compile") 2>conftest.er1
16004 ac_status=$?
16005 grep -v '^ *+' conftest.er1 >conftest.err
16006 rm -f conftest.er1
16007 cat conftest.err >&5
16008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16009 (exit $ac_status); } && {
16010 test -z "$ac_c_werror_flag" ||
16011 test ! -s conftest.err
16012 } && test -s conftest.$ac_objext; then
16013
16014cat >>confdefs.h <<\_ACEOF
16015#define HAVE_KQUEUE 1
16016_ACEOF
16017
16018 { echo "$as_me:$LINENO: result: yes" >&5
16019echo "${ECHO_T}yes" >&6; }
16020else
16021 echo "$as_me: failed program was:" >&5
16022sed 's/^/| /' conftest.$ac_ext >&5
16023
16024 { echo "$as_me:$LINENO: result: no" >&5
16025echo "${ECHO_T}no" >&6; }
16026
16027fi
16028
16029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016030# On some systems (eg. FreeBSD 5), we would find a definition of the
16031# functions ctermid_r, setgroups in the library, but no prototype
16032# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16033# address to avoid compiler warnings and potential miscompilations
16034# because of the missing prototypes.
16035
Martin v. Löwiseba40652007-08-30 20:10:57 +000016036{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16037echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016038cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016039/* confdefs.h. */
16040_ACEOF
16041cat confdefs.h >>conftest.$ac_ext
16042cat >>conftest.$ac_ext <<_ACEOF
16043/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016044
16045#include "confdefs.h"
16046#include <stdio.h>
16047
Martin v. Löwisd5843682002-11-21 20:41:28 +000016048int
16049main ()
16050{
16051void* p = ctermid_r
16052 ;
16053 return 0;
16054}
16055_ACEOF
16056rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016057if { (ac_try="$ac_compile"
16058case "(($ac_try" in
16059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16060 *) ac_try_echo=$ac_try;;
16061esac
16062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16063 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016065 grep -v '^ *+' conftest.er1 >conftest.err
16066 rm -f conftest.er1
16067 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016069 (exit $ac_status); } && {
16070 test -z "$ac_c_werror_flag" ||
16071 test ! -s conftest.err
16072 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016073
16074cat >>confdefs.h <<\_ACEOF
16075#define HAVE_CTERMID_R 1
16076_ACEOF
16077
Martin v. Löwiseba40652007-08-30 20:10:57 +000016078 { echo "$as_me:$LINENO: result: yes" >&5
16079echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016080else
16081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016082sed 's/^/| /' conftest.$ac_ext >&5
16083
Martin v. Löwiseba40652007-08-30 20:10:57 +000016084 { echo "$as_me:$LINENO: result: no" >&5
16085echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016086
16087fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016088
Martin v. Löwiseba40652007-08-30 20:10:57 +000016089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16090
16091{ echo "$as_me:$LINENO: checking for flock" >&5
16092echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016094/* confdefs.h. */
16095_ACEOF
16096cat confdefs.h >>conftest.$ac_ext
16097cat >>conftest.$ac_ext <<_ACEOF
16098/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016099
16100#include "confdefs.h"
16101#include <sys/file.h>
16102
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016103int
16104main ()
16105{
16106void* p = flock
16107 ;
16108 return 0;
16109}
16110_ACEOF
16111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016112if { (ac_try="$ac_compile"
16113case "(($ac_try" in
16114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16115 *) ac_try_echo=$ac_try;;
16116esac
16117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016120 grep -v '^ *+' conftest.er1 >conftest.err
16121 rm -f conftest.er1
16122 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016124 (exit $ac_status); } && {
16125 test -z "$ac_c_werror_flag" ||
16126 test ! -s conftest.err
16127 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016128
16129cat >>confdefs.h <<\_ACEOF
16130#define HAVE_FLOCK 1
16131_ACEOF
16132
Martin v. Löwiseba40652007-08-30 20:10:57 +000016133 { echo "$as_me:$LINENO: result: yes" >&5
16134echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016135else
16136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016137sed 's/^/| /' conftest.$ac_ext >&5
16138
Martin v. Löwiseba40652007-08-30 20:10:57 +000016139 { echo "$as_me:$LINENO: result: no" >&5
16140echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016141
16142fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016143
Martin v. Löwiseba40652007-08-30 20:10:57 +000016144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16145
16146{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16147echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016149/* confdefs.h. */
16150_ACEOF
16151cat confdefs.h >>conftest.$ac_ext
16152cat >>conftest.$ac_ext <<_ACEOF
16153/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016154
16155#include "confdefs.h"
16156#include <unistd.h>
16157
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016158int
16159main ()
16160{
16161void* p = getpagesize
16162 ;
16163 return 0;
16164}
16165_ACEOF
16166rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016167if { (ac_try="$ac_compile"
16168case "(($ac_try" in
16169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16170 *) ac_try_echo=$ac_try;;
16171esac
16172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016175 grep -v '^ *+' conftest.er1 >conftest.err
16176 rm -f conftest.er1
16177 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016179 (exit $ac_status); } && {
16180 test -z "$ac_c_werror_flag" ||
16181 test ! -s conftest.err
16182 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016183
16184cat >>confdefs.h <<\_ACEOF
16185#define HAVE_GETPAGESIZE 1
16186_ACEOF
16187
Martin v. Löwiseba40652007-08-30 20:10:57 +000016188 { echo "$as_me:$LINENO: result: yes" >&5
16189echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016190else
16191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016192sed 's/^/| /' conftest.$ac_ext >&5
16193
Martin v. Löwiseba40652007-08-30 20:10:57 +000016194 { echo "$as_me:$LINENO: result: no" >&5
16195echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016196
16197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016198
16199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016200
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016201for ac_prog in true
16202do
16203 # Extract the first word of "$ac_prog", so it can be a program name with args.
16204set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016205{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16206echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016207if test "${ac_cv_prog_TRUE+set}" = set; then
16208 echo $ECHO_N "(cached) $ECHO_C" >&6
16209else
16210 if test -n "$TRUE"; then
16211 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16212else
16213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16214for as_dir in $PATH
16215do
16216 IFS=$as_save_IFS
16217 test -z "$as_dir" && as_dir=.
16218 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016219 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 +000016220 ac_cv_prog_TRUE="$ac_prog"
16221 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16222 break 2
16223 fi
16224done
16225done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016226IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016227
16228fi
16229fi
16230TRUE=$ac_cv_prog_TRUE
16231if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016232 { echo "$as_me:$LINENO: result: $TRUE" >&5
16233echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016234else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016235 { echo "$as_me:$LINENO: result: no" >&5
16236echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016237fi
16238
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016240 test -n "$TRUE" && break
16241done
16242test -n "$TRUE" || TRUE="/bin/true"
16243
16244
Martin v. Löwiseba40652007-08-30 20:10:57 +000016245{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16246echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016247if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16248 echo $ECHO_N "(cached) $ECHO_C" >&6
16249else
16250 ac_check_lib_save_LIBS=$LIBS
16251LIBS="-lc $LIBS"
16252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016253/* confdefs.h. */
16254_ACEOF
16255cat confdefs.h >>conftest.$ac_ext
16256cat >>conftest.$ac_ext <<_ACEOF
16257/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016258
Martin v. Löwiseba40652007-08-30 20:10:57 +000016259/* Override any GCC internal prototype to avoid an error.
16260 Use char because int might match the return type of a GCC
16261 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016262#ifdef __cplusplus
16263extern "C"
16264#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016265char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016266int
16267main ()
16268{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016269return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016270 ;
16271 return 0;
16272}
16273_ACEOF
16274rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016275if { (ac_try="$ac_link"
16276case "(($ac_try" in
16277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16278 *) ac_try_echo=$ac_try;;
16279esac
16280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16281 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016283 grep -v '^ *+' conftest.er1 >conftest.err
16284 rm -f conftest.er1
16285 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016287 (exit $ac_status); } && {
16288 test -z "$ac_c_werror_flag" ||
16289 test ! -s conftest.err
16290 } && test -s conftest$ac_exeext &&
16291 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016292 ac_cv_lib_c_inet_aton=yes
16293else
16294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016295sed 's/^/| /' conftest.$ac_ext >&5
16296
Martin v. Löwiseba40652007-08-30 20:10:57 +000016297 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016299
16300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016301 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016302LIBS=$ac_check_lib_save_LIBS
16303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016304{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16305echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016306if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016307 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016308else
16309
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16311echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016312if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16313 echo $ECHO_N "(cached) $ECHO_C" >&6
16314else
16315 ac_check_lib_save_LIBS=$LIBS
16316LIBS="-lresolv $LIBS"
16317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016318/* confdefs.h. */
16319_ACEOF
16320cat confdefs.h >>conftest.$ac_ext
16321cat >>conftest.$ac_ext <<_ACEOF
16322/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016323
Martin v. Löwiseba40652007-08-30 20:10:57 +000016324/* Override any GCC internal prototype to avoid an error.
16325 Use char because int might match the return type of a GCC
16326 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016327#ifdef __cplusplus
16328extern "C"
16329#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016330char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016331int
16332main ()
16333{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016334return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016335 ;
16336 return 0;
16337}
16338_ACEOF
16339rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016340if { (ac_try="$ac_link"
16341case "(($ac_try" in
16342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16343 *) ac_try_echo=$ac_try;;
16344esac
16345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16346 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016348 grep -v '^ *+' conftest.er1 >conftest.err
16349 rm -f conftest.er1
16350 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016352 (exit $ac_status); } && {
16353 test -z "$ac_c_werror_flag" ||
16354 test ! -s conftest.err
16355 } && test -s conftest$ac_exeext &&
16356 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016357 ac_cv_lib_resolv_inet_aton=yes
16358else
16359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016360sed 's/^/| /' conftest.$ac_ext >&5
16361
Martin v. Löwiseba40652007-08-30 20:10:57 +000016362 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364
16365rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016366 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016367LIBS=$ac_check_lib_save_LIBS
16368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016369{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16370echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016371if test $ac_cv_lib_resolv_inet_aton = yes; then
16372 cat >>confdefs.h <<_ACEOF
16373#define HAVE_LIBRESOLV 1
16374_ACEOF
16375
16376 LIBS="-lresolv $LIBS"
16377
16378fi
16379
16380
16381fi
16382
16383
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016384# On Tru64, chflags seems to be present, but calling it will
16385# exit Python
16386{ echo "$as_me:$LINENO: checking for chflags" >&5
16387echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16388if test "$cross_compiling" = yes; then
16389 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16390See \`config.log' for more details." >&5
16391echo "$as_me: error: cannot run test program while cross compiling
16392See \`config.log' for more details." >&2;}
16393 { (exit 1); exit 1; }; }
16394else
16395 cat >conftest.$ac_ext <<_ACEOF
16396/* confdefs.h. */
16397_ACEOF
16398cat confdefs.h >>conftest.$ac_ext
16399cat >>conftest.$ac_ext <<_ACEOF
16400/* end confdefs.h. */
16401
16402#include <sys/stat.h>
16403#include <unistd.h>
16404int main(int argc, char*argv[])
16405{
16406 if(chflags(argv[0], 0) != 0)
16407 return 1;
16408 return 0;
16409}
16410
16411_ACEOF
16412rm -f conftest$ac_exeext
16413if { (ac_try="$ac_link"
16414case "(($ac_try" in
16415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16416 *) ac_try_echo=$ac_try;;
16417esac
16418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16419 (eval "$ac_link") 2>&5
16420 ac_status=$?
16421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16422 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16423 { (case "(($ac_try" in
16424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16425 *) ac_try_echo=$ac_try;;
16426esac
16427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16428 (eval "$ac_try") 2>&5
16429 ac_status=$?
16430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16431 (exit $ac_status); }; }; then
16432
16433cat >>confdefs.h <<\_ACEOF
16434#define HAVE_CHFLAGS 1
16435_ACEOF
16436
16437 { echo "$as_me:$LINENO: result: yes" >&5
16438echo "${ECHO_T}yes" >&6; }
16439else
16440 echo "$as_me: program exited with status $ac_status" >&5
16441echo "$as_me: failed program was:" >&5
16442sed 's/^/| /' conftest.$ac_ext >&5
16443
16444( exit $ac_status )
16445{ echo "$as_me:$LINENO: result: no" >&5
16446echo "${ECHO_T}no" >&6; }
16447
16448fi
16449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16450fi
16451
16452
16453
16454{ echo "$as_me:$LINENO: checking for lchflags" >&5
16455echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16456if test "$cross_compiling" = yes; then
16457 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16458See \`config.log' for more details." >&5
16459echo "$as_me: error: cannot run test program while cross compiling
16460See \`config.log' for more details." >&2;}
16461 { (exit 1); exit 1; }; }
16462else
16463 cat >conftest.$ac_ext <<_ACEOF
16464/* confdefs.h. */
16465_ACEOF
16466cat confdefs.h >>conftest.$ac_ext
16467cat >>conftest.$ac_ext <<_ACEOF
16468/* end confdefs.h. */
16469
16470#include <sys/stat.h>
16471#include <unistd.h>
16472int main(int argc, char*argv[])
16473{
16474 if(lchflags(argv[0], 0) != 0)
16475 return 1;
16476 return 0;
16477}
16478
16479_ACEOF
16480rm -f conftest$ac_exeext
16481if { (ac_try="$ac_link"
16482case "(($ac_try" in
16483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16484 *) ac_try_echo=$ac_try;;
16485esac
16486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16487 (eval "$ac_link") 2>&5
16488 ac_status=$?
16489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16490 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16491 { (case "(($ac_try" in
16492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16493 *) ac_try_echo=$ac_try;;
16494esac
16495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16496 (eval "$ac_try") 2>&5
16497 ac_status=$?
16498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16499 (exit $ac_status); }; }; then
16500
16501cat >>confdefs.h <<\_ACEOF
16502#define HAVE_LCHFLAGS 1
16503_ACEOF
16504
16505 { echo "$as_me:$LINENO: result: yes" >&5
16506echo "${ECHO_T}yes" >&6; }
16507else
16508 echo "$as_me: program exited with status $ac_status" >&5
16509echo "$as_me: failed program was:" >&5
16510sed 's/^/| /' conftest.$ac_ext >&5
16511
16512( exit $ac_status )
16513{ echo "$as_me:$LINENO: result: no" >&5
16514echo "${ECHO_T}no" >&6; }
16515
16516fi
16517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16518fi
16519
16520
16521
Ronald Oussorenf8752642006-07-06 10:13:35 +000016522case $ac_sys_system/$ac_sys_release in
16523Darwin/*)
16524 _CUR_CFLAGS="${CFLAGS}"
16525 _CUR_LDFLAGS="${LDFLAGS}"
16526 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16527 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16528 ;;
16529esac
16530
Martin v. Löwiseba40652007-08-30 20:10:57 +000016531{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16532echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016533if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16534 echo $ECHO_N "(cached) $ECHO_C" >&6
16535else
16536 ac_check_lib_save_LIBS=$LIBS
16537LIBS="-lz $LIBS"
16538cat >conftest.$ac_ext <<_ACEOF
16539/* confdefs.h. */
16540_ACEOF
16541cat confdefs.h >>conftest.$ac_ext
16542cat >>conftest.$ac_ext <<_ACEOF
16543/* end confdefs.h. */
16544
Martin v. Löwiseba40652007-08-30 20:10:57 +000016545/* Override any GCC internal prototype to avoid an error.
16546 Use char because int might match the return type of a GCC
16547 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016548#ifdef __cplusplus
16549extern "C"
16550#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016551char inflateCopy ();
16552int
16553main ()
16554{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016555return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016556 ;
16557 return 0;
16558}
16559_ACEOF
16560rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016561if { (ac_try="$ac_link"
16562case "(($ac_try" in
16563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16564 *) ac_try_echo=$ac_try;;
16565esac
16566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16567 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016568 ac_status=$?
16569 grep -v '^ *+' conftest.er1 >conftest.err
16570 rm -f conftest.er1
16571 cat conftest.err >&5
16572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016573 (exit $ac_status); } && {
16574 test -z "$ac_c_werror_flag" ||
16575 test ! -s conftest.err
16576 } && test -s conftest$ac_exeext &&
16577 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016578 ac_cv_lib_z_inflateCopy=yes
16579else
16580 echo "$as_me: failed program was:" >&5
16581sed 's/^/| /' conftest.$ac_ext >&5
16582
Martin v. Löwiseba40652007-08-30 20:10:57 +000016583 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016585
16586rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016587 conftest$ac_exeext conftest.$ac_ext
16588LIBS=$ac_check_lib_save_LIBS
16589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016590{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16591echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016592if test $ac_cv_lib_z_inflateCopy = yes; then
16593
16594cat >>confdefs.h <<\_ACEOF
16595#define HAVE_ZLIB_COPY 1
16596_ACEOF
16597
16598fi
16599
16600
Ronald Oussorenf8752642006-07-06 10:13:35 +000016601case $ac_sys_system/$ac_sys_release in
16602Darwin/*)
16603 CFLAGS="${_CUR_CFLAGS}"
16604 LDFLAGS="${_CUR_LDFLAGS}"
16605 ;;
16606esac
16607
Martin v. Löwiseba40652007-08-30 20:10:57 +000016608{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16609echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016611/* confdefs.h. */
16612_ACEOF
16613cat confdefs.h >>conftest.$ac_ext
16614cat >>conftest.$ac_ext <<_ACEOF
16615/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016616
16617#include "confdefs.h"
16618#include <netdb.h>
16619
Martin v. Löwise9416172003-05-03 10:12:45 +000016620int
16621main ()
16622{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016623void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016624 ;
16625 return 0;
16626}
16627_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016628rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016629if { (ac_try="$ac_link"
16630case "(($ac_try" in
16631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16632 *) ac_try_echo=$ac_try;;
16633esac
16634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16635 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016637 grep -v '^ *+' conftest.er1 >conftest.err
16638 rm -f conftest.er1
16639 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016641 (exit $ac_status); } && {
16642 test -z "$ac_c_werror_flag" ||
16643 test ! -s conftest.err
16644 } && test -s conftest$ac_exeext &&
16645 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016646
16647cat >>confdefs.h <<\_ACEOF
16648#define HAVE_HSTRERROR 1
16649_ACEOF
16650
Martin v. Löwiseba40652007-08-30 20:10:57 +000016651 { echo "$as_me:$LINENO: result: yes" >&5
16652echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016653else
16654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016655sed 's/^/| /' conftest.$ac_ext >&5
16656
Martin v. Löwiseba40652007-08-30 20:10:57 +000016657 { echo "$as_me:$LINENO: result: no" >&5
16658echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016659
16660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016661
16662rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016663 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016664
Martin v. Löwiseba40652007-08-30 20:10:57 +000016665{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16666echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016668/* confdefs.h. */
16669_ACEOF
16670cat confdefs.h >>conftest.$ac_ext
16671cat >>conftest.$ac_ext <<_ACEOF
16672/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016673
16674#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016675#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016676#include <sys/socket.h>
16677#include <netinet/in.h>
16678#include <arpa/inet.h>
16679
Martin v. Löwise9416172003-05-03 10:12:45 +000016680int
16681main ()
16682{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016683void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016684 ;
16685 return 0;
16686}
16687_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016688rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016689if { (ac_try="$ac_link"
16690case "(($ac_try" in
16691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16692 *) ac_try_echo=$ac_try;;
16693esac
16694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16695 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016697 grep -v '^ *+' conftest.er1 >conftest.err
16698 rm -f conftest.er1
16699 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016701 (exit $ac_status); } && {
16702 test -z "$ac_c_werror_flag" ||
16703 test ! -s conftest.err
16704 } && test -s conftest$ac_exeext &&
16705 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016706
16707cat >>confdefs.h <<\_ACEOF
16708#define HAVE_INET_ATON 1
16709_ACEOF
16710
Martin v. Löwiseba40652007-08-30 20:10:57 +000016711 { echo "$as_me:$LINENO: result: yes" >&5
16712echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016713else
16714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016715sed 's/^/| /' conftest.$ac_ext >&5
16716
Martin v. Löwiseba40652007-08-30 20:10:57 +000016717 { echo "$as_me:$LINENO: result: no" >&5
16718echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016719
16720fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016721
16722rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016723 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016724
Martin v. Löwiseba40652007-08-30 20:10:57 +000016725{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16726echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016727cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016728/* confdefs.h. */
16729_ACEOF
16730cat confdefs.h >>conftest.$ac_ext
16731cat >>conftest.$ac_ext <<_ACEOF
16732/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016733
16734#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016735#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016736#include <sys/socket.h>
16737#include <netinet/in.h>
16738#include <arpa/inet.h>
16739
Martin v. Löwise9416172003-05-03 10:12:45 +000016740int
16741main ()
16742{
16743void* p = inet_pton
16744 ;
16745 return 0;
16746}
16747_ACEOF
16748rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016749if { (ac_try="$ac_compile"
16750case "(($ac_try" in
16751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16752 *) ac_try_echo=$ac_try;;
16753esac
16754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16755 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016757 grep -v '^ *+' conftest.er1 >conftest.err
16758 rm -f conftest.er1
16759 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016761 (exit $ac_status); } && {
16762 test -z "$ac_c_werror_flag" ||
16763 test ! -s conftest.err
16764 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016765
16766cat >>confdefs.h <<\_ACEOF
16767#define HAVE_INET_PTON 1
16768_ACEOF
16769
Martin v. Löwiseba40652007-08-30 20:10:57 +000016770 { echo "$as_me:$LINENO: result: yes" >&5
16771echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016772else
16773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016774sed 's/^/| /' conftest.$ac_ext >&5
16775
Martin v. Löwiseba40652007-08-30 20:10:57 +000016776 { echo "$as_me:$LINENO: result: no" >&5
16777echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016778
16779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016780
16781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016782
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016783# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016784{ echo "$as_me:$LINENO: checking for setgroups" >&5
16785echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016786cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016787/* confdefs.h. */
16788_ACEOF
16789cat confdefs.h >>conftest.$ac_ext
16790cat >>conftest.$ac_ext <<_ACEOF
16791/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016792
16793#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016794#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016795#ifdef HAVE_GRP_H
16796#include <grp.h>
16797#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016798
Martin v. Löwisd5843682002-11-21 20:41:28 +000016799int
16800main ()
16801{
16802void* p = setgroups
16803 ;
16804 return 0;
16805}
16806_ACEOF
16807rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016808if { (ac_try="$ac_compile"
16809case "(($ac_try" in
16810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16811 *) ac_try_echo=$ac_try;;
16812esac
16813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16814 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016816 grep -v '^ *+' conftest.er1 >conftest.err
16817 rm -f conftest.er1
16818 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016820 (exit $ac_status); } && {
16821 test -z "$ac_c_werror_flag" ||
16822 test ! -s conftest.err
16823 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016824
16825cat >>confdefs.h <<\_ACEOF
16826#define HAVE_SETGROUPS 1
16827_ACEOF
16828
Martin v. Löwiseba40652007-08-30 20:10:57 +000016829 { echo "$as_me:$LINENO: result: yes" >&5
16830echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016831else
16832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016833sed 's/^/| /' conftest.$ac_ext >&5
16834
Martin v. Löwiseba40652007-08-30 20:10:57 +000016835 { echo "$as_me:$LINENO: result: no" >&5
16836echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016837
16838fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016839
16840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016841
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016842# check for openpty and forkpty
16843
Martin v. Löwis11437992002-04-12 09:54:03 +000016844
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016845for ac_func in openpty
16846do
Martin v. Löwis11437992002-04-12 09:54:03 +000016847as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016848{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16849echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16850if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016851 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016852else
Martin v. Löwis11437992002-04-12 09:54:03 +000016853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016854/* confdefs.h. */
16855_ACEOF
16856cat confdefs.h >>conftest.$ac_ext
16857cat >>conftest.$ac_ext <<_ACEOF
16858/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016859/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16860 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16861#define $ac_func innocuous_$ac_func
16862
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016863/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016864 which can conflict with char $ac_func (); below.
16865 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016866 <limits.h> exists even on freestanding compilers. */
16867
16868#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016869# include <limits.h>
16870#else
16871# include <assert.h>
16872#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016873
16874#undef $ac_func
16875
Martin v. Löwiseba40652007-08-30 20:10:57 +000016876/* Override any GCC internal prototype to avoid an error.
16877 Use char because int might match the return type of a GCC
16878 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016879#ifdef __cplusplus
16880extern "C"
16881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016882char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016883/* The GNU C library defines this for functions which it implements
16884 to always fail with ENOSYS. Some functions are actually named
16885 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016886#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016887choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016888#endif
16889
Skip Montanaro6dead952003-09-25 14:50:04 +000016890int
16891main ()
16892{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016893return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016894 ;
16895 return 0;
16896}
16897_ACEOF
16898rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016899if { (ac_try="$ac_link"
16900case "(($ac_try" in
16901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16902 *) ac_try_echo=$ac_try;;
16903esac
16904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16905 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016907 grep -v '^ *+' conftest.er1 >conftest.err
16908 rm -f conftest.er1
16909 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016911 (exit $ac_status); } && {
16912 test -z "$ac_c_werror_flag" ||
16913 test ! -s conftest.err
16914 } && test -s conftest$ac_exeext &&
16915 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016917else
Martin v. Löwis11437992002-04-12 09:54:03 +000016918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016919sed 's/^/| /' conftest.$ac_ext >&5
16920
Martin v. Löwiseba40652007-08-30 20:10:57 +000016921 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016923
16924rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016925 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016927ac_res=`eval echo '${'$as_ac_var'}'`
16928 { echo "$as_me:$LINENO: result: $ac_res" >&5
16929echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016930if test `eval echo '${'$as_ac_var'}'` = yes; then
16931 cat >>confdefs.h <<_ACEOF
16932#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16933_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016934
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016935else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016936 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16937echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016938if test "${ac_cv_lib_util_openpty+set}" = set; then
16939 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016940else
Martin v. Löwis11437992002-04-12 09:54:03 +000016941 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016942LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016943cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016944/* confdefs.h. */
16945_ACEOF
16946cat confdefs.h >>conftest.$ac_ext
16947cat >>conftest.$ac_ext <<_ACEOF
16948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016949
Martin v. Löwiseba40652007-08-30 20:10:57 +000016950/* Override any GCC internal prototype to avoid an error.
16951 Use char because int might match the return type of a GCC
16952 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016953#ifdef __cplusplus
16954extern "C"
16955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016956char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016957int
16958main ()
16959{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016960return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016961 ;
16962 return 0;
16963}
16964_ACEOF
16965rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016966if { (ac_try="$ac_link"
16967case "(($ac_try" in
16968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16969 *) ac_try_echo=$ac_try;;
16970esac
16971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16972 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016974 grep -v '^ *+' conftest.er1 >conftest.err
16975 rm -f conftest.er1
16976 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016978 (exit $ac_status); } && {
16979 test -z "$ac_c_werror_flag" ||
16980 test ! -s conftest.err
16981 } && test -s conftest$ac_exeext &&
16982 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016983 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016984else
Martin v. Löwis11437992002-04-12 09:54:03 +000016985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016986sed 's/^/| /' conftest.$ac_ext >&5
16987
Martin v. Löwiseba40652007-08-30 20:10:57 +000016988 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016990
16991rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016992 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016993LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016995{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
16996echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016997if test $ac_cv_lib_util_openpty = yes; then
16998 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016999#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017000_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017001 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017002else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017003 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17004echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017005if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17006 echo $ECHO_N "(cached) $ECHO_C" >&6
17007else
17008 ac_check_lib_save_LIBS=$LIBS
17009LIBS="-lbsd $LIBS"
17010cat >conftest.$ac_ext <<_ACEOF
17011/* confdefs.h. */
17012_ACEOF
17013cat confdefs.h >>conftest.$ac_ext
17014cat >>conftest.$ac_ext <<_ACEOF
17015/* end confdefs.h. */
17016
Martin v. Löwiseba40652007-08-30 20:10:57 +000017017/* Override any GCC internal prototype to avoid an error.
17018 Use char because int might match the return type of a GCC
17019 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017020#ifdef __cplusplus
17021extern "C"
17022#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017023char openpty ();
17024int
17025main ()
17026{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017027return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017028 ;
17029 return 0;
17030}
17031_ACEOF
17032rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017033if { (ac_try="$ac_link"
17034case "(($ac_try" in
17035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17036 *) ac_try_echo=$ac_try;;
17037esac
17038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17039 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017040 ac_status=$?
17041 grep -v '^ *+' conftest.er1 >conftest.err
17042 rm -f conftest.er1
17043 cat conftest.err >&5
17044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017045 (exit $ac_status); } && {
17046 test -z "$ac_c_werror_flag" ||
17047 test ! -s conftest.err
17048 } && test -s conftest$ac_exeext &&
17049 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017050 ac_cv_lib_bsd_openpty=yes
17051else
17052 echo "$as_me: failed program was:" >&5
17053sed 's/^/| /' conftest.$ac_ext >&5
17054
Martin v. Löwiseba40652007-08-30 20:10:57 +000017055 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017057
17058rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017059 conftest$ac_exeext conftest.$ac_ext
17060LIBS=$ac_check_lib_save_LIBS
17061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017062{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17063echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017064if test $ac_cv_lib_bsd_openpty = yes; then
17065 cat >>confdefs.h <<\_ACEOF
17066#define HAVE_OPENPTY 1
17067_ACEOF
17068 LIBS="$LIBS -lbsd"
17069fi
17070
17071
17072fi
17073
Fred Drake8cef4cf2000-06-28 16:40:38 +000017074
17075fi
17076done
17077
Martin v. Löwis11437992002-04-12 09:54:03 +000017078
Fred Drake8cef4cf2000-06-28 16:40:38 +000017079for ac_func in forkpty
17080do
Martin v. Löwis11437992002-04-12 09:54:03 +000017081as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017082{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17083echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17084if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017085 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017086else
Martin v. Löwis11437992002-04-12 09:54:03 +000017087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017088/* confdefs.h. */
17089_ACEOF
17090cat confdefs.h >>conftest.$ac_ext
17091cat >>conftest.$ac_ext <<_ACEOF
17092/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017093/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17094 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17095#define $ac_func innocuous_$ac_func
17096
Fred Drake8cef4cf2000-06-28 16:40:38 +000017097/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017098 which can conflict with char $ac_func (); below.
17099 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017100 <limits.h> exists even on freestanding compilers. */
17101
17102#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017103# include <limits.h>
17104#else
17105# include <assert.h>
17106#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017107
17108#undef $ac_func
17109
Martin v. Löwiseba40652007-08-30 20:10:57 +000017110/* Override any GCC internal prototype to avoid an error.
17111 Use char because int might match the return type of a GCC
17112 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017113#ifdef __cplusplus
17114extern "C"
17115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017116char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017117/* The GNU C library defines this for functions which it implements
17118 to always fail with ENOSYS. Some functions are actually named
17119 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017120#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017121choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017122#endif
17123
Skip Montanaro6dead952003-09-25 14:50:04 +000017124int
17125main ()
17126{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017127return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017128 ;
17129 return 0;
17130}
17131_ACEOF
17132rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017133if { (ac_try="$ac_link"
17134case "(($ac_try" in
17135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17136 *) ac_try_echo=$ac_try;;
17137esac
17138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17139 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017141 grep -v '^ *+' conftest.er1 >conftest.err
17142 rm -f conftest.er1
17143 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017145 (exit $ac_status); } && {
17146 test -z "$ac_c_werror_flag" ||
17147 test ! -s conftest.err
17148 } && test -s conftest$ac_exeext &&
17149 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017150 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017151else
Martin v. Löwis11437992002-04-12 09:54:03 +000017152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017153sed 's/^/| /' conftest.$ac_ext >&5
17154
Martin v. Löwiseba40652007-08-30 20:10:57 +000017155 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017157
17158rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017159 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017161ac_res=`eval echo '${'$as_ac_var'}'`
17162 { echo "$as_me:$LINENO: result: $ac_res" >&5
17163echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017164if test `eval echo '${'$as_ac_var'}'` = yes; then
17165 cat >>confdefs.h <<_ACEOF
17166#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17167_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017168
Fred Drake8cef4cf2000-06-28 16:40:38 +000017169else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017170 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17171echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017172if test "${ac_cv_lib_util_forkpty+set}" = set; then
17173 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017174else
Martin v. Löwis11437992002-04-12 09:54:03 +000017175 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017176LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017178/* confdefs.h. */
17179_ACEOF
17180cat confdefs.h >>conftest.$ac_ext
17181cat >>conftest.$ac_ext <<_ACEOF
17182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017183
Martin v. Löwiseba40652007-08-30 20:10:57 +000017184/* Override any GCC internal prototype to avoid an error.
17185 Use char because int might match the return type of a GCC
17186 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017187#ifdef __cplusplus
17188extern "C"
17189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017190char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017191int
17192main ()
17193{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017194return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017195 ;
17196 return 0;
17197}
17198_ACEOF
17199rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017200if { (ac_try="$ac_link"
17201case "(($ac_try" in
17202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17203 *) ac_try_echo=$ac_try;;
17204esac
17205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17206 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017208 grep -v '^ *+' conftest.er1 >conftest.err
17209 rm -f conftest.er1
17210 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017212 (exit $ac_status); } && {
17213 test -z "$ac_c_werror_flag" ||
17214 test ! -s conftest.err
17215 } && test -s conftest$ac_exeext &&
17216 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017217 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017218else
Martin v. Löwis11437992002-04-12 09:54:03 +000017219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017220sed 's/^/| /' conftest.$ac_ext >&5
17221
Martin v. Löwiseba40652007-08-30 20:10:57 +000017222 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017224
17225rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017227LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017229{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17230echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017231if test $ac_cv_lib_util_forkpty = yes; then
17232 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017233#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017234_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017235 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017236else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017237 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17238echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017239if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17240 echo $ECHO_N "(cached) $ECHO_C" >&6
17241else
17242 ac_check_lib_save_LIBS=$LIBS
17243LIBS="-lbsd $LIBS"
17244cat >conftest.$ac_ext <<_ACEOF
17245/* confdefs.h. */
17246_ACEOF
17247cat confdefs.h >>conftest.$ac_ext
17248cat >>conftest.$ac_ext <<_ACEOF
17249/* end confdefs.h. */
17250
Martin v. Löwiseba40652007-08-30 20:10:57 +000017251/* Override any GCC internal prototype to avoid an error.
17252 Use char because int might match the return type of a GCC
17253 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017254#ifdef __cplusplus
17255extern "C"
17256#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017257char forkpty ();
17258int
17259main ()
17260{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017261return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017262 ;
17263 return 0;
17264}
17265_ACEOF
17266rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017267if { (ac_try="$ac_link"
17268case "(($ac_try" in
17269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17270 *) ac_try_echo=$ac_try;;
17271esac
17272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17273 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017274 ac_status=$?
17275 grep -v '^ *+' conftest.er1 >conftest.err
17276 rm -f conftest.er1
17277 cat conftest.err >&5
17278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017279 (exit $ac_status); } && {
17280 test -z "$ac_c_werror_flag" ||
17281 test ! -s conftest.err
17282 } && test -s conftest$ac_exeext &&
17283 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017284 ac_cv_lib_bsd_forkpty=yes
17285else
17286 echo "$as_me: failed program was:" >&5
17287sed 's/^/| /' conftest.$ac_ext >&5
17288
Martin v. Löwiseba40652007-08-30 20:10:57 +000017289 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017291
17292rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017293 conftest$ac_exeext conftest.$ac_ext
17294LIBS=$ac_check_lib_save_LIBS
17295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017296{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17297echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017298if test $ac_cv_lib_bsd_forkpty = yes; then
17299 cat >>confdefs.h <<\_ACEOF
17300#define HAVE_FORKPTY 1
17301_ACEOF
17302 LIBS="$LIBS -lbsd"
17303fi
17304
17305
17306fi
17307
Fred Drake8cef4cf2000-06-28 16:40:38 +000017308
17309fi
17310done
17311
Jack Jansendd19cf82001-12-06 22:36:17 +000017312
Brett Cannonaa5778d2008-03-18 04:09:00 +000017313# Stuff for expat.
17314
17315for ac_func in memmove
17316do
17317as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17318{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17319echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17320if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17321 echo $ECHO_N "(cached) $ECHO_C" >&6
17322else
17323 cat >conftest.$ac_ext <<_ACEOF
17324/* confdefs.h. */
17325_ACEOF
17326cat confdefs.h >>conftest.$ac_ext
17327cat >>conftest.$ac_ext <<_ACEOF
17328/* end confdefs.h. */
17329/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17330 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17331#define $ac_func innocuous_$ac_func
17332
17333/* System header to define __stub macros and hopefully few prototypes,
17334 which can conflict with char $ac_func (); below.
17335 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17336 <limits.h> exists even on freestanding compilers. */
17337
17338#ifdef __STDC__
17339# include <limits.h>
17340#else
17341# include <assert.h>
17342#endif
17343
17344#undef $ac_func
17345
17346/* Override any GCC internal prototype to avoid an error.
17347 Use char because int might match the return type of a GCC
17348 builtin and then its argument prototype would still apply. */
17349#ifdef __cplusplus
17350extern "C"
17351#endif
17352char $ac_func ();
17353/* The GNU C library defines this for functions which it implements
17354 to always fail with ENOSYS. Some functions are actually named
17355 something starting with __ and the normal name is an alias. */
17356#if defined __stub_$ac_func || defined __stub___$ac_func
17357choke me
17358#endif
17359
17360int
17361main ()
17362{
17363return $ac_func ();
17364 ;
17365 return 0;
17366}
17367_ACEOF
17368rm -f conftest.$ac_objext conftest$ac_exeext
17369if { (ac_try="$ac_link"
17370case "(($ac_try" in
17371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17372 *) ac_try_echo=$ac_try;;
17373esac
17374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17375 (eval "$ac_link") 2>conftest.er1
17376 ac_status=$?
17377 grep -v '^ *+' conftest.er1 >conftest.err
17378 rm -f conftest.er1
17379 cat conftest.err >&5
17380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17381 (exit $ac_status); } && {
17382 test -z "$ac_c_werror_flag" ||
17383 test ! -s conftest.err
17384 } && test -s conftest$ac_exeext &&
17385 $as_test_x conftest$ac_exeext; then
17386 eval "$as_ac_var=yes"
17387else
17388 echo "$as_me: failed program was:" >&5
17389sed 's/^/| /' conftest.$ac_ext >&5
17390
17391 eval "$as_ac_var=no"
17392fi
17393
17394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17395 conftest$ac_exeext conftest.$ac_ext
17396fi
17397ac_res=`eval echo '${'$as_ac_var'}'`
17398 { echo "$as_me:$LINENO: result: $ac_res" >&5
17399echo "${ECHO_T}$ac_res" >&6; }
17400if test `eval echo '${'$as_ac_var'}'` = yes; then
17401 cat >>confdefs.h <<_ACEOF
17402#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17403_ACEOF
17404
17405fi
17406done
17407
17408
Michael W. Hudson54241132001-12-07 15:38:26 +000017409# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017410
17411
17412
17413
17414
17415
Fred Drake8cef4cf2000-06-28 16:40:38 +000017416for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17417do
Martin v. Löwis11437992002-04-12 09:54:03 +000017418as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017419{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17420echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17421if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017423else
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017425/* confdefs.h. */
17426_ACEOF
17427cat confdefs.h >>conftest.$ac_ext
17428cat >>conftest.$ac_ext <<_ACEOF
17429/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017430/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17431 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17432#define $ac_func innocuous_$ac_func
17433
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017434/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017435 which can conflict with char $ac_func (); below.
17436 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017437 <limits.h> exists even on freestanding compilers. */
17438
17439#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017440# include <limits.h>
17441#else
17442# include <assert.h>
17443#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017444
17445#undef $ac_func
17446
Martin v. Löwiseba40652007-08-30 20:10:57 +000017447/* Override any GCC internal prototype to avoid an error.
17448 Use char because int might match the return type of a GCC
17449 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017450#ifdef __cplusplus
17451extern "C"
17452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017453char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017454/* The GNU C library defines this for functions which it implements
17455 to always fail with ENOSYS. Some functions are actually named
17456 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017457#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017458choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017459#endif
17460
Skip Montanaro6dead952003-09-25 14:50:04 +000017461int
17462main ()
17463{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017464return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017465 ;
17466 return 0;
17467}
17468_ACEOF
17469rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017470if { (ac_try="$ac_link"
17471case "(($ac_try" in
17472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17473 *) ac_try_echo=$ac_try;;
17474esac
17475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17476 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017478 grep -v '^ *+' conftest.er1 >conftest.err
17479 rm -f conftest.er1
17480 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017482 (exit $ac_status); } && {
17483 test -z "$ac_c_werror_flag" ||
17484 test ! -s conftest.err
17485 } && test -s conftest$ac_exeext &&
17486 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017487 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017488else
Martin v. Löwis11437992002-04-12 09:54:03 +000017489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017490sed 's/^/| /' conftest.$ac_ext >&5
17491
Martin v. Löwiseba40652007-08-30 20:10:57 +000017492 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017494
17495rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017496 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017498ac_res=`eval echo '${'$as_ac_var'}'`
17499 { echo "$as_me:$LINENO: result: $ac_res" >&5
17500echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017501if test `eval echo '${'$as_ac_var'}'` = yes; then
17502 cat >>confdefs.h <<_ACEOF
17503#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17504_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017505
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017506fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017507done
17508
Michael W. Hudson54241132001-12-07 15:38:26 +000017509
Martin v. Löwis11437992002-04-12 09:54:03 +000017510
17511
17512
Brett Cannonaa5778d2008-03-18 04:09:00 +000017513for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000017514do
Martin v. Löwis11437992002-04-12 09:54:03 +000017515as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017516{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17517echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17518if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017519 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017520else
Martin v. Löwis11437992002-04-12 09:54:03 +000017521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017522/* confdefs.h. */
17523_ACEOF
17524cat confdefs.h >>conftest.$ac_ext
17525cat >>conftest.$ac_ext <<_ACEOF
17526/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017527/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17528 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17529#define $ac_func innocuous_$ac_func
17530
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017531/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017532 which can conflict with char $ac_func (); below.
17533 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017534 <limits.h> exists even on freestanding compilers. */
17535
17536#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017537# include <limits.h>
17538#else
17539# include <assert.h>
17540#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017541
17542#undef $ac_func
17543
Martin v. Löwiseba40652007-08-30 20:10:57 +000017544/* Override any GCC internal prototype to avoid an error.
17545 Use char because int might match the return type of a GCC
17546 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017547#ifdef __cplusplus
17548extern "C"
17549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017550char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017551/* The GNU C library defines this for functions which it implements
17552 to always fail with ENOSYS. Some functions are actually named
17553 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017554#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017555choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017556#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017557
Skip Montanaro6dead952003-09-25 14:50:04 +000017558int
17559main ()
17560{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017561return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017562 ;
17563 return 0;
17564}
17565_ACEOF
17566rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017567if { (ac_try="$ac_link"
17568case "(($ac_try" in
17569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17570 *) ac_try_echo=$ac_try;;
17571esac
17572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17573 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017575 grep -v '^ *+' conftest.er1 >conftest.err
17576 rm -f conftest.er1
17577 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017579 (exit $ac_status); } && {
17580 test -z "$ac_c_werror_flag" ||
17581 test ! -s conftest.err
17582 } && test -s conftest$ac_exeext &&
17583 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017584 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017585else
Martin v. Löwis11437992002-04-12 09:54:03 +000017586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017587sed 's/^/| /' conftest.$ac_ext >&5
17588
Martin v. Löwiseba40652007-08-30 20:10:57 +000017589 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017590fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017591
17592rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017595ac_res=`eval echo '${'$as_ac_var'}'`
17596 { echo "$as_me:$LINENO: result: $ac_res" >&5
17597echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017598if test `eval echo '${'$as_ac_var'}'` = yes; then
17599 cat >>confdefs.h <<_ACEOF
17600#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17601_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017602
Martin v. Löwis1142de32002-03-29 16:28:31 +000017603else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017604 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017605 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017606 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17607 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017608esac
17609
Martin v. Löwis1142de32002-03-29 16:28:31 +000017610fi
17611done
17612
17613
Martin v. Löwis11437992002-04-12 09:54:03 +000017614
Martin v. Löwis1142de32002-03-29 16:28:31 +000017615for ac_func in getpgrp
17616do
Martin v. Löwis11437992002-04-12 09:54:03 +000017617as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017618{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17619echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17620if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017621 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017622else
Martin v. Löwis11437992002-04-12 09:54:03 +000017623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017624/* confdefs.h. */
17625_ACEOF
17626cat confdefs.h >>conftest.$ac_ext
17627cat >>conftest.$ac_ext <<_ACEOF
17628/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017629/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17630 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17631#define $ac_func innocuous_$ac_func
17632
Martin v. Löwis1142de32002-03-29 16:28:31 +000017633/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017634 which can conflict with char $ac_func (); below.
17635 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017636 <limits.h> exists even on freestanding compilers. */
17637
17638#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017639# include <limits.h>
17640#else
17641# include <assert.h>
17642#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017643
17644#undef $ac_func
17645
Martin v. Löwiseba40652007-08-30 20:10:57 +000017646/* Override any GCC internal prototype to avoid an error.
17647 Use char because int might match the return type of a GCC
17648 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017649#ifdef __cplusplus
17650extern "C"
17651#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017652char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017653/* The GNU C library defines this for functions which it implements
17654 to always fail with ENOSYS. Some functions are actually named
17655 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017656#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017657choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017658#endif
17659
Skip Montanaro6dead952003-09-25 14:50:04 +000017660int
17661main ()
17662{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017663return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017664 ;
17665 return 0;
17666}
17667_ACEOF
17668rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017669if { (ac_try="$ac_link"
17670case "(($ac_try" in
17671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17672 *) ac_try_echo=$ac_try;;
17673esac
17674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17675 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017677 grep -v '^ *+' conftest.er1 >conftest.err
17678 rm -f conftest.er1
17679 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017681 (exit $ac_status); } && {
17682 test -z "$ac_c_werror_flag" ||
17683 test ! -s conftest.err
17684 } && test -s conftest$ac_exeext &&
17685 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017686 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017687else
Martin v. Löwis11437992002-04-12 09:54:03 +000017688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017689sed 's/^/| /' conftest.$ac_ext >&5
17690
Martin v. Löwiseba40652007-08-30 20:10:57 +000017691 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017693
17694rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017695 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017697ac_res=`eval echo '${'$as_ac_var'}'`
17698 { echo "$as_me:$LINENO: result: $ac_res" >&5
17699echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017700if test `eval echo '${'$as_ac_var'}'` = yes; then
17701 cat >>confdefs.h <<_ACEOF
17702#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17703_ACEOF
17704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017705/* confdefs.h. */
17706_ACEOF
17707cat confdefs.h >>conftest.$ac_ext
17708cat >>conftest.$ac_ext <<_ACEOF
17709/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017710#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017711int
17712main ()
17713{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017714getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017715 ;
17716 return 0;
17717}
17718_ACEOF
17719rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017720if { (ac_try="$ac_compile"
17721case "(($ac_try" in
17722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17723 *) ac_try_echo=$ac_try;;
17724esac
17725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017728 grep -v '^ *+' conftest.er1 >conftest.err
17729 rm -f conftest.er1
17730 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017732 (exit $ac_status); } && {
17733 test -z "$ac_c_werror_flag" ||
17734 test ! -s conftest.err
17735 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017736
17737cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017738#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017739_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017740
Martin v. Löwis11437992002-04-12 09:54:03 +000017741
Guido van Rossumf78abae1997-01-21 22:02:36 +000017742else
Martin v. Löwis11437992002-04-12 09:54:03 +000017743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017744sed 's/^/| /' conftest.$ac_ext >&5
17745
Martin v. Löwiseba40652007-08-30 20:10:57 +000017746
Guido van Rossum627b2d71993-12-24 10:39:16 +000017747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017748
17749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017750
Guido van Rossum627b2d71993-12-24 10:39:16 +000017751fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017752done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017753
Jack Jansen150753c2003-03-29 22:07:47 +000017754
17755for ac_func in setpgrp
17756do
17757as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017758{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17759echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17760if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017761 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017762else
Martin v. Löwis11437992002-04-12 09:54:03 +000017763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017764/* confdefs.h. */
17765_ACEOF
17766cat confdefs.h >>conftest.$ac_ext
17767cat >>conftest.$ac_ext <<_ACEOF
17768/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017769/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17770 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17771#define $ac_func innocuous_$ac_func
17772
Jack Jansen150753c2003-03-29 22:07:47 +000017773/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017774 which can conflict with char $ac_func (); below.
17775 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017776 <limits.h> exists even on freestanding compilers. */
17777
17778#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017779# include <limits.h>
17780#else
17781# include <assert.h>
17782#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017783
17784#undef $ac_func
17785
Martin v. Löwiseba40652007-08-30 20:10:57 +000017786/* Override any GCC internal prototype to avoid an error.
17787 Use char because int might match the return type of a GCC
17788 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017789#ifdef __cplusplus
17790extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017791#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017792char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017793/* The GNU C library defines this for functions which it implements
17794 to always fail with ENOSYS. Some functions are actually named
17795 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017796#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017797choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017798#endif
17799
Skip Montanaro6dead952003-09-25 14:50:04 +000017800int
17801main ()
17802{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017803return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017804 ;
17805 return 0;
17806}
17807_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017808rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017809if { (ac_try="$ac_link"
17810case "(($ac_try" in
17811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17812 *) ac_try_echo=$ac_try;;
17813esac
17814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17815 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017817 grep -v '^ *+' conftest.er1 >conftest.err
17818 rm -f conftest.er1
17819 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017821 (exit $ac_status); } && {
17822 test -z "$ac_c_werror_flag" ||
17823 test ! -s conftest.err
17824 } && test -s conftest$ac_exeext &&
17825 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017826 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017827else
Jack Jansen150753c2003-03-29 22:07:47 +000017828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017829sed 's/^/| /' conftest.$ac_ext >&5
17830
Martin v. Löwiseba40652007-08-30 20:10:57 +000017831 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017833
17834rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017835 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017837ac_res=`eval echo '${'$as_ac_var'}'`
17838 { echo "$as_me:$LINENO: result: $ac_res" >&5
17839echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017840if test `eval echo '${'$as_ac_var'}'` = yes; then
17841 cat >>confdefs.h <<_ACEOF
17842#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17843_ACEOF
17844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017845/* confdefs.h. */
17846_ACEOF
17847cat confdefs.h >>conftest.$ac_ext
17848cat >>conftest.$ac_ext <<_ACEOF
17849/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017850#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017851int
17852main ()
17853{
17854setpgrp(0,0);
17855 ;
17856 return 0;
17857}
17858_ACEOF
17859rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017860if { (ac_try="$ac_compile"
17861case "(($ac_try" in
17862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17863 *) ac_try_echo=$ac_try;;
17864esac
17865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17866 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017868 grep -v '^ *+' conftest.er1 >conftest.err
17869 rm -f conftest.er1
17870 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017872 (exit $ac_status); } && {
17873 test -z "$ac_c_werror_flag" ||
17874 test ! -s conftest.err
17875 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017876
17877cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017878#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017879_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017880
Jack Jansen150753c2003-03-29 22:07:47 +000017881
17882else
17883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017884sed 's/^/| /' conftest.$ac_ext >&5
17885
Martin v. Löwiseba40652007-08-30 20:10:57 +000017886
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017888
17889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017890
17891fi
17892done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017893
Martin v. Löwis11437992002-04-12 09:54:03 +000017894
Thomas Wouters3a584202000-08-05 23:28:51 +000017895for ac_func in gettimeofday
17896do
Martin v. Löwis11437992002-04-12 09:54:03 +000017897as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017898{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17899echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17900if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017901 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017902else
Martin v. Löwis11437992002-04-12 09:54:03 +000017903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017904/* confdefs.h. */
17905_ACEOF
17906cat confdefs.h >>conftest.$ac_ext
17907cat >>conftest.$ac_ext <<_ACEOF
17908/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017909/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17910 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17911#define $ac_func innocuous_$ac_func
17912
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017913/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017914 which can conflict with char $ac_func (); below.
17915 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017916 <limits.h> exists even on freestanding compilers. */
17917
17918#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017919# include <limits.h>
17920#else
17921# include <assert.h>
17922#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017923
17924#undef $ac_func
17925
Martin v. Löwiseba40652007-08-30 20:10:57 +000017926/* Override any GCC internal prototype to avoid an error.
17927 Use char because int might match the return type of a GCC
17928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017929#ifdef __cplusplus
17930extern "C"
17931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017932char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017933/* The GNU C library defines this for functions which it implements
17934 to always fail with ENOSYS. Some functions are actually named
17935 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017936#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017937choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017938#endif
17939
Skip Montanaro6dead952003-09-25 14:50:04 +000017940int
17941main ()
17942{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017943return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017944 ;
17945 return 0;
17946}
17947_ACEOF
17948rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017949if { (ac_try="$ac_link"
17950case "(($ac_try" in
17951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17952 *) ac_try_echo=$ac_try;;
17953esac
17954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17955 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017957 grep -v '^ *+' conftest.er1 >conftest.err
17958 rm -f conftest.er1
17959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017961 (exit $ac_status); } && {
17962 test -z "$ac_c_werror_flag" ||
17963 test ! -s conftest.err
17964 } && test -s conftest$ac_exeext &&
17965 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017967else
Martin v. Löwis11437992002-04-12 09:54:03 +000017968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017969sed 's/^/| /' conftest.$ac_ext >&5
17970
Martin v. Löwiseba40652007-08-30 20:10:57 +000017971 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017973
17974rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017975 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017977ac_res=`eval echo '${'$as_ac_var'}'`
17978 { echo "$as_me:$LINENO: result: $ac_res" >&5
17979echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017980if test `eval echo '${'$as_ac_var'}'` = yes; then
17981 cat >>confdefs.h <<_ACEOF
17982#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17983_ACEOF
17984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017985/* confdefs.h. */
17986_ACEOF
17987cat confdefs.h >>conftest.$ac_ext
17988cat >>conftest.$ac_ext <<_ACEOF
17989/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017990#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017991int
17992main ()
17993{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017994gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017995 ;
17996 return 0;
17997}
17998_ACEOF
17999rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018000if { (ac_try="$ac_compile"
18001case "(($ac_try" in
18002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18003 *) ac_try_echo=$ac_try;;
18004esac
18005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018008 grep -v '^ *+' conftest.er1 >conftest.err
18009 rm -f conftest.er1
18010 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018012 (exit $ac_status); } && {
18013 test -z "$ac_c_werror_flag" ||
18014 test ! -s conftest.err
18015 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018016 :
18017else
Martin v. Löwis11437992002-04-12 09:54:03 +000018018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018019sed 's/^/| /' conftest.$ac_ext >&5
18020
Martin v. Löwis11437992002-04-12 09:54:03 +000018021
18022cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018023#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018024_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018025
Martin v. Löwis11437992002-04-12 09:54:03 +000018026
Guido van Rossum627b2d71993-12-24 10:39:16 +000018027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018028
18029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018030
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018031fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018032done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018033
Michael W. Hudson54241132001-12-07 15:38:26 +000018034
Martin v. Löwiseba40652007-08-30 20:10:57 +000018035{ echo "$as_me:$LINENO: checking for major" >&5
18036echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018037cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018038/* confdefs.h. */
18039_ACEOF
18040cat confdefs.h >>conftest.$ac_ext
18041cat >>conftest.$ac_ext <<_ACEOF
18042/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018043
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018044#if defined(MAJOR_IN_MKDEV)
18045#include <sys/mkdev.h>
18046#elif defined(MAJOR_IN_SYSMACROS)
18047#include <sys/sysmacros.h>
18048#else
18049#include <sys/types.h>
18050#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018051
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018052int
18053main ()
18054{
18055
18056 makedev(major(0),minor(0));
18057
18058 ;
18059 return 0;
18060}
18061_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018062rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018063if { (ac_try="$ac_link"
18064case "(($ac_try" in
18065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18066 *) ac_try_echo=$ac_try;;
18067esac
18068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18069 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018071 grep -v '^ *+' conftest.er1 >conftest.err
18072 rm -f conftest.er1
18073 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018075 (exit $ac_status); } && {
18076 test -z "$ac_c_werror_flag" ||
18077 test ! -s conftest.err
18078 } && test -s conftest$ac_exeext &&
18079 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018080
18081
18082cat >>confdefs.h <<\_ACEOF
18083#define HAVE_DEVICE_MACROS 1
18084_ACEOF
18085
Martin v. Löwiseba40652007-08-30 20:10:57 +000018086 { echo "$as_me:$LINENO: result: yes" >&5
18087echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018088
18089else
18090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018091sed 's/^/| /' conftest.$ac_ext >&5
18092
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018093
Martin v. Löwiseba40652007-08-30 20:10:57 +000018094 { echo "$as_me:$LINENO: result: no" >&5
18095echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018096
18097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018098
18099rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018100 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018101
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018102# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018103# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018104{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18105echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018107/* confdefs.h. */
18108_ACEOF
18109cat confdefs.h >>conftest.$ac_ext
18110cat >>conftest.$ac_ext <<_ACEOF
18111/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018112
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018113#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018114#include <sys/socket.h>
18115#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018116#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018117
Martin v. Löwis11437992002-04-12 09:54:03 +000018118int
18119main ()
18120{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018121
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018122getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018123
Martin v. Löwis11437992002-04-12 09:54:03 +000018124 ;
18125 return 0;
18126}
18127_ACEOF
18128rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018129if { (ac_try="$ac_link"
18130case "(($ac_try" in
18131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18132 *) ac_try_echo=$ac_try;;
18133esac
18134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18135 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018137 grep -v '^ *+' conftest.er1 >conftest.err
18138 rm -f conftest.er1
18139 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018141 (exit $ac_status); } && {
18142 test -z "$ac_c_werror_flag" ||
18143 test ! -s conftest.err
18144 } && test -s conftest$ac_exeext &&
18145 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018146
Martin v. Löwiseba40652007-08-30 20:10:57 +000018147{ echo "$as_me:$LINENO: result: yes" >&5
18148echo "${ECHO_T}yes" >&6; }
18149{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18150echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018151if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018152 { echo "$as_me:$LINENO: result: buggy" >&5
18153echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018154buggygetaddrinfo=yes
18155else
Martin v. Löwis11437992002-04-12 09:54:03 +000018156 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018157/* confdefs.h. */
18158_ACEOF
18159cat confdefs.h >>conftest.$ac_ext
18160cat >>conftest.$ac_ext <<_ACEOF
18161/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018162
18163#include <sys/types.h>
18164#include <netdb.h>
18165#include <string.h>
18166#include <sys/socket.h>
18167#include <netinet/in.h>
18168
18169main()
18170{
18171 int passive, gaierr, inet4 = 0, inet6 = 0;
18172 struct addrinfo hints, *ai, *aitop;
18173 char straddr[INET6_ADDRSTRLEN], strport[16];
18174
18175 for (passive = 0; passive <= 1; passive++) {
18176 memset(&hints, 0, sizeof(hints));
18177 hints.ai_family = AF_UNSPEC;
18178 hints.ai_flags = passive ? AI_PASSIVE : 0;
18179 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018180 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018181 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18182 (void)gai_strerror(gaierr);
18183 goto bad;
18184 }
18185 for (ai = aitop; ai; ai = ai->ai_next) {
18186 if (ai->ai_addr == NULL ||
18187 ai->ai_addrlen == 0 ||
18188 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18189 straddr, sizeof(straddr), strport, sizeof(strport),
18190 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18191 goto bad;
18192 }
18193 switch (ai->ai_family) {
18194 case AF_INET:
18195 if (strcmp(strport, "54321") != 0) {
18196 goto bad;
18197 }
18198 if (passive) {
18199 if (strcmp(straddr, "0.0.0.0") != 0) {
18200 goto bad;
18201 }
18202 } else {
18203 if (strcmp(straddr, "127.0.0.1") != 0) {
18204 goto bad;
18205 }
18206 }
18207 inet4++;
18208 break;
18209 case AF_INET6:
18210 if (strcmp(strport, "54321") != 0) {
18211 goto bad;
18212 }
18213 if (passive) {
18214 if (strcmp(straddr, "::") != 0) {
18215 goto bad;
18216 }
18217 } else {
18218 if (strcmp(straddr, "::1") != 0) {
18219 goto bad;
18220 }
18221 }
18222 inet6++;
18223 break;
18224 case AF_UNSPEC:
18225 goto bad;
18226 break;
18227 default:
18228 /* another family support? */
18229 break;
18230 }
18231 }
18232 }
18233
18234 if (!(inet4 == 0 || inet4 == 2))
18235 goto bad;
18236 if (!(inet6 == 0 || inet6 == 2))
18237 goto bad;
18238
18239 if (aitop)
18240 freeaddrinfo(aitop);
18241 exit(0);
18242
18243 bad:
18244 if (aitop)
18245 freeaddrinfo(aitop);
18246 exit(1);
18247}
18248
Martin v. Löwis11437992002-04-12 09:54:03 +000018249_ACEOF
18250rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018251if { (ac_try="$ac_link"
18252case "(($ac_try" in
18253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18254 *) ac_try_echo=$ac_try;;
18255esac
18256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18257 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018258 ac_status=$?
18259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18260 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018261 { (case "(($ac_try" in
18262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18263 *) ac_try_echo=$ac_try;;
18264esac
18265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18266 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018267 ac_status=$?
18268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18269 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018270 { echo "$as_me:$LINENO: result: good" >&5
18271echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018272buggygetaddrinfo=no
18273else
Martin v. Löwis11437992002-04-12 09:54:03 +000018274 echo "$as_me: program exited with status $ac_status" >&5
18275echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018276sed 's/^/| /' conftest.$ac_ext >&5
18277
Martin v. Löwis11437992002-04-12 09:54:03 +000018278( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018279{ echo "$as_me:$LINENO: result: buggy" >&5
18280echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018281buggygetaddrinfo=yes
18282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018283rm -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 +000018284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018285
18286
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018287else
Martin v. Löwis11437992002-04-12 09:54:03 +000018288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018289sed 's/^/| /' conftest.$ac_ext >&5
18290
Martin v. Löwis11437992002-04-12 09:54:03 +000018291
Martin v. Löwiseba40652007-08-30 20:10:57 +000018292{ echo "$as_me:$LINENO: result: no" >&5
18293echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018294buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018295
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018297
18298rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018300
18301if test "$buggygetaddrinfo" = "yes"; then
18302 if test "$ipv6" = "yes"; then
18303 echo 'Fatal: You must get working getaddrinfo() function.'
18304 echo ' or you can specify "--disable-ipv6"'.
18305 exit 1
18306 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018307else
Martin v. Löwis11437992002-04-12 09:54:03 +000018308
18309cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018310#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018311_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018312
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018313fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018314
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018315for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018316do
Martin v. Löwis11437992002-04-12 09:54:03 +000018317as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018318{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18319echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18320if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018321 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018322else
Martin v. Löwis11437992002-04-12 09:54:03 +000018323 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018324/* confdefs.h. */
18325_ACEOF
18326cat confdefs.h >>conftest.$ac_ext
18327cat >>conftest.$ac_ext <<_ACEOF
18328/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018329/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18330 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18331#define $ac_func innocuous_$ac_func
18332
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018333/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018334 which can conflict with char $ac_func (); below.
18335 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018336 <limits.h> exists even on freestanding compilers. */
18337
18338#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018339# include <limits.h>
18340#else
18341# include <assert.h>
18342#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018343
18344#undef $ac_func
18345
Martin v. Löwiseba40652007-08-30 20:10:57 +000018346/* Override any GCC internal prototype to avoid an error.
18347 Use char because int might match the return type of a GCC
18348 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018349#ifdef __cplusplus
18350extern "C"
18351#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018352char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018353/* The GNU C library defines this for functions which it implements
18354 to always fail with ENOSYS. Some functions are actually named
18355 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018356#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018357choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018358#endif
18359
Skip Montanaro6dead952003-09-25 14:50:04 +000018360int
18361main ()
18362{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018363return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018364 ;
18365 return 0;
18366}
18367_ACEOF
18368rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018369if { (ac_try="$ac_link"
18370case "(($ac_try" in
18371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18372 *) ac_try_echo=$ac_try;;
18373esac
18374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18375 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018377 grep -v '^ *+' conftest.er1 >conftest.err
18378 rm -f conftest.er1
18379 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018381 (exit $ac_status); } && {
18382 test -z "$ac_c_werror_flag" ||
18383 test ! -s conftest.err
18384 } && test -s conftest$ac_exeext &&
18385 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018386 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018387else
Martin v. Löwis11437992002-04-12 09:54:03 +000018388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018389sed 's/^/| /' conftest.$ac_ext >&5
18390
Martin v. Löwiseba40652007-08-30 20:10:57 +000018391 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018393
18394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018395 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018397ac_res=`eval echo '${'$as_ac_var'}'`
18398 { echo "$as_me:$LINENO: result: $ac_res" >&5
18399echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018400if test `eval echo '${'$as_ac_var'}'` = yes; then
18401 cat >>confdefs.h <<_ACEOF
18402#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18403_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018404
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018405fi
18406done
18407
Michael W. Hudson54241132001-12-07 15:38:26 +000018408
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018409# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018410{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18411echo $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 +000018412if test "${ac_cv_header_time+set}" = set; then
18413 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018414else
Martin v. Löwis11437992002-04-12 09:54:03 +000018415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018416/* confdefs.h. */
18417_ACEOF
18418cat confdefs.h >>conftest.$ac_ext
18419cat >>conftest.$ac_ext <<_ACEOF
18420/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018421#include <sys/types.h>
18422#include <sys/time.h>
18423#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018424
Martin v. Löwis11437992002-04-12 09:54:03 +000018425int
18426main ()
18427{
18428if ((struct tm *) 0)
18429return 0;
18430 ;
18431 return 0;
18432}
18433_ACEOF
18434rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018435if { (ac_try="$ac_compile"
18436case "(($ac_try" in
18437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18438 *) ac_try_echo=$ac_try;;
18439esac
18440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18441 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018443 grep -v '^ *+' conftest.er1 >conftest.err
18444 rm -f conftest.er1
18445 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018447 (exit $ac_status); } && {
18448 test -z "$ac_c_werror_flag" ||
18449 test ! -s conftest.err
18450 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018451 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018452else
Martin v. Löwis11437992002-04-12 09:54:03 +000018453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018454sed 's/^/| /' conftest.$ac_ext >&5
18455
Martin v. Löwiseba40652007-08-30 20:10:57 +000018456 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018458
18459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018461{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18462echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018463if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018464
18465cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018466#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018467_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018468
18469fi
18470
Martin v. Löwiseba40652007-08-30 20:10:57 +000018471{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18472echo $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 +000018473if test "${ac_cv_struct_tm+set}" = set; then
18474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018475else
Martin v. Löwis11437992002-04-12 09:54:03 +000018476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018477/* confdefs.h. */
18478_ACEOF
18479cat confdefs.h >>conftest.$ac_ext
18480cat >>conftest.$ac_ext <<_ACEOF
18481/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018482#include <sys/types.h>
18483#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018484
Martin v. Löwis11437992002-04-12 09:54:03 +000018485int
18486main ()
18487{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018488struct tm tm;
18489 int *p = &tm.tm_sec;
18490 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018491 ;
18492 return 0;
18493}
18494_ACEOF
18495rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018496if { (ac_try="$ac_compile"
18497case "(($ac_try" in
18498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18499 *) ac_try_echo=$ac_try;;
18500esac
18501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18502 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018504 grep -v '^ *+' conftest.er1 >conftest.err
18505 rm -f conftest.er1
18506 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018508 (exit $ac_status); } && {
18509 test -z "$ac_c_werror_flag" ||
18510 test ! -s conftest.err
18511 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018512 ac_cv_struct_tm=time.h
18513else
Martin v. Löwis11437992002-04-12 09:54:03 +000018514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018515sed 's/^/| /' conftest.$ac_ext >&5
18516
Martin v. Löwiseba40652007-08-30 20:10:57 +000018517 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018519
18520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018522{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18523echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018524if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018525
18526cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018527#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018528_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018529
18530fi
18531
Martin v. Löwiseba40652007-08-30 20:10:57 +000018532{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18533echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018534if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18535 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018536else
Martin v. Löwis11437992002-04-12 09:54:03 +000018537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018538/* confdefs.h. */
18539_ACEOF
18540cat confdefs.h >>conftest.$ac_ext
18541cat >>conftest.$ac_ext <<_ACEOF
18542/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018543#include <sys/types.h>
18544#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018545
18546
Martin v. Löwis11437992002-04-12 09:54:03 +000018547int
18548main ()
18549{
18550static struct tm ac_aggr;
18551if (ac_aggr.tm_zone)
18552return 0;
18553 ;
18554 return 0;
18555}
18556_ACEOF
18557rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018558if { (ac_try="$ac_compile"
18559case "(($ac_try" in
18560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18561 *) ac_try_echo=$ac_try;;
18562esac
18563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018566 grep -v '^ *+' conftest.er1 >conftest.err
18567 rm -f conftest.er1
18568 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018570 (exit $ac_status); } && {
18571 test -z "$ac_c_werror_flag" ||
18572 test ! -s conftest.err
18573 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018574 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018575else
Martin v. Löwis11437992002-04-12 09:54:03 +000018576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018577sed 's/^/| /' conftest.$ac_ext >&5
18578
Martin v. Löwiseba40652007-08-30 20:10:57 +000018579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018580/* confdefs.h. */
18581_ACEOF
18582cat confdefs.h >>conftest.$ac_ext
18583cat >>conftest.$ac_ext <<_ACEOF
18584/* end confdefs.h. */
18585#include <sys/types.h>
18586#include <$ac_cv_struct_tm>
18587
18588
18589int
18590main ()
18591{
18592static struct tm ac_aggr;
18593if (sizeof ac_aggr.tm_zone)
18594return 0;
18595 ;
18596 return 0;
18597}
18598_ACEOF
18599rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018600if { (ac_try="$ac_compile"
18601case "(($ac_try" in
18602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18603 *) ac_try_echo=$ac_try;;
18604esac
18605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18606 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018608 grep -v '^ *+' conftest.er1 >conftest.err
18609 rm -f conftest.er1
18610 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018612 (exit $ac_status); } && {
18613 test -z "$ac_c_werror_flag" ||
18614 test ! -s conftest.err
18615 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018616 ac_cv_member_struct_tm_tm_zone=yes
18617else
18618 echo "$as_me: failed program was:" >&5
18619sed 's/^/| /' conftest.$ac_ext >&5
18620
Martin v. Löwiseba40652007-08-30 20:10:57 +000018621 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018623
18624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018626
18627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018629{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18630echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018631if test $ac_cv_member_struct_tm_tm_zone = yes; then
18632
18633cat >>confdefs.h <<_ACEOF
18634#define HAVE_STRUCT_TM_TM_ZONE 1
18635_ACEOF
18636
18637
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018638fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018639
Martin v. Löwis11437992002-04-12 09:54:03 +000018640if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18641
18642cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018643#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018644_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018645
18646else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018647 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18648echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18649if test "${ac_cv_have_decl_tzname+set}" = set; then
18650 echo $ECHO_N "(cached) $ECHO_C" >&6
18651else
18652 cat >conftest.$ac_ext <<_ACEOF
18653/* confdefs.h. */
18654_ACEOF
18655cat confdefs.h >>conftest.$ac_ext
18656cat >>conftest.$ac_ext <<_ACEOF
18657/* end confdefs.h. */
18658#include <time.h>
18659
18660int
18661main ()
18662{
18663#ifndef tzname
18664 (void) tzname;
18665#endif
18666
18667 ;
18668 return 0;
18669}
18670_ACEOF
18671rm -f conftest.$ac_objext
18672if { (ac_try="$ac_compile"
18673case "(($ac_try" in
18674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18675 *) ac_try_echo=$ac_try;;
18676esac
18677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18678 (eval "$ac_compile") 2>conftest.er1
18679 ac_status=$?
18680 grep -v '^ *+' conftest.er1 >conftest.err
18681 rm -f conftest.er1
18682 cat conftest.err >&5
18683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18684 (exit $ac_status); } && {
18685 test -z "$ac_c_werror_flag" ||
18686 test ! -s conftest.err
18687 } && test -s conftest.$ac_objext; then
18688 ac_cv_have_decl_tzname=yes
18689else
18690 echo "$as_me: failed program was:" >&5
18691sed 's/^/| /' conftest.$ac_ext >&5
18692
18693 ac_cv_have_decl_tzname=no
18694fi
18695
18696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18697fi
18698{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18699echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18700if test $ac_cv_have_decl_tzname = yes; then
18701
18702cat >>confdefs.h <<_ACEOF
18703#define HAVE_DECL_TZNAME 1
18704_ACEOF
18705
18706
18707else
18708 cat >>confdefs.h <<_ACEOF
18709#define HAVE_DECL_TZNAME 0
18710_ACEOF
18711
18712
18713fi
18714
18715
18716 { echo "$as_me:$LINENO: checking for tzname" >&5
18717echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018718if test "${ac_cv_var_tzname+set}" = set; then
18719 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018720else
Martin v. Löwis11437992002-04-12 09:54:03 +000018721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018722/* confdefs.h. */
18723_ACEOF
18724cat confdefs.h >>conftest.$ac_ext
18725cat >>conftest.$ac_ext <<_ACEOF
18726/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018727#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018728#if !HAVE_DECL_TZNAME
18729extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018730#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018731
Martin v. Löwis11437992002-04-12 09:54:03 +000018732int
18733main ()
18734{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018735return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018736 ;
18737 return 0;
18738}
18739_ACEOF
18740rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018741if { (ac_try="$ac_link"
18742case "(($ac_try" in
18743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18744 *) ac_try_echo=$ac_try;;
18745esac
18746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18747 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018749 grep -v '^ *+' conftest.er1 >conftest.err
18750 rm -f conftest.er1
18751 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018753 (exit $ac_status); } && {
18754 test -z "$ac_c_werror_flag" ||
18755 test ! -s conftest.err
18756 } && test -s conftest$ac_exeext &&
18757 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018758 ac_cv_var_tzname=yes
18759else
Martin v. Löwis11437992002-04-12 09:54:03 +000018760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018761sed 's/^/| /' conftest.$ac_ext >&5
18762
Martin v. Löwiseba40652007-08-30 20:10:57 +000018763 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018765
18766rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018767 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018769{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18770echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018771 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018772
18773cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018774#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018775_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018777 fi
18778fi
18779
Martin v. Löwiseba40652007-08-30 20:10:57 +000018780{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18781echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018782if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18783 echo $ECHO_N "(cached) $ECHO_C" >&6
18784else
18785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018786/* confdefs.h. */
18787_ACEOF
18788cat confdefs.h >>conftest.$ac_ext
18789cat >>conftest.$ac_ext <<_ACEOF
18790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018791$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018792int
18793main ()
18794{
18795static struct stat ac_aggr;
18796if (ac_aggr.st_rdev)
18797return 0;
18798 ;
18799 return 0;
18800}
18801_ACEOF
18802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018803if { (ac_try="$ac_compile"
18804case "(($ac_try" in
18805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18806 *) ac_try_echo=$ac_try;;
18807esac
18808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018811 grep -v '^ *+' conftest.er1 >conftest.err
18812 rm -f conftest.er1
18813 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018815 (exit $ac_status); } && {
18816 test -z "$ac_c_werror_flag" ||
18817 test ! -s conftest.err
18818 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018819 ac_cv_member_struct_stat_st_rdev=yes
18820else
18821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018822sed 's/^/| /' conftest.$ac_ext >&5
18823
Martin v. Löwiseba40652007-08-30 20:10:57 +000018824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018825/* confdefs.h. */
18826_ACEOF
18827cat confdefs.h >>conftest.$ac_ext
18828cat >>conftest.$ac_ext <<_ACEOF
18829/* end confdefs.h. */
18830$ac_includes_default
18831int
18832main ()
18833{
18834static struct stat ac_aggr;
18835if (sizeof ac_aggr.st_rdev)
18836return 0;
18837 ;
18838 return 0;
18839}
18840_ACEOF
18841rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018842if { (ac_try="$ac_compile"
18843case "(($ac_try" in
18844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18845 *) ac_try_echo=$ac_try;;
18846esac
18847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18848 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018850 grep -v '^ *+' conftest.er1 >conftest.err
18851 rm -f conftest.er1
18852 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018854 (exit $ac_status); } && {
18855 test -z "$ac_c_werror_flag" ||
18856 test ! -s conftest.err
18857 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018858 ac_cv_member_struct_stat_st_rdev=yes
18859else
18860 echo "$as_me: failed program was:" >&5
18861sed 's/^/| /' conftest.$ac_ext >&5
18862
Martin v. Löwiseba40652007-08-30 20:10:57 +000018863 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018865
18866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018868
18869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018871{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18872echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018873if test $ac_cv_member_struct_stat_st_rdev = yes; then
18874
18875cat >>confdefs.h <<_ACEOF
18876#define HAVE_STRUCT_STAT_ST_RDEV 1
18877_ACEOF
18878
18879
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018880fi
18881
Martin v. Löwiseba40652007-08-30 20:10:57 +000018882{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18883echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018884if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18885 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018886else
Martin v. Löwis11437992002-04-12 09:54:03 +000018887 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018888/* confdefs.h. */
18889_ACEOF
18890cat confdefs.h >>conftest.$ac_ext
18891cat >>conftest.$ac_ext <<_ACEOF
18892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018893$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018894int
18895main ()
18896{
18897static struct stat ac_aggr;
18898if (ac_aggr.st_blksize)
18899return 0;
18900 ;
18901 return 0;
18902}
18903_ACEOF
18904rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018905if { (ac_try="$ac_compile"
18906case "(($ac_try" in
18907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18908 *) ac_try_echo=$ac_try;;
18909esac
18910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018913 grep -v '^ *+' conftest.er1 >conftest.err
18914 rm -f conftest.er1
18915 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018917 (exit $ac_status); } && {
18918 test -z "$ac_c_werror_flag" ||
18919 test ! -s conftest.err
18920 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018921 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018922else
Martin v. Löwis11437992002-04-12 09:54:03 +000018923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018924sed 's/^/| /' conftest.$ac_ext >&5
18925
Martin v. Löwiseba40652007-08-30 20:10:57 +000018926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018927/* confdefs.h. */
18928_ACEOF
18929cat confdefs.h >>conftest.$ac_ext
18930cat >>conftest.$ac_ext <<_ACEOF
18931/* end confdefs.h. */
18932$ac_includes_default
18933int
18934main ()
18935{
18936static struct stat ac_aggr;
18937if (sizeof ac_aggr.st_blksize)
18938return 0;
18939 ;
18940 return 0;
18941}
18942_ACEOF
18943rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018944if { (ac_try="$ac_compile"
18945case "(($ac_try" in
18946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18947 *) ac_try_echo=$ac_try;;
18948esac
18949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18950 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018952 grep -v '^ *+' conftest.er1 >conftest.err
18953 rm -f conftest.er1
18954 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018956 (exit $ac_status); } && {
18957 test -z "$ac_c_werror_flag" ||
18958 test ! -s conftest.err
18959 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018960 ac_cv_member_struct_stat_st_blksize=yes
18961else
18962 echo "$as_me: failed program was:" >&5
18963sed 's/^/| /' conftest.$ac_ext >&5
18964
Martin v. Löwiseba40652007-08-30 20:10:57 +000018965 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018967
18968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018970
18971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018973{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
18974echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018975if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018976
Martin v. Löwis11437992002-04-12 09:54:03 +000018977cat >>confdefs.h <<_ACEOF
18978#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
18979_ACEOF
18980
18981
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018982fi
18983
Martin v. Löwiseba40652007-08-30 20:10:57 +000018984{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
18985echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018986if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
18987 echo $ECHO_N "(cached) $ECHO_C" >&6
18988else
18989 cat >conftest.$ac_ext <<_ACEOF
18990/* confdefs.h. */
18991_ACEOF
18992cat confdefs.h >>conftest.$ac_ext
18993cat >>conftest.$ac_ext <<_ACEOF
18994/* end confdefs.h. */
18995$ac_includes_default
18996int
18997main ()
18998{
18999static struct stat ac_aggr;
19000if (ac_aggr.st_flags)
19001return 0;
19002 ;
19003 return 0;
19004}
19005_ACEOF
19006rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019007if { (ac_try="$ac_compile"
19008case "(($ac_try" in
19009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19010 *) ac_try_echo=$ac_try;;
19011esac
19012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19013 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019014 ac_status=$?
19015 grep -v '^ *+' conftest.er1 >conftest.err
19016 rm -f conftest.er1
19017 cat conftest.err >&5
19018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019019 (exit $ac_status); } && {
19020 test -z "$ac_c_werror_flag" ||
19021 test ! -s conftest.err
19022 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019023 ac_cv_member_struct_stat_st_flags=yes
19024else
19025 echo "$as_me: failed program was:" >&5
19026sed 's/^/| /' conftest.$ac_ext >&5
19027
Martin v. Löwiseba40652007-08-30 20:10:57 +000019028 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019029/* confdefs.h. */
19030_ACEOF
19031cat confdefs.h >>conftest.$ac_ext
19032cat >>conftest.$ac_ext <<_ACEOF
19033/* end confdefs.h. */
19034$ac_includes_default
19035int
19036main ()
19037{
19038static struct stat ac_aggr;
19039if (sizeof ac_aggr.st_flags)
19040return 0;
19041 ;
19042 return 0;
19043}
19044_ACEOF
19045rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019046if { (ac_try="$ac_compile"
19047case "(($ac_try" in
19048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19049 *) ac_try_echo=$ac_try;;
19050esac
19051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19052 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019053 ac_status=$?
19054 grep -v '^ *+' conftest.er1 >conftest.err
19055 rm -f conftest.er1
19056 cat conftest.err >&5
19057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019058 (exit $ac_status); } && {
19059 test -z "$ac_c_werror_flag" ||
19060 test ! -s conftest.err
19061 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019062 ac_cv_member_struct_stat_st_flags=yes
19063else
19064 echo "$as_me: failed program was:" >&5
19065sed 's/^/| /' conftest.$ac_ext >&5
19066
Martin v. Löwiseba40652007-08-30 20:10:57 +000019067 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019069
19070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019072
19073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019075{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19076echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019077if test $ac_cv_member_struct_stat_st_flags = yes; then
19078
19079cat >>confdefs.h <<_ACEOF
19080#define HAVE_STRUCT_STAT_ST_FLAGS 1
19081_ACEOF
19082
19083
19084fi
19085
Martin v. Löwiseba40652007-08-30 20:10:57 +000019086{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19087echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019088if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19089 echo $ECHO_N "(cached) $ECHO_C" >&6
19090else
19091 cat >conftest.$ac_ext <<_ACEOF
19092/* confdefs.h. */
19093_ACEOF
19094cat confdefs.h >>conftest.$ac_ext
19095cat >>conftest.$ac_ext <<_ACEOF
19096/* end confdefs.h. */
19097$ac_includes_default
19098int
19099main ()
19100{
19101static struct stat ac_aggr;
19102if (ac_aggr.st_gen)
19103return 0;
19104 ;
19105 return 0;
19106}
19107_ACEOF
19108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019109if { (ac_try="$ac_compile"
19110case "(($ac_try" in
19111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19112 *) ac_try_echo=$ac_try;;
19113esac
19114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019116 ac_status=$?
19117 grep -v '^ *+' conftest.er1 >conftest.err
19118 rm -f conftest.er1
19119 cat conftest.err >&5
19120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019121 (exit $ac_status); } && {
19122 test -z "$ac_c_werror_flag" ||
19123 test ! -s conftest.err
19124 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019125 ac_cv_member_struct_stat_st_gen=yes
19126else
19127 echo "$as_me: failed program was:" >&5
19128sed 's/^/| /' conftest.$ac_ext >&5
19129
Martin v. Löwiseba40652007-08-30 20:10:57 +000019130 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019131/* confdefs.h. */
19132_ACEOF
19133cat confdefs.h >>conftest.$ac_ext
19134cat >>conftest.$ac_ext <<_ACEOF
19135/* end confdefs.h. */
19136$ac_includes_default
19137int
19138main ()
19139{
19140static struct stat ac_aggr;
19141if (sizeof ac_aggr.st_gen)
19142return 0;
19143 ;
19144 return 0;
19145}
19146_ACEOF
19147rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019148if { (ac_try="$ac_compile"
19149case "(($ac_try" in
19150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19151 *) ac_try_echo=$ac_try;;
19152esac
19153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019155 ac_status=$?
19156 grep -v '^ *+' conftest.er1 >conftest.err
19157 rm -f conftest.er1
19158 cat conftest.err >&5
19159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019160 (exit $ac_status); } && {
19161 test -z "$ac_c_werror_flag" ||
19162 test ! -s conftest.err
19163 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019164 ac_cv_member_struct_stat_st_gen=yes
19165else
19166 echo "$as_me: failed program was:" >&5
19167sed 's/^/| /' conftest.$ac_ext >&5
19168
Martin v. Löwiseba40652007-08-30 20:10:57 +000019169 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019171
19172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019174
19175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019177{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19178echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019179if test $ac_cv_member_struct_stat_st_gen = yes; then
19180
19181cat >>confdefs.h <<_ACEOF
19182#define HAVE_STRUCT_STAT_ST_GEN 1
19183_ACEOF
19184
19185
19186fi
19187
Martin v. Löwiseba40652007-08-30 20:10:57 +000019188{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19189echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019190if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19191 echo $ECHO_N "(cached) $ECHO_C" >&6
19192else
19193 cat >conftest.$ac_ext <<_ACEOF
19194/* confdefs.h. */
19195_ACEOF
19196cat confdefs.h >>conftest.$ac_ext
19197cat >>conftest.$ac_ext <<_ACEOF
19198/* end confdefs.h. */
19199$ac_includes_default
19200int
19201main ()
19202{
19203static struct stat ac_aggr;
19204if (ac_aggr.st_birthtime)
19205return 0;
19206 ;
19207 return 0;
19208}
19209_ACEOF
19210rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019211if { (ac_try="$ac_compile"
19212case "(($ac_try" in
19213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19214 *) ac_try_echo=$ac_try;;
19215esac
19216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019218 ac_status=$?
19219 grep -v '^ *+' conftest.er1 >conftest.err
19220 rm -f conftest.er1
19221 cat conftest.err >&5
19222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019223 (exit $ac_status); } && {
19224 test -z "$ac_c_werror_flag" ||
19225 test ! -s conftest.err
19226 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019227 ac_cv_member_struct_stat_st_birthtime=yes
19228else
19229 echo "$as_me: failed program was:" >&5
19230sed 's/^/| /' conftest.$ac_ext >&5
19231
Martin v. Löwiseba40652007-08-30 20:10:57 +000019232 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019233/* confdefs.h. */
19234_ACEOF
19235cat confdefs.h >>conftest.$ac_ext
19236cat >>conftest.$ac_ext <<_ACEOF
19237/* end confdefs.h. */
19238$ac_includes_default
19239int
19240main ()
19241{
19242static struct stat ac_aggr;
19243if (sizeof ac_aggr.st_birthtime)
19244return 0;
19245 ;
19246 return 0;
19247}
19248_ACEOF
19249rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019250if { (ac_try="$ac_compile"
19251case "(($ac_try" in
19252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19253 *) ac_try_echo=$ac_try;;
19254esac
19255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19256 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019257 ac_status=$?
19258 grep -v '^ *+' conftest.er1 >conftest.err
19259 rm -f conftest.er1
19260 cat conftest.err >&5
19261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019262 (exit $ac_status); } && {
19263 test -z "$ac_c_werror_flag" ||
19264 test ! -s conftest.err
19265 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019266 ac_cv_member_struct_stat_st_birthtime=yes
19267else
19268 echo "$as_me: failed program was:" >&5
19269sed 's/^/| /' conftest.$ac_ext >&5
19270
Martin v. Löwiseba40652007-08-30 20:10:57 +000019271 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019273
19274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019276
19277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019279{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19280echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019281if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19282
19283cat >>confdefs.h <<_ACEOF
19284#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19285_ACEOF
19286
19287
19288fi
19289
Martin v. Löwiseba40652007-08-30 20:10:57 +000019290{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19291echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019292if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19293 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019294else
Martin v. Löwis11437992002-04-12 09:54:03 +000019295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019296/* confdefs.h. */
19297_ACEOF
19298cat confdefs.h >>conftest.$ac_ext
19299cat >>conftest.$ac_ext <<_ACEOF
19300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019301$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019302int
19303main ()
19304{
19305static struct stat ac_aggr;
19306if (ac_aggr.st_blocks)
19307return 0;
19308 ;
19309 return 0;
19310}
19311_ACEOF
19312rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019313if { (ac_try="$ac_compile"
19314case "(($ac_try" in
19315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19316 *) ac_try_echo=$ac_try;;
19317esac
19318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019321 grep -v '^ *+' conftest.er1 >conftest.err
19322 rm -f conftest.er1
19323 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019325 (exit $ac_status); } && {
19326 test -z "$ac_c_werror_flag" ||
19327 test ! -s conftest.err
19328 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019329 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019330else
Martin v. Löwis11437992002-04-12 09:54:03 +000019331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019332sed 's/^/| /' conftest.$ac_ext >&5
19333
Martin v. Löwiseba40652007-08-30 20:10:57 +000019334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019335/* confdefs.h. */
19336_ACEOF
19337cat confdefs.h >>conftest.$ac_ext
19338cat >>conftest.$ac_ext <<_ACEOF
19339/* end confdefs.h. */
19340$ac_includes_default
19341int
19342main ()
19343{
19344static struct stat ac_aggr;
19345if (sizeof ac_aggr.st_blocks)
19346return 0;
19347 ;
19348 return 0;
19349}
19350_ACEOF
19351rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019352if { (ac_try="$ac_compile"
19353case "(($ac_try" in
19354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19355 *) ac_try_echo=$ac_try;;
19356esac
19357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19358 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019360 grep -v '^ *+' conftest.er1 >conftest.err
19361 rm -f conftest.er1
19362 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019364 (exit $ac_status); } && {
19365 test -z "$ac_c_werror_flag" ||
19366 test ! -s conftest.err
19367 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019368 ac_cv_member_struct_stat_st_blocks=yes
19369else
19370 echo "$as_me: failed program was:" >&5
19371sed 's/^/| /' conftest.$ac_ext >&5
19372
Martin v. Löwiseba40652007-08-30 20:10:57 +000019373 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019375
19376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019378
19379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019381{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19382echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019383if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019384
Martin v. Löwis11437992002-04-12 09:54:03 +000019385cat >>confdefs.h <<_ACEOF
19386#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19387_ACEOF
19388
19389
19390cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019391#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019392_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019393
19394else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019395 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019396 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019397 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19398 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019399esac
19400
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019401fi
19402
Michael W. Hudson54241132001-12-07 15:38:26 +000019403
Martin v. Löwis11437992002-04-12 09:54:03 +000019404
Martin v. Löwiseba40652007-08-30 20:10:57 +000019405{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19406echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019407if test "${ac_cv_header_time_altzone+set}" = set; then
19408 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019409else
Martin v. Löwis11437992002-04-12 09:54:03 +000019410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019411/* confdefs.h. */
19412_ACEOF
19413cat confdefs.h >>conftest.$ac_ext
19414cat >>conftest.$ac_ext <<_ACEOF
19415/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019416#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019417int
19418main ()
19419{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019420return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019421 ;
19422 return 0;
19423}
19424_ACEOF
19425rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019426if { (ac_try="$ac_compile"
19427case "(($ac_try" in
19428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19429 *) ac_try_echo=$ac_try;;
19430esac
19431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019434 grep -v '^ *+' conftest.er1 >conftest.err
19435 rm -f conftest.er1
19436 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019438 (exit $ac_status); } && {
19439 test -z "$ac_c_werror_flag" ||
19440 test ! -s conftest.err
19441 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019442 ac_cv_header_time_altzone=yes
19443else
Martin v. Löwis11437992002-04-12 09:54:03 +000019444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019445sed 's/^/| /' conftest.$ac_ext >&5
19446
Martin v. Löwiseba40652007-08-30 20:10:57 +000019447 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019448fi
19449
Martin v. Löwiseba40652007-08-30 20:10:57 +000019450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19451fi
19452
19453{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19454echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019455if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019456
19457cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019458#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019459_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019460
19461fi
19462
Guido van Rossumda88dad1995-01-26 00:46:29 +000019463was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019464{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19465echo $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 +000019466cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019467/* confdefs.h. */
19468_ACEOF
19469cat confdefs.h >>conftest.$ac_ext
19470cat >>conftest.$ac_ext <<_ACEOF
19471/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019472
19473#include <sys/types.h>
19474#include <sys/select.h>
19475#include <sys/time.h>
19476
Martin v. Löwis11437992002-04-12 09:54:03 +000019477int
19478main ()
19479{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019480;
Martin v. Löwis11437992002-04-12 09:54:03 +000019481 ;
19482 return 0;
19483}
19484_ACEOF
19485rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019486if { (ac_try="$ac_compile"
19487case "(($ac_try" in
19488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19489 *) ac_try_echo=$ac_try;;
19490esac
19491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19492 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019494 grep -v '^ *+' conftest.er1 >conftest.err
19495 rm -f conftest.er1
19496 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019498 (exit $ac_status); } && {
19499 test -z "$ac_c_werror_flag" ||
19500 test ! -s conftest.err
19501 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019502
19503
19504cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019505#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019506_ACEOF
19507
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019508 was_it_defined=yes
19509
Guido van Rossumf78abae1997-01-21 22:02:36 +000019510else
Martin v. Löwis11437992002-04-12 09:54:03 +000019511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019512sed 's/^/| /' conftest.$ac_ext >&5
19513
Brett Cannon19fab762007-06-02 03:02:29 +000019514
Martin v. Löwiseba40652007-08-30 20:10:57 +000019515fi
19516
19517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19518{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19519echo "${ECHO_T}$was_it_defined" >&6; }
19520
19521{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19522echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019523if test "${ac_cv_struct_addrinfo+set}" = set; then
19524 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019525else
Martin v. Löwis11437992002-04-12 09:54:03 +000019526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019527/* confdefs.h. */
19528_ACEOF
19529cat confdefs.h >>conftest.$ac_ext
19530cat >>conftest.$ac_ext <<_ACEOF
19531/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019532
19533# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019534int
19535main ()
19536{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019537struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019538 ;
19539 return 0;
19540}
19541_ACEOF
19542rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019543if { (ac_try="$ac_compile"
19544case "(($ac_try" in
19545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19546 *) ac_try_echo=$ac_try;;
19547esac
19548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19549 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019551 grep -v '^ *+' conftest.er1 >conftest.err
19552 rm -f conftest.er1
19553 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019555 (exit $ac_status); } && {
19556 test -z "$ac_c_werror_flag" ||
19557 test ! -s conftest.err
19558 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019559 ac_cv_struct_addrinfo=yes
19560else
Martin v. Löwis11437992002-04-12 09:54:03 +000019561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019562sed 's/^/| /' conftest.$ac_ext >&5
19563
Martin v. Löwiseba40652007-08-30 20:10:57 +000019564 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019565fi
19566
Martin v. Löwiseba40652007-08-30 20:10:57 +000019567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19568fi
19569
19570{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19571echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019572if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019573
19574cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019575#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019576_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019577
19578fi
19579
Martin v. Löwiseba40652007-08-30 20:10:57 +000019580{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19581echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019582if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019584else
Martin v. Löwis11437992002-04-12 09:54:03 +000019585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019586/* confdefs.h. */
19587_ACEOF
19588cat confdefs.h >>conftest.$ac_ext
19589cat >>conftest.$ac_ext <<_ACEOF
19590/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019591
19592# include <sys/types.h>
19593# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019594int
19595main ()
19596{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019597struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019598 ;
19599 return 0;
19600}
19601_ACEOF
19602rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019603if { (ac_try="$ac_compile"
19604case "(($ac_try" in
19605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19606 *) ac_try_echo=$ac_try;;
19607esac
19608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19609 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019611 grep -v '^ *+' conftest.er1 >conftest.err
19612 rm -f conftest.er1
19613 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019615 (exit $ac_status); } && {
19616 test -z "$ac_c_werror_flag" ||
19617 test ! -s conftest.err
19618 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019619 ac_cv_struct_sockaddr_storage=yes
19620else
Martin v. Löwis11437992002-04-12 09:54:03 +000019621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019622sed 's/^/| /' conftest.$ac_ext >&5
19623
Martin v. Löwiseba40652007-08-30 20:10:57 +000019624 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019625fi
19626
Martin v. Löwiseba40652007-08-30 20:10:57 +000019627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19628fi
19629
19630{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19631echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019632if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019633
19634cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019635#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019636_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019637
19638fi
19639
Guido van Rossum627b2d71993-12-24 10:39:16 +000019640# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019641
Michael W. Hudson54241132001-12-07 15:38:26 +000019642
Martin v. Löwiseba40652007-08-30 20:10:57 +000019643{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19644echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019645if test "${ac_cv_c_char_unsigned+set}" = set; then
19646 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019647else
Martin v. Löwis11437992002-04-12 09:54:03 +000019648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019649/* confdefs.h. */
19650_ACEOF
19651cat confdefs.h >>conftest.$ac_ext
19652cat >>conftest.$ac_ext <<_ACEOF
19653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019654$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019655int
19656main ()
19657{
19658static int test_array [1 - 2 * !(((char) -1) < 0)];
19659test_array [0] = 0
19660
19661 ;
19662 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019663}
Martin v. Löwis11437992002-04-12 09:54:03 +000019664_ACEOF
19665rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019666if { (ac_try="$ac_compile"
19667case "(($ac_try" in
19668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19669 *) ac_try_echo=$ac_try;;
19670esac
19671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019674 grep -v '^ *+' conftest.er1 >conftest.err
19675 rm -f conftest.er1
19676 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019678 (exit $ac_status); } && {
19679 test -z "$ac_c_werror_flag" ||
19680 test ! -s conftest.err
19681 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019682 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019683else
19684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019685sed 's/^/| /' conftest.$ac_ext >&5
19686
Martin v. Löwiseba40652007-08-30 20:10:57 +000019687 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019689
19690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019692{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19693echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019694if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019695 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019696#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019697_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019698
19699fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019700
Martin v. Löwiseba40652007-08-30 20:10:57 +000019701{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19702echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019703if test "${ac_cv_c_const+set}" = set; then
19704 echo $ECHO_N "(cached) $ECHO_C" >&6
19705else
19706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019707/* confdefs.h. */
19708_ACEOF
19709cat confdefs.h >>conftest.$ac_ext
19710cat >>conftest.$ac_ext <<_ACEOF
19711/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019712
Martin v. Löwis11437992002-04-12 09:54:03 +000019713int
19714main ()
19715{
19716/* FIXME: Include the comments suggested by Paul. */
19717#ifndef __cplusplus
19718 /* Ultrix mips cc rejects this. */
19719 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019720 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019721 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019722 char const *const *pcpcc;
19723 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019724 /* NEC SVR4.0.2 mips cc rejects this. */
19725 struct point {int x, y;};
19726 static struct point const zero = {0,0};
19727 /* AIX XL C 1.02.0.0 rejects this.
19728 It does not let you subtract one const X* pointer from another in
19729 an arm of an if-expression whose if-part is not a constant
19730 expression */
19731 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019732 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019733 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019734 ++pcpcc;
19735 ppc = (char**) pcpcc;
19736 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019737 { /* SCO 3.2v4 cc rejects this. */
19738 char *t;
19739 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019740
Martin v. Löwis11437992002-04-12 09:54:03 +000019741 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019742 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019743 }
19744 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19745 int x[] = {25, 17};
19746 const int *foo = &x[0];
19747 ++foo;
19748 }
19749 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19750 typedef const int *iptr;
19751 iptr p = 0;
19752 ++p;
19753 }
19754 { /* AIX XL C 1.02.0.0 rejects this saying
19755 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19756 struct s { int j; const int *ap[3]; };
19757 struct s *b; b->j = 5;
19758 }
19759 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19760 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019761 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019762 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019763 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019764#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019765
Martin v. Löwis11437992002-04-12 09:54:03 +000019766 ;
19767 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019768}
Martin v. Löwis11437992002-04-12 09:54:03 +000019769_ACEOF
19770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019771if { (ac_try="$ac_compile"
19772case "(($ac_try" in
19773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19774 *) ac_try_echo=$ac_try;;
19775esac
19776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019779 grep -v '^ *+' conftest.er1 >conftest.err
19780 rm -f conftest.er1
19781 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019783 (exit $ac_status); } && {
19784 test -z "$ac_c_werror_flag" ||
19785 test ! -s conftest.err
19786 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019787 ac_cv_c_const=yes
19788else
Martin v. Löwis11437992002-04-12 09:54:03 +000019789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019790sed 's/^/| /' conftest.$ac_ext >&5
19791
Martin v. Löwiseba40652007-08-30 20:10:57 +000019792 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019794
19795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019797{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19798echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019799if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019800
19801cat >>confdefs.h <<\_ACEOF
19802#define const
19803_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019804
19805fi
19806
Michael W. Hudson54241132001-12-07 15:38:26 +000019807
Guido van Rossumda88dad1995-01-26 00:46:29 +000019808works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019809{ echo "$as_me:$LINENO: checking for working volatile" >&5
19810echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019811cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019812/* confdefs.h. */
19813_ACEOF
19814cat confdefs.h >>conftest.$ac_ext
19815cat >>conftest.$ac_ext <<_ACEOF
19816/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019817
Martin v. Löwis11437992002-04-12 09:54:03 +000019818int
19819main ()
19820{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019821volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019822 ;
19823 return 0;
19824}
19825_ACEOF
19826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019827if { (ac_try="$ac_compile"
19828case "(($ac_try" in
19829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19830 *) ac_try_echo=$ac_try;;
19831esac
19832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019835 grep -v '^ *+' conftest.er1 >conftest.err
19836 rm -f conftest.er1
19837 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019839 (exit $ac_status); } && {
19840 test -z "$ac_c_werror_flag" ||
19841 test ! -s conftest.err
19842 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019843 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019844else
Martin v. Löwis11437992002-04-12 09:54:03 +000019845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019846sed 's/^/| /' conftest.$ac_ext >&5
19847
Martin v. Löwis11437992002-04-12 09:54:03 +000019848
19849cat >>confdefs.h <<\_ACEOF
19850#define volatile
19851_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019852
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019853
Guido van Rossum627b2d71993-12-24 10:39:16 +000019854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019855
19856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19857{ echo "$as_me:$LINENO: result: $works" >&5
19858echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019859
Guido van Rossumda88dad1995-01-26 00:46:29 +000019860works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019861{ echo "$as_me:$LINENO: checking for working signed char" >&5
19862echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019863cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019864/* confdefs.h. */
19865_ACEOF
19866cat confdefs.h >>conftest.$ac_ext
19867cat >>conftest.$ac_ext <<_ACEOF
19868/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019869
Martin v. Löwis11437992002-04-12 09:54:03 +000019870int
19871main ()
19872{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019873signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019874 ;
19875 return 0;
19876}
19877_ACEOF
19878rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019879if { (ac_try="$ac_compile"
19880case "(($ac_try" in
19881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19882 *) ac_try_echo=$ac_try;;
19883esac
19884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019887 grep -v '^ *+' conftest.er1 >conftest.err
19888 rm -f conftest.er1
19889 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019891 (exit $ac_status); } && {
19892 test -z "$ac_c_werror_flag" ||
19893 test ! -s conftest.err
19894 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019895 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019896else
Martin v. Löwis11437992002-04-12 09:54:03 +000019897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019898sed 's/^/| /' conftest.$ac_ext >&5
19899
Martin v. Löwis11437992002-04-12 09:54:03 +000019900
19901cat >>confdefs.h <<\_ACEOF
19902#define signed
19903_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019904
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019905
Guido van Rossum7f43da71994-08-01 12:15:30 +000019906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019907
19908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19909{ echo "$as_me:$LINENO: result: $works" >&5
19910echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019911
Guido van Rossumda88dad1995-01-26 00:46:29 +000019912have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019913{ echo "$as_me:$LINENO: checking for prototypes" >&5
19914echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019915cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019916/* confdefs.h. */
19917_ACEOF
19918cat confdefs.h >>conftest.$ac_ext
19919cat >>conftest.$ac_ext <<_ACEOF
19920/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019921int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019922int
19923main ()
19924{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019925return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019926 ;
19927 return 0;
19928}
19929_ACEOF
19930rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019931if { (ac_try="$ac_compile"
19932case "(($ac_try" in
19933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19934 *) ac_try_echo=$ac_try;;
19935esac
19936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19937 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019939 grep -v '^ *+' conftest.er1 >conftest.err
19940 rm -f conftest.er1
19941 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019943 (exit $ac_status); } && {
19944 test -z "$ac_c_werror_flag" ||
19945 test ! -s conftest.err
19946 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019947
19948
19949cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019950#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019951_ACEOF
19952
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019953 have_prototypes=yes
19954
Guido van Rossumf78abae1997-01-21 22:02:36 +000019955else
Martin v. Löwis11437992002-04-12 09:54:03 +000019956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019957sed 's/^/| /' conftest.$ac_ext >&5
19958
Martin v. Löwiseba40652007-08-30 20:10:57 +000019959
Guido van Rossum7f43da71994-08-01 12:15:30 +000019960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019961
19962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19963{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
19964echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019965
Guido van Rossumda88dad1995-01-26 00:46:29 +000019966works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019967{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
19968echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019970/* confdefs.h. */
19971_ACEOF
19972cat confdefs.h >>conftest.$ac_ext
19973cat >>conftest.$ac_ext <<_ACEOF
19974/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019975
19976#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019977int foo(int x, ...) {
19978 va_list va;
19979 va_start(va, x);
19980 va_arg(va, int);
19981 va_arg(va, char *);
19982 va_arg(va, double);
19983 return 0;
19984}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019985
Martin v. Löwis11437992002-04-12 09:54:03 +000019986int
19987main ()
19988{
Guido van Rossum90eea071996-08-30 20:58:57 +000019989return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000019990 ;
19991 return 0;
19992}
19993_ACEOF
19994rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019995if { (ac_try="$ac_compile"
19996case "(($ac_try" in
19997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19998 *) ac_try_echo=$ac_try;;
19999esac
20000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20001 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020003 grep -v '^ *+' conftest.er1 >conftest.err
20004 rm -f conftest.er1
20005 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020007 (exit $ac_status); } && {
20008 test -z "$ac_c_werror_flag" ||
20009 test ! -s conftest.err
20010 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020011
20012
20013cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020014#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020015_ACEOF
20016
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020017 works=yes
20018
Guido van Rossumf78abae1997-01-21 22:02:36 +000020019else
Martin v. Löwis11437992002-04-12 09:54:03 +000020020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020021sed 's/^/| /' conftest.$ac_ext >&5
20022
Martin v. Löwiseba40652007-08-30 20:10:57 +000020023
Guido van Rossum627b2d71993-12-24 10:39:16 +000020024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020025
20026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20027{ echo "$as_me:$LINENO: result: $works" >&5
20028echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020029
Martin v. Löwisd6320502004-08-12 13:45:08 +000020030# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020031{ echo "$as_me:$LINENO: checking for socketpair" >&5
20032echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020033cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020034/* confdefs.h. */
20035_ACEOF
20036cat confdefs.h >>conftest.$ac_ext
20037cat >>conftest.$ac_ext <<_ACEOF
20038/* end confdefs.h. */
20039
20040#include <sys/types.h>
20041#include <sys/socket.h>
20042
20043int
20044main ()
20045{
20046void *x=socketpair
20047 ;
20048 return 0;
20049}
20050_ACEOF
20051rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020052if { (ac_try="$ac_compile"
20053case "(($ac_try" in
20054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20055 *) ac_try_echo=$ac_try;;
20056esac
20057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20058 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020060 grep -v '^ *+' conftest.er1 >conftest.err
20061 rm -f conftest.er1
20062 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020064 (exit $ac_status); } && {
20065 test -z "$ac_c_werror_flag" ||
20066 test ! -s conftest.err
20067 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020068
20069cat >>confdefs.h <<\_ACEOF
20070#define HAVE_SOCKETPAIR 1
20071_ACEOF
20072
Martin v. Löwiseba40652007-08-30 20:10:57 +000020073 { echo "$as_me:$LINENO: result: yes" >&5
20074echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020075else
20076 echo "$as_me: failed program was:" >&5
20077sed 's/^/| /' conftest.$ac_ext >&5
20078
Martin v. Löwiseba40652007-08-30 20:10:57 +000020079 { echo "$as_me:$LINENO: result: no" >&5
20080echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020081
20082fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020083
20084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020085
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020086# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020087{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20088echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020089cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020090/* confdefs.h. */
20091_ACEOF
20092cat confdefs.h >>conftest.$ac_ext
20093cat >>conftest.$ac_ext <<_ACEOF
20094/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020095#include <sys/types.h>
20096#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020097int
20098main ()
20099{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020100struct sockaddr x;
20101x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020102 ;
20103 return 0;
20104}
20105_ACEOF
20106rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020107if { (ac_try="$ac_compile"
20108case "(($ac_try" in
20109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20110 *) ac_try_echo=$ac_try;;
20111esac
20112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20113 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020115 grep -v '^ *+' conftest.er1 >conftest.err
20116 rm -f conftest.er1
20117 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020119 (exit $ac_status); } && {
20120 test -z "$ac_c_werror_flag" ||
20121 test ! -s conftest.err
20122 } && test -s conftest.$ac_objext; then
20123 { echo "$as_me:$LINENO: result: yes" >&5
20124echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020125
20126cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020127#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020128_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020129
20130else
Martin v. Löwis11437992002-04-12 09:54:03 +000020131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020132sed 's/^/| /' conftest.$ac_ext >&5
20133
Martin v. Löwiseba40652007-08-30 20:10:57 +000020134 { echo "$as_me:$LINENO: result: no" >&5
20135echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020137
20138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020139
Guido van Rossumda88dad1995-01-26 00:46:29 +000020140va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020141{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20142echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020144/* confdefs.h. */
20145_ACEOF
20146cat confdefs.h >>conftest.$ac_ext
20147cat >>conftest.$ac_ext <<_ACEOF
20148/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020149
20150#ifdef HAVE_STDARG_PROTOTYPES
20151#include <stdarg.h>
20152#else
20153#include <varargs.h>
20154#endif
20155
Martin v. Löwis11437992002-04-12 09:54:03 +000020156int
20157main ()
20158{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020159va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020160 ;
20161 return 0;
20162}
20163_ACEOF
20164rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020165if { (ac_try="$ac_compile"
20166case "(($ac_try" in
20167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20168 *) ac_try_echo=$ac_try;;
20169esac
20170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20171 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020173 grep -v '^ *+' conftest.er1 >conftest.err
20174 rm -f conftest.er1
20175 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020177 (exit $ac_status); } && {
20178 test -z "$ac_c_werror_flag" ||
20179 test ! -s conftest.err
20180 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020181 :
20182else
Martin v. Löwis11437992002-04-12 09:54:03 +000020183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020184sed 's/^/| /' conftest.$ac_ext >&5
20185
Martin v. Löwis11437992002-04-12 09:54:03 +000020186
20187
20188cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020189#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020190_ACEOF
20191
Guido van Rossumda88dad1995-01-26 00:46:29 +000020192 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020193
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020195
20196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20197{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20198echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020199
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020200# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020201
20202
20203
Martin v. Löwiseba40652007-08-30 20:10:57 +000020204{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20205echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020206if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20207 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020208else
Martin v. Löwis11437992002-04-12 09:54:03 +000020209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020210/* confdefs.h. */
20211_ACEOF
20212cat confdefs.h >>conftest.$ac_ext
20213cat >>conftest.$ac_ext <<_ACEOF
20214/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020215/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20216 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20217#define gethostbyname_r innocuous_gethostbyname_r
20218
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020219/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020220 which can conflict with char gethostbyname_r (); below.
20221 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020222 <limits.h> exists even on freestanding compilers. */
20223
20224#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020225# include <limits.h>
20226#else
20227# include <assert.h>
20228#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020229
20230#undef gethostbyname_r
20231
Martin v. Löwiseba40652007-08-30 20:10:57 +000020232/* Override any GCC internal prototype to avoid an error.
20233 Use char because int might match the return type of a GCC
20234 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020235#ifdef __cplusplus
20236extern "C"
20237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020238char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020239/* The GNU C library defines this for functions which it implements
20240 to always fail with ENOSYS. Some functions are actually named
20241 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020242#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020243choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020244#endif
20245
Skip Montanaro6dead952003-09-25 14:50:04 +000020246int
20247main ()
20248{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020249return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020250 ;
20251 return 0;
20252}
20253_ACEOF
20254rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020255if { (ac_try="$ac_link"
20256case "(($ac_try" in
20257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20258 *) ac_try_echo=$ac_try;;
20259esac
20260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20261 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020263 grep -v '^ *+' conftest.er1 >conftest.err
20264 rm -f conftest.er1
20265 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020267 (exit $ac_status); } && {
20268 test -z "$ac_c_werror_flag" ||
20269 test ! -s conftest.err
20270 } && test -s conftest$ac_exeext &&
20271 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020272 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020273else
Martin v. Löwis11437992002-04-12 09:54:03 +000020274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020275sed 's/^/| /' conftest.$ac_ext >&5
20276
Martin v. Löwiseba40652007-08-30 20:10:57 +000020277 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020279
20280rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020281 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020283{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20284echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020285if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020286
Martin v. Löwis11437992002-04-12 09:54:03 +000020287 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020288#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020289_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020290
Martin v. Löwiseba40652007-08-30 20:10:57 +000020291 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20292echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020293 OLD_CFLAGS=$CFLAGS
20294 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020296/* confdefs.h. */
20297_ACEOF
20298cat confdefs.h >>conftest.$ac_ext
20299cat >>conftest.$ac_ext <<_ACEOF
20300/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020301
20302# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020303
Martin v. Löwis11437992002-04-12 09:54:03 +000020304int
20305main ()
20306{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020307
20308 char *name;
20309 struct hostent *he, *res;
20310 char buffer[2048];
20311 int buflen = 2048;
20312 int h_errnop;
20313
20314 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020315
20316 ;
20317 return 0;
20318}
20319_ACEOF
20320rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020321if { (ac_try="$ac_compile"
20322case "(($ac_try" in
20323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20324 *) ac_try_echo=$ac_try;;
20325esac
20326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020329 grep -v '^ *+' conftest.er1 >conftest.err
20330 rm -f conftest.er1
20331 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020333 (exit $ac_status); } && {
20334 test -z "$ac_c_werror_flag" ||
20335 test ! -s conftest.err
20336 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020337
20338 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020339#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020340_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020341
Martin v. Löwis11437992002-04-12 09:54:03 +000020342
20343cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020344#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020345_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020346
Martin v. Löwiseba40652007-08-30 20:10:57 +000020347 { echo "$as_me:$LINENO: result: yes" >&5
20348echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020349
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020350else
Martin v. Löwis11437992002-04-12 09:54:03 +000020351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020352sed 's/^/| /' conftest.$ac_ext >&5
20353
Martin v. Löwis11437992002-04-12 09:54:03 +000020354
Martin v. Löwiseba40652007-08-30 20:10:57 +000020355 { echo "$as_me:$LINENO: result: no" >&5
20356echo "${ECHO_T}no" >&6; }
20357 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20358echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020360/* confdefs.h. */
20361_ACEOF
20362cat confdefs.h >>conftest.$ac_ext
20363cat >>conftest.$ac_ext <<_ACEOF
20364/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020365
20366# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020367
Martin v. Löwis11437992002-04-12 09:54:03 +000020368int
20369main ()
20370{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020371
20372 char *name;
20373 struct hostent *he;
20374 char buffer[2048];
20375 int buflen = 2048;
20376 int h_errnop;
20377
20378 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020379
20380 ;
20381 return 0;
20382}
20383_ACEOF
20384rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020385if { (ac_try="$ac_compile"
20386case "(($ac_try" in
20387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20388 *) ac_try_echo=$ac_try;;
20389esac
20390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20391 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020392 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020393 grep -v '^ *+' conftest.er1 >conftest.err
20394 rm -f conftest.er1
20395 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020397 (exit $ac_status); } && {
20398 test -z "$ac_c_werror_flag" ||
20399 test ! -s conftest.err
20400 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020401
20402 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020403#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020404_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020405
Martin v. Löwis11437992002-04-12 09:54:03 +000020406
20407cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020408#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020409_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020410
Martin v. Löwiseba40652007-08-30 20:10:57 +000020411 { echo "$as_me:$LINENO: result: yes" >&5
20412echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020413
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020414else
Martin v. Löwis11437992002-04-12 09:54:03 +000020415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020416sed 's/^/| /' conftest.$ac_ext >&5
20417
Martin v. Löwis11437992002-04-12 09:54:03 +000020418
Martin v. Löwiseba40652007-08-30 20:10:57 +000020419 { echo "$as_me:$LINENO: result: no" >&5
20420echo "${ECHO_T}no" >&6; }
20421 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20422echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020423 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020424/* confdefs.h. */
20425_ACEOF
20426cat confdefs.h >>conftest.$ac_ext
20427cat >>conftest.$ac_ext <<_ACEOF
20428/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020429
20430# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020431
Martin v. Löwis11437992002-04-12 09:54:03 +000020432int
20433main ()
20434{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020435
20436 char *name;
20437 struct hostent *he;
20438 struct hostent_data data;
20439
20440 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020441
20442 ;
20443 return 0;
20444}
20445_ACEOF
20446rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020447if { (ac_try="$ac_compile"
20448case "(($ac_try" in
20449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20450 *) ac_try_echo=$ac_try;;
20451esac
20452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20453 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020455 grep -v '^ *+' conftest.er1 >conftest.err
20456 rm -f conftest.er1
20457 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020459 (exit $ac_status); } && {
20460 test -z "$ac_c_werror_flag" ||
20461 test ! -s conftest.err
20462 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020463
20464 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020465#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020466_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020467
Martin v. Löwis11437992002-04-12 09:54:03 +000020468
20469cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020470#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020471_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020472
Martin v. Löwiseba40652007-08-30 20:10:57 +000020473 { echo "$as_me:$LINENO: result: yes" >&5
20474echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020475
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020476else
Martin v. Löwis11437992002-04-12 09:54:03 +000020477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020478sed 's/^/| /' conftest.$ac_ext >&5
20479
Martin v. Löwis11437992002-04-12 09:54:03 +000020480
Martin v. Löwiseba40652007-08-30 20:10:57 +000020481 { echo "$as_me:$LINENO: result: no" >&5
20482echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020483
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020485
20486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020495 CFLAGS=$OLD_CFLAGS
20496
20497else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020498
Martin v. Löwis11437992002-04-12 09:54:03 +000020499
20500for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020501do
Martin v. Löwis11437992002-04-12 09:54:03 +000020502as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020503{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20504echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20505if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020506 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020507else
Martin v. Löwis11437992002-04-12 09:54:03 +000020508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020509/* confdefs.h. */
20510_ACEOF
20511cat confdefs.h >>conftest.$ac_ext
20512cat >>conftest.$ac_ext <<_ACEOF
20513/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020514/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20515 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20516#define $ac_func innocuous_$ac_func
20517
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020518/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020519 which can conflict with char $ac_func (); below.
20520 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020521 <limits.h> exists even on freestanding compilers. */
20522
20523#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020524# include <limits.h>
20525#else
20526# include <assert.h>
20527#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020528
20529#undef $ac_func
20530
Martin v. Löwiseba40652007-08-30 20:10:57 +000020531/* Override any GCC internal prototype to avoid an error.
20532 Use char because int might match the return type of a GCC
20533 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020534#ifdef __cplusplus
20535extern "C"
20536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020537char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020538/* The GNU C library defines this for functions which it implements
20539 to always fail with ENOSYS. Some functions are actually named
20540 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020541#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020542choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020543#endif
20544
Skip Montanaro6dead952003-09-25 14:50:04 +000020545int
20546main ()
20547{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020548return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020549 ;
20550 return 0;
20551}
20552_ACEOF
20553rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020554if { (ac_try="$ac_link"
20555case "(($ac_try" in
20556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20557 *) ac_try_echo=$ac_try;;
20558esac
20559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20560 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020562 grep -v '^ *+' conftest.er1 >conftest.err
20563 rm -f conftest.er1
20564 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020566 (exit $ac_status); } && {
20567 test -z "$ac_c_werror_flag" ||
20568 test ! -s conftest.err
20569 } && test -s conftest$ac_exeext &&
20570 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020571 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020572else
Martin v. Löwis11437992002-04-12 09:54:03 +000020573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020574sed 's/^/| /' conftest.$ac_ext >&5
20575
Martin v. Löwiseba40652007-08-30 20:10:57 +000020576 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020578
20579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020580 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020582ac_res=`eval echo '${'$as_ac_var'}'`
20583 { echo "$as_me:$LINENO: result: $ac_res" >&5
20584echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020585if test `eval echo '${'$as_ac_var'}'` = yes; then
20586 cat >>confdefs.h <<_ACEOF
20587#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20588_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020589
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020590fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020591done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020592
Michael W. Hudson54241132001-12-07 15:38:26 +000020593
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020594fi
20595
Michael W. Hudson54241132001-12-07 15:38:26 +000020596
20597
20598
20599
20600
20601
Guido van Rossum627b2d71993-12-24 10:39:16 +000020602# checks for system services
20603# (none yet)
20604
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020605# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020606{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20607echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020608if test "${ac_cv_func___fpu_control+set}" = set; then
20609 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020610else
Martin v. Löwis11437992002-04-12 09:54:03 +000020611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020612/* confdefs.h. */
20613_ACEOF
20614cat confdefs.h >>conftest.$ac_ext
20615cat >>conftest.$ac_ext <<_ACEOF
20616/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020617/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20618 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20619#define __fpu_control innocuous___fpu_control
20620
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020621/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020622 which can conflict with char __fpu_control (); below.
20623 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020624 <limits.h> exists even on freestanding compilers. */
20625
20626#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020627# include <limits.h>
20628#else
20629# include <assert.h>
20630#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020631
20632#undef __fpu_control
20633
Martin v. Löwiseba40652007-08-30 20:10:57 +000020634/* Override any GCC internal prototype to avoid an error.
20635 Use char because int might match the return type of a GCC
20636 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020637#ifdef __cplusplus
20638extern "C"
20639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020640char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020641/* The GNU C library defines this for functions which it implements
20642 to always fail with ENOSYS. Some functions are actually named
20643 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020644#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020645choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020646#endif
20647
Skip Montanaro6dead952003-09-25 14:50:04 +000020648int
20649main ()
20650{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020651return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020652 ;
20653 return 0;
20654}
20655_ACEOF
20656rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020657if { (ac_try="$ac_link"
20658case "(($ac_try" in
20659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20660 *) ac_try_echo=$ac_try;;
20661esac
20662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20663 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020665 grep -v '^ *+' conftest.er1 >conftest.err
20666 rm -f conftest.er1
20667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020669 (exit $ac_status); } && {
20670 test -z "$ac_c_werror_flag" ||
20671 test ! -s conftest.err
20672 } && test -s conftest$ac_exeext &&
20673 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020674 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020675else
Martin v. Löwis11437992002-04-12 09:54:03 +000020676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020677sed 's/^/| /' conftest.$ac_ext >&5
20678
Martin v. Löwiseba40652007-08-30 20:10:57 +000020679 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020681
20682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020683 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020685{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20686echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020687if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020688 :
20689else
Martin v. Löwis11437992002-04-12 09:54:03 +000020690
Martin v. Löwiseba40652007-08-30 20:10:57 +000020691{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20692echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020693if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20694 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020695else
Martin v. Löwis11437992002-04-12 09:54:03 +000020696 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020697LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020699/* confdefs.h. */
20700_ACEOF
20701cat confdefs.h >>conftest.$ac_ext
20702cat >>conftest.$ac_ext <<_ACEOF
20703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020704
Martin v. Löwiseba40652007-08-30 20:10:57 +000020705/* Override any GCC internal prototype to avoid an error.
20706 Use char because int might match the return type of a GCC
20707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020708#ifdef __cplusplus
20709extern "C"
20710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020711char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020712int
20713main ()
20714{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020715return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020716 ;
20717 return 0;
20718}
20719_ACEOF
20720rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020721if { (ac_try="$ac_link"
20722case "(($ac_try" in
20723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20724 *) ac_try_echo=$ac_try;;
20725esac
20726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20727 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020729 grep -v '^ *+' conftest.er1 >conftest.err
20730 rm -f conftest.er1
20731 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020733 (exit $ac_status); } && {
20734 test -z "$ac_c_werror_flag" ||
20735 test ! -s conftest.err
20736 } && test -s conftest$ac_exeext &&
20737 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020738 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020739else
Martin v. Löwis11437992002-04-12 09:54:03 +000020740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020741sed 's/^/| /' conftest.$ac_ext >&5
20742
Martin v. Löwiseba40652007-08-30 20:10:57 +000020743 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020745
20746rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020748LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020750{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20751echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020752if test $ac_cv_lib_ieee___fpu_control = yes; then
20753 cat >>confdefs.h <<_ACEOF
20754#define HAVE_LIBIEEE 1
20755_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020756
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020757 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020758
Guido van Rossum627b2d71993-12-24 10:39:16 +000020759fi
20760
Michael W. Hudson54241132001-12-07 15:38:26 +000020761
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020762fi
20763
Michael W. Hudson54241132001-12-07 15:38:26 +000020764
Guido van Rossum7f253911997-05-09 02:42:48 +000020765# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020766{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20767echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020768
Martin v. Löwiseba40652007-08-30 20:10:57 +000020769# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020770if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020771 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020772if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020773then
20774
20775cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020776#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020777_ACEOF
20778
Martin v. Löwiseba40652007-08-30 20:10:57 +000020779 { echo "$as_me:$LINENO: result: yes" >&5
20780echo "${ECHO_T}yes" >&6; }
20781else { echo "$as_me:$LINENO: result: no" >&5
20782echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020783fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020784else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020785 { echo "$as_me:$LINENO: result: no" >&5
20786echo "${ECHO_T}no" >&6; }
20787fi
20788
Guido van Rossum7f253911997-05-09 02:42:48 +000020789
Guido van Rossum7f43da71994-08-01 12:15:30 +000020790# check for --with-libm=...
20791
Guido van Rossum563e7081996-09-10 18:20:48 +000020792case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020793Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020794BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020795*) LIBM=-lm
20796esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020797{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20798echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020799
Martin v. Löwiseba40652007-08-30 20:10:57 +000020800# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020801if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020802 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020803if test "$withval" = no
20804then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020805 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20806echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020807elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020808then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020809 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20810echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020811else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20812echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20813 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020814fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020815else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020816 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20817echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20818fi
20819
Guido van Rossum7f43da71994-08-01 12:15:30 +000020820
20821# check for --with-libc=...
20822
Martin v. Löwiseba40652007-08-30 20:10:57 +000020823{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20824echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020825
Martin v. Löwiseba40652007-08-30 20:10:57 +000020826# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020827if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020828 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020829if test "$withval" = no
20830then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020831 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20832echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020833elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020834then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020835 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20836echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020837else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20838echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20839 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020840fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020841else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020842 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20843echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20844fi
20845
Guido van Rossum7f43da71994-08-01 12:15:30 +000020846
Christian Heimes0a8143f2007-12-18 23:22:54 +000020847# ************************************
20848# * Check for mathematical functions *
20849# ************************************
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020850LIBS_SAVE=$LIBS
20851LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000020852
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020853for ac_func in hypot
20854do
Martin v. Löwis11437992002-04-12 09:54:03 +000020855as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020856{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20857echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20858if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020859 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020860else
Martin v. Löwis11437992002-04-12 09:54:03 +000020861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020862/* confdefs.h. */
20863_ACEOF
20864cat confdefs.h >>conftest.$ac_ext
20865cat >>conftest.$ac_ext <<_ACEOF
20866/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020867/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20868 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20869#define $ac_func innocuous_$ac_func
20870
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020871/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020872 which can conflict with char $ac_func (); below.
20873 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020874 <limits.h> exists even on freestanding compilers. */
20875
20876#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020877# include <limits.h>
20878#else
20879# include <assert.h>
20880#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020881
20882#undef $ac_func
20883
Martin v. Löwiseba40652007-08-30 20:10:57 +000020884/* Override any GCC internal prototype to avoid an error.
20885 Use char because int might match the return type of a GCC
20886 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020887#ifdef __cplusplus
20888extern "C"
20889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020890char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020891/* The GNU C library defines this for functions which it implements
20892 to always fail with ENOSYS. Some functions are actually named
20893 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020894#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020895choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020896#endif
20897
Skip Montanaro6dead952003-09-25 14:50:04 +000020898int
20899main ()
20900{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020901return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020902 ;
20903 return 0;
20904}
20905_ACEOF
20906rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020907if { (ac_try="$ac_link"
20908case "(($ac_try" in
20909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20910 *) ac_try_echo=$ac_try;;
20911esac
20912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20913 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020915 grep -v '^ *+' conftest.er1 >conftest.err
20916 rm -f conftest.er1
20917 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020919 (exit $ac_status); } && {
20920 test -z "$ac_c_werror_flag" ||
20921 test ! -s conftest.err
20922 } && test -s conftest$ac_exeext &&
20923 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020924 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020925else
Martin v. Löwis11437992002-04-12 09:54:03 +000020926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020927sed 's/^/| /' conftest.$ac_ext >&5
20928
Martin v. Löwiseba40652007-08-30 20:10:57 +000020929 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020931
20932rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020933 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020935ac_res=`eval echo '${'$as_ac_var'}'`
20936 { echo "$as_me:$LINENO: result: $ac_res" >&5
20937echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020938if test `eval echo '${'$as_ac_var'}'` = yes; then
20939 cat >>confdefs.h <<_ACEOF
20940#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20941_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020942
Michael W. Hudson54241132001-12-07 15:38:26 +000020943else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020944 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020945 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020946 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20947 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020948esac
20949
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020950fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020951done
20952
Michael W. Hudson54241132001-12-07 15:38:26 +000020953
Christian Heimes0a8143f2007-12-18 23:22:54 +000020954
20955
20956
20957
20958
Christian Heimes48723512008-01-20 14:28:28 +000020959
20960
20961
20962
20963
20964for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000020965do
20966as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20967{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20968echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20969if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20970 echo $ECHO_N "(cached) $ECHO_C" >&6
20971else
20972 cat >conftest.$ac_ext <<_ACEOF
20973/* confdefs.h. */
20974_ACEOF
20975cat confdefs.h >>conftest.$ac_ext
20976cat >>conftest.$ac_ext <<_ACEOF
20977/* end confdefs.h. */
20978/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20979 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20980#define $ac_func innocuous_$ac_func
20981
20982/* System header to define __stub macros and hopefully few prototypes,
20983 which can conflict with char $ac_func (); below.
20984 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20985 <limits.h> exists even on freestanding compilers. */
20986
20987#ifdef __STDC__
20988# include <limits.h>
20989#else
20990# include <assert.h>
20991#endif
20992
20993#undef $ac_func
20994
20995/* Override any GCC internal prototype to avoid an error.
20996 Use char because int might match the return type of a GCC
20997 builtin and then its argument prototype would still apply. */
20998#ifdef __cplusplus
20999extern "C"
21000#endif
21001char $ac_func ();
21002/* The GNU C library defines this for functions which it implements
21003 to always fail with ENOSYS. Some functions are actually named
21004 something starting with __ and the normal name is an alias. */
21005#if defined __stub_$ac_func || defined __stub___$ac_func
21006choke me
21007#endif
21008
21009int
21010main ()
21011{
21012return $ac_func ();
21013 ;
21014 return 0;
21015}
21016_ACEOF
21017rm -f conftest.$ac_objext conftest$ac_exeext
21018if { (ac_try="$ac_link"
21019case "(($ac_try" in
21020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21021 *) ac_try_echo=$ac_try;;
21022esac
21023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21024 (eval "$ac_link") 2>conftest.er1
21025 ac_status=$?
21026 grep -v '^ *+' conftest.er1 >conftest.err
21027 rm -f conftest.er1
21028 cat conftest.err >&5
21029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21030 (exit $ac_status); } && {
21031 test -z "$ac_c_werror_flag" ||
21032 test ! -s conftest.err
21033 } && test -s conftest$ac_exeext &&
21034 $as_test_x conftest$ac_exeext; then
21035 eval "$as_ac_var=yes"
21036else
21037 echo "$as_me: failed program was:" >&5
21038sed 's/^/| /' conftest.$ac_ext >&5
21039
21040 eval "$as_ac_var=no"
21041fi
21042
21043rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21044 conftest$ac_exeext conftest.$ac_ext
21045fi
21046ac_res=`eval echo '${'$as_ac_var'}'`
21047 { echo "$as_me:$LINENO: result: $ac_res" >&5
21048echo "${ECHO_T}$ac_res" >&6; }
21049if test `eval echo '${'$as_ac_var'}'` = yes; then
21050 cat >>confdefs.h <<_ACEOF
21051#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21052_ACEOF
21053
21054fi
21055done
21056
21057
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021058LIBS=$LIBS_SAVE
21059
Guido van Rossumef2255b2000-03-10 22:30:29 +000021060# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021061if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021062 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21063echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021064if test "${ac_cv_header_wchar_h+set}" = set; then
21065 echo $ECHO_N "(cached) $ECHO_C" >&6
21066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021067{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21068echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021069else
Martin v. Löwis11437992002-04-12 09:54:03 +000021070 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021071{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21072echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021073cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021074/* confdefs.h. */
21075_ACEOF
21076cat confdefs.h >>conftest.$ac_ext
21077cat >>conftest.$ac_ext <<_ACEOF
21078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021079$ac_includes_default
21080#include <wchar.h>
21081_ACEOF
21082rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021083if { (ac_try="$ac_compile"
21084case "(($ac_try" in
21085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21086 *) ac_try_echo=$ac_try;;
21087esac
21088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21089 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021091 grep -v '^ *+' conftest.er1 >conftest.err
21092 rm -f conftest.er1
21093 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021095 (exit $ac_status); } && {
21096 test -z "$ac_c_werror_flag" ||
21097 test ! -s conftest.err
21098 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021099 ac_header_compiler=yes
21100else
21101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021102sed 's/^/| /' conftest.$ac_ext >&5
21103
Martin v. Löwiseba40652007-08-30 20:10:57 +000021104 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021106
21107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21108{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21109echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021110
21111# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021112{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21113echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021114cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021115/* confdefs.h. */
21116_ACEOF
21117cat confdefs.h >>conftest.$ac_ext
21118cat >>conftest.$ac_ext <<_ACEOF
21119/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021120#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021121_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021122if { (ac_try="$ac_cpp conftest.$ac_ext"
21123case "(($ac_try" in
21124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21125 *) ac_try_echo=$ac_try;;
21126esac
21127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21128 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021129 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021130 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021131 rm -f conftest.er1
21132 cat conftest.err >&5
21133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021134 (exit $ac_status); } >/dev/null && {
21135 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21136 test ! -s conftest.err
21137 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021138 ac_header_preproc=yes
21139else
21140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021141sed 's/^/| /' conftest.$ac_ext >&5
21142
Martin v. Löwis11437992002-04-12 09:54:03 +000021143 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021145
Martin v. Löwis11437992002-04-12 09:54:03 +000021146rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021147{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21148echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021149
21150# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021151case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21152 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021153 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21154echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021155 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21156echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21157 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021158 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021159 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021160 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21161echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021162 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21163echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21164 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21165echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21166 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21167echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021168 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21169echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021170 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21171echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021172 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021173## ------------------------------------------------ ##
21174## Report this to http://www.python.org/python-bugs ##
21175## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021176_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021177 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021178 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021179esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021180{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21181echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021182if test "${ac_cv_header_wchar_h+set}" = set; then
21183 echo $ECHO_N "(cached) $ECHO_C" >&6
21184else
21185 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021186fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021187{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21188echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021189
21190fi
21191if test $ac_cv_header_wchar_h = yes; then
21192
21193
21194cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021195#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021196_ACEOF
21197
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021198 wchar_h="yes"
21199
Guido van Rossumef2255b2000-03-10 22:30:29 +000021200else
Martin v. Löwis11437992002-04-12 09:54:03 +000021201 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021202
21203fi
21204
Michael W. Hudson54241132001-12-07 15:38:26 +000021205
Martin v. Löwis11437992002-04-12 09:54:03 +000021206
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021207# determine wchar_t size
21208if test "$wchar_h" = yes
21209then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021210 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21211echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021212if test "${ac_cv_type_wchar_t+set}" = set; then
21213 echo $ECHO_N "(cached) $ECHO_C" >&6
21214else
21215 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021216/* confdefs.h. */
21217_ACEOF
21218cat confdefs.h >>conftest.$ac_ext
21219cat >>conftest.$ac_ext <<_ACEOF
21220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021221#include <wchar.h>
21222
Martin v. Löwiseba40652007-08-30 20:10:57 +000021223typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021224int
21225main ()
21226{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021227if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021228 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021229if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 return 0;
21231 ;
21232 return 0;
21233}
21234_ACEOF
21235rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021236if { (ac_try="$ac_compile"
21237case "(($ac_try" in
21238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21239 *) ac_try_echo=$ac_try;;
21240esac
21241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021244 grep -v '^ *+' conftest.er1 >conftest.err
21245 rm -f conftest.er1
21246 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021248 (exit $ac_status); } && {
21249 test -z "$ac_c_werror_flag" ||
21250 test ! -s conftest.err
21251 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021252 ac_cv_type_wchar_t=yes
21253else
21254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021255sed 's/^/| /' conftest.$ac_ext >&5
21256
Martin v. Löwiseba40652007-08-30 20:10:57 +000021257 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021258fi
Brett Cannon19fab762007-06-02 03:02:29 +000021259
Martin v. Löwiseba40652007-08-30 20:10:57 +000021260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21261fi
21262{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21263echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21264
21265# The cast to long int works around a bug in the HP C Compiler
21266# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21267# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21268# This bug is HP SR number 8606223364.
21269{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21270echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021271if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21272 echo $ECHO_N "(cached) $ECHO_C" >&6
21273else
Martin v. Löwis11437992002-04-12 09:54:03 +000021274 if test "$cross_compiling" = yes; then
21275 # Depending upon the size, compute the lo and hi bounds.
21276cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021277/* confdefs.h. */
21278_ACEOF
21279cat confdefs.h >>conftest.$ac_ext
21280cat >>conftest.$ac_ext <<_ACEOF
21281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021282#include <wchar.h>
21283
Martin v. Löwiseba40652007-08-30 20:10:57 +000021284 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021285int
21286main ()
21287{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021288static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021289test_array [0] = 0
21290
21291 ;
21292 return 0;
21293}
21294_ACEOF
21295rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021296if { (ac_try="$ac_compile"
21297case "(($ac_try" in
21298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21299 *) ac_try_echo=$ac_try;;
21300esac
21301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21302 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021304 grep -v '^ *+' conftest.er1 >conftest.err
21305 rm -f conftest.er1
21306 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021308 (exit $ac_status); } && {
21309 test -z "$ac_c_werror_flag" ||
21310 test ! -s conftest.err
21311 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021312 ac_lo=0 ac_mid=0
21313 while :; do
21314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021315/* confdefs.h. */
21316_ACEOF
21317cat confdefs.h >>conftest.$ac_ext
21318cat >>conftest.$ac_ext <<_ACEOF
21319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021320#include <wchar.h>
21321
Martin v. Löwiseba40652007-08-30 20:10:57 +000021322 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021323int
21324main ()
21325{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021326static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021327test_array [0] = 0
21328
21329 ;
21330 return 0;
21331}
21332_ACEOF
21333rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021334if { (ac_try="$ac_compile"
21335case "(($ac_try" in
21336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21337 *) ac_try_echo=$ac_try;;
21338esac
21339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21340 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021342 grep -v '^ *+' conftest.er1 >conftest.err
21343 rm -f conftest.er1
21344 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021346 (exit $ac_status); } && {
21347 test -z "$ac_c_werror_flag" ||
21348 test ! -s conftest.err
21349 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021350 ac_hi=$ac_mid; break
21351else
21352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021353sed 's/^/| /' conftest.$ac_ext >&5
21354
Martin v. Löwiseba40652007-08-30 20:10:57 +000021355 ac_lo=`expr $ac_mid + 1`
21356 if test $ac_lo -le $ac_mid; then
21357 ac_lo= ac_hi=
21358 break
21359 fi
21360 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021362
21363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021364 done
21365else
21366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021367sed 's/^/| /' conftest.$ac_ext >&5
21368
Martin v. Löwiseba40652007-08-30 20:10:57 +000021369 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021370/* confdefs.h. */
21371_ACEOF
21372cat confdefs.h >>conftest.$ac_ext
21373cat >>conftest.$ac_ext <<_ACEOF
21374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021375#include <wchar.h>
21376
Martin v. Löwiseba40652007-08-30 20:10:57 +000021377 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021378int
21379main ()
21380{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021381static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021382test_array [0] = 0
21383
21384 ;
21385 return 0;
21386}
21387_ACEOF
21388rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021389if { (ac_try="$ac_compile"
21390case "(($ac_try" in
21391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21392 *) ac_try_echo=$ac_try;;
21393esac
21394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21395 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021396 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021397 grep -v '^ *+' conftest.er1 >conftest.err
21398 rm -f conftest.er1
21399 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021401 (exit $ac_status); } && {
21402 test -z "$ac_c_werror_flag" ||
21403 test ! -s conftest.err
21404 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021405 ac_hi=-1 ac_mid=-1
21406 while :; do
21407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021408/* confdefs.h. */
21409_ACEOF
21410cat confdefs.h >>conftest.$ac_ext
21411cat >>conftest.$ac_ext <<_ACEOF
21412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021413#include <wchar.h>
21414
Martin v. Löwiseba40652007-08-30 20:10:57 +000021415 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021416int
21417main ()
21418{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021419static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021420test_array [0] = 0
21421
21422 ;
21423 return 0;
21424}
21425_ACEOF
21426rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021427if { (ac_try="$ac_compile"
21428case "(($ac_try" in
21429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21430 *) ac_try_echo=$ac_try;;
21431esac
21432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21433 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021435 grep -v '^ *+' conftest.er1 >conftest.err
21436 rm -f conftest.er1
21437 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021439 (exit $ac_status); } && {
21440 test -z "$ac_c_werror_flag" ||
21441 test ! -s conftest.err
21442 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021443 ac_lo=$ac_mid; break
21444else
21445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021446sed 's/^/| /' conftest.$ac_ext >&5
21447
Martin v. Löwiseba40652007-08-30 20:10:57 +000021448 ac_hi=`expr '(' $ac_mid ')' - 1`
21449 if test $ac_mid -le $ac_hi; then
21450 ac_lo= ac_hi=
21451 break
21452 fi
21453 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000021454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021455
21456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021457 done
21458else
21459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021460sed 's/^/| /' conftest.$ac_ext >&5
21461
Martin v. Löwiseba40652007-08-30 20:10:57 +000021462 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021464
21465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021467
21468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021469# Binary search between lo and hi bounds.
21470while test "x$ac_lo" != "x$ac_hi"; do
21471 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021473/* confdefs.h. */
21474_ACEOF
21475cat confdefs.h >>conftest.$ac_ext
21476cat >>conftest.$ac_ext <<_ACEOF
21477/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021478#include <wchar.h>
21479
Martin v. Löwiseba40652007-08-30 20:10:57 +000021480 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021481int
21482main ()
21483{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021484static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021485test_array [0] = 0
21486
21487 ;
21488 return 0;
21489}
21490_ACEOF
21491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021492if { (ac_try="$ac_compile"
21493case "(($ac_try" in
21494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21495 *) ac_try_echo=$ac_try;;
21496esac
21497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021500 grep -v '^ *+' conftest.er1 >conftest.err
21501 rm -f conftest.er1
21502 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021504 (exit $ac_status); } && {
21505 test -z "$ac_c_werror_flag" ||
21506 test ! -s conftest.err
21507 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021508 ac_hi=$ac_mid
21509else
21510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021511sed 's/^/| /' conftest.$ac_ext >&5
21512
Martin v. Löwiseba40652007-08-30 20:10:57 +000021513 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021515
21516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021517done
21518case $ac_lo in
21519?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021520'') if test "$ac_cv_type_wchar_t" = yes; then
21521 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021522See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021523echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021524See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021525 { (exit 77); exit 77; }; }
21526 else
21527 ac_cv_sizeof_wchar_t=0
21528 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021529esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021530else
Martin v. Löwis11437992002-04-12 09:54:03 +000021531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021532/* confdefs.h. */
21533_ACEOF
21534cat confdefs.h >>conftest.$ac_ext
21535cat >>conftest.$ac_ext <<_ACEOF
21536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021537#include <wchar.h>
21538
Martin v. Löwiseba40652007-08-30 20:10:57 +000021539 typedef wchar_t ac__type_sizeof_;
21540static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21541static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021542#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021543#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021544int
21545main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021546{
Martin v. Löwis11437992002-04-12 09:54:03 +000021547
21548 FILE *f = fopen ("conftest.val", "w");
21549 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021550 return 1;
21551 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021552 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021553 long int i = longval ();
21554 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21555 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021556 fprintf (f, "%ld\n", i);
21557 }
21558 else
21559 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021560 unsigned long int i = ulongval ();
21561 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21562 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021563 fprintf (f, "%lu\n", i);
21564 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021565 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021566
21567 ;
21568 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021569}
Martin v. Löwis11437992002-04-12 09:54:03 +000021570_ACEOF
21571rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021572if { (ac_try="$ac_link"
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_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021579 ac_status=$?
21580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21581 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021582 { (case "(($ac_try" in
21583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21584 *) ac_try_echo=$ac_try;;
21585esac
21586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21587 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021588 ac_status=$?
21589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21590 (exit $ac_status); }; }; then
21591 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021592else
Martin v. Löwis11437992002-04-12 09:54:03 +000021593 echo "$as_me: program exited with status $ac_status" >&5
21594echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021595sed 's/^/| /' conftest.$ac_ext >&5
21596
Martin v. Löwis11437992002-04-12 09:54:03 +000021597( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021598if test "$ac_cv_type_wchar_t" = yes; then
21599 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021600See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021601echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021602See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021603 { (exit 77); exit 77; }; }
21604 else
21605 ac_cv_sizeof_wchar_t=0
21606 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021608rm -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 +000021609fi
21610rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21613echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21614
21615
21616
Martin v. Löwis11437992002-04-12 09:54:03 +000021617cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021618#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021619_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021620
Michael W. Hudson54241132001-12-07 15:38:26 +000021621
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021622fi
21623
Martin v. Löwiseba40652007-08-30 20:10:57 +000021624{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21625echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021626have_ucs4_tcl=no
21627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021628/* confdefs.h. */
21629_ACEOF
21630cat confdefs.h >>conftest.$ac_ext
21631cat >>conftest.$ac_ext <<_ACEOF
21632/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021633
21634#include <tcl.h>
21635#if TCL_UTF_MAX != 6
21636# error "NOT UCS4_TCL"
21637#endif
21638int
21639main ()
21640{
21641
21642 ;
21643 return 0;
21644}
21645_ACEOF
21646rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021647if { (ac_try="$ac_compile"
21648case "(($ac_try" in
21649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21650 *) ac_try_echo=$ac_try;;
21651esac
21652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021655 grep -v '^ *+' conftest.er1 >conftest.err
21656 rm -f conftest.er1
21657 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021659 (exit $ac_status); } && {
21660 test -z "$ac_c_werror_flag" ||
21661 test ! -s conftest.err
21662 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021663
21664
21665cat >>confdefs.h <<\_ACEOF
21666#define HAVE_UCS4_TCL 1
21667_ACEOF
21668
21669 have_ucs4_tcl=yes
21670
21671else
21672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021673sed 's/^/| /' conftest.$ac_ext >&5
21674
Martin v. Löwiseba40652007-08-30 20:10:57 +000021675
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021677
21678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21679{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21680echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021681
Skip Montanaro6dead952003-09-25 14:50:04 +000021682# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021683if test "$wchar_h" = yes
21684then
21685 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021686 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21687echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021688 if test "${ac_cv_wchar_t_signed+set}" = set; then
21689 echo $ECHO_N "(cached) $ECHO_C" >&6
21690else
21691
21692 if test "$cross_compiling" = yes; then
21693 ac_cv_wchar_t_signed=yes
21694else
21695 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021696/* confdefs.h. */
21697_ACEOF
21698cat confdefs.h >>conftest.$ac_ext
21699cat >>conftest.$ac_ext <<_ACEOF
21700/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021701
21702 #include <wchar.h>
21703 int main()
21704 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021705 /* Success: exit code 0 */
21706 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021707 }
21708
21709_ACEOF
21710rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021711if { (ac_try="$ac_link"
21712case "(($ac_try" in
21713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21714 *) ac_try_echo=$ac_try;;
21715esac
21716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21717 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021718 ac_status=$?
21719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21720 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021721 { (case "(($ac_try" in
21722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21723 *) ac_try_echo=$ac_try;;
21724esac
21725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21726 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021727 ac_status=$?
21728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21729 (exit $ac_status); }; }; then
21730 ac_cv_wchar_t_signed=yes
21731else
21732 echo "$as_me: program exited with status $ac_status" >&5
21733echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021734sed 's/^/| /' conftest.$ac_ext >&5
21735
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021736( exit $ac_status )
21737ac_cv_wchar_t_signed=no
21738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021739rm -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 +000021740fi
21741
Martin v. Löwiseba40652007-08-30 20:10:57 +000021742
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021743fi
21744
Martin v. Löwiseba40652007-08-30 20:10:57 +000021745 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21746echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21747fi
21748
21749{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21750echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21751# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021752if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021753 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021754else
21755 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021756fi
21757
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021758
21759if test $enable_unicode = yes
21760then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021761 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021762 case "$have_ucs4_tcl" in
21763 yes) enable_unicode="ucs4"
21764 ;;
21765 *) enable_unicode="ucs2"
21766 ;;
21767 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021768fi
21769
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021770
21771
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021772case "$enable_unicode" in
21773ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021774 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021775#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021776_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021777
21778 ;;
21779ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021780 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021781#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021782_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021783
21784 ;;
21785esac
21786
Michael W. Hudson54241132001-12-07 15:38:26 +000021787
Martin v. Löwis11437992002-04-12 09:54:03 +000021788
21789
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021790
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021791if test "$enable_unicode" = "no"
21792then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021793 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021794 { echo "$as_me:$LINENO: result: not used" >&5
21795echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021796else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021797 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021798
21799cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021800#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021801_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021802
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021803
21804 # wchar_t is only usable if it maps to an unsigned type
21805 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021806 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021807 then
21808 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021809
Martin v. Löwis11437992002-04-12 09:54:03 +000021810cat >>confdefs.h <<\_ACEOF
21811#define HAVE_USABLE_WCHAR_T 1
21812_ACEOF
21813
21814 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021815#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021816_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021817
21818 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21819 then
21820 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021821 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021822#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021823_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021824
21825 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21826 then
21827 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021828 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021829#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021830_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021831
21832 else
21833 PY_UNICODE_TYPE="no type found"
21834 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021835 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21836echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021837fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021838
21839# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021840{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21841echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021842if test "${ac_cv_c_bigendian+set}" = set; then
21843 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021844else
Martin v. Löwis11437992002-04-12 09:54:03 +000021845 # See if sys/param.h defines the BYTE_ORDER macro.
21846cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021847/* confdefs.h. */
21848_ACEOF
21849cat confdefs.h >>conftest.$ac_ext
21850cat >>conftest.$ac_ext <<_ACEOF
21851/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021852#include <sys/types.h>
21853#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021854
Martin v. Löwis11437992002-04-12 09:54:03 +000021855int
21856main ()
21857{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021858#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21859 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021860 bogus endian macros
21861#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021862
21863 ;
21864 return 0;
21865}
21866_ACEOF
21867rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021868if { (ac_try="$ac_compile"
21869case "(($ac_try" in
21870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21871 *) ac_try_echo=$ac_try;;
21872esac
21873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021876 grep -v '^ *+' conftest.er1 >conftest.err
21877 rm -f conftest.er1
21878 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021880 (exit $ac_status); } && {
21881 test -z "$ac_c_werror_flag" ||
21882 test ! -s conftest.err
21883 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021884 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000021885cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021886/* confdefs.h. */
21887_ACEOF
21888cat confdefs.h >>conftest.$ac_ext
21889cat >>conftest.$ac_ext <<_ACEOF
21890/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021891#include <sys/types.h>
21892#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021893
Martin v. Löwis11437992002-04-12 09:54:03 +000021894int
21895main ()
21896{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021897#if BYTE_ORDER != BIG_ENDIAN
21898 not big endian
21899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021900
21901 ;
21902 return 0;
21903}
21904_ACEOF
21905rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021906if { (ac_try="$ac_compile"
21907case "(($ac_try" in
21908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21909 *) ac_try_echo=$ac_try;;
21910esac
21911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021914 grep -v '^ *+' conftest.er1 >conftest.err
21915 rm -f conftest.er1
21916 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021918 (exit $ac_status); } && {
21919 test -z "$ac_c_werror_flag" ||
21920 test ! -s conftest.err
21921 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021922 ac_cv_c_bigendian=yes
21923else
Martin v. Löwis11437992002-04-12 09:54:03 +000021924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021925sed 's/^/| /' conftest.$ac_ext >&5
21926
Martin v. Löwiseba40652007-08-30 20:10:57 +000021927 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021929
21930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000021931else
Martin v. Löwis11437992002-04-12 09:54:03 +000021932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021933sed 's/^/| /' conftest.$ac_ext >&5
21934
Martin v. Löwiseba40652007-08-30 20:10:57 +000021935 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000021936if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021937 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000021938 ac_cv_c_bigendian=unknown
21939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021940/* confdefs.h. */
21941_ACEOF
21942cat confdefs.h >>conftest.$ac_ext
21943cat >>conftest.$ac_ext <<_ACEOF
21944/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021945short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
21946short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021947void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021948short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
21949short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021950void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021951int
21952main ()
21953{
21954 _ascii (); _ebcdic ();
21955 ;
21956 return 0;
21957}
21958_ACEOF
21959rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021960if { (ac_try="$ac_compile"
21961case "(($ac_try" in
21962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21963 *) ac_try_echo=$ac_try;;
21964esac
21965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021968 grep -v '^ *+' conftest.er1 >conftest.err
21969 rm -f conftest.er1
21970 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021972 (exit $ac_status); } && {
21973 test -z "$ac_c_werror_flag" ||
21974 test ! -s conftest.err
21975 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021976 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021977 ac_cv_c_bigendian=yes
21978fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021979if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021980 if test "$ac_cv_c_bigendian" = unknown; then
21981 ac_cv_c_bigendian=no
21982 else
21983 # finding both strings is unlikely to happen, but who knows?
21984 ac_cv_c_bigendian=unknown
21985 fi
21986fi
21987else
21988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021989sed 's/^/| /' conftest.$ac_ext >&5
21990
Martin v. Löwiseba40652007-08-30 20:10:57 +000021991
Martin v. Löwis11437992002-04-12 09:54:03 +000021992fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021993
21994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021995else
21996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021997/* confdefs.h. */
21998_ACEOF
21999cat confdefs.h >>conftest.$ac_ext
22000cat >>conftest.$ac_ext <<_ACEOF
22001/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022002$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022003int
22004main ()
22005{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022006
Guido van Rossumef2255b2000-03-10 22:30:29 +000022007 /* Are we little or big endian? From Harbison&Steele. */
22008 union
22009 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022010 long int l;
22011 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022012 } u;
22013 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022014 return u.c[sizeof (long int) - 1] == 1;
22015
22016 ;
22017 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022018}
Martin v. Löwis11437992002-04-12 09:54:03 +000022019_ACEOF
22020rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022021if { (ac_try="$ac_link"
22022case "(($ac_try" in
22023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22024 *) ac_try_echo=$ac_try;;
22025esac
22026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22027 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022028 ac_status=$?
22029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022031 { (case "(($ac_try" in
22032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22033 *) ac_try_echo=$ac_try;;
22034esac
22035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22036 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022037 ac_status=$?
22038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22039 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022040 ac_cv_c_bigendian=no
22041else
Martin v. Löwis11437992002-04-12 09:54:03 +000022042 echo "$as_me: program exited with status $ac_status" >&5
22043echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022044sed 's/^/| /' conftest.$ac_ext >&5
22045
Martin v. Löwis11437992002-04-12 09:54:03 +000022046( exit $ac_status )
22047ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022049rm -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 +000022050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022051
22052
Martin v. Löwis11437992002-04-12 09:54:03 +000022053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022054
22055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022057{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22058echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022059case $ac_cv_c_bigendian in
22060 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022061
Martin v. Löwis11437992002-04-12 09:54:03 +000022062cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022063#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022064_ACEOF
22065 ;;
22066 no)
22067 ;;
22068 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022069 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022070presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022071echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022072presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22073 { (exit 1); exit 1; }; } ;;
22074esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022075
Michael W. Hudson54241132001-12-07 15:38:26 +000022076
Ronald Oussoren988117f2006-04-29 11:31:35 +000022077
22078
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022079# Check whether right shifting a negative integer extends the sign bit
22080# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022081{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22082echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022083if test "${ac_cv_rshift_extends_sign+set}" = set; then
22084 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022085else
Martin v. Löwis11437992002-04-12 09:54:03 +000022086
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022087if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022088 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022089else
Martin v. Löwis11437992002-04-12 09:54:03 +000022090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022091/* confdefs.h. */
22092_ACEOF
22093cat confdefs.h >>conftest.$ac_ext
22094cat >>conftest.$ac_ext <<_ACEOF
22095/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022096
22097int main()
22098{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022099 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022100}
22101
Martin v. Löwis11437992002-04-12 09:54:03 +000022102_ACEOF
22103rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022104if { (ac_try="$ac_link"
22105case "(($ac_try" in
22106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22107 *) ac_try_echo=$ac_try;;
22108esac
22109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22110 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022111 ac_status=$?
22112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22113 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022114 { (case "(($ac_try" in
22115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22116 *) ac_try_echo=$ac_try;;
22117esac
22118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22119 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022120 ac_status=$?
22121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22122 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022123 ac_cv_rshift_extends_sign=yes
22124else
Martin v. Löwis11437992002-04-12 09:54:03 +000022125 echo "$as_me: program exited with status $ac_status" >&5
22126echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022127sed 's/^/| /' conftest.$ac_ext >&5
22128
Martin v. Löwis11437992002-04-12 09:54:03 +000022129( exit $ac_status )
22130ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022132rm -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 +000022133fi
22134
Martin v. Löwiseba40652007-08-30 20:10:57 +000022135
22136fi
22137
22138{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22139echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022140if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022141then
Martin v. Löwis11437992002-04-12 09:54:03 +000022142
22143cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022144#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022145_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022146
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022147fi
22148
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022149# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022150{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22151echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022152if test "${ac_cv_have_getc_unlocked+set}" = set; then
22153 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022154else
Martin v. Löwis11437992002-04-12 09:54:03 +000022155
22156cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022157/* confdefs.h. */
22158_ACEOF
22159cat confdefs.h >>conftest.$ac_ext
22160cat >>conftest.$ac_ext <<_ACEOF
22161/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022162#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022163int
22164main ()
22165{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022166
22167 FILE *f = fopen("/dev/null", "r");
22168 flockfile(f);
22169 getc_unlocked(f);
22170 funlockfile(f);
22171
Martin v. Löwis11437992002-04-12 09:54:03 +000022172 ;
22173 return 0;
22174}
22175_ACEOF
22176rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022177if { (ac_try="$ac_link"
22178case "(($ac_try" in
22179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22180 *) ac_try_echo=$ac_try;;
22181esac
22182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22183 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022185 grep -v '^ *+' conftest.er1 >conftest.err
22186 rm -f conftest.er1
22187 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022189 (exit $ac_status); } && {
22190 test -z "$ac_c_werror_flag" ||
22191 test ! -s conftest.err
22192 } && test -s conftest$ac_exeext &&
22193 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022194 ac_cv_have_getc_unlocked=yes
22195else
Martin v. Löwis11437992002-04-12 09:54:03 +000022196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022197sed 's/^/| /' conftest.$ac_ext >&5
22198
Martin v. Löwiseba40652007-08-30 20:10:57 +000022199 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022201
22202rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022203 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022204fi
22205
Martin v. Löwiseba40652007-08-30 20:10:57 +000022206{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22207echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022208if test "$ac_cv_have_getc_unlocked" = yes
22209then
Martin v. Löwis11437992002-04-12 09:54:03 +000022210
22211cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022212#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022213_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022214
22215fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022216
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022217# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022218# save the value of LIBS so we don't actually link Python with readline
22219LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022220
Martin v. Löwiseba40652007-08-30 20:10:57 +000022221{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22222echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022223if test "${ac_cv_lib_readline_readline+set}" = set; then
22224 echo $ECHO_N "(cached) $ECHO_C" >&6
22225else
22226 ac_check_lib_save_LIBS=$LIBS
22227LIBS="-lreadline $LIBS"
22228cat >conftest.$ac_ext <<_ACEOF
22229/* confdefs.h. */
22230_ACEOF
22231cat confdefs.h >>conftest.$ac_ext
22232cat >>conftest.$ac_ext <<_ACEOF
22233/* end confdefs.h. */
22234
Martin v. Löwiseba40652007-08-30 20:10:57 +000022235/* Override any GCC internal prototype to avoid an error.
22236 Use char because int might match the return type of a GCC
22237 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022238#ifdef __cplusplus
22239extern "C"
22240#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022241char readline ();
22242int
22243main ()
22244{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022245return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022246 ;
22247 return 0;
22248}
22249_ACEOF
22250rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022251if { (ac_try="$ac_link"
22252case "(($ac_try" in
22253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22254 *) ac_try_echo=$ac_try;;
22255esac
22256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22257 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022258 ac_status=$?
22259 grep -v '^ *+' conftest.er1 >conftest.err
22260 rm -f conftest.er1
22261 cat conftest.err >&5
22262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022263 (exit $ac_status); } && {
22264 test -z "$ac_c_werror_flag" ||
22265 test ! -s conftest.err
22266 } && test -s conftest$ac_exeext &&
22267 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022268 ac_cv_lib_readline_readline=yes
22269else
22270 echo "$as_me: failed program was:" >&5
22271sed 's/^/| /' conftest.$ac_ext >&5
22272
Martin v. Löwiseba40652007-08-30 20:10:57 +000022273 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022275
22276rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022277 conftest$ac_exeext conftest.$ac_ext
22278LIBS=$ac_check_lib_save_LIBS
22279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022280{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22281echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022282if test $ac_cv_lib_readline_readline = yes; then
22283 cat >>confdefs.h <<_ACEOF
22284#define HAVE_LIBREADLINE 1
22285_ACEOF
22286
22287 LIBS="-lreadline $LIBS"
22288
22289fi
22290
22291if test "$ac_cv_have_readline_readline" = no
22292then
22293
Martin v. Löwiseba40652007-08-30 20:10:57 +000022294{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22295echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022296if test "${ac_cv_lib_termcap_readline+set}" = set; then
22297 echo $ECHO_N "(cached) $ECHO_C" >&6
22298else
22299 ac_check_lib_save_LIBS=$LIBS
22300LIBS="-ltermcap $LIBS"
22301cat >conftest.$ac_ext <<_ACEOF
22302/* confdefs.h. */
22303_ACEOF
22304cat confdefs.h >>conftest.$ac_ext
22305cat >>conftest.$ac_ext <<_ACEOF
22306/* end confdefs.h. */
22307
Martin v. Löwiseba40652007-08-30 20:10:57 +000022308/* Override any GCC internal prototype to avoid an error.
22309 Use char because int might match the return type of a GCC
22310 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022311#ifdef __cplusplus
22312extern "C"
22313#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022314char readline ();
22315int
22316main ()
22317{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022318return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022319 ;
22320 return 0;
22321}
22322_ACEOF
22323rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022324if { (ac_try="$ac_link"
22325case "(($ac_try" in
22326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22327 *) ac_try_echo=$ac_try;;
22328esac
22329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22330 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022331 ac_status=$?
22332 grep -v '^ *+' conftest.er1 >conftest.err
22333 rm -f conftest.er1
22334 cat conftest.err >&5
22335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022336 (exit $ac_status); } && {
22337 test -z "$ac_c_werror_flag" ||
22338 test ! -s conftest.err
22339 } && test -s conftest$ac_exeext &&
22340 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022341 ac_cv_lib_termcap_readline=yes
22342else
22343 echo "$as_me: failed program was:" >&5
22344sed 's/^/| /' conftest.$ac_ext >&5
22345
Martin v. Löwiseba40652007-08-30 20:10:57 +000022346 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022348
22349rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022350 conftest$ac_exeext conftest.$ac_ext
22351LIBS=$ac_check_lib_save_LIBS
22352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022353{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22354echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022355if test $ac_cv_lib_termcap_readline = yes; then
22356 cat >>confdefs.h <<_ACEOF
22357#define HAVE_LIBTERMCAP 1
22358_ACEOF
22359
22360 LIBS="-ltermcap $LIBS"
22361
22362fi
22363
22364fi
22365
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022366# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022367{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22368echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022369if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22370 echo $ECHO_N "(cached) $ECHO_C" >&6
22371else
22372 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022373LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022374cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022375/* confdefs.h. */
22376_ACEOF
22377cat confdefs.h >>conftest.$ac_ext
22378cat >>conftest.$ac_ext <<_ACEOF
22379/* end confdefs.h. */
22380
Martin v. Löwiseba40652007-08-30 20:10:57 +000022381/* Override any GCC internal prototype to avoid an error.
22382 Use char because int might match the return type of a GCC
22383 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022384#ifdef __cplusplus
22385extern "C"
22386#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022387char rl_callback_handler_install ();
22388int
22389main ()
22390{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022391return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022392 ;
22393 return 0;
22394}
22395_ACEOF
22396rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022397if { (ac_try="$ac_link"
22398case "(($ac_try" in
22399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22400 *) ac_try_echo=$ac_try;;
22401esac
22402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22403 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022405 grep -v '^ *+' conftest.er1 >conftest.err
22406 rm -f conftest.er1
22407 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022409 (exit $ac_status); } && {
22410 test -z "$ac_c_werror_flag" ||
22411 test ! -s conftest.err
22412 } && test -s conftest$ac_exeext &&
22413 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022414 ac_cv_lib_readline_rl_callback_handler_install=yes
22415else
22416 echo "$as_me: failed program was:" >&5
22417sed 's/^/| /' conftest.$ac_ext >&5
22418
Martin v. Löwiseba40652007-08-30 20:10:57 +000022419 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022421
22422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022423 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022424LIBS=$ac_check_lib_save_LIBS
22425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022426{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22427echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022428if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22429
22430cat >>confdefs.h <<\_ACEOF
22431#define HAVE_RL_CALLBACK 1
22432_ACEOF
22433
22434fi
22435
22436
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022437# check for readline 2.2
22438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022439/* confdefs.h. */
22440_ACEOF
22441cat confdefs.h >>conftest.$ac_ext
22442cat >>conftest.$ac_ext <<_ACEOF
22443/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022444#include <readline/readline.h>
22445_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022446if { (ac_try="$ac_cpp conftest.$ac_ext"
22447case "(($ac_try" in
22448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22449 *) ac_try_echo=$ac_try;;
22450esac
22451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22452 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022453 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022454 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022455 rm -f conftest.er1
22456 cat conftest.err >&5
22457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022458 (exit $ac_status); } >/dev/null && {
22459 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22460 test ! -s conftest.err
22461 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022462 have_readline=yes
22463else
22464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022465sed 's/^/| /' conftest.$ac_ext >&5
22466
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022467 have_readline=no
22468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022469
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022470rm -f conftest.err conftest.$ac_ext
22471if test $have_readline = yes
22472then
22473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022474/* confdefs.h. */
22475_ACEOF
22476cat confdefs.h >>conftest.$ac_ext
22477cat >>conftest.$ac_ext <<_ACEOF
22478/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022479#include <readline/readline.h>
22480
22481_ACEOF
22482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022483 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022484
22485cat >>confdefs.h <<\_ACEOF
22486#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22487_ACEOF
22488
22489fi
22490rm -f conftest*
22491
22492fi
22493
Martin v. Löwis0daad592001-09-30 21:09:59 +000022494# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022495{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22496echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022497if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22498 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022499else
Martin v. Löwis11437992002-04-12 09:54:03 +000022500 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022501LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022502cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022503/* confdefs.h. */
22504_ACEOF
22505cat confdefs.h >>conftest.$ac_ext
22506cat >>conftest.$ac_ext <<_ACEOF
22507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022508
Martin v. Löwiseba40652007-08-30 20:10:57 +000022509/* Override any GCC internal prototype to avoid an error.
22510 Use char because int might match the return type of a GCC
22511 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022512#ifdef __cplusplus
22513extern "C"
22514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022515char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022516int
22517main ()
22518{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022519return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022520 ;
22521 return 0;
22522}
22523_ACEOF
22524rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022525if { (ac_try="$ac_link"
22526case "(($ac_try" in
22527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22528 *) ac_try_echo=$ac_try;;
22529esac
22530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22531 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022533 grep -v '^ *+' conftest.er1 >conftest.err
22534 rm -f conftest.er1
22535 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022537 (exit $ac_status); } && {
22538 test -z "$ac_c_werror_flag" ||
22539 test ! -s conftest.err
22540 } && test -s conftest$ac_exeext &&
22541 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022542 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022543else
Martin v. Löwis11437992002-04-12 09:54:03 +000022544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022545sed 's/^/| /' conftest.$ac_ext >&5
22546
Martin v. Löwiseba40652007-08-30 20:10:57 +000022547 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022549
22550rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022551 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022552LIBS=$ac_check_lib_save_LIBS
22553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022554{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22555echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022556if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022557
Martin v. Löwis11437992002-04-12 09:54:03 +000022558cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022559#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022560_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022561
Martin v. Löwis0daad592001-09-30 21:09:59 +000022562fi
22563
Michael W. Hudson54241132001-12-07 15:38:26 +000022564
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022565# also in 4.0
22566{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22567echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22568if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22569 echo $ECHO_N "(cached) $ECHO_C" >&6
22570else
22571 ac_check_lib_save_LIBS=$LIBS
22572LIBS="-lreadline $LIBS"
22573cat >conftest.$ac_ext <<_ACEOF
22574/* confdefs.h. */
22575_ACEOF
22576cat confdefs.h >>conftest.$ac_ext
22577cat >>conftest.$ac_ext <<_ACEOF
22578/* end confdefs.h. */
22579
22580/* Override any GCC internal prototype to avoid an error.
22581 Use char because int might match the return type of a GCC
22582 builtin and then its argument prototype would still apply. */
22583#ifdef __cplusplus
22584extern "C"
22585#endif
22586char rl_completion_display_matches_hook ();
22587int
22588main ()
22589{
22590return rl_completion_display_matches_hook ();
22591 ;
22592 return 0;
22593}
22594_ACEOF
22595rm -f conftest.$ac_objext conftest$ac_exeext
22596if { (ac_try="$ac_link"
22597case "(($ac_try" in
22598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22599 *) ac_try_echo=$ac_try;;
22600esac
22601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22602 (eval "$ac_link") 2>conftest.er1
22603 ac_status=$?
22604 grep -v '^ *+' conftest.er1 >conftest.err
22605 rm -f conftest.er1
22606 cat conftest.err >&5
22607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22608 (exit $ac_status); } && {
22609 test -z "$ac_c_werror_flag" ||
22610 test ! -s conftest.err
22611 } && test -s conftest$ac_exeext &&
22612 $as_test_x conftest$ac_exeext; then
22613 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22614else
22615 echo "$as_me: failed program was:" >&5
22616sed 's/^/| /' conftest.$ac_ext >&5
22617
22618 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22619fi
22620
22621rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22622 conftest$ac_exeext conftest.$ac_ext
22623LIBS=$ac_check_lib_save_LIBS
22624fi
22625{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22626echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22627if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22628
22629cat >>confdefs.h <<\_ACEOF
22630#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22631_ACEOF
22632
22633fi
22634
22635
Martin v. Löwis0daad592001-09-30 21:09:59 +000022636# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022637{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22638echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022639if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22640 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022641else
Martin v. Löwis11437992002-04-12 09:54:03 +000022642 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022643LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022644cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022645/* confdefs.h. */
22646_ACEOF
22647cat confdefs.h >>conftest.$ac_ext
22648cat >>conftest.$ac_ext <<_ACEOF
22649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022650
Martin v. Löwiseba40652007-08-30 20:10:57 +000022651/* Override any GCC internal prototype to avoid an error.
22652 Use char because int might match the return type of a GCC
22653 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022654#ifdef __cplusplus
22655extern "C"
22656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022657char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022658int
22659main ()
22660{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022661return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022662 ;
22663 return 0;
22664}
22665_ACEOF
22666rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022667if { (ac_try="$ac_link"
22668case "(($ac_try" in
22669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22670 *) ac_try_echo=$ac_try;;
22671esac
22672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22673 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022675 grep -v '^ *+' conftest.er1 >conftest.err
22676 rm -f conftest.er1
22677 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022679 (exit $ac_status); } && {
22680 test -z "$ac_c_werror_flag" ||
22681 test ! -s conftest.err
22682 } && test -s conftest$ac_exeext &&
22683 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022684 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022685else
Martin v. Löwis11437992002-04-12 09:54:03 +000022686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022687sed 's/^/| /' conftest.$ac_ext >&5
22688
Martin v. Löwiseba40652007-08-30 20:10:57 +000022689 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022691
22692rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022693 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022694LIBS=$ac_check_lib_save_LIBS
22695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022696{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22697echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022698if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022699
Martin v. Löwis11437992002-04-12 09:54:03 +000022700cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022701#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022702_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022703
Guido van Rossum353ae582001-07-10 16:45:32 +000022704fi
22705
Jack Jansendd19cf82001-12-06 22:36:17 +000022706
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022707# also in readline 4.2
22708cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022709/* confdefs.h. */
22710_ACEOF
22711cat confdefs.h >>conftest.$ac_ext
22712cat >>conftest.$ac_ext <<_ACEOF
22713/* end confdefs.h. */
22714#include <readline/readline.h>
22715_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022716if { (ac_try="$ac_cpp conftest.$ac_ext"
22717case "(($ac_try" in
22718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22719 *) ac_try_echo=$ac_try;;
22720esac
22721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22722 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022723 ac_status=$?
22724 grep -v '^ *+' conftest.er1 >conftest.err
22725 rm -f conftest.er1
22726 cat conftest.err >&5
22727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022728 (exit $ac_status); } >/dev/null && {
22729 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22730 test ! -s conftest.err
22731 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022732 have_readline=yes
22733else
22734 echo "$as_me: failed program was:" >&5
22735sed 's/^/| /' conftest.$ac_ext >&5
22736
22737 have_readline=no
22738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022739
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022740rm -f conftest.err conftest.$ac_ext
22741if test $have_readline = yes
22742then
22743 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022744/* confdefs.h. */
22745_ACEOF
22746cat confdefs.h >>conftest.$ac_ext
22747cat >>conftest.$ac_ext <<_ACEOF
22748/* end confdefs.h. */
22749#include <readline/readline.h>
22750
22751_ACEOF
22752if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22753 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22754
22755cat >>confdefs.h <<\_ACEOF
22756#define HAVE_RL_CATCH_SIGNAL 1
22757_ACEOF
22758
22759fi
22760rm -f conftest*
22761
22762fi
22763
Martin v. Löwis82bca632006-02-10 20:49:30 +000022764# End of readline checks: restore LIBS
22765LIBS=$LIBS_no_readline
22766
Martin v. Löwiseba40652007-08-30 20:10:57 +000022767{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22768echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022769if test "${ac_cv_broken_nice+set}" = set; then
22770 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022771else
Martin v. Löwis11437992002-04-12 09:54:03 +000022772
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022773if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022774 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022775else
Martin v. Löwis11437992002-04-12 09:54:03 +000022776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022777/* confdefs.h. */
22778_ACEOF
22779cat confdefs.h >>conftest.$ac_ext
22780cat >>conftest.$ac_ext <<_ACEOF
22781/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022782
22783int main()
22784{
22785 int val1 = nice(1);
22786 if (val1 != -1 && val1 == nice(2))
22787 exit(0);
22788 exit(1);
22789}
22790
Martin v. Löwis11437992002-04-12 09:54:03 +000022791_ACEOF
22792rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022793if { (ac_try="$ac_link"
22794case "(($ac_try" in
22795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22796 *) ac_try_echo=$ac_try;;
22797esac
22798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22799 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022800 ac_status=$?
22801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22802 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022803 { (case "(($ac_try" in
22804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22805 *) ac_try_echo=$ac_try;;
22806esac
22807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22808 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022809 ac_status=$?
22810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22811 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022812 ac_cv_broken_nice=yes
22813else
Martin v. Löwis11437992002-04-12 09:54:03 +000022814 echo "$as_me: program exited with status $ac_status" >&5
22815echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022816sed 's/^/| /' conftest.$ac_ext >&5
22817
Martin v. Löwis11437992002-04-12 09:54:03 +000022818( exit $ac_status )
22819ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022821rm -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 +000022822fi
22823
Martin v. Löwiseba40652007-08-30 20:10:57 +000022824
22825fi
22826
22827{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22828echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022829if test "$ac_cv_broken_nice" = yes
22830then
Martin v. Löwis11437992002-04-12 09:54:03 +000022831
22832cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022833#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022834_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022835
22836fi
22837
Martin v. Löwiseba40652007-08-30 20:10:57 +000022838{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22839echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022840if test "$cross_compiling" = yes; then
22841 ac_cv_broken_poll=no
22842else
22843 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022844/* confdefs.h. */
22845_ACEOF
22846cat confdefs.h >>conftest.$ac_ext
22847cat >>conftest.$ac_ext <<_ACEOF
22848/* end confdefs.h. */
22849
22850#include <poll.h>
22851
22852int main (void)
22853 {
22854 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22855
22856 close (42);
22857
22858 int poll_test = poll (&poll_struct, 1, 0);
22859
22860 if (poll_test < 0)
22861 {
22862 exit(0);
22863 }
22864 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22865 {
22866 exit(0);
22867 }
22868 else
22869 {
22870 exit(1);
22871 }
22872 }
22873
22874_ACEOF
22875rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022876if { (ac_try="$ac_link"
22877case "(($ac_try" in
22878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22879 *) ac_try_echo=$ac_try;;
22880esac
22881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22882 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022883 ac_status=$?
22884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22885 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022886 { (case "(($ac_try" in
22887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22888 *) ac_try_echo=$ac_try;;
22889esac
22890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22891 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022892 ac_status=$?
22893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22894 (exit $ac_status); }; }; then
22895 ac_cv_broken_poll=yes
22896else
22897 echo "$as_me: program exited with status $ac_status" >&5
22898echo "$as_me: failed program was:" >&5
22899sed 's/^/| /' conftest.$ac_ext >&5
22900
22901( exit $ac_status )
22902ac_cv_broken_poll=no
22903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022904rm -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 +000022905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022906
22907
22908{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
22909echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022910if test "$ac_cv_broken_poll" = yes
22911then
22912
22913cat >>confdefs.h <<\_ACEOF
22914#define HAVE_BROKEN_POLL 1
22915_ACEOF
22916
22917fi
22918
Brett Cannon43802422005-02-10 20:48:03 +000022919# 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 +000022920# (which is not required by ISO C or UNIX spec) and/or if we support
22921# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000022922{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
22923echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022924if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
22925 echo $ECHO_N "(cached) $ECHO_C" >&6
22926else
22927 cat >conftest.$ac_ext <<_ACEOF
22928/* confdefs.h. */
22929_ACEOF
22930cat confdefs.h >>conftest.$ac_ext
22931cat >>conftest.$ac_ext <<_ACEOF
22932/* end confdefs.h. */
22933#include <sys/types.h>
22934#include <$ac_cv_struct_tm>
22935
22936
22937int
22938main ()
22939{
22940static struct tm ac_aggr;
22941if (ac_aggr.tm_zone)
22942return 0;
22943 ;
22944 return 0;
22945}
22946_ACEOF
22947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022948if { (ac_try="$ac_compile"
22949case "(($ac_try" in
22950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22951 *) ac_try_echo=$ac_try;;
22952esac
22953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22954 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022955 ac_status=$?
22956 grep -v '^ *+' conftest.er1 >conftest.err
22957 rm -f conftest.er1
22958 cat conftest.err >&5
22959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022960 (exit $ac_status); } && {
22961 test -z "$ac_c_werror_flag" ||
22962 test ! -s conftest.err
22963 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022964 ac_cv_member_struct_tm_tm_zone=yes
22965else
22966 echo "$as_me: failed program was:" >&5
22967sed 's/^/| /' conftest.$ac_ext >&5
22968
Martin v. Löwiseba40652007-08-30 20:10:57 +000022969 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000022970/* confdefs.h. */
22971_ACEOF
22972cat confdefs.h >>conftest.$ac_ext
22973cat >>conftest.$ac_ext <<_ACEOF
22974/* end confdefs.h. */
22975#include <sys/types.h>
22976#include <$ac_cv_struct_tm>
22977
22978
22979int
22980main ()
22981{
22982static struct tm ac_aggr;
22983if (sizeof ac_aggr.tm_zone)
22984return 0;
22985 ;
22986 return 0;
22987}
22988_ACEOF
22989rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022990if { (ac_try="$ac_compile"
22991case "(($ac_try" in
22992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22993 *) ac_try_echo=$ac_try;;
22994esac
22995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22996 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022997 ac_status=$?
22998 grep -v '^ *+' conftest.er1 >conftest.err
22999 rm -f conftest.er1
23000 cat conftest.err >&5
23001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002 (exit $ac_status); } && {
23003 test -z "$ac_c_werror_flag" ||
23004 test ! -s conftest.err
23005 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023006 ac_cv_member_struct_tm_tm_zone=yes
23007else
23008 echo "$as_me: failed program was:" >&5
23009sed 's/^/| /' conftest.$ac_ext >&5
23010
Martin v. Löwiseba40652007-08-30 20:10:57 +000023011 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023013
23014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023016
23017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023019{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23020echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023021if test $ac_cv_member_struct_tm_tm_zone = yes; then
23022
23023cat >>confdefs.h <<_ACEOF
23024#define HAVE_STRUCT_TM_TM_ZONE 1
23025_ACEOF
23026
23027
23028fi
23029
23030if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23031
23032cat >>confdefs.h <<\_ACEOF
23033#define HAVE_TM_ZONE 1
23034_ACEOF
23035
23036else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023037 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23038echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23039if test "${ac_cv_have_decl_tzname+set}" = set; then
23040 echo $ECHO_N "(cached) $ECHO_C" >&6
23041else
23042 cat >conftest.$ac_ext <<_ACEOF
23043/* confdefs.h. */
23044_ACEOF
23045cat confdefs.h >>conftest.$ac_ext
23046cat >>conftest.$ac_ext <<_ACEOF
23047/* end confdefs.h. */
23048#include <time.h>
23049
23050int
23051main ()
23052{
23053#ifndef tzname
23054 (void) tzname;
23055#endif
23056
23057 ;
23058 return 0;
23059}
23060_ACEOF
23061rm -f conftest.$ac_objext
23062if { (ac_try="$ac_compile"
23063case "(($ac_try" in
23064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23065 *) ac_try_echo=$ac_try;;
23066esac
23067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23068 (eval "$ac_compile") 2>conftest.er1
23069 ac_status=$?
23070 grep -v '^ *+' conftest.er1 >conftest.err
23071 rm -f conftest.er1
23072 cat conftest.err >&5
23073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23074 (exit $ac_status); } && {
23075 test -z "$ac_c_werror_flag" ||
23076 test ! -s conftest.err
23077 } && test -s conftest.$ac_objext; then
23078 ac_cv_have_decl_tzname=yes
23079else
23080 echo "$as_me: failed program was:" >&5
23081sed 's/^/| /' conftest.$ac_ext >&5
23082
23083 ac_cv_have_decl_tzname=no
23084fi
23085
23086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23087fi
23088{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23089echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23090if test $ac_cv_have_decl_tzname = yes; then
23091
23092cat >>confdefs.h <<_ACEOF
23093#define HAVE_DECL_TZNAME 1
23094_ACEOF
23095
23096
23097else
23098 cat >>confdefs.h <<_ACEOF
23099#define HAVE_DECL_TZNAME 0
23100_ACEOF
23101
23102
23103fi
23104
23105
23106 { echo "$as_me:$LINENO: checking for tzname" >&5
23107echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023108if test "${ac_cv_var_tzname+set}" = set; then
23109 echo $ECHO_N "(cached) $ECHO_C" >&6
23110else
23111 cat >conftest.$ac_ext <<_ACEOF
23112/* confdefs.h. */
23113_ACEOF
23114cat confdefs.h >>conftest.$ac_ext
23115cat >>conftest.$ac_ext <<_ACEOF
23116/* end confdefs.h. */
23117#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023118#if !HAVE_DECL_TZNAME
23119extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023120#endif
23121
23122int
23123main ()
23124{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023125return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023126 ;
23127 return 0;
23128}
23129_ACEOF
23130rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023131if { (ac_try="$ac_link"
23132case "(($ac_try" in
23133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23134 *) ac_try_echo=$ac_try;;
23135esac
23136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23137 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023138 ac_status=$?
23139 grep -v '^ *+' conftest.er1 >conftest.err
23140 rm -f conftest.er1
23141 cat conftest.err >&5
23142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023143 (exit $ac_status); } && {
23144 test -z "$ac_c_werror_flag" ||
23145 test ! -s conftest.err
23146 } && test -s conftest$ac_exeext &&
23147 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023148 ac_cv_var_tzname=yes
23149else
23150 echo "$as_me: failed program was:" >&5
23151sed 's/^/| /' conftest.$ac_ext >&5
23152
Martin v. Löwiseba40652007-08-30 20:10:57 +000023153 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023155
23156rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023157 conftest$ac_exeext conftest.$ac_ext
23158fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023159{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23160echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023161 if test $ac_cv_var_tzname = yes; then
23162
23163cat >>confdefs.h <<\_ACEOF
23164#define HAVE_TZNAME 1
23165_ACEOF
23166
23167 fi
23168fi
23169
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023170
Martin v. Löwis1d459062005-03-14 21:23:33 +000023171# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023172{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23173echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023174if test "${ac_cv_working_tzset+set}" = set; then
23175 echo $ECHO_N "(cached) $ECHO_C" >&6
23176else
23177
23178if test "$cross_compiling" = yes; then
23179 ac_cv_working_tzset=no
23180else
23181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023182/* confdefs.h. */
23183_ACEOF
23184cat confdefs.h >>conftest.$ac_ext
23185cat >>conftest.$ac_ext <<_ACEOF
23186/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023187
23188#include <stdlib.h>
23189#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023190#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023191
23192#if HAVE_TZNAME
23193extern char *tzname[];
23194#endif
23195
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023196int main()
23197{
Brett Cannon18367812003-09-19 00:59:16 +000023198 /* Note that we need to ensure that not only does tzset(3)
23199 do 'something' with localtime, but it works as documented
23200 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023201 This includes making sure that tzname is set properly if
23202 tm->tm_zone does not exist since it is the alternative way
23203 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023204
23205 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023206 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023207 */
23208
Martin v. Löwis1d459062005-03-14 21:23:33 +000023209 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023210 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23211
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023212 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023213 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023214 if (localtime(&groundhogday)->tm_hour != 0)
23215 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023216#if HAVE_TZNAME
23217 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23218 if (strcmp(tzname[0], "UTC") ||
23219 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23220 exit(1);
23221#endif
Brett Cannon18367812003-09-19 00:59:16 +000023222
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023223 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023224 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023225 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023226 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023227#if HAVE_TZNAME
23228 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23229 exit(1);
23230#endif
Brett Cannon18367812003-09-19 00:59:16 +000023231
23232 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23233 tzset();
23234 if (localtime(&groundhogday)->tm_hour != 11)
23235 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023236#if HAVE_TZNAME
23237 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23238 exit(1);
23239#endif
23240
23241#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023242 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23243 exit(1);
23244 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23245 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023246#endif
Brett Cannon18367812003-09-19 00:59:16 +000023247
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023248 exit(0);
23249}
23250
23251_ACEOF
23252rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023253if { (ac_try="$ac_link"
23254case "(($ac_try" in
23255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23256 *) ac_try_echo=$ac_try;;
23257esac
23258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23259 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023260 ac_status=$?
23261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23262 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023263 { (case "(($ac_try" in
23264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23265 *) ac_try_echo=$ac_try;;
23266esac
23267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23268 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023269 ac_status=$?
23270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23271 (exit $ac_status); }; }; then
23272 ac_cv_working_tzset=yes
23273else
23274 echo "$as_me: program exited with status $ac_status" >&5
23275echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023276sed 's/^/| /' conftest.$ac_ext >&5
23277
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023278( exit $ac_status )
23279ac_cv_working_tzset=no
23280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023281rm -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 +000023282fi
23283
Martin v. Löwiseba40652007-08-30 20:10:57 +000023284
23285fi
23286
23287{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23288echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023289if test "$ac_cv_working_tzset" = yes
23290then
23291
23292cat >>confdefs.h <<\_ACEOF
23293#define HAVE_WORKING_TZSET 1
23294_ACEOF
23295
23296fi
23297
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023298# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023299{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23300echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023301if test "${ac_cv_stat_tv_nsec+set}" = set; then
23302 echo $ECHO_N "(cached) $ECHO_C" >&6
23303else
23304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023305/* confdefs.h. */
23306_ACEOF
23307cat confdefs.h >>conftest.$ac_ext
23308cat >>conftest.$ac_ext <<_ACEOF
23309/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023310#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023311int
23312main ()
23313{
23314
23315struct stat st;
23316st.st_mtim.tv_nsec = 1;
23317
23318 ;
23319 return 0;
23320}
23321_ACEOF
23322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023323if { (ac_try="$ac_compile"
23324case "(($ac_try" in
23325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23326 *) ac_try_echo=$ac_try;;
23327esac
23328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023331 grep -v '^ *+' conftest.er1 >conftest.err
23332 rm -f conftest.er1
23333 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023335 (exit $ac_status); } && {
23336 test -z "$ac_c_werror_flag" ||
23337 test ! -s conftest.err
23338 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023339 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023340else
23341 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023342sed 's/^/| /' conftest.$ac_ext >&5
23343
Martin v. Löwiseba40652007-08-30 20:10:57 +000023344 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023345fi
23346
Martin v. Löwiseba40652007-08-30 20:10:57 +000023347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23348fi
23349
23350{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23351echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023352if test "$ac_cv_stat_tv_nsec" = yes
23353then
23354
23355cat >>confdefs.h <<\_ACEOF
23356#define HAVE_STAT_TV_NSEC 1
23357_ACEOF
23358
23359fi
23360
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023361# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023362{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23363echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023364if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23365 echo $ECHO_N "(cached) $ECHO_C" >&6
23366else
23367 cat >conftest.$ac_ext <<_ACEOF
23368/* confdefs.h. */
23369_ACEOF
23370cat confdefs.h >>conftest.$ac_ext
23371cat >>conftest.$ac_ext <<_ACEOF
23372/* end confdefs.h. */
23373#include <sys/stat.h>
23374int
23375main ()
23376{
23377
23378struct stat st;
23379st.st_mtimespec.tv_nsec = 1;
23380
23381 ;
23382 return 0;
23383}
23384_ACEOF
23385rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023386if { (ac_try="$ac_compile"
23387case "(($ac_try" in
23388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23389 *) ac_try_echo=$ac_try;;
23390esac
23391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023393 ac_status=$?
23394 grep -v '^ *+' conftest.er1 >conftest.err
23395 rm -f conftest.er1
23396 cat conftest.err >&5
23397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023398 (exit $ac_status); } && {
23399 test -z "$ac_c_werror_flag" ||
23400 test ! -s conftest.err
23401 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023402 ac_cv_stat_tv_nsec2=yes
23403else
23404 echo "$as_me: failed program was:" >&5
23405sed 's/^/| /' conftest.$ac_ext >&5
23406
Martin v. Löwiseba40652007-08-30 20:10:57 +000023407 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023408fi
23409
Martin v. Löwiseba40652007-08-30 20:10:57 +000023410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23411fi
23412
23413{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23414echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023415if test "$ac_cv_stat_tv_nsec2" = yes
23416then
23417
23418cat >>confdefs.h <<\_ACEOF
23419#define HAVE_STAT_TV_NSEC2 1
23420_ACEOF
23421
23422fi
23423
Jack Jansen666b1e72001-10-31 12:11:48 +000023424# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023425{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23426echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023427if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23428 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023429else
Martin v. Löwis11437992002-04-12 09:54:03 +000023430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023431/* confdefs.h. */
23432_ACEOF
23433cat confdefs.h >>conftest.$ac_ext
23434cat >>conftest.$ac_ext <<_ACEOF
23435/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023436#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023437int
23438main ()
23439{
Jack Jansen666b1e72001-10-31 12:11:48 +000023440
23441 int rtn;
23442 rtn = mvwdelch(0,0,0);
23443
Martin v. Löwis11437992002-04-12 09:54:03 +000023444 ;
23445 return 0;
23446}
23447_ACEOF
23448rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023449if { (ac_try="$ac_compile"
23450case "(($ac_try" in
23451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23452 *) ac_try_echo=$ac_try;;
23453esac
23454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23455 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023457 grep -v '^ *+' conftest.er1 >conftest.err
23458 rm -f conftest.er1
23459 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023461 (exit $ac_status); } && {
23462 test -z "$ac_c_werror_flag" ||
23463 test ! -s conftest.err
23464 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023465 ac_cv_mvwdelch_is_expression=yes
23466else
Martin v. Löwis11437992002-04-12 09:54:03 +000023467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023468sed 's/^/| /' conftest.$ac_ext >&5
23469
Martin v. Löwiseba40652007-08-30 20:10:57 +000023470 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023471fi
23472
Martin v. Löwiseba40652007-08-30 20:10:57 +000023473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23474fi
23475
23476{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23477echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023478
23479if test "$ac_cv_mvwdelch_is_expression" = yes
23480then
Martin v. Löwis11437992002-04-12 09:54:03 +000023481
23482cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023483#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023484_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023485
23486fi
23487
Martin v. Löwiseba40652007-08-30 20:10:57 +000023488{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23489echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023490if test "${ac_cv_window_has_flags+set}" = set; then
23491 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023492else
Martin v. Löwis11437992002-04-12 09:54:03 +000023493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023494/* confdefs.h. */
23495_ACEOF
23496cat confdefs.h >>conftest.$ac_ext
23497cat >>conftest.$ac_ext <<_ACEOF
23498/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023499#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023500int
23501main ()
23502{
Jack Jansen666b1e72001-10-31 12:11:48 +000023503
23504 WINDOW *w;
23505 w->_flags = 0;
23506
Martin v. Löwis11437992002-04-12 09:54:03 +000023507 ;
23508 return 0;
23509}
23510_ACEOF
23511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023512if { (ac_try="$ac_compile"
23513case "(($ac_try" in
23514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23515 *) ac_try_echo=$ac_try;;
23516esac
23517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023520 grep -v '^ *+' conftest.er1 >conftest.err
23521 rm -f conftest.er1
23522 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023524 (exit $ac_status); } && {
23525 test -z "$ac_c_werror_flag" ||
23526 test ! -s conftest.err
23527 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023528 ac_cv_window_has_flags=yes
23529else
Martin v. Löwis11437992002-04-12 09:54:03 +000023530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023531sed 's/^/| /' conftest.$ac_ext >&5
23532
Martin v. Löwiseba40652007-08-30 20:10:57 +000023533 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023534fi
23535
Martin v. Löwiseba40652007-08-30 20:10:57 +000023536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23537fi
23538
23539{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23540echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023541
Jack Jansen666b1e72001-10-31 12:11:48 +000023542
23543if test "$ac_cv_window_has_flags" = yes
23544then
Martin v. Löwis11437992002-04-12 09:54:03 +000023545
23546cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023547#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023548_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023549
23550fi
23551
Martin v. Löwiseba40652007-08-30 20:10:57 +000023552{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23553echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023554cat >conftest.$ac_ext <<_ACEOF
23555/* confdefs.h. */
23556_ACEOF
23557cat confdefs.h >>conftest.$ac_ext
23558cat >>conftest.$ac_ext <<_ACEOF
23559/* end confdefs.h. */
23560#include <curses.h>
23561int
23562main ()
23563{
23564void *x=is_term_resized
23565 ;
23566 return 0;
23567}
23568_ACEOF
23569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023570if { (ac_try="$ac_compile"
23571case "(($ac_try" in
23572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23573 *) ac_try_echo=$ac_try;;
23574esac
23575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23576 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023577 ac_status=$?
23578 grep -v '^ *+' conftest.er1 >conftest.err
23579 rm -f conftest.er1
23580 cat conftest.err >&5
23581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023582 (exit $ac_status); } && {
23583 test -z "$ac_c_werror_flag" ||
23584 test ! -s conftest.err
23585 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023586
23587cat >>confdefs.h <<\_ACEOF
23588#define HAVE_CURSES_IS_TERM_RESIZED 1
23589_ACEOF
23590
Martin v. Löwiseba40652007-08-30 20:10:57 +000023591 { echo "$as_me:$LINENO: result: yes" >&5
23592echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023593else
23594 echo "$as_me: failed program was:" >&5
23595sed 's/^/| /' conftest.$ac_ext >&5
23596
Martin v. Löwiseba40652007-08-30 20:10:57 +000023597 { echo "$as_me:$LINENO: result: no" >&5
23598echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023599
23600fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023601
Martin v. Löwiseba40652007-08-30 20:10:57 +000023602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23603
23604{ echo "$as_me:$LINENO: checking for resize_term" >&5
23605echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023606cat >conftest.$ac_ext <<_ACEOF
23607/* confdefs.h. */
23608_ACEOF
23609cat confdefs.h >>conftest.$ac_ext
23610cat >>conftest.$ac_ext <<_ACEOF
23611/* end confdefs.h. */
23612#include <curses.h>
23613int
23614main ()
23615{
23616void *x=resize_term
23617 ;
23618 return 0;
23619}
23620_ACEOF
23621rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023622if { (ac_try="$ac_compile"
23623case "(($ac_try" in
23624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23625 *) ac_try_echo=$ac_try;;
23626esac
23627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23628 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023629 ac_status=$?
23630 grep -v '^ *+' conftest.er1 >conftest.err
23631 rm -f conftest.er1
23632 cat conftest.err >&5
23633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023634 (exit $ac_status); } && {
23635 test -z "$ac_c_werror_flag" ||
23636 test ! -s conftest.err
23637 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023638
23639cat >>confdefs.h <<\_ACEOF
23640#define HAVE_CURSES_RESIZE_TERM 1
23641_ACEOF
23642
Martin v. Löwiseba40652007-08-30 20:10:57 +000023643 { echo "$as_me:$LINENO: result: yes" >&5
23644echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023645else
23646 echo "$as_me: failed program was:" >&5
23647sed 's/^/| /' conftest.$ac_ext >&5
23648
Martin v. Löwiseba40652007-08-30 20:10:57 +000023649 { echo "$as_me:$LINENO: result: no" >&5
23650echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023651
23652fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023653
Martin v. Löwiseba40652007-08-30 20:10:57 +000023654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23655
23656{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23657echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023658cat >conftest.$ac_ext <<_ACEOF
23659/* confdefs.h. */
23660_ACEOF
23661cat confdefs.h >>conftest.$ac_ext
23662cat >>conftest.$ac_ext <<_ACEOF
23663/* end confdefs.h. */
23664#include <curses.h>
23665int
23666main ()
23667{
23668void *x=resizeterm
23669 ;
23670 return 0;
23671}
23672_ACEOF
23673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023674if { (ac_try="$ac_compile"
23675case "(($ac_try" in
23676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23677 *) ac_try_echo=$ac_try;;
23678esac
23679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23680 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023681 ac_status=$?
23682 grep -v '^ *+' conftest.er1 >conftest.err
23683 rm -f conftest.er1
23684 cat conftest.err >&5
23685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023686 (exit $ac_status); } && {
23687 test -z "$ac_c_werror_flag" ||
23688 test ! -s conftest.err
23689 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023690
23691cat >>confdefs.h <<\_ACEOF
23692#define HAVE_CURSES_RESIZETERM 1
23693_ACEOF
23694
Martin v. Löwiseba40652007-08-30 20:10:57 +000023695 { echo "$as_me:$LINENO: result: yes" >&5
23696echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023697else
23698 echo "$as_me: failed program was:" >&5
23699sed 's/^/| /' conftest.$ac_ext >&5
23700
Martin v. Löwiseba40652007-08-30 20:10:57 +000023701 { echo "$as_me:$LINENO: result: no" >&5
23702echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023703
23704fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023705
Martin v. Löwiseba40652007-08-30 20:10:57 +000023706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23707
23708{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23709echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023710
23711if test -r /dev/ptmx
23712then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023713 { echo "$as_me:$LINENO: result: yes" >&5
23714echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023715
23716cat >>confdefs.h <<\_ACEOF
23717#define HAVE_DEV_PTMX 1
23718_ACEOF
23719
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023720else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023721 { echo "$as_me:$LINENO: result: no" >&5
23722echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023723fi
23724
Martin v. Löwiseba40652007-08-30 20:10:57 +000023725{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23726echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023727
23728if test -r /dev/ptc
23729then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023730 { echo "$as_me:$LINENO: result: yes" >&5
23731echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023732
23733cat >>confdefs.h <<\_ACEOF
23734#define HAVE_DEV_PTC 1
23735_ACEOF
23736
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023737else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023738 { echo "$as_me:$LINENO: result: no" >&5
23739echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023740fi
23741
Martin v. Löwiseba40652007-08-30 20:10:57 +000023742{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23743echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023744if test "$cross_compiling" = yes; then
23745 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23746See \`config.log' for more details." >&5
23747echo "$as_me: error: cannot run test program while cross compiling
23748See \`config.log' for more details." >&2;}
23749 { (exit 1); exit 1; }; }
23750else
23751 cat >conftest.$ac_ext <<_ACEOF
23752/* confdefs.h. */
23753_ACEOF
23754cat confdefs.h >>conftest.$ac_ext
23755cat >>conftest.$ac_ext <<_ACEOF
23756/* end confdefs.h. */
23757#include <stdio.h>
23758#include <stddef.h>
23759#include <string.h>
23760
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023761#ifdef HAVE_SYS_TYPES_H
23762#include <sys/types.h>
23763#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023764
23765#ifdef HAVE_SSIZE_T
23766typedef ssize_t Py_ssize_t;
23767#elif SIZEOF_VOID_P == SIZEOF_LONG
23768typedef long Py_ssize_t;
23769#else
23770typedef int Py_ssize_t;
23771#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023772
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023773int main()
23774{
23775 char buffer[256];
23776
Brett Cannon09d12362006-05-11 05:11:33 +000023777 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23778 return 1;
23779
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023780 if (strcmp(buffer, "123"))
23781 return 1;
23782
23783 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23784 return 1;
23785
23786 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023787 return 1;
23788
23789 return 0;
23790}
23791_ACEOF
23792rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023793if { (ac_try="$ac_link"
23794case "(($ac_try" in
23795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23796 *) ac_try_echo=$ac_try;;
23797esac
23798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23799 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023800 ac_status=$?
23801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23802 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023803 { (case "(($ac_try" in
23804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23805 *) ac_try_echo=$ac_try;;
23806esac
23807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23808 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023809 ac_status=$?
23810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23811 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023812 { echo "$as_me:$LINENO: result: yes" >&5
23813echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023814
23815cat >>confdefs.h <<\_ACEOF
23816#define PY_FORMAT_SIZE_T "z"
23817_ACEOF
23818
23819else
23820 echo "$as_me: program exited with status $ac_status" >&5
23821echo "$as_me: failed program was:" >&5
23822sed 's/^/| /' conftest.$ac_ext >&5
23823
23824( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023825{ echo "$as_me:$LINENO: result: no" >&5
23826echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023828rm -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 +000023829fi
23830
Martin v. Löwiseba40652007-08-30 20:10:57 +000023831
23832
23833{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23834echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023835if test "${ac_cv_type_socklen_t+set}" = set; then
23836 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023837else
Martin v. Löwis11437992002-04-12 09:54:03 +000023838 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023839/* confdefs.h. */
23840_ACEOF
23841cat confdefs.h >>conftest.$ac_ext
23842cat >>conftest.$ac_ext <<_ACEOF
23843/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023844
23845#ifdef HAVE_SYS_TYPES_H
23846#include <sys/types.h>
23847#endif
23848#ifdef HAVE_SYS_SOCKET_H
23849#include <sys/socket.h>
23850#endif
23851
23852
Martin v. Löwiseba40652007-08-30 20:10:57 +000023853typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023854int
23855main ()
23856{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023857if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023858 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023859if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023860 return 0;
23861 ;
23862 return 0;
23863}
23864_ACEOF
23865rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023866if { (ac_try="$ac_compile"
23867case "(($ac_try" in
23868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23869 *) ac_try_echo=$ac_try;;
23870esac
23871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23872 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023874 grep -v '^ *+' conftest.er1 >conftest.err
23875 rm -f conftest.er1
23876 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023878 (exit $ac_status); } && {
23879 test -z "$ac_c_werror_flag" ||
23880 test ! -s conftest.err
23881 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000023882 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000023883else
Martin v. Löwis11437992002-04-12 09:54:03 +000023884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023885sed 's/^/| /' conftest.$ac_ext >&5
23886
Martin v. Löwiseba40652007-08-30 20:10:57 +000023887 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000023888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023889
23890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023891fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023892{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
23893echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023894if test $ac_cv_type_socklen_t = yes; then
23895 :
23896else
Guido van Rossum95713eb2000-05-18 20:53:31 +000023897
Martin v. Löwis01c04012002-11-11 14:58:44 +000023898cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023899#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000023900_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023901
23902fi
23903
Michael W. Hudson54241132001-12-07 15:38:26 +000023904
Michael W. Hudson54241132001-12-07 15:38:26 +000023905
23906
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000023907for h in `(cd $srcdir;echo Python/thread_*.h)`
23908do
23909 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
23910done
23911
Michael W. Hudson54241132001-12-07 15:38:26 +000023912
Neal Norwitzd24499d2005-12-18 21:36:39 +000023913SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023914{ echo "$as_me:$LINENO: checking for build directories" >&5
23915echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023916for dir in $SRCDIRS; do
23917 if test ! -d $dir; then
23918 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000023919 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023920done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023921{ echo "$as_me:$LINENO: result: done" >&5
23922echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000023923
Guido van Rossum627b2d71993-12-24 10:39:16 +000023924# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000023925ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000023926
Martin v. Löwis11437992002-04-12 09:54:03 +000023927cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023928# This file is a shell script that caches the results of configure
23929# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000023930# scripts and configure runs, see configure's option --config-cache.
23931# It is not useful on other systems. If it contains results you don't
23932# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023933#
Martin v. Löwis11437992002-04-12 09:54:03 +000023934# config.status only pays attention to the cache file if you give it
23935# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023936#
Skip Montanaro6dead952003-09-25 14:50:04 +000023937# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000023938# loading this file, other *unset* `ac_cv_foo' will be assigned the
23939# following values.
23940
23941_ACEOF
23942
Guido van Rossumf78abae1997-01-21 22:02:36 +000023943# The following way of writing the cache mishandles newlines in values,
23944# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023945# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023946# Ultrix sh set writes to stderr and can't be redirected directly,
23947# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023948(
23949 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23950 eval ac_val=\$$ac_var
23951 case $ac_val in #(
23952 *${as_nl}*)
23953 case $ac_var in #(
23954 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23955echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23956 esac
23957 case $ac_var in #(
23958 _ | IFS | as_nl) ;; #(
23959 *) $as_unset $ac_var ;;
23960 esac ;;
23961 esac
23962 done
23963
Martin v. Löwis11437992002-04-12 09:54:03 +000023964 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000023965 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23966 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000023967 # `set' does not quote correctly, so add quotes (double-quote
23968 # substitution turns \\\\ into \\, and sed turns \\ into \).
23969 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023970 "s/'/'\\\\''/g;
23971 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023972 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000023973 *)
23974 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023975 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000023976 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023977 esac |
23978 sort
23979) |
Martin v. Löwis11437992002-04-12 09:54:03 +000023980 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023981 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000023982 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000023983 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000023984 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23985 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000023986 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23987 :end' >>confcache
23988if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23989 if test -w "$cache_file"; then
23990 test "x$cache_file" != "x/dev/null" &&
23991 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23992echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023993 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023994 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023995 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23996echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023997 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023998fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023999rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024000
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024001test "x$prefix" = xNONE && prefix=$ac_default_prefix
24002# Let make expand exec_prefix.
24003test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024004
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024005DEFS=-DHAVE_CONFIG_H
24006
Skip Montanaro6dead952003-09-25 14:50:04 +000024007ac_libobjs=
24008ac_ltlibobjs=
24009for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24010 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024011 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24012 ac_i=`echo "$ac_i" | sed "$ac_script"`
24013 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24014 # will be set to the directory where LIBOBJS objects are built.
24015 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24016 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024017done
24018LIBOBJS=$ac_libobjs
24019
24020LTLIBOBJS=$ac_ltlibobjs
24021
24022
Martin v. Löwis11437992002-04-12 09:54:03 +000024023
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024024: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024025ac_clean_files_save=$ac_clean_files
24026ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24027{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24028echo "$as_me: creating $CONFIG_STATUS" >&6;}
24029cat >$CONFIG_STATUS <<_ACEOF
24030#! $SHELL
24031# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024032# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024033# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024034# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024035
Martin v. Löwis11437992002-04-12 09:54:03 +000024036debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024037ac_cs_recheck=false
24038ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024039SHELL=\${CONFIG_SHELL-$SHELL}
24040_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024041
Martin v. Löwis11437992002-04-12 09:54:03 +000024042cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024043## --------------------- ##
24044## M4sh Initialization. ##
24045## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024046
Martin v. Löwiseba40652007-08-30 20:10:57 +000024047# Be more Bourne compatible
24048DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024049if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24050 emulate sh
24051 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024052 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24053 # is contrary to our usage. Disable this feature.
24054 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024055 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024056else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024057 case `(set -o) 2>/dev/null` in
24058 *posix*) set -o posix ;;
24059esac
24060
Martin v. Löwis11437992002-04-12 09:54:03 +000024061fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024062
Skip Montanaro6dead952003-09-25 14:50:04 +000024063
Martin v. Löwis11437992002-04-12 09:54:03 +000024064
24065
Martin v. Löwiseba40652007-08-30 20:10:57 +000024066# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024067# Avoid depending upon Character Ranges.
24068as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24069as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24070as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24071as_cr_digits='0123456789'
24072as_cr_alnum=$as_cr_Letters$as_cr_digits
24073
24074# The user is always right.
24075if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024076 echo "#! /bin/sh" >conf$$.sh
24077 echo "exit 0" >>conf$$.sh
24078 chmod +x conf$$.sh
24079 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024080 PATH_SEPARATOR=';'
24081 else
24082 PATH_SEPARATOR=:
24083 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024084 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024085fi
24086
Martin v. Löwiseba40652007-08-30 20:10:57 +000024087# Support unset when possible.
24088if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24089 as_unset=unset
24090else
24091 as_unset=false
24092fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024093
Martin v. Löwiseba40652007-08-30 20:10:57 +000024094
24095# IFS
24096# We need space, tab and new line, in precisely that order. Quoting is
24097# there to prevent editors from complaining about space-tab.
24098# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24099# splitting by setting IFS to empty value.)
24100as_nl='
24101'
24102IFS=" "" $as_nl"
24103
24104# Find who we are. Look in the path if we contain no directory separator.
24105case $0 in
24106 *[\\/]* ) as_myself=$0 ;;
24107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024108for as_dir in $PATH
24109do
24110 IFS=$as_save_IFS
24111 test -z "$as_dir" && as_dir=.
24112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24113done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024114IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024115
Martin v. Löwiseba40652007-08-30 20:10:57 +000024116 ;;
24117esac
24118# We did not find ourselves, most probably we were run as `sh COMMAND'
24119# in which case we are not to be found in the path.
24120if test "x$as_myself" = x; then
24121 as_myself=$0
24122fi
24123if test ! -f "$as_myself"; then
24124 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24125 { (exit 1); exit 1; }
24126fi
24127
24128# Work around bugs in pre-3.0 UWIN ksh.
24129for as_var in ENV MAIL MAILPATH
24130do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24131done
24132PS1='$ '
24133PS2='> '
24134PS4='+ '
24135
24136# NLS nuisances.
24137for as_var in \
24138 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24139 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24140 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024141do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024142 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24143 eval $as_var=C; export $as_var
24144 else
24145 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24146 fi
24147done
24148
24149# Required to use basename.
24150if expr a : '\(a\)' >/dev/null 2>&1 &&
24151 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24152 as_expr=expr
24153else
24154 as_expr=false
24155fi
24156
24157if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24158 as_basename=basename
24159else
24160 as_basename=false
24161fi
24162
24163
24164# Name of the executable.
24165as_me=`$as_basename -- "$0" ||
24166$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24167 X"$0" : 'X\(//\)$' \| \
24168 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24169echo X/"$0" |
24170 sed '/^.*\/\([^/][^/]*\)\/*$/{
24171 s//\1/
24172 q
24173 }
24174 /^X\/\(\/\/\)$/{
24175 s//\1/
24176 q
24177 }
24178 /^X\/\(\/\).*/{
24179 s//\1/
24180 q
24181 }
24182 s/.*/./; q'`
24183
24184# CDPATH.
24185$as_unset CDPATH
24186
24187
24188
Martin v. Löwis11437992002-04-12 09:54:03 +000024189 as_lineno_1=$LINENO
24190 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024191 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024192 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024193
Martin v. Löwis11437992002-04-12 09:54:03 +000024194 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24195 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024196 # line-number line after each line using $LINENO; the second 'sed'
24197 # does the real work. The second script uses 'N' to pair each
24198 # line-number line with the line containing $LINENO, and appends
24199 # trailing '-' during substitution so that $LINENO is not a special
24200 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024201 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024202 # scripts with optimization help from Paolo Bonzini. Blame Lee
24203 # E. McMahon (1931-1989) for sed's syntax. :-)
24204 sed -n '
24205 p
24206 /[$]LINENO/=
24207 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024208 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024209 s/[$]LINENO.*/&-/
24210 t lineno
24211 b
24212 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024213 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024214 :loop
24215 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024216 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024217 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024218 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024219 chmod +x "$as_me.lineno" ||
24220 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024221 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024222
Martin v. Löwis11437992002-04-12 09:54:03 +000024223 # Don't try to exec as it changes $[0], causing all sort of problems
24224 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024225 # original and so on. Autoconf is especially sensitive to this).
24226 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024227 # Exit status is that of the last command.
24228 exit
24229}
24230
24231
Martin v. Löwiseba40652007-08-30 20:10:57 +000024232if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24233 as_dirname=dirname
24234else
24235 as_dirname=false
24236fi
24237
24238ECHO_C= ECHO_N= ECHO_T=
24239case `echo -n x` in
24240-n*)
24241 case `echo 'x\c'` in
24242 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24243 *) ECHO_C='\c';;
24244 esac;;
24245*)
24246 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024247esac
24248
Martin v. Löwiseba40652007-08-30 20:10:57 +000024249if expr a : '\(a\)' >/dev/null 2>&1 &&
24250 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024251 as_expr=expr
24252else
24253 as_expr=false
24254fi
24255
24256rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024257if test -d conf$$.dir; then
24258 rm -f conf$$.dir/conf$$.file
24259else
24260 rm -f conf$$.dir
24261 mkdir conf$$.dir
24262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024263echo >conf$$.file
24264if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024265 as_ln_s='ln -s'
24266 # ... but there are two gotchas:
24267 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24268 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24269 # In both cases, we have to default to `cp -p'.
24270 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024271 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024272elif ln conf$$.file conf$$ 2>/dev/null; then
24273 as_ln_s=ln
24274else
24275 as_ln_s='cp -p'
24276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024277rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24278rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024279
Skip Montanaro6dead952003-09-25 14:50:04 +000024280if mkdir -p . 2>/dev/null; then
24281 as_mkdir_p=:
24282else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024283 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024284 as_mkdir_p=false
24285fi
24286
Martin v. Löwiseba40652007-08-30 20:10:57 +000024287if test -x / >/dev/null 2>&1; then
24288 as_test_x='test -x'
24289else
24290 if ls -dL / >/dev/null 2>&1; then
24291 as_ls_L_option=L
24292 else
24293 as_ls_L_option=
24294 fi
24295 as_test_x='
24296 eval sh -c '\''
24297 if test -d "$1"; then
24298 test -d "$1/.";
24299 else
24300 case $1 in
24301 -*)set "./$1";;
24302 esac;
24303 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24304 ???[sx]*):;;*)false;;esac;fi
24305 '\'' sh
24306 '
24307fi
24308as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024309
24310# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024311as_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 +000024312
24313# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024314as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024315
24316
Martin v. Löwis11437992002-04-12 09:54:03 +000024317exec 6>&1
24318
Martin v. Löwiseba40652007-08-30 20:10:57 +000024319# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024320# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024321# values after options handling.
24322ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024323This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024324generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024325
24326 CONFIG_FILES = $CONFIG_FILES
24327 CONFIG_HEADERS = $CONFIG_HEADERS
24328 CONFIG_LINKS = $CONFIG_LINKS
24329 CONFIG_COMMANDS = $CONFIG_COMMANDS
24330 $ $0 $@
24331
Martin v. Löwiseba40652007-08-30 20:10:57 +000024332on `(hostname || uname -n) 2>/dev/null | sed 1q`
24333"
24334
Martin v. Löwis11437992002-04-12 09:54:03 +000024335_ACEOF
24336
Martin v. Löwiseba40652007-08-30 20:10:57 +000024337cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024338# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024339config_files="$ac_config_files"
24340config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024341
Martin v. Löwiseba40652007-08-30 20:10:57 +000024342_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024343
24344cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024345ac_cs_usage="\
24346\`$as_me' instantiates files from templates according to the
24347current configuration.
24348
24349Usage: $0 [OPTIONS] [FILE]...
24350
24351 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024352 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024353 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024354 -d, --debug don't remove temporary files
24355 --recheck update $as_me by reconfiguring in the same conditions
24356 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024357 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024358 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024359 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024360
24361Configuration files:
24362$config_files
24363
24364Configuration headers:
24365$config_headers
24366
24367Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024368
Martin v. Löwiseba40652007-08-30 20:10:57 +000024369_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024370cat >>$CONFIG_STATUS <<_ACEOF
24371ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024372python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024373configured by $0, generated by GNU Autoconf 2.61,
24374 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024375
Martin v. Löwiseba40652007-08-30 20:10:57 +000024376Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024377This config.status script is free software; the Free Software Foundation
24378gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024379
24380ac_pwd='$ac_pwd'
24381srcdir='$srcdir'
24382INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024383_ACEOF
24384
24385cat >>$CONFIG_STATUS <<\_ACEOF
24386# If no file are specified by the user, then we need to provide default
24387# value. By we need to know if files were specified by the user.
24388ac_need_defaults=:
24389while test $# != 0
24390do
24391 case $1 in
24392 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024393 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24394 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024395 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024396 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024397 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024398 ac_option=$1
24399 ac_optarg=$2
24400 ac_shift=shift
24401 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024402 esac
24403
Skip Montanaro6dead952003-09-25 14:50:04 +000024404 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024405 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024406 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24407 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024408 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24409 echo "$ac_cs_version"; exit ;;
24410 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024411 debug=: ;;
24412 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024413 $ac_shift
24414 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024415 ac_need_defaults=false;;
24416 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024417 $ac_shift
24418 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024419 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024420 --he | --h)
24421 # Conflict between --help and --header
24422 { echo "$as_me: error: ambiguous option: $1
24423Try \`$0 --help' for more information." >&2
24424 { (exit 1); exit 1; }; };;
24425 --help | --hel | -h )
24426 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024427 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24428 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24429 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024430
24431 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024432 -*) { echo "$as_me: error: unrecognized option: $1
24433Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024434 { (exit 1); exit 1; }; } ;;
24435
Martin v. Löwiseba40652007-08-30 20:10:57 +000024436 *) ac_config_targets="$ac_config_targets $1"
24437 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024438
24439 esac
24440 shift
24441done
24442
Skip Montanaro6dead952003-09-25 14:50:04 +000024443ac_configure_extra_args=
24444
24445if $ac_cs_silent; then
24446 exec 6>/dev/null
24447 ac_configure_extra_args="$ac_configure_extra_args --silent"
24448fi
24449
24450_ACEOF
24451cat >>$CONFIG_STATUS <<_ACEOF
24452if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024453 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24454 CONFIG_SHELL=$SHELL
24455 export CONFIG_SHELL
24456 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024457fi
24458
Martin v. Löwis11437992002-04-12 09:54:03 +000024459_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024460cat >>$CONFIG_STATUS <<\_ACEOF
24461exec 5>>config.log
24462{
24463 echo
24464 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24465## Running $as_me. ##
24466_ASBOX
24467 echo "$ac_log"
24468} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024469
Martin v. Löwiseba40652007-08-30 20:10:57 +000024470_ACEOF
24471cat >>$CONFIG_STATUS <<_ACEOF
24472_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024473
24474cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024475
24476# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024477for ac_config_target in $ac_config_targets
24478do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024479 case $ac_config_target in
24480 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24481 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24482 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24483 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
24484 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24485 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24486
Martin v. Löwis11437992002-04-12 09:54:03 +000024487 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24488echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24489 { (exit 1); exit 1; }; };;
24490 esac
24491done
24492
Martin v. Löwiseba40652007-08-30 20:10:57 +000024493
Martin v. Löwis11437992002-04-12 09:54:03 +000024494# If the user did not use the arguments to specify the items to instantiate,
24495# then the envvar interface is used. Set only those that are not.
24496# We use the long form for the default assignment because of an extremely
24497# bizarre bug on SunOS 4.1.3.
24498if $ac_need_defaults; then
24499 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24500 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24501fi
24502
Skip Montanaro6dead952003-09-25 14:50:04 +000024503# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024504# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024505# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024506# Hook for its removal unless debugging.
24507# Note that there is a small window in which the directory will not be cleaned:
24508# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024509$debug ||
24510{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024511 tmp=
24512 trap 'exit_status=$?
24513 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24514' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024515 trap '{ (exit 1); exit 1; }' 1 2 13 15
24516}
Martin v. Löwis11437992002-04-12 09:54:03 +000024517# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024518
Martin v. Löwis11437992002-04-12 09:54:03 +000024519{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024520 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024521 test -n "$tmp" && test -d "$tmp"
24522} ||
24523{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024524 tmp=./conf$$-$RANDOM
24525 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024526} ||
24527{
Skip Montanaro6dead952003-09-25 14:50:04 +000024528 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024529 { (exit 1); exit 1; }
24530}
24531
Martin v. Löwis11437992002-04-12 09:54:03 +000024532#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024533# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024534#
24535
24536# No need to generate the scripts if there are no CONFIG_FILES.
24537# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024538if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024539
24540_ACEOF
24541
Martin v. Löwiseba40652007-08-30 20:10:57 +000024542
24543
24544ac_delim='%!_!# '
24545for ac_last_try in false false false false false :; do
24546 cat >conf$$subs.sed <<_ACEOF
24547SHELL!$SHELL$ac_delim
24548PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24549PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24550PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24551PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24552PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24553PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24554exec_prefix!$exec_prefix$ac_delim
24555prefix!$prefix$ac_delim
24556program_transform_name!$program_transform_name$ac_delim
24557bindir!$bindir$ac_delim
24558sbindir!$sbindir$ac_delim
24559libexecdir!$libexecdir$ac_delim
24560datarootdir!$datarootdir$ac_delim
24561datadir!$datadir$ac_delim
24562sysconfdir!$sysconfdir$ac_delim
24563sharedstatedir!$sharedstatedir$ac_delim
24564localstatedir!$localstatedir$ac_delim
24565includedir!$includedir$ac_delim
24566oldincludedir!$oldincludedir$ac_delim
24567docdir!$docdir$ac_delim
24568infodir!$infodir$ac_delim
24569htmldir!$htmldir$ac_delim
24570dvidir!$dvidir$ac_delim
24571pdfdir!$pdfdir$ac_delim
24572psdir!$psdir$ac_delim
24573libdir!$libdir$ac_delim
24574localedir!$localedir$ac_delim
24575mandir!$mandir$ac_delim
24576DEFS!$DEFS$ac_delim
24577ECHO_C!$ECHO_C$ac_delim
24578ECHO_N!$ECHO_N$ac_delim
24579ECHO_T!$ECHO_T$ac_delim
24580LIBS!$LIBS$ac_delim
24581build_alias!$build_alias$ac_delim
24582host_alias!$host_alias$ac_delim
24583target_alias!$target_alias$ac_delim
24584VERSION!$VERSION$ac_delim
24585SOVERSION!$SOVERSION$ac_delim
24586CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24587UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24588PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
24589PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24590PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24591PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24592FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24593FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24594FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24595FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24596FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24597MACHDEP!$MACHDEP$ac_delim
24598SGI_ABI!$SGI_ABI$ac_delim
24599EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24600EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24601CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24602EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24603CC!$CC$ac_delim
24604CFLAGS!$CFLAGS$ac_delim
24605LDFLAGS!$LDFLAGS$ac_delim
24606CPPFLAGS!$CPPFLAGS$ac_delim
24607ac_ct_CC!$ac_ct_CC$ac_delim
24608EXEEXT!$EXEEXT$ac_delim
24609OBJEXT!$OBJEXT$ac_delim
24610CXX!$CXX$ac_delim
24611MAINCC!$MAINCC$ac_delim
24612CPP!$CPP$ac_delim
24613GREP!$GREP$ac_delim
24614EGREP!$EGREP$ac_delim
24615BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24616LIBRARY!$LIBRARY$ac_delim
24617LDLIBRARY!$LDLIBRARY$ac_delim
24618DLLLIBRARY!$DLLLIBRARY$ac_delim
24619BLDLIBRARY!$BLDLIBRARY$ac_delim
24620LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24621INSTSONAME!$INSTSONAME$ac_delim
24622RUNSHARED!$RUNSHARED$ac_delim
24623LINKCC!$LINKCC$ac_delim
24624RANLIB!$RANLIB$ac_delim
24625AR!$AR$ac_delim
24626SVNVERSION!$SVNVERSION$ac_delim
24627INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24628INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24629INSTALL_DATA!$INSTALL_DATA$ac_delim
24630LN!$LN$ac_delim
24631OPT!$OPT$ac_delim
24632BASECFLAGS!$BASECFLAGS$ac_delim
24633OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24634LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24635SO!$SO$ac_delim
24636LDSHARED!$LDSHARED$ac_delim
24637BLDSHARED!$BLDSHARED$ac_delim
24638CCSHARED!$CCSHARED$ac_delim
24639LINKFORSHARED!$LINKFORSHARED$ac_delim
24640CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24641SHLIBS!$SHLIBS$ac_delim
24642USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
24643SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
24644_ACEOF
24645
24646 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24647 break
24648 elif $ac_last_try; then
24649 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24650echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24651 { (exit 1); exit 1; }; }
24652 else
24653 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024654 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024655done
24656
24657ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24658if test -n "$ac_eof"; then
24659 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24660 ac_eof=`expr $ac_eof + 1`
24661fi
24662
24663cat >>$CONFIG_STATUS <<_ACEOF
24664cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24665/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24666_ACEOF
24667sed '
24668s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24669s/^/s,@/; s/!/@,|#_!!_#|/
24670:n
24671t n
24672s/'"$ac_delim"'$/,g/; t
24673s/$/\\/; p
24674N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24675' >>$CONFIG_STATUS <conf$$subs.sed
24676rm -f conf$$subs.sed
24677cat >>$CONFIG_STATUS <<_ACEOF
24678CEOF$ac_eof
24679_ACEOF
24680
24681
24682ac_delim='%!_!# '
24683for ac_last_try in false false false false false :; do
24684 cat >conf$$subs.sed <<_ACEOF
24685USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24686LDLAST!$LDLAST$ac_delim
24687THREADOBJ!$THREADOBJ$ac_delim
24688DLINCLDIR!$DLINCLDIR$ac_delim
24689DYNLOADFILE!$DYNLOADFILE$ac_delim
24690MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24691TRUE!$TRUE$ac_delim
24692LIBOBJS!$LIBOBJS$ac_delim
24693HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24694HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24695HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24696HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24697HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24698LIBM!$LIBM$ac_delim
24699LIBC!$LIBC$ac_delim
24700UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24701THREADHEADERS!$THREADHEADERS$ac_delim
24702SRCDIRS!$SRCDIRS$ac_delim
24703LTLIBOBJS!$LTLIBOBJS$ac_delim
24704_ACEOF
24705
24706 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
24707 break
24708 elif $ac_last_try; then
24709 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24710echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24711 { (exit 1); exit 1; }; }
24712 else
24713 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24714 fi
24715done
24716
24717ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24718if test -n "$ac_eof"; then
24719 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24720 ac_eof=`expr $ac_eof + 1`
24721fi
24722
24723cat >>$CONFIG_STATUS <<_ACEOF
24724cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24725/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24726_ACEOF
24727sed '
24728s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24729s/^/s,@/; s/!/@,|#_!!_#|/
24730:n
24731t n
24732s/'"$ac_delim"'$/,g/; t
24733s/$/\\/; p
24734N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24735' >>$CONFIG_STATUS <conf$$subs.sed
24736rm -f conf$$subs.sed
24737cat >>$CONFIG_STATUS <<_ACEOF
24738:end
24739s/|#_!!_#|//g
24740CEOF$ac_eof
24741_ACEOF
24742
24743
24744# VPATH may cause trouble with some makes, so we remove $(srcdir),
24745# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24746# trailing colons and then remove the whole line if VPATH becomes empty
24747# (actually we leave an empty line to preserve line numbers).
24748if test "x$srcdir" = x.; then
24749 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24750s/:*\$(srcdir):*/:/
24751s/:*\${srcdir}:*/:/
24752s/:*@srcdir@:*/:/
24753s/^\([^=]*=[ ]*\):*/\1/
24754s/:*$//
24755s/^[^=]*=[ ]*$//
24756}'
24757fi
24758
24759cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024760fi # test -n "$CONFIG_FILES"
24761
Martin v. Löwiseba40652007-08-30 20:10:57 +000024762
24763for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24764do
24765 case $ac_tag in
24766 :[FHLC]) ac_mode=$ac_tag; continue;;
24767 esac
24768 case $ac_mode$ac_tag in
24769 :[FHL]*:*);;
24770 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24771echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24772 { (exit 1); exit 1; }; };;
24773 :[FH]-) ac_tag=-:-;;
24774 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24775 esac
24776 ac_save_IFS=$IFS
24777 IFS=:
24778 set x $ac_tag
24779 IFS=$ac_save_IFS
24780 shift
24781 ac_file=$1
24782 shift
24783
24784 case $ac_mode in
24785 :L) ac_source=$1;;
24786 :[FH])
24787 ac_file_inputs=
24788 for ac_f
24789 do
24790 case $ac_f in
24791 -) ac_f="$tmp/stdin";;
24792 *) # Look for the file first in the build tree, then in the source tree
24793 # (if the path is not absolute). The absolute path cannot be DOS-style,
24794 # because $ac_f cannot contain `:'.
24795 test -f "$ac_f" ||
24796 case $ac_f in
24797 [\\/$]*) false;;
24798 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24799 esac ||
24800 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24801echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24802 { (exit 1); exit 1; }; };;
24803 esac
24804 ac_file_inputs="$ac_file_inputs $ac_f"
24805 done
24806
24807 # Let's still pretend it is `configure' which instantiates (i.e., don't
24808 # use $as_me), people would be surprised to read:
24809 # /* config.h. Generated by config.status. */
24810 configure_input="Generated from "`IFS=:
24811 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24812 if test x"$ac_file" != x-; then
24813 configure_input="$ac_file. $configure_input"
24814 { echo "$as_me:$LINENO: creating $ac_file" >&5
24815echo "$as_me: creating $ac_file" >&6;}
24816 fi
24817
24818 case $ac_tag in
24819 *:-:* | *:-) cat >"$tmp/stdin";;
24820 esac
24821 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024822 esac
24823
Martin v. Löwiseba40652007-08-30 20:10:57 +000024824 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024825$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024826 X"$ac_file" : 'X\(//\)[^/]' \| \
24827 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024828 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024829echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024830 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24831 s//\1/
24832 q
24833 }
24834 /^X\(\/\/\)[^/].*/{
24835 s//\1/
24836 q
24837 }
24838 /^X\(\/\/\)$/{
24839 s//\1/
24840 q
24841 }
24842 /^X\(\/\).*/{
24843 s//\1/
24844 q
24845 }
24846 s/.*/./; q'`
24847 { as_dir="$ac_dir"
24848 case $as_dir in #(
24849 -*) as_dir=./$as_dir;;
24850 esac
24851 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024852 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024853 while :; do
24854 case $as_dir in #(
24855 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24856 *) as_qdir=$as_dir;;
24857 esac
24858 as_dirs="'$as_qdir' $as_dirs"
24859 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024860$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024861 X"$as_dir" : 'X\(//\)[^/]' \| \
24862 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024863 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024864echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024865 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24866 s//\1/
24867 q
24868 }
24869 /^X\(\/\/\)[^/].*/{
24870 s//\1/
24871 q
24872 }
24873 /^X\(\/\/\)$/{
24874 s//\1/
24875 q
24876 }
24877 /^X\(\/\).*/{
24878 s//\1/
24879 q
24880 }
24881 s/.*/./; q'`
24882 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000024883 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024884 test -z "$as_dirs" || eval "mkdir $as_dirs"
24885 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24886echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000024887 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024888 ac_builddir=.
24889
Martin v. Löwiseba40652007-08-30 20:10:57 +000024890case "$ac_dir" in
24891.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24892*)
Martin v. Löwis11437992002-04-12 09:54:03 +000024893 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000024894 # A ".." for each directory in $ac_dir_suffix.
24895 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24896 case $ac_top_builddir_sub in
24897 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24898 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24899 esac ;;
24900esac
24901ac_abs_top_builddir=$ac_pwd
24902ac_abs_builddir=$ac_pwd$ac_dir_suffix
24903# for backward compatibility:
24904ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000024905
24906case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024907 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000024908 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024909 ac_top_srcdir=$ac_top_builddir_sub
24910 ac_abs_top_srcdir=$ac_pwd ;;
24911 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000024912 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024913 ac_top_srcdir=$srcdir
24914 ac_abs_top_srcdir=$srcdir ;;
24915 *) # Relative name.
24916 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24917 ac_top_srcdir=$ac_top_build_prefix$srcdir
24918 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024919esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024920ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000024921
Martin v. Löwis11437992002-04-12 09:54:03 +000024922
Martin v. Löwiseba40652007-08-30 20:10:57 +000024923 case $ac_mode in
24924 :F)
24925 #
24926 # CONFIG_FILE
24927 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024928
24929 case $INSTALL in
24930 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024931 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024932 esac
Brett Cannon19fab762007-06-02 03:02:29 +000024933_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024934
24935cat >>$CONFIG_STATUS <<\_ACEOF
24936# If the template does not know about datarootdir, expand it.
24937# FIXME: This hack should be removed a few years after 2.60.
24938ac_datarootdir_hack=; ac_datarootdir_seen=
24939
24940case `sed -n '/datarootdir/ {
24941 p
24942 q
24943}
24944/@datadir@/p
24945/@docdir@/p
24946/@infodir@/p
24947/@localedir@/p
24948/@mandir@/p
24949' $ac_file_inputs` in
24950*datarootdir*) ac_datarootdir_seen=yes;;
24951*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24952 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24953echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24954_ACEOF
24955cat >>$CONFIG_STATUS <<_ACEOF
24956 ac_datarootdir_hack='
24957 s&@datadir@&$datadir&g
24958 s&@docdir@&$docdir&g
24959 s&@infodir@&$infodir&g
24960 s&@localedir@&$localedir&g
24961 s&@mandir@&$mandir&g
24962 s&\\\${datarootdir}&$datarootdir&g' ;;
24963esac
24964_ACEOF
24965
24966# Neutralize VPATH when `$srcdir' = `.'.
24967# Shell code in configure.ac might set extrasub.
24968# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000024969cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024970 sed "$ac_vpsub
24971$extrasub
24972_ACEOF
24973cat >>$CONFIG_STATUS <<\_ACEOF
24974:t
24975/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000024976s&@configure_input@&$configure_input&;t t
24977s&@top_builddir@&$ac_top_builddir_sub&;t t
24978s&@srcdir@&$ac_srcdir&;t t
24979s&@abs_srcdir@&$ac_abs_srcdir&;t t
24980s&@top_srcdir@&$ac_top_srcdir&;t t
24981s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24982s&@builddir@&$ac_builddir&;t t
24983s&@abs_builddir@&$ac_abs_builddir&;t t
24984s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24985s&@INSTALL@&$ac_INSTALL&;t t
24986$ac_datarootdir_hack
24987" $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 +000024988
Martin v. Löwiseba40652007-08-30 20:10:57 +000024989test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24990 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24991 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24992 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24993which seems to be undefined. Please make sure it is defined." >&5
24994echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24995which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024996
Martin v. Löwiseba40652007-08-30 20:10:57 +000024997 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000024998 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024999 -) cat "$tmp/out"; rm -f "$tmp/out";;
25000 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025001 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025002 ;;
25003 :H)
25004 #
25005 # CONFIG_HEADER
25006 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025007_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025008
Martin v. Löwiseba40652007-08-30 20:10:57 +000025009# Transform confdefs.h into a sed script `conftest.defines', that
25010# substitutes the proper values into config.h.in to produce config.h.
25011rm -f conftest.defines conftest.tail
25012# First, append a space to every undef/define line, to ease matching.
25013echo 's/$/ /' >conftest.defines
25014# Then, protect against being on the right side of a sed subst, or in
25015# an unquoted here document, in config.status. If some macros were
25016# called several times there might be several #defines for the same
25017# symbol, which is useless. But do not sort them, since the last
25018# AC_DEFINE must be honored.
25019ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25020# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25021# NAME is the cpp macro being defined, VALUE is the value it is being given.
25022# PARAMS is the parameter list in the macro definition--in most cases, it's
25023# just an empty string.
25024ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25025ac_dB='\\)[ (].*,\\1define\\2'
25026ac_dC=' '
25027ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025028
Martin v. Löwiseba40652007-08-30 20:10:57 +000025029uniq confdefs.h |
25030 sed -n '
25031 t rset
25032 :rset
25033 s/^[ ]*#[ ]*define[ ][ ]*//
25034 t ok
25035 d
25036 :ok
25037 s/[\\&,]/\\&/g
25038 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25039 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25040 ' >>conftest.defines
25041
25042# Remove the space that was appended to ease matching.
25043# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025044# example, in the case of _POSIX_SOURCE, which is predefined and required
25045# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025046# (The regexp can be short, since the line contains either #define or #undef.)
25047echo 's/ $//
25048s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025049
Martin v. Löwiseba40652007-08-30 20:10:57 +000025050# Break up conftest.defines:
25051ac_max_sed_lines=50
25052
25053# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25054# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25055# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25056# et cetera.
25057ac_in='$ac_file_inputs'
25058ac_out='"$tmp/out1"'
25059ac_nxt='"$tmp/out2"'
25060
25061while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025062do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025063 # Write a here document:
25064 cat >>$CONFIG_STATUS <<_ACEOF
25065 # First, check the format of the line:
25066 cat >"\$tmp/defines.sed" <<\\CEOF
25067/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25068/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25069b
25070:def
25071_ACEOF
25072 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025073 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025074 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25075 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25076 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25077 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025078 rm -f conftest.defines
25079 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025080done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025081rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025082
Martin v. Löwiseba40652007-08-30 20:10:57 +000025083echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025084cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025085 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025086 echo "/* $configure_input */" >"$tmp/config.h"
25087 cat "$ac_result" >>"$tmp/config.h"
25088 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025089 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25090echo "$as_me: $ac_file is unchanged" >&6;}
25091 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025092 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025093 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025094 fi
25095 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025096 echo "/* $configure_input */"
25097 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025098 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025099 rm -f "$tmp/out12"
25100 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025101
Martin v. Löwiseba40652007-08-30 20:10:57 +000025102
25103 esac
25104
25105done # for ac_tag
25106
Guido van Rossum627b2d71993-12-24 10:39:16 +000025107
Martin v. Löwis11437992002-04-12 09:54:03 +000025108{ (exit 0); exit 0; }
25109_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025110chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025111ac_clean_files=$ac_clean_files_save
25112
25113
25114# configure is writing to config.log, and then calls config.status.
25115# config.status does its own redirection, appending to config.log.
25116# Unfortunately, on DOS this fails, as config.log is still kept open
25117# by configure, so config.status won't be able to write to it; its
25118# output is simply discarded. So we exec the FD to /dev/null,
25119# effectively closing config.log, so it can be properly (re)opened and
25120# appended to by config.status. When coming back to configure, we
25121# need to make the FD available again.
25122if test "$no_create" != yes; then
25123 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025124 ac_config_status_args=
25125 test "$silent" = yes &&
25126 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025127 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025128 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025129 exec 5>>config.log
25130 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25131 # would make configure fail if this is the last instruction.
25132 $ac_cs_success || { (exit 1); exit 1; }
25133fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025134
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025135
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025136echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025137if test ! -f Modules/Setup
25138then
25139 cp $srcdir/Modules/Setup.dist Modules/Setup
25140fi
25141
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025142echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025143if test ! -f Modules/Setup.local
25144then
25145 echo "# Edit this file for local setup changes" >Modules/Setup.local
25146fi
25147
25148echo "creating Makefile"
25149$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25150 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025151 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025152
25153case $ac_sys_system in
25154BeOS)
25155 { echo "$as_me:$LINENO: WARNING:
25156
25157 Support for BeOS is deprecated as of Python 2.6.
25158 See PEP 11 for the gory details.
25159 " >&5
25160echo "$as_me: WARNING:
25161
25162 Support for BeOS is deprecated as of Python 2.6.
25163 See PEP 11 for the gory details.
25164 " >&2;}
25165 ;;
25166*) ;;
25167esac
25168
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025169mv config.c Modules