blob: 6beb47d5b165bd5b6dd5bde2225cdabd69dfc317 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Thomas Heller486b1b02007-11-02 19:10:24 +00002# From configure.in Revision: 58653 .
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]
Ronald Oussoren988117f2006-04-29 11:31:35 +00001315 --enable-universalsdk[SDKDIR]
1316 Build agains 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öwis76760b02007-07-31 19:57:56 +00001841# OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
1842# also defined. This can be overridden by defining _BSD_SOURCE
1843
1844cat >>confdefs.h <<\_ACEOF
1845#define _BSD_SOURCE 1
1846_ACEOF
1847
1848
Martin v. Löwisd6320502004-08-12 13:45:08 +00001849# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1850# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1851
1852cat >>confdefs.h <<\_ACEOF
1853#define _BSD_TYPES 1
1854_ACEOF
1855
1856
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001857define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001858
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001859# Arguments passed to configure.
1860
1861CONFIG_ARGS="$ac_configure_args"
1862
Martin v. Löwiseba40652007-08-30 20:10:57 +00001863# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001864if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001865 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001866 case $enableval in
1867 yes)
1868 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1869 ;;
1870 esac
1871 case $enableval in
1872 no)
1873 UNIVERSALSDK=
1874 enable_universalsdk=
1875 ;;
1876 *)
1877 UNIVERSALSDK=$enableval
1878 ;;
1879 esac
1880
1881else
1882
1883 UNIVERSALSDK=
1884 enable_universalsdk=
1885
Martin v. Löwiseba40652007-08-30 20:10:57 +00001886fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001887
1888
Martin v. Löwiseba40652007-08-30 20:10:57 +00001889
1890# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001891if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001892 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001893 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001894 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001895 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001896 esac
1897 case $enableval in
1898 no)
1899 PYTHONFRAMEWORK=
1900 PYTHONFRAMEWORKDIR=no-framework
1901 PYTHONFRAMEWORKPREFIX=
1902 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001903 FRAMEWORKINSTALLFIRST=
1904 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001905 FRAMEWORKALTINSTALLFIRST=
1906 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001907 if test "x${prefix}" = "xNONE"; then
1908 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1909 else
1910 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1911 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001912 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001913 ;;
1914 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001915 PYTHONFRAMEWORK=Python
1916 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001917 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001918 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001919 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1920 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5b787322006-06-06 19:50:24 +00001921 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1922 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001923 if test "x${prefix}" = "xNONE" ; then
1924 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1925 else
1926 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1927 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001928 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001929
1930 # Add makefiles for Mac specific code to the list of output
1931 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001932 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001933
Martin v. Löwiseba40652007-08-30 20:10:57 +00001934 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001935
Martin v. Löwiseba40652007-08-30 20:10:57 +00001936 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001937
Jack Jansene578a632001-08-15 01:27:14 +00001938 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001939
Guido van Rossum563e7081996-09-10 18:20:48 +00001940else
Martin v. Löwis11437992002-04-12 09:54:03 +00001941
Jack Jansene578a632001-08-15 01:27:14 +00001942 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001943 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001944 PYTHONFRAMEWORKPREFIX=
1945 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001946 FRAMEWORKINSTALLFIRST=
1947 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001948 FRAMEWORKALTINSTALLFIRST=
1949 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001950 if test "x${prefix}" = "xNONE" ; then
1951 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1952 else
1953 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1954 fi
Jack Jansene578a632001-08-15 01:27:14 +00001955 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001956
Martin v. Löwiseba40652007-08-30 20:10:57 +00001957fi
1958
Michael W. Hudson54241132001-12-07 15:38:26 +00001959
1960
1961
1962
Jack Jansene578a632001-08-15 01:27:14 +00001963
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001964
1965
Ronald Oussoren5b787322006-06-06 19:50:24 +00001966
1967
1968
Jack Jansene578a632001-08-15 01:27:14 +00001969##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001970## AC_HELP_STRING(--with-dyld,
1971## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001972##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001973# Set name for machine-dependent library files
1974
Martin v. Löwiseba40652007-08-30 20:10:57 +00001975{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1976echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001977if test -z "$MACHDEP"
1978then
Guido van Rossum563e7081996-09-10 18:20:48 +00001979 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001980 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1981 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001982 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001983 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001984 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001985 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001986 ac_md_system=`echo $ac_sys_system |
1987 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1988 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001989 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001990 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001991
Guido van Rossum07397971997-04-29 21:49:50 +00001992 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001993 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001994 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001995 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001996 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001997 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001998 esac
1999fi
Guido van Rossum91922671997-10-09 20:24:13 +00002000
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002001# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2002# disable features if it is defined, without any means to access these
2003# features as extensions. For these systems, we skip the definition of
2004# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2005# some feature, make sure there is no alternative way to access this
2006# feature. Also, when using wildcards, make sure you have verified the
2007# need for not defining _XOPEN_SOURCE on all systems matching the
2008# wildcard, and that the wildcard does not include future systems
2009# (which may remove their limitations).
2010case $ac_sys_system/$ac_sys_release in
2011 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2012 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002013 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz4bc2c092006-09-05 02:57:01 +00002014 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002015 define_xopen_source=no;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002016 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2017 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2018 # Marc Recht
2019 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2020 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002021 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2022 # of union __?sigval. Reported by Stuart Bishop.
2023 SunOS/5.6)
2024 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002025 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2026 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002027 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002028 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002029 define_xopen_source=no;;
2030 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002031 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002032 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002033 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002034 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2035 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2036 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2037 # This should hopefully be fixed in FreeBSD 4.9
2038 FreeBSD/4.8* | Darwin/6* )
2039 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002040 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2041 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2042 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002043 AIX/4)
2044 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002045 AIX/5)
2046 if test `uname -r` -eq 1; then
2047 define_xopen_source=no
2048 fi
2049 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002050 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2051 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002052 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002053 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002054 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002055 define_xopen_source=no
2056 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002057
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002058esac
2059
2060if test $define_xopen_source = yes
2061then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002062 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2063 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002064 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2065 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002066 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002067 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002068
2069cat >>confdefs.h <<\_ACEOF
2070#define _XOPEN_SOURCE 500
2071_ACEOF
2072
2073 ;;
2074 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002075
2076cat >>confdefs.h <<\_ACEOF
2077#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002078_ACEOF
2079
Skip Montanarof0d5f792004-08-15 14:08:23 +00002080 ;;
2081 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002082
2083 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2084 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2085 # several APIs are not declared. Since this is also needed in some
2086 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002087 # except for Solaris 10, where it must not be defined,
2088 # as it implies XPG4.2
2089 case $ac_sys_system/$ac_sys_release in
2090 SunOS/5.10)
2091 ;;
2092 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002093
2094cat >>confdefs.h <<\_ACEOF
2095#define _XOPEN_SOURCE_EXTENDED 1
2096_ACEOF
2097
Martin v. Löwis7dece662005-11-26 11:38:24 +00002098 ;;
2099 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002100
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002101
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002102cat >>confdefs.h <<\_ACEOF
2103#define _POSIX_C_SOURCE 200112L
2104_ACEOF
2105
2106
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002107fi
2108
Guido van Rossum91922671997-10-09 20:24:13 +00002109#
2110# SGI compilers allow the specification of the both the ABI and the
2111# ISA on the command line. Depending on the values of these switches,
2112# different and often incompatable code will be generated.
2113#
2114# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2115# thus supply support for various ABI/ISA combinations. The MACHDEP
2116# variable is also adjusted.
2117#
2118
2119if test ! -z "$SGI_ABI"
2120then
2121 CC="cc $SGI_ABI"
2122 LDFLAGS="$SGI_ABI $LDFLAGS"
2123 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002125{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2126echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002127
Jack Jansen83f898c2002-12-30 22:23:40 +00002128# And add extra plat-mac for darwin
2129
Jack Jansen7b59b422003-03-17 15:44:10 +00002130
Martin v. Löwiseba40652007-08-30 20:10:57 +00002131{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2132echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002133if test -z "$EXTRAPLATDIR"
2134then
2135 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002136 darwin)
2137 EXTRAPLATDIR="\$(PLATMACDIRS)"
2138 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2139 ;;
2140 *)
2141 EXTRAPLATDIR=""
2142 EXTRAMACHDEPPATH=""
2143 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002144 esac
2145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002146{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2147echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002148
Jack Jansen6b08a402004-06-03 12:41:45 +00002149# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2150# it may influence the way we can build extensions, so distutils
2151# needs to check it
2152
Ronald Oussoren988117f2006-04-29 11:31:35 +00002153
Jack Jansen6b08a402004-06-03 12:41:45 +00002154CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002155EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002156
Guido van Rossum627b2d71993-12-24 10:39:16 +00002157# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002158
2159# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2160# for debug/optimization stuff. BASECFLAGS is for flags that are required
2161# just to get things to compile and link. Users are free to override OPT
2162# when running configure or make. The build should not break if they do.
2163# BASECFLAGS should generally not be messed with, however.
2164
2165# XXX shouldn't some/most/all of this code be merged with the stuff later
2166# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002167{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2168echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002169
Martin v. Löwiseba40652007-08-30 20:10:57 +00002170# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002171if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002172 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002173 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002174 no) CC=cc
2175 without_gcc=yes;;
2176 yes) CC=gcc
2177 without_gcc=no;;
2178 *) CC=$withval
2179 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002180 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002181else
Martin v. Löwis11437992002-04-12 09:54:03 +00002182
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002183 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002184 AIX*) CC=cc_r
2185 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002186 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002187 case $BE_HOST_CPU in
2188 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002189 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002190 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002191 BASECFLAGS="$BASECFLAGS -export pragma"
2192 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002193 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002194 ;;
2195 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002196 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002197 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002198 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002199 ;;
2200 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002201 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2202echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2203 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002204 ;;
2205 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002206 AR="\$(srcdir)/Modules/ar_beos"
2207 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002208 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002209 Monterey*)
2210 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002211 without_gcc=;;
2212 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002213 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002214fi
2215
2216{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2217echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002218
Guido van Rossum8b131c51995-03-09 14:10:13 +00002219# If the user switches compilers, we can't believe the cache
2220if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2221then
Martin v. Löwis11437992002-04-12 09:54:03 +00002222 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2223(it is also a good idea to do 'make clean' before compiling)" >&5
2224echo "$as_me: error: cached CC is different -- throw away $cache_file
2225(it is also a good idea to do 'make clean' before compiling)" >&2;}
2226 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002227fi
2228
Martin v. Löwis11437992002-04-12 09:54:03 +00002229ac_ext=c
2230ac_cpp='$CPP $CPPFLAGS'
2231ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2232ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2233ac_compiler_gnu=$ac_cv_c_compiler_gnu
2234if test -n "$ac_tool_prefix"; then
2235 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2236set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002237{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2238echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002239if test "${ac_cv_prog_CC+set}" = set; then
2240 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002241else
2242 if test -n "$CC"; then
2243 ac_cv_prog_CC="$CC" # Let the user override the test.
2244else
Martin v. Löwis11437992002-04-12 09:54:03 +00002245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2246for as_dir in $PATH
2247do
2248 IFS=$as_save_IFS
2249 test -z "$as_dir" && as_dir=.
2250 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002251 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 +00002252 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2253 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2254 break 2
2255 fi
2256done
2257done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002258IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002259
Jack Jansendd19cf82001-12-06 22:36:17 +00002260fi
2261fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002262CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002263if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002264 { echo "$as_me:$LINENO: result: $CC" >&5
2265echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002266else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002267 { echo "$as_me:$LINENO: result: no" >&5
2268echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002269fi
2270
Martin v. Löwiseba40652007-08-30 20:10:57 +00002271
Martin v. Löwis11437992002-04-12 09:54:03 +00002272fi
2273if test -z "$ac_cv_prog_CC"; then
2274 ac_ct_CC=$CC
2275 # Extract the first word of "gcc", so it can be a program name with args.
2276set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002277{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002279if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2280 echo $ECHO_N "(cached) $ECHO_C" >&6
2281else
2282 if test -n "$ac_ct_CC"; then
2283 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2284else
2285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2286for as_dir in $PATH
2287do
2288 IFS=$as_save_IFS
2289 test -z "$as_dir" && as_dir=.
2290 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002291 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 +00002292 ac_cv_prog_ac_ct_CC="gcc"
2293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2294 break 2
2295 fi
2296done
2297done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002298IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002299
2300fi
2301fi
2302ac_ct_CC=$ac_cv_prog_ac_ct_CC
2303if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002304 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2305echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002306else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002307 { echo "$as_me:$LINENO: result: no" >&5
2308echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002309fi
2310
Martin v. Löwiseba40652007-08-30 20:10:57 +00002311 if test "x$ac_ct_CC" = x; then
2312 CC=""
2313 else
2314 case $cross_compiling:$ac_tool_warned in
2315yes:)
2316{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2317whose name does not start with the host triplet. If you think this
2318configuration is useful to you, please write to autoconf@gnu.org." >&5
2319echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2320whose name does not start with the host triplet. If you think this
2321configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2322ac_tool_warned=yes ;;
2323esac
2324 CC=$ac_ct_CC
2325 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002326else
2327 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002328fi
2329
Jack Jansendd19cf82001-12-06 22:36:17 +00002330if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002331 if test -n "$ac_tool_prefix"; then
2332 # 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 +00002333set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002334{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2335echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002336if test "${ac_cv_prog_CC+set}" = set; then
2337 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002338else
2339 if test -n "$CC"; then
2340 ac_cv_prog_CC="$CC" # Let the user override the test.
2341else
Martin v. Löwis11437992002-04-12 09:54:03 +00002342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2343for as_dir in $PATH
2344do
2345 IFS=$as_save_IFS
2346 test -z "$as_dir" && as_dir=.
2347 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002348 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 +00002349 ac_cv_prog_CC="${ac_tool_prefix}cc"
2350 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2351 break 2
2352 fi
2353done
2354done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002355IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002356
2357fi
2358fi
2359CC=$ac_cv_prog_CC
2360if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002361 { echo "$as_me:$LINENO: result: $CC" >&5
2362echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002363else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002364 { echo "$as_me:$LINENO: result: no" >&5
2365echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002366fi
2367
Martin v. Löwiseba40652007-08-30 20:10:57 +00002368
Martin v. Löwis11437992002-04-12 09:54:03 +00002369 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002370fi
2371if test -z "$CC"; then
2372 # Extract the first word of "cc", so it can be a program name with args.
2373set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002374{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2375echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002376if test "${ac_cv_prog_CC+set}" = set; then
2377 echo $ECHO_N "(cached) $ECHO_C" >&6
2378else
2379 if test -n "$CC"; then
2380 ac_cv_prog_CC="$CC" # Let the user override the test.
2381else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002382 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2384for as_dir in $PATH
2385do
2386 IFS=$as_save_IFS
2387 test -z "$as_dir" && as_dir=.
2388 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002389 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 +00002390 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2391 ac_prog_rejected=yes
2392 continue
2393 fi
2394 ac_cv_prog_CC="cc"
2395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2396 break 2
2397 fi
2398done
2399done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002400IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002401
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002402if test $ac_prog_rejected = yes; then
2403 # We found a bogon in the path, so make sure we never use it.
2404 set dummy $ac_cv_prog_CC
2405 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002406 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002407 # We chose a different compiler from the bogus one.
2408 # However, it has the same basename, so the bogon will be chosen
2409 # first if we set CC to just the basename; use the full file name.
2410 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002412 fi
2413fi
2414fi
2415fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002416CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002417if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002418 { echo "$as_me:$LINENO: result: $CC" >&5
2419echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002420else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002421 { echo "$as_me:$LINENO: result: no" >&5
2422echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002423fi
2424
Martin v. Löwiseba40652007-08-30 20:10:57 +00002425
Martin v. Löwis11437992002-04-12 09:54:03 +00002426fi
2427if test -z "$CC"; then
2428 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002429 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002430 do
2431 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2432set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002433{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2434echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002435if test "${ac_cv_prog_CC+set}" = set; then
2436 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002437else
2438 if test -n "$CC"; then
2439 ac_cv_prog_CC="$CC" # Let the user override the test.
2440else
Martin v. Löwis11437992002-04-12 09:54:03 +00002441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2442for as_dir in $PATH
2443do
2444 IFS=$as_save_IFS
2445 test -z "$as_dir" && as_dir=.
2446 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002447 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 +00002448 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2449 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2450 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002451 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002452done
2453done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002454IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002455
2456fi
2457fi
2458CC=$ac_cv_prog_CC
2459if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002460 { echo "$as_me:$LINENO: result: $CC" >&5
2461echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002462else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002463 { echo "$as_me:$LINENO: result: no" >&5
2464echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002465fi
2466
Martin v. Löwiseba40652007-08-30 20:10:57 +00002467
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 test -n "$CC" && break
2469 done
2470fi
2471if test -z "$CC"; then
2472 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002473 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002474do
2475 # Extract the first word of "$ac_prog", so it can be a program name with args.
2476set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002477{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2478echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002479if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2480 echo $ECHO_N "(cached) $ECHO_C" >&6
2481else
2482 if test -n "$ac_ct_CC"; then
2483 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2484else
2485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2486for as_dir in $PATH
2487do
2488 IFS=$as_save_IFS
2489 test -z "$as_dir" && as_dir=.
2490 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002491 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 +00002492 ac_cv_prog_ac_ct_CC="$ac_prog"
2493 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2494 break 2
2495 fi
2496done
2497done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002498IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002499
Martin v. Löwis11437992002-04-12 09:54:03 +00002500fi
2501fi
2502ac_ct_CC=$ac_cv_prog_ac_ct_CC
2503if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002504 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2505echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002506else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002507 { echo "$as_me:$LINENO: result: no" >&5
2508echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002509fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002510
Martin v. Löwiseba40652007-08-30 20:10:57 +00002511
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 test -n "$ac_ct_CC" && break
2513done
Michael W. Hudson54241132001-12-07 15:38:26 +00002514
Martin v. Löwiseba40652007-08-30 20:10:57 +00002515 if test "x$ac_ct_CC" = x; then
2516 CC=""
2517 else
2518 case $cross_compiling:$ac_tool_warned in
2519yes:)
2520{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2521whose name does not start with the host triplet. If you think this
2522configuration is useful to you, please write to autoconf@gnu.org." >&5
2523echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2524whose name does not start with the host triplet. If you think this
2525configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2526ac_tool_warned=yes ;;
2527esac
2528 CC=$ac_ct_CC
2529 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002530fi
2531
2532fi
2533
2534
Skip Montanaro6dead952003-09-25 14:50:04 +00002535test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2536See \`config.log' for more details." >&5
2537echo "$as_me: error: no acceptable C compiler found in \$PATH
2538See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 { (exit 1); exit 1; }; }
2540
2541# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002542echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002543ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002544{ (ac_try="$ac_compiler --version >&5"
2545case "(($ac_try" in
2546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2547 *) ac_try_echo=$ac_try;;
2548esac
2549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2550 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 ac_status=$?
2552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2553 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554{ (ac_try="$ac_compiler -v >&5"
2555case "(($ac_try" in
2556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2557 *) ac_try_echo=$ac_try;;
2558esac
2559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2560 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 ac_status=$?
2562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2563 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564{ (ac_try="$ac_compiler -V >&5"
2565case "(($ac_try" in
2566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2567 *) ac_try_echo=$ac_try;;
2568esac
2569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2570 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 ac_status=$?
2572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2573 (exit $ac_status); }
2574
2575cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002576/* confdefs.h. */
2577_ACEOF
2578cat confdefs.h >>conftest.$ac_ext
2579cat >>conftest.$ac_ext <<_ACEOF
2580/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582int
2583main ()
2584{
2585
2586 ;
2587 return 0;
2588}
2589_ACEOF
2590ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002591ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002592# Try to create an executable without -o first, disregard a.out.
2593# It will help us diagnose broken compilers, and finding out an intuition
2594# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002595{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2596echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002597ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002598#
2599# List of possible output files, starting from the most likely.
2600# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2601# only as a last resort. b.out is created by i960 compilers.
2602ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2603#
2604# The IRIX 6 linker writes into existing files which may not be
2605# executable, retaining their permissions. Remove them first so a
2606# subsequent execution test works.
2607ac_rmfiles=
2608for ac_file in $ac_files
2609do
2610 case $ac_file in
2611 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2612 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2613 esac
2614done
2615rm -f $ac_rmfiles
2616
2617if { (ac_try="$ac_link_default"
2618case "(($ac_try" in
2619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2620 *) ac_try_echo=$ac_try;;
2621esac
2622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2623 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 ac_status=$?
2625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2626 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002627 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2628# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2629# in a Makefile. We should not override ac_cv_exeext if it was cached,
2630# so that the user can short-circuit this test for compilers unknown to
2631# Autoconf.
2632for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002633do
2634 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002637 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002638 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002639 # We found the default executable, but exeext='' is most
2640 # certainly right.
2641 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002642 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002643 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2644 then :; else
2645 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2646 fi
2647 # We set ac_cv_exeext here because the later test for it is not
2648 # safe: cross compilers may not add the suffix if given an `-o'
2649 # argument, so we may need to know it at that point already.
2650 # Even if this section looks crufty: it has the advantage of
2651 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002652 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002653 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002654 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 esac
2656done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002657test "$ac_cv_exeext" = no && ac_cv_exeext=
2658
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002659else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002660 ac_file=''
2661fi
2662
2663{ echo "$as_me:$LINENO: result: $ac_file" >&5
2664echo "${ECHO_T}$ac_file" >&6; }
2665if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002667sed 's/^/| /' conftest.$ac_ext >&5
2668
2669{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2670See \`config.log' for more details." >&5
2671echo "$as_me: error: C compiler cannot create executables
2672See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002674fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002677
Martin v. Löwiseba40652007-08-30 20:10:57 +00002678# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002679# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002680{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2681echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002682# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2683# If not cross compiling, check that we can run a simple program.
2684if test "$cross_compiling" != yes; then
2685 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002686 { (case "(($ac_try" in
2687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2688 *) ac_try_echo=$ac_try;;
2689esac
2690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2691 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 ac_status=$?
2693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2694 (exit $ac_status); }; }; then
2695 cross_compiling=no
2696 else
2697 if test "$cross_compiling" = maybe; then
2698 cross_compiling=yes
2699 else
2700 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002701If you meant to cross compile, use \`--host'.
2702See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002703echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002704If you meant to cross compile, use \`--host'.
2705See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 { (exit 1); exit 1; }; }
2707 fi
2708 fi
2709fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002710{ echo "$as_me:$LINENO: result: yes" >&5
2711echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002712
Skip Montanaro6dead952003-09-25 14:50:04 +00002713rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002714ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002715# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002716# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2718echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2719{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2720echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002721
Martin v. Löwiseba40652007-08-30 20:10:57 +00002722{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2723echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2724if { (ac_try="$ac_link"
2725case "(($ac_try" in
2726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2727 *) ac_try_echo=$ac_try;;
2728esac
2729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2730 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 ac_status=$?
2732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2733 (exit $ac_status); }; then
2734 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2735# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2736# work properly (i.e., refer to `conftest.exe'), while it won't with
2737# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002738for ac_file in conftest.exe conftest conftest.*; do
2739 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002741 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002743 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 * ) break;;
2745 esac
2746done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002747else
Skip Montanaro6dead952003-09-25 14:50:04 +00002748 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2749See \`config.log' for more details." >&5
2750echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2751See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002753fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002754
Martin v. Löwis11437992002-04-12 09:54:03 +00002755rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002756{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2757echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002758
2759rm -f conftest.$ac_ext
2760EXEEXT=$ac_cv_exeext
2761ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002762{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2763echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002764if test "${ac_cv_objext+set}" = set; then
2765 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002766else
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002768/* confdefs.h. */
2769_ACEOF
2770cat confdefs.h >>conftest.$ac_ext
2771cat >>conftest.$ac_ext <<_ACEOF
2772/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002773
Martin v. Löwis11437992002-04-12 09:54:03 +00002774int
2775main ()
2776{
2777
2778 ;
2779 return 0;
2780}
2781_ACEOF
2782rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002783if { (ac_try="$ac_compile"
2784case "(($ac_try" in
2785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2786 *) ac_try_echo=$ac_try;;
2787esac
2788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2789 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 ac_status=$?
2791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2792 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002793 for ac_file in conftest.o conftest.obj conftest.*; do
2794 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002795 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002797 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2798 break;;
2799 esac
2800done
2801else
2802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002803sed 's/^/| /' conftest.$ac_ext >&5
2804
2805{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2806See \`config.log' for more details." >&5
2807echo "$as_me: error: cannot compute suffix of object files: cannot compile
2808See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002809 { (exit 1); exit 1; }; }
2810fi
2811
2812rm -f conftest.$ac_cv_objext conftest.$ac_ext
2813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002814{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2815echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002816OBJEXT=$ac_cv_objext
2817ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002818{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2819echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002820if test "${ac_cv_c_compiler_gnu+set}" = set; then
2821 echo $ECHO_N "(cached) $ECHO_C" >&6
2822else
2823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002824/* confdefs.h. */
2825_ACEOF
2826cat confdefs.h >>conftest.$ac_ext
2827cat >>conftest.$ac_ext <<_ACEOF
2828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002829
Martin v. Löwis11437992002-04-12 09:54:03 +00002830int
2831main ()
2832{
2833#ifndef __GNUC__
2834 choke me
2835#endif
2836
2837 ;
2838 return 0;
2839}
2840_ACEOF
2841rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002842if { (ac_try="$ac_compile"
2843case "(($ac_try" in
2844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2845 *) ac_try_echo=$ac_try;;
2846esac
2847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2848 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002850 grep -v '^ *+' conftest.er1 >conftest.err
2851 rm -f conftest.er1
2852 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002854 (exit $ac_status); } && {
2855 test -z "$ac_c_werror_flag" ||
2856 test ! -s conftest.err
2857 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002858 ac_compiler_gnu=yes
2859else
2860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002861sed 's/^/| /' conftest.$ac_ext >&5
2862
Martin v. Löwiseba40652007-08-30 20:10:57 +00002863 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002865
2866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002867ac_cv_c_compiler_gnu=$ac_compiler_gnu
2868
2869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002870{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2871echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002872GCC=`test $ac_compiler_gnu = yes && echo yes`
2873ac_test_CFLAGS=${CFLAGS+set}
2874ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002875{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2876echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002877if test "${ac_cv_prog_cc_g+set}" = set; then
2878 echo $ECHO_N "(cached) $ECHO_C" >&6
2879else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002880 ac_save_c_werror_flag=$ac_c_werror_flag
2881 ac_c_werror_flag=yes
2882 ac_cv_prog_cc_g=no
2883 CFLAGS="-g"
2884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002885/* confdefs.h. */
2886_ACEOF
2887cat confdefs.h >>conftest.$ac_ext
2888cat >>conftest.$ac_ext <<_ACEOF
2889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002890
Martin v. Löwis11437992002-04-12 09:54:03 +00002891int
2892main ()
2893{
2894
2895 ;
2896 return 0;
2897}
2898_ACEOF
2899rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002900if { (ac_try="$ac_compile"
2901case "(($ac_try" in
2902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2903 *) ac_try_echo=$ac_try;;
2904esac
2905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2906 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002908 grep -v '^ *+' conftest.er1 >conftest.err
2909 rm -f conftest.er1
2910 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002912 (exit $ac_status); } && {
2913 test -z "$ac_c_werror_flag" ||
2914 test ! -s conftest.err
2915 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002916 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002917else
Martin v. Löwis11437992002-04-12 09:54:03 +00002918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002919sed 's/^/| /' conftest.$ac_ext >&5
2920
Martin v. Löwiseba40652007-08-30 20:10:57 +00002921 CFLAGS=""
2922 cat >conftest.$ac_ext <<_ACEOF
2923/* confdefs.h. */
2924_ACEOF
2925cat confdefs.h >>conftest.$ac_ext
2926cat >>conftest.$ac_ext <<_ACEOF
2927/* end confdefs.h. */
2928
2929int
2930main ()
2931{
2932
2933 ;
2934 return 0;
2935}
2936_ACEOF
2937rm -f conftest.$ac_objext
2938if { (ac_try="$ac_compile"
2939case "(($ac_try" in
2940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2941 *) ac_try_echo=$ac_try;;
2942esac
2943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2944 (eval "$ac_compile") 2>conftest.er1
2945 ac_status=$?
2946 grep -v '^ *+' conftest.er1 >conftest.err
2947 rm -f conftest.er1
2948 cat conftest.err >&5
2949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2950 (exit $ac_status); } && {
2951 test -z "$ac_c_werror_flag" ||
2952 test ! -s conftest.err
2953 } && test -s conftest.$ac_objext; then
2954 :
2955else
2956 echo "$as_me: failed program was:" >&5
2957sed 's/^/| /' conftest.$ac_ext >&5
2958
2959 ac_c_werror_flag=$ac_save_c_werror_flag
2960 CFLAGS="-g"
2961 cat >conftest.$ac_ext <<_ACEOF
2962/* confdefs.h. */
2963_ACEOF
2964cat confdefs.h >>conftest.$ac_ext
2965cat >>conftest.$ac_ext <<_ACEOF
2966/* end confdefs.h. */
2967
2968int
2969main ()
2970{
2971
2972 ;
2973 return 0;
2974}
2975_ACEOF
2976rm -f conftest.$ac_objext
2977if { (ac_try="$ac_compile"
2978case "(($ac_try" in
2979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2980 *) ac_try_echo=$ac_try;;
2981esac
2982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2983 (eval "$ac_compile") 2>conftest.er1
2984 ac_status=$?
2985 grep -v '^ *+' conftest.er1 >conftest.err
2986 rm -f conftest.er1
2987 cat conftest.err >&5
2988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2989 (exit $ac_status); } && {
2990 test -z "$ac_c_werror_flag" ||
2991 test ! -s conftest.err
2992 } && test -s conftest.$ac_objext; then
2993 ac_cv_prog_cc_g=yes
2994else
2995 echo "$as_me: failed program was:" >&5
2996sed 's/^/| /' conftest.$ac_ext >&5
2997
2998
Guido van Rossum627b2d71993-12-24 10:39:16 +00002999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003000
3001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003003
3004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3005fi
3006
3007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3008 ac_c_werror_flag=$ac_save_c_werror_flag
3009fi
3010{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3011echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003012if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003013 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003014elif test $ac_cv_prog_cc_g = yes; then
3015 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003016 CFLAGS="-g -O2"
3017 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003018 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003019 fi
3020else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003021 if test "$GCC" = yes; then
3022 CFLAGS="-O2"
3023 else
3024 CFLAGS=
3025 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003027{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3028echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3029if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003030 echo $ECHO_N "(cached) $ECHO_C" >&6
3031else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003032 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003033ac_save_CC=$CC
3034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003035/* confdefs.h. */
3036_ACEOF
3037cat confdefs.h >>conftest.$ac_ext
3038cat >>conftest.$ac_ext <<_ACEOF
3039/* end confdefs.h. */
3040#include <stdarg.h>
3041#include <stdio.h>
3042#include <sys/types.h>
3043#include <sys/stat.h>
3044/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3045struct buf { int x; };
3046FILE * (*rcsopen) (struct buf *, struct stat *, int);
3047static char *e (p, i)
3048 char **p;
3049 int i;
3050{
3051 return p[i];
3052}
3053static char *f (char * (*g) (char **, int), char **p, ...)
3054{
3055 char *s;
3056 va_list v;
3057 va_start (v,p);
3058 s = g (p, va_arg (v,int));
3059 va_end (v);
3060 return s;
3061}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003062
3063/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3064 function prototypes and stuff, but not '\xHH' hex character constants.
3065 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003066 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003067 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3068 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003069 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003070int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3071
Martin v. Löwiseba40652007-08-30 20:10:57 +00003072/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3073 inside strings and character constants. */
3074#define FOO(x) 'x'
3075int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3076
Skip Montanaro6dead952003-09-25 14:50:04 +00003077int test (int i, double x);
3078struct s1 {int (*f) (int a);};
3079struct s2 {int (*f) (double a);};
3080int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3081int argc;
3082char **argv;
3083int
3084main ()
3085{
3086return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3087 ;
3088 return 0;
3089}
3090_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003091for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3092 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003093do
3094 CC="$ac_save_CC $ac_arg"
3095 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003096if { (ac_try="$ac_compile"
3097case "(($ac_try" in
3098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3099 *) ac_try_echo=$ac_try;;
3100esac
3101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3102 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003104 grep -v '^ *+' conftest.er1 >conftest.err
3105 rm -f conftest.er1
3106 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003108 (exit $ac_status); } && {
3109 test -z "$ac_c_werror_flag" ||
3110 test ! -s conftest.err
3111 } && test -s conftest.$ac_objext; then
3112 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003113else
3114 echo "$as_me: failed program was:" >&5
3115sed 's/^/| /' conftest.$ac_ext >&5
3116
Martin v. Löwiseba40652007-08-30 20:10:57 +00003117
Skip Montanaro6dead952003-09-25 14:50:04 +00003118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003119
3120rm -f core conftest.err conftest.$ac_objext
3121 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003122done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003123rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003124CC=$ac_save_CC
3125
3126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003127# AC_CACHE_VAL
3128case "x$ac_cv_prog_cc_c89" in
3129 x)
3130 { echo "$as_me:$LINENO: result: none needed" >&5
3131echo "${ECHO_T}none needed" >&6; } ;;
3132 xno)
3133 { echo "$as_me:$LINENO: result: unsupported" >&5
3134echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003135 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003136 CC="$CC $ac_cv_prog_cc_c89"
3137 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3138echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003139esac
3140
Skip Montanaro6dead952003-09-25 14:50:04 +00003141
Martin v. Löwis11437992002-04-12 09:54:03 +00003142ac_ext=c
3143ac_cpp='$CPP $CPPFLAGS'
3144ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3145ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3146ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003147
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003148
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003149
3150
Martin v. Löwiseba40652007-08-30 20:10:57 +00003151{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3152echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003153
Martin v. Löwiseba40652007-08-30 20:10:57 +00003154# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003155if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003156 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003157
3158 case $withval in
3159 no) with_cxx_main=no
3160 MAINCC='$(CC)';;
3161 yes) with_cxx_main=yes
3162 MAINCC='$(CXX)';;
3163 *) with_cxx_main=yes
3164 MAINCC=$withval
3165 if test -z "$CXX"
3166 then
3167 CXX=$withval
3168 fi;;
3169 esac
3170else
3171
3172 with_cxx_main=no
3173 MAINCC='$(CC)'
3174
Martin v. Löwiseba40652007-08-30 20:10:57 +00003175fi
3176
3177{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3178echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003179
3180preset_cxx="$CXX"
3181if test -z "$CXX"
3182then
3183 case "$CC" in
3184 gcc) # Extract the first word of "g++", so it can be a program name with args.
3185set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003186{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3187echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003188if test "${ac_cv_path_CXX+set}" = set; then
3189 echo $ECHO_N "(cached) $ECHO_C" >&6
3190else
3191 case $CXX in
3192 [\\/]* | ?:[\\/]*)
3193 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3194 ;;
3195 *)
3196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3197for as_dir in notfound
3198do
3199 IFS=$as_save_IFS
3200 test -z "$as_dir" && as_dir=.
3201 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003202 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 +00003203 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3204 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3205 break 2
3206 fi
3207done
3208done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003209IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003210
3211 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3212 ;;
3213esac
3214fi
3215CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003216if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003217 { echo "$as_me:$LINENO: result: $CXX" >&5
3218echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003219else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003220 { echo "$as_me:$LINENO: result: no" >&5
3221echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003223
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003224 ;;
3225 cc) # Extract the first word of "c++", so it can be a program name with args.
3226set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3228echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003229if test "${ac_cv_path_CXX+set}" = set; then
3230 echo $ECHO_N "(cached) $ECHO_C" >&6
3231else
3232 case $CXX in
3233 [\\/]* | ?:[\\/]*)
3234 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3235 ;;
3236 *)
3237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3238for as_dir in notfound
3239do
3240 IFS=$as_save_IFS
3241 test -z "$as_dir" && as_dir=.
3242 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003243 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 +00003244 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3245 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3246 break 2
3247 fi
3248done
3249done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003250IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003251
3252 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3253 ;;
3254esac
3255fi
3256CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003257if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003258 { echo "$as_me:$LINENO: result: $CXX" >&5
3259echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003260else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003261 { echo "$as_me:$LINENO: result: no" >&5
3262echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003264
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003265 ;;
3266 esac
3267 if test "$CXX" = "notfound"
3268 then
3269 CXX=""
3270 fi
3271fi
3272if test -z "$CXX"
3273then
3274 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3275do
3276 # Extract the first word of "$ac_prog", so it can be a program name with args.
3277set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003280if test "${ac_cv_prog_CXX+set}" = set; then
3281 echo $ECHO_N "(cached) $ECHO_C" >&6
3282else
3283 if test -n "$CXX"; then
3284 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3285else
3286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3287for as_dir in $PATH
3288do
3289 IFS=$as_save_IFS
3290 test -z "$as_dir" && as_dir=.
3291 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003292 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 +00003293 ac_cv_prog_CXX="$ac_prog"
3294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3295 break 2
3296 fi
3297done
3298done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003299IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003300
3301fi
3302fi
3303CXX=$ac_cv_prog_CXX
3304if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003305 { echo "$as_me:$LINENO: result: $CXX" >&5
3306echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003307else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003308 { echo "$as_me:$LINENO: result: no" >&5
3309echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003310fi
3311
Martin v. Löwiseba40652007-08-30 20:10:57 +00003312
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003313 test -n "$CXX" && break
3314done
3315test -n "$CXX" || CXX="notfound"
3316
3317 if test "$CXX" = "notfound"
3318 then
3319 CXX=""
3320 fi
3321fi
3322if test "$preset_cxx" != "$CXX"
3323then
3324 { echo "$as_me:$LINENO: WARNING:
3325
3326 By default, distutils will build C++ extension modules with \"$CXX\".
3327 If this is not intended, then set CXX on the configure command line.
3328 " >&5
3329echo "$as_me: WARNING:
3330
3331 By default, distutils will build C++ extension modules with \"$CXX\".
3332 If this is not intended, then set CXX on the configure command line.
3333 " >&2;}
3334fi
3335
3336
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003337# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003338
3339ac_ext=c
3340ac_cpp='$CPP $CPPFLAGS'
3341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3343ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003344{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3345echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003346# On Suns, sometimes $CPP names a directory.
3347if test -n "$CPP" && test -d "$CPP"; then
3348 CPP=
3349fi
3350if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003351 if test "${ac_cv_prog_CPP+set}" = set; then
3352 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003353else
Martin v. Löwis11437992002-04-12 09:54:03 +00003354 # Double quotes because CPP needs to be expanded
3355 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3356 do
3357 ac_preproc_ok=false
3358for ac_c_preproc_warn_flag in '' yes
3359do
3360 # Use a header file that comes with gcc, so configuring glibc
3361 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003362 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3363 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003364 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003365 # not just through cpp. "Syntax error" is here to catch this case.
3366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003367/* confdefs.h. */
3368_ACEOF
3369cat confdefs.h >>conftest.$ac_ext
3370cat >>conftest.$ac_ext <<_ACEOF
3371/* end confdefs.h. */
3372#ifdef __STDC__
3373# include <limits.h>
3374#else
3375# include <assert.h>
3376#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003377 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003378_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003379if { (ac_try="$ac_cpp conftest.$ac_ext"
3380case "(($ac_try" in
3381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3382 *) ac_try_echo=$ac_try;;
3383esac
3384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3385 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003386 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003387 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003388 rm -f conftest.er1
3389 cat conftest.err >&5
3390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003391 (exit $ac_status); } >/dev/null && {
3392 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3393 test ! -s conftest.err
3394 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003395 :
3396else
Martin v. Löwis11437992002-04-12 09:54:03 +00003397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003398sed 's/^/| /' conftest.$ac_ext >&5
3399
Martin v. Löwis11437992002-04-12 09:54:03 +00003400 # Broken: fails on valid input.
3401continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003403
Martin v. Löwis11437992002-04-12 09:54:03 +00003404rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003405
Martin v. Löwiseba40652007-08-30 20:10:57 +00003406 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 # can be detected and how.
3408 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003409/* confdefs.h. */
3410_ACEOF
3411cat confdefs.h >>conftest.$ac_ext
3412cat >>conftest.$ac_ext <<_ACEOF
3413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003414#include <ac_nonexistent.h>
3415_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003416if { (ac_try="$ac_cpp conftest.$ac_ext"
3417case "(($ac_try" in
3418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3419 *) ac_try_echo=$ac_try;;
3420esac
3421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3422 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003424 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003425 rm -f conftest.er1
3426 cat conftest.err >&5
3427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003428 (exit $ac_status); } >/dev/null && {
3429 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3430 test ! -s conftest.err
3431 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 # Broken: success on invalid input.
3433continue
3434else
3435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003436sed 's/^/| /' conftest.$ac_ext >&5
3437
Martin v. Löwis11437992002-04-12 09:54:03 +00003438 # Passes both tests.
3439ac_preproc_ok=:
3440break
3441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443rm -f conftest.err conftest.$ac_ext
3444
3445done
3446# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3447rm -f conftest.err conftest.$ac_ext
3448if $ac_preproc_ok; then
3449 break
3450fi
3451
3452 done
3453 ac_cv_prog_CPP=$CPP
3454
3455fi
3456 CPP=$ac_cv_prog_CPP
3457else
3458 ac_cv_prog_CPP=$CPP
3459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003460{ echo "$as_me:$LINENO: result: $CPP" >&5
3461echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003462ac_preproc_ok=false
3463for ac_c_preproc_warn_flag in '' yes
3464do
3465 # Use a header file that comes with gcc, so configuring glibc
3466 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003467 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3468 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 # On the NeXT, cc -E runs the code through the compiler's parser,
3470 # not just through cpp. "Syntax error" is here to catch this case.
3471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003472/* confdefs.h. */
3473_ACEOF
3474cat confdefs.h >>conftest.$ac_ext
3475cat >>conftest.$ac_ext <<_ACEOF
3476/* end confdefs.h. */
3477#ifdef __STDC__
3478# include <limits.h>
3479#else
3480# include <assert.h>
3481#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003482 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003483_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003484if { (ac_try="$ac_cpp conftest.$ac_ext"
3485case "(($ac_try" in
3486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3487 *) ac_try_echo=$ac_try;;
3488esac
3489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3490 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003491 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003492 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003493 rm -f conftest.er1
3494 cat conftest.err >&5
3495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003496 (exit $ac_status); } >/dev/null && {
3497 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3498 test ! -s conftest.err
3499 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 :
3501else
3502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003503sed 's/^/| /' conftest.$ac_ext >&5
3504
Martin v. Löwis11437992002-04-12 09:54:03 +00003505 # Broken: fails on valid input.
3506continue
3507fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003508
Martin v. Löwis11437992002-04-12 09:54:03 +00003509rm -f conftest.err conftest.$ac_ext
3510
Martin v. Löwiseba40652007-08-30 20:10:57 +00003511 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 # can be detected and how.
3513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003514/* confdefs.h. */
3515_ACEOF
3516cat confdefs.h >>conftest.$ac_ext
3517cat >>conftest.$ac_ext <<_ACEOF
3518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003519#include <ac_nonexistent.h>
3520_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003521if { (ac_try="$ac_cpp conftest.$ac_ext"
3522case "(($ac_try" in
3523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3524 *) ac_try_echo=$ac_try;;
3525esac
3526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3527 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003529 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 rm -f conftest.er1
3531 cat conftest.err >&5
3532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003533 (exit $ac_status); } >/dev/null && {
3534 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3535 test ! -s conftest.err
3536 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 # Broken: success on invalid input.
3538continue
3539else
3540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003541sed 's/^/| /' conftest.$ac_ext >&5
3542
Martin v. Löwis11437992002-04-12 09:54:03 +00003543 # Passes both tests.
3544ac_preproc_ok=:
3545break
3546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003547
Martin v. Löwis11437992002-04-12 09:54:03 +00003548rm -f conftest.err conftest.$ac_ext
3549
3550done
3551# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3552rm -f conftest.err conftest.$ac_ext
3553if $ac_preproc_ok; then
3554 :
3555else
Skip Montanaro6dead952003-09-25 14:50:04 +00003556 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3557See \`config.log' for more details." >&5
3558echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3559See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 { (exit 1); exit 1; }; }
3561fi
3562
3563ac_ext=c
3564ac_cpp='$CPP $CPPFLAGS'
3565ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3566ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3567ac_compiler_gnu=$ac_cv_c_compiler_gnu
3568
3569
Martin v. Löwiseba40652007-08-30 20:10:57 +00003570{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3571echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3572if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003573 echo $ECHO_N "(cached) $ECHO_C" >&6
3574else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003575 # Extract the first word of "grep ggrep" to use in msg output
3576if test -z "$GREP"; then
3577set dummy grep ggrep; ac_prog_name=$2
3578if test "${ac_cv_path_GREP+set}" = set; then
3579 echo $ECHO_N "(cached) $ECHO_C" >&6
3580else
3581 ac_path_GREP_found=false
3582# Loop through the user's path and test for each of PROGNAME-LIST
3583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3584for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3585do
3586 IFS=$as_save_IFS
3587 test -z "$as_dir" && as_dir=.
3588 for ac_prog in grep ggrep; do
3589 for ac_exec_ext in '' $ac_executable_extensions; do
3590 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3591 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3592 # Check for GNU ac_path_GREP and select it if it is found.
3593 # Check for GNU $ac_path_GREP
3594case `"$ac_path_GREP" --version 2>&1` in
3595*GNU*)
3596 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3597*)
3598 ac_count=0
3599 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3600 while :
3601 do
3602 cat "conftest.in" "conftest.in" >"conftest.tmp"
3603 mv "conftest.tmp" "conftest.in"
3604 cp "conftest.in" "conftest.nl"
3605 echo 'GREP' >> "conftest.nl"
3606 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3607 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3608 ac_count=`expr $ac_count + 1`
3609 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3610 # Best one so far, save it but keep looking for a better one
3611 ac_cv_path_GREP="$ac_path_GREP"
3612 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003613 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003614 # 10*(2^10) chars as input seems more than enough
3615 test $ac_count -gt 10 && break
3616 done
3617 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3618esac
3619
3620
3621 $ac_path_GREP_found && break 3
3622 done
3623done
3624
3625done
3626IFS=$as_save_IFS
3627
3628
Skip Montanaro6dead952003-09-25 14:50:04 +00003629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003630
3631GREP="$ac_cv_path_GREP"
3632if test -z "$GREP"; then
3633 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3634echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3635 { (exit 1); exit 1; }; }
3636fi
3637
3638else
3639 ac_cv_path_GREP=$GREP
3640fi
3641
3642
3643fi
3644{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3645echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3646 GREP="$ac_cv_path_GREP"
3647
3648
3649{ echo "$as_me:$LINENO: checking for egrep" >&5
3650echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3651if test "${ac_cv_path_EGREP+set}" = set; then
3652 echo $ECHO_N "(cached) $ECHO_C" >&6
3653else
3654 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3655 then ac_cv_path_EGREP="$GREP -E"
3656 else
3657 # Extract the first word of "egrep" to use in msg output
3658if test -z "$EGREP"; then
3659set dummy egrep; ac_prog_name=$2
3660if test "${ac_cv_path_EGREP+set}" = set; then
3661 echo $ECHO_N "(cached) $ECHO_C" >&6
3662else
3663 ac_path_EGREP_found=false
3664# Loop through the user's path and test for each of PROGNAME-LIST
3665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3666for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3667do
3668 IFS=$as_save_IFS
3669 test -z "$as_dir" && as_dir=.
3670 for ac_prog in egrep; do
3671 for ac_exec_ext in '' $ac_executable_extensions; do
3672 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3673 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3674 # Check for GNU ac_path_EGREP and select it if it is found.
3675 # Check for GNU $ac_path_EGREP
3676case `"$ac_path_EGREP" --version 2>&1` in
3677*GNU*)
3678 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3679*)
3680 ac_count=0
3681 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3682 while :
3683 do
3684 cat "conftest.in" "conftest.in" >"conftest.tmp"
3685 mv "conftest.tmp" "conftest.in"
3686 cp "conftest.in" "conftest.nl"
3687 echo 'EGREP' >> "conftest.nl"
3688 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3689 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3690 ac_count=`expr $ac_count + 1`
3691 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3692 # Best one so far, save it but keep looking for a better one
3693 ac_cv_path_EGREP="$ac_path_EGREP"
3694 ac_path_EGREP_max=$ac_count
3695 fi
3696 # 10*(2^10) chars as input seems more than enough
3697 test $ac_count -gt 10 && break
3698 done
3699 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3700esac
3701
3702
3703 $ac_path_EGREP_found && break 3
3704 done
3705done
3706
3707done
3708IFS=$as_save_IFS
3709
3710
3711fi
3712
3713EGREP="$ac_cv_path_EGREP"
3714if test -z "$EGREP"; then
3715 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3716echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3717 { (exit 1); exit 1; }; }
3718fi
3719
3720else
3721 ac_cv_path_EGREP=$EGREP
3722fi
3723
3724
3725 fi
3726fi
3727{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3728echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3729 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003730
3731
Martin v. Löwis11437992002-04-12 09:54:03 +00003732
Martin v. Löwiseba40652007-08-30 20:10:57 +00003733{ echo "$as_me:$LINENO: checking for AIX" >&5
3734echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003735cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003736/* confdefs.h. */
3737_ACEOF
3738cat confdefs.h >>conftest.$ac_ext
3739cat >>conftest.$ac_ext <<_ACEOF
3740/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003741#ifdef _AIX
3742 yes
3743#endif
3744
Martin v. Löwis11437992002-04-12 09:54:03 +00003745_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003746if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003747 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003748 { echo "$as_me:$LINENO: result: yes" >&5
3749echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003750cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003751#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003752_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003753
3754else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003755 { echo "$as_me:$LINENO: result: no" >&5
3756echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003757fi
3758rm -f conftest*
3759
Michael W. Hudson54241132001-12-07 15:38:26 +00003760
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003761
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003762# Check for unsupported systems
3763case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003764atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003765 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3766 echo See README for details.
3767 exit 1;;
3768esac
3769
Michael W. Hudson54241132001-12-07 15:38:26 +00003770
Martin v. Löwiseba40652007-08-30 20:10:57 +00003771{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3772echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003773
Martin v. Löwiseba40652007-08-30 20:10:57 +00003774# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003775if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003776 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003777 case $withval in
3778 no) EXEEXT=;;
3779 yes) EXEEXT=.exe;;
3780 *) EXEEXT=$withval;;
3781 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003782fi
3783
3784{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3785echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003786
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003787# Test whether we're running on a non-case-sensitive system, in which
3788# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003789
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3791echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003792if test ! -d CaseSensitiveTestDir; then
3793mkdir CaseSensitiveTestDir
3794fi
3795
3796if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003797then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003798 { echo "$as_me:$LINENO: result: yes" >&5
3799echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003800 BUILDEXEEXT=.exe
3801else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003802 { echo "$as_me:$LINENO: result: no" >&5
3803echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003804 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003805fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003806rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003807
Guido van Rossumdd997f71998-10-07 19:58:26 +00003808case $MACHDEP in
3809bsdos*)
3810 case $CC in
3811 gcc) CC="$CC -D_HAVE_BSDI";;
3812 esac;;
3813esac
3814
Guido van Rossum24b1e751997-08-21 02:29:16 +00003815case $ac_sys_system in
3816hp*|HP*)
3817 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003818 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003819 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003820Monterey*)
3821 case $CC in
3822 cc) CC="$CC -Wl,-Bexport";;
3823 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003824SunOS*)
3825 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003826
3827cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003828#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003829_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003830
3831 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003832esac
3833
Michael W. Hudson54241132001-12-07 15:38:26 +00003834
3835
Martin v. Löwiseba40652007-08-30 20:10:57 +00003836{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3837echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003838if test -z "$LIBRARY"
3839then
3840 LIBRARY='libpython$(VERSION).a'
3841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003842{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3843echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003844
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003845# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003846# name of the library into which to insert object files). BLDLIBRARY is also
3847# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3848# is blank as the main program is not linked directly against LDLIBRARY.
3849# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3850# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3851# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3852# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003853#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003854# RUNSHARED is used to run shared python without installed libraries
3855#
3856# INSTSONAME is the name of the shared library that will be use to install
3857# on the system - some systems like version suffix, others don't
3858
3859
Michael W. Hudson54241132001-12-07 15:38:26 +00003860
3861
3862
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003863
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003864LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003865BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003866INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003867DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003868LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003869RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003870
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003871# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003872# If CXX is set, and if it is needed to link a main function that was
3873# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3874# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003875# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003876# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003877
Martin v. Löwiseba40652007-08-30 20:10:57 +00003878{ echo "$as_me:$LINENO: checking LINKCC" >&5
3879echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003880if test -z "$LINKCC"
3881then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003882 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003883 case $ac_sys_system in
3884 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003885 exp_extra="\"\""
3886 if test $ac_sys_release -ge 5 -o \
3887 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3888 exp_extra="."
3889 fi
3890 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003891 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003892 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003893 esac
3894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003895{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3896echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003897
Martin v. Löwiseba40652007-08-30 20:10:57 +00003898{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3899echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3900# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003901if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003902 enableval=$enable_shared;
3903fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003904
Martin v. Löwis1142de32002-03-29 16:28:31 +00003905
3906if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003907then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003908 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003909 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003910 enable_shared="yes";;
3911 *)
3912 enable_shared="no";;
3913 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003915{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3916echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003917
Martin v. Löwiseba40652007-08-30 20:10:57 +00003918{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3919echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3920# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003921if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003922 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003923 CC="$CC -pg"
3924 if test "$cross_compiling" = yes; then
3925 ac_enable_profiling="no"
3926else
3927 cat >conftest.$ac_ext <<_ACEOF
3928/* confdefs.h. */
3929_ACEOF
3930cat confdefs.h >>conftest.$ac_ext
3931cat >>conftest.$ac_ext <<_ACEOF
3932/* end confdefs.h. */
3933int main() { return 0; }
3934_ACEOF
3935rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003936if { (ac_try="$ac_link"
3937case "(($ac_try" in
3938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3939 *) ac_try_echo=$ac_try;;
3940esac
3941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3942 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003943 ac_status=$?
3944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3945 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00003946 { (case "(($ac_try" in
3947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3948 *) ac_try_echo=$ac_try;;
3949esac
3950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3951 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003952 ac_status=$?
3953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3954 (exit $ac_status); }; }; then
3955 ac_enable_profiling="yes"
3956else
3957 echo "$as_me: program exited with status $ac_status" >&5
3958echo "$as_me: failed program was:" >&5
3959sed 's/^/| /' conftest.$ac_ext >&5
3960
3961( exit $ac_status )
3962ac_enable_profiling="no"
3963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003964rm -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 +00003965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003966
3967
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003968 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003969fi
3970
3971{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3972echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003973
3974case "$ac_enable_profiling" in
3975 "yes")
3976 BASECFLAGS="-pg $BASECFLAGS"
3977 LDFLAGS="-pg $LDFLAGS"
3978 ;;
3979esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003980
Martin v. Löwiseba40652007-08-30 20:10:57 +00003981{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3982echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00003983
Guido van Rossumb8552162001-09-05 14:58:11 +00003984# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3985# library that we build, but we do not want to link against it (we
3986# will find it with a -framework option). For this reason there is an
3987# extra variable BLDLIBRARY against which Python and the extension
3988# modules are linked, BLDLIBRARY. This is normally the same as
3989# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003990if test "$enable_framework"
3991then
3992 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003993 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003994 BLDLIBRARY=''
3995else
3996 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003997fi
Jack Jansene578a632001-08-15 01:27:14 +00003998
Martin v. Löwis1142de32002-03-29 16:28:31 +00003999# Other platforms follow
4000if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004001
4002cat >>confdefs.h <<\_ACEOF
4003#define Py_ENABLE_SHARED 1
4004_ACEOF
4005
Martin v. Löwis1142de32002-03-29 16:28:31 +00004006 case $ac_sys_system in
4007 BeOS*)
4008 LDLIBRARY='libpython$(VERSION).so'
4009 ;;
4010 CYGWIN*)
4011 LDLIBRARY='libpython$(VERSION).dll.a'
4012 DLLLIBRARY='libpython$(VERSION).dll'
4013 ;;
4014 SunOS*)
4015 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004016 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004017 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004018 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004019 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004020 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004021 LDLIBRARY='libpython$(VERSION).so'
4022 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004023 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004024 case $ac_sys_system in
4025 FreeBSD*)
4026 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4027 ;;
4028 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004029 INSTSONAME="$LDLIBRARY".$SOVERSION
4030 ;;
4031 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004032 case `uname -m` in
4033 ia64)
4034 LDLIBRARY='libpython$(VERSION).so'
4035 ;;
4036 *)
4037 LDLIBRARY='libpython$(VERSION).sl'
4038 ;;
4039 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004040 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004041 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004042 ;;
4043 OSF*)
4044 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004045 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004046 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004047 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004048 atheos*)
4049 LDLIBRARY='libpython$(VERSION).so'
4050 BLDLIBRARY='-L. -lpython$(VERSION)'
4051 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4052 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004053 esac
Jason Tishler30765592003-09-04 11:04:06 +00004054else # shared is disabled
4055 case $ac_sys_system in
4056 CYGWIN*)
4057 BLDLIBRARY='$(LIBRARY)'
4058 LDLIBRARY='libpython$(VERSION).dll.a'
4059 ;;
4060 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004061fi
4062
Martin v. Löwiseba40652007-08-30 20:10:57 +00004063{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4064echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004065
Martin v. Löwis11437992002-04-12 09:54:03 +00004066if test -n "$ac_tool_prefix"; then
4067 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4068set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004069{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4070echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004071if test "${ac_cv_prog_RANLIB+set}" = set; then
4072 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004073else
4074 if test -n "$RANLIB"; then
4075 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4076else
Martin v. Löwis11437992002-04-12 09:54:03 +00004077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4078for as_dir in $PATH
4079do
4080 IFS=$as_save_IFS
4081 test -z "$as_dir" && as_dir=.
4082 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004083 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 +00004084 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4085 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4086 break 2
4087 fi
4088done
4089done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004090IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004091
Guido van Rossum627b2d71993-12-24 10:39:16 +00004092fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004093fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004094RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004095if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004096 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4097echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004098else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004099 { echo "$as_me:$LINENO: result: no" >&5
4100echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004101fi
4102
Martin v. Löwiseba40652007-08-30 20:10:57 +00004103
Martin v. Löwis11437992002-04-12 09:54:03 +00004104fi
4105if test -z "$ac_cv_prog_RANLIB"; then
4106 ac_ct_RANLIB=$RANLIB
4107 # Extract the first word of "ranlib", so it can be a program name with args.
4108set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004109{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4110echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004111if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4112 echo $ECHO_N "(cached) $ECHO_C" >&6
4113else
4114 if test -n "$ac_ct_RANLIB"; then
4115 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4116else
4117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4118for as_dir in $PATH
4119do
4120 IFS=$as_save_IFS
4121 test -z "$as_dir" && as_dir=.
4122 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004123 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 +00004124 ac_cv_prog_ac_ct_RANLIB="ranlib"
4125 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4126 break 2
4127 fi
4128done
4129done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004130IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004131
Martin v. Löwis11437992002-04-12 09:54:03 +00004132fi
4133fi
4134ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4135if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004136 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4137echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004138else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004139 { echo "$as_me:$LINENO: result: no" >&5
4140echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004141fi
4142
Martin v. Löwiseba40652007-08-30 20:10:57 +00004143 if test "x$ac_ct_RANLIB" = x; then
4144 RANLIB=":"
4145 else
4146 case $cross_compiling:$ac_tool_warned in
4147yes:)
4148{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4149whose name does not start with the host triplet. If you think this
4150configuration is useful to you, please write to autoconf@gnu.org." >&5
4151echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4152whose name does not start with the host triplet. If you think this
4153configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4154ac_tool_warned=yes ;;
4155esac
4156 RANLIB=$ac_ct_RANLIB
4157 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004158else
4159 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004160fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004161
4162
Guido van Rossum7f43da71994-08-01 12:15:30 +00004163for ac_prog in ar aal
4164do
Martin v. Löwis11437992002-04-12 09:54:03 +00004165 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004166set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004167{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4168echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004169if test "${ac_cv_prog_AR+set}" = set; then
4170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171else
4172 if test -n "$AR"; then
4173 ac_cv_prog_AR="$AR" # Let the user override the test.
4174else
Martin v. Löwis11437992002-04-12 09:54:03 +00004175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4176for as_dir in $PATH
4177do
4178 IFS=$as_save_IFS
4179 test -z "$as_dir" && as_dir=.
4180 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004181 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 +00004182 ac_cv_prog_AR="$ac_prog"
4183 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4184 break 2
4185 fi
4186done
4187done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004188IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004189
Guido van Rossum7f43da71994-08-01 12:15:30 +00004190fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004191fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004192AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004194 { echo "$as_me:$LINENO: result: $AR" >&5
4195echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004196else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004197 { echo "$as_me:$LINENO: result: no" >&5
4198echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004199fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004200
Martin v. Löwiseba40652007-08-30 20:10:57 +00004201
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004203done
4204test -n "$AR" || AR="ar"
4205
Michael W. Hudson54241132001-12-07 15:38:26 +00004206
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004207
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004208# Extract the first word of "svnversion", so it can be a program name with args.
4209set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004210{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4211echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004212if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4213 echo $ECHO_N "(cached) $ECHO_C" >&6
4214else
4215 if test -n "$SVNVERSION"; then
4216 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4217else
4218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4219for as_dir in $PATH
4220do
4221 IFS=$as_save_IFS
4222 test -z "$as_dir" && as_dir=.
4223 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004224 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 +00004225 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004226 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4227 break 2
4228 fi
4229done
4230done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004231IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004232
Martin v. Löwisff600232006-04-03 19:12:32 +00004233 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004234fi
4235fi
4236SVNVERSION=$ac_cv_prog_SVNVERSION
4237if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4239echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004240else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004241 { echo "$as_me:$LINENO: result: no" >&5
4242echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004243fi
4244
Martin v. Löwiseba40652007-08-30 20:10:57 +00004245
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004246if test $SVNVERSION = found
4247then
4248 SVNVERSION="svnversion \$(srcdir)"
4249else
4250 SVNVERSION="echo exported"
4251fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004252
Neil Schemenauera42c8272001-03-31 00:01:55 +00004253case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004254bsdos*|hp*|HP*)
4255 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004256 if test -z "$INSTALL"
4257 then
4258 INSTALL="${srcdir}/install-sh -c"
4259 fi
4260esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004261ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004262for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4263 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004264 ac_aux_dir=$ac_dir
4265 ac_install_sh="$ac_aux_dir/install-sh -c"
4266 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004267 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004268 ac_aux_dir=$ac_dir
4269 ac_install_sh="$ac_aux_dir/install.sh -c"
4270 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004271 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004272 ac_aux_dir=$ac_dir
4273 ac_install_sh="$ac_aux_dir/shtool install -c"
4274 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004275 fi
4276done
4277if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004278 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4279echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004280 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004282
4283# These three variables are undocumented and unsupported,
4284# and are intended to be withdrawn in a future Autoconf release.
4285# They can cause serious problems if a builder's source tree is in a directory
4286# whose full name contains unusual characters.
4287ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4288ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4289ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4290
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004291
4292# Find a good install program. We prefer a C program (faster),
4293# so one script is as good as another. But avoid the broken or
4294# incompatible versions:
4295# SysV /etc/install, /usr/sbin/install
4296# SunOS /usr/etc/install
4297# IRIX /sbin/install
4298# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004299# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004300# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4301# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4302# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004303# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004304# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004305{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4306echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004307if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004308if test "${ac_cv_path_install+set}" = set; then
4309 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004310else
Martin v. Löwis11437992002-04-12 09:54:03 +00004311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4312for as_dir in $PATH
4313do
4314 IFS=$as_save_IFS
4315 test -z "$as_dir" && as_dir=.
4316 # Account for people who put trailing slashes in PATH elements.
4317case $as_dir/ in
4318 ./ | .// | /cC/* | \
4319 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004320 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004321 /usr/ucb/* ) ;;
4322 *)
4323 # OSF1 and SCO ODT 3.0 have their own names for install.
4324 # Don't use installbsd from OSF since it installs stuff as root
4325 # by default.
4326 for ac_prog in ginstall scoinst install; do
4327 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004328 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 +00004329 if test $ac_prog = install &&
4330 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4331 # AIX install. It has an incompatible calling convention.
4332 :
4333 elif test $ac_prog = install &&
4334 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4335 # program-specific install script used by HP pwplus--don't use.
4336 :
4337 else
4338 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4339 break 3
4340 fi
4341 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004342 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004343 done
4344 ;;
4345esac
4346done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004347IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004348
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004349
4350fi
4351 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004352 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004353 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004354 # As a last resort, use the slow shell script. Don't cache a
4355 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004356 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004357 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004358 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004359 fi
4360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004361{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4362echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004363
4364# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4365# It thinks the first close brace ends the variable substitution.
4366test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4367
Martin v. Löwis11437992002-04-12 09:54:03 +00004368test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004369
4370test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4371
Michael W. Hudson54241132001-12-07 15:38:26 +00004372
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004373# Not every filesystem supports hard links
4374
4375if test -z "$LN" ; then
4376 case $ac_sys_system in
4377 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004378 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004379 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004380 *) LN=ln;;
4381 esac
4382fi
4383
Fred Drake109d9862001-07-11 06:27:56 +00004384# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004385{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4386echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004387
Martin v. Löwiseba40652007-08-30 20:10:57 +00004388# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004389if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004390 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004391if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004392then
4393
4394cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004395#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004396_ACEOF
4397
Martin v. Löwiseba40652007-08-30 20:10:57 +00004398 { echo "$as_me:$LINENO: result: yes" >&5
4399echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004400 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004401else { echo "$as_me:$LINENO: result: no" >&5
4402echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004403fi
4404else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004405 { echo "$as_me:$LINENO: result: no" >&5
4406echo "${ECHO_T}no" >&6; }
4407fi
4408
Fred Drake109d9862001-07-11 06:27:56 +00004409
Skip Montanarodecc6a42003-01-01 20:07:49 +00004410# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4411# merged with this chunk of code?
4412
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004413# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004414# ------------------------
4415# (The following bit of code is complicated enough - please keep things
4416# indented properly. Just pretend you're editing Python code. ;-)
4417
4418# There are two parallel sets of case statements below, one that checks to
4419# see if OPT was set and one that does BASECFLAGS setting based upon
4420# compiler and platform. BASECFLAGS tweaks need to be made even if the
4421# user set OPT.
4422
4423# tweak OPT based on compiler and platform, only if the user didn't set
4424# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004425
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004426if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004427then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004428 case $GCC in
4429 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004430 if test "$CC" != 'g++' ; then
4431 STRICT_PROTO="-Wstrict-prototypes"
4432 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004433 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004434 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004435 if test "$Py_DEBUG" = 'true' ; then
4436 # Optimization messes up debuggers, so turn it off for
4437 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004438 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004439 else
Skip Montanaro288a5be2006-04-13 02:00:56 +00004440 OPT="-g -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004441 fi
4442 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004443 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004444 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004445 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004446 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004447 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004448 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4449 ;;
4450 esac
Fred Drake109d9862001-07-11 06:27:56 +00004451 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004452
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004453 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004454 OPT="-O"
4455 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004456 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004457
4458 # The current (beta) Monterey compiler dies with optimizations
4459 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004460 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004461 Monterey*)
4462 OPT=""
4463 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004464 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004465
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004466fi
4467
Skip Montanarodecc6a42003-01-01 20:07:49 +00004468
4469# tweak BASECFLAGS based on compiler and platform
4470case $GCC in
4471yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004472 # Python violates C99 rules, by casting between incompatible
4473 # pointer types. GCC may generate bad code as a result of that,
4474 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004475 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4476echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004477 ac_save_cc="$CC"
4478 CC="$CC -fno-strict-aliasing"
4479 if test "$cross_compiling" = yes; then
4480 ac_cv_no_strict_aliasing_ok=no
4481else
4482 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004483/* confdefs.h. */
4484_ACEOF
4485cat confdefs.h >>conftest.$ac_ext
4486cat >>conftest.$ac_ext <<_ACEOF
4487/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004488int main() { return 0; }
4489_ACEOF
4490rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004491if { (ac_try="$ac_link"
4492case "(($ac_try" in
4493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4494 *) ac_try_echo=$ac_try;;
4495esac
4496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4497 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004498 ac_status=$?
4499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4500 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004501 { (case "(($ac_try" in
4502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4503 *) ac_try_echo=$ac_try;;
4504esac
4505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4506 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004507 ac_status=$?
4508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4509 (exit $ac_status); }; }; then
4510 ac_cv_no_strict_aliasing_ok=yes
4511else
4512 echo "$as_me: program exited with status $ac_status" >&5
4513echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004514sed 's/^/| /' conftest.$ac_ext >&5
4515
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004516( exit $ac_status )
4517ac_cv_no_strict_aliasing_ok=no
4518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004519rm -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 +00004520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004521
4522
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004523 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004524 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4525echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004526 if test $ac_cv_no_strict_aliasing_ok = yes
4527 then
4528 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4529 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004530 case $ac_sys_system in
4531 SCO_SV*)
4532 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4533 ;;
4534 # is there any other compiler on Darwin besides gcc?
4535 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00004536 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Ronald Oussoren988117f2006-04-29 11:31:35 +00004537 if test "${enable_universalsdk}"; then
4538 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4539 fi
4540
Skip Montanarodecc6a42003-01-01 20:07:49 +00004541 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004542 OSF*)
4543 BASECFLAGS="$BASECFLAGS -mieee"
4544 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004545 esac
4546 ;;
4547
4548*)
4549 case $ac_sys_system in
4550 OpenUNIX*|UnixWare*)
4551 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4552 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004553 OSF*)
4554 BASECFLAGS="$BASECFLAGS -ieee -std"
4555 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004556 SCO_SV*)
4557 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4558 ;;
4559 esac
4560 ;;
4561esac
4562
Fred Drakee1ceaa02001-12-04 20:55:47 +00004563if test "$Py_DEBUG" = 'true'; then
4564 :
4565else
4566 OPT="-DNDEBUG $OPT"
4567fi
4568
Guido van Rossum563e7081996-09-10 18:20:48 +00004569if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004570then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004571 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004572fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004573
Neal Norwitz020c46a2006-01-07 21:39:28 +00004574# disable check for icc since it seems to pass, but generates a warning
4575if test "$CC" = icc
4576then
4577 ac_cv_opt_olimit_ok=no
4578fi
4579
Martin v. Löwiseba40652007-08-30 20:10:57 +00004580{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4581echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004582if test "${ac_cv_opt_olimit_ok+set}" = set; then
4583 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004584else
4585 ac_save_cc="$CC"
4586CC="$CC -OPT:Olimit=0"
4587if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004588 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004589else
Martin v. Löwis11437992002-04-12 09:54:03 +00004590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004591/* confdefs.h. */
4592_ACEOF
4593cat confdefs.h >>conftest.$ac_ext
4594cat >>conftest.$ac_ext <<_ACEOF
4595/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004596int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004597_ACEOF
4598rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004599if { (ac_try="$ac_link"
4600case "(($ac_try" in
4601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4602 *) ac_try_echo=$ac_try;;
4603esac
4604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4605 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004606 ac_status=$?
4607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4608 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004609 { (case "(($ac_try" in
4610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4611 *) ac_try_echo=$ac_try;;
4612esac
4613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4614 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004615 ac_status=$?
4616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004618 ac_cv_opt_olimit_ok=yes
4619else
Martin v. Löwis11437992002-04-12 09:54:03 +00004620 echo "$as_me: program exited with status $ac_status" >&5
4621echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004622sed 's/^/| /' conftest.$ac_ext >&5
4623
Martin v. Löwis11437992002-04-12 09:54:03 +00004624( exit $ac_status )
4625ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004627rm -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 +00004628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004629
4630
Guido van Rossum91922671997-10-09 20:24:13 +00004631CC="$ac_save_cc"
4632fi
4633
Martin v. Löwiseba40652007-08-30 20:10:57 +00004634{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4635echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004636if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004637 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004638 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4639 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4640 # environment?
4641 Darwin*)
4642 ;;
4643 *)
4644 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4645 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004646 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004647else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004648 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4649echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004650 if test "${ac_cv_olimit_ok+set}" = set; then
4651 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004652else
4653 ac_save_cc="$CC"
4654 CC="$CC -Olimit 1500"
4655 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004656 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004657else
Martin v. Löwis11437992002-04-12 09:54:03 +00004658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004659/* confdefs.h. */
4660_ACEOF
4661cat confdefs.h >>conftest.$ac_ext
4662cat >>conftest.$ac_ext <<_ACEOF
4663/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004664int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004665_ACEOF
4666rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004667if { (ac_try="$ac_link"
4668case "(($ac_try" in
4669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4670 *) ac_try_echo=$ac_try;;
4671esac
4672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4673 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004674 ac_status=$?
4675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4676 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004677 { (case "(($ac_try" in
4678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4679 *) ac_try_echo=$ac_try;;
4680esac
4681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4682 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004683 ac_status=$?
4684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4685 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004686 ac_cv_olimit_ok=yes
4687else
Martin v. Löwis11437992002-04-12 09:54:03 +00004688 echo "$as_me: program exited with status $ac_status" >&5
4689echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004690sed 's/^/| /' conftest.$ac_ext >&5
4691
Martin v. Löwis11437992002-04-12 09:54:03 +00004692( exit $ac_status )
4693ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004695rm -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 +00004696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004697
4698
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004699 CC="$ac_save_cc"
4700fi
4701
Martin v. Löwiseba40652007-08-30 20:10:57 +00004702 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4703echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004704 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004705 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004706 fi
4707fi
4708
Martin v. Löwisaac13162006-10-19 10:58:46 +00004709# Check whether GCC supports PyArg_ParseTuple format
4710if test "$GCC" = "yes"
4711then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004712 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4713echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004714 save_CFLAGS=$CFLAGS
4715 CFLAGS="$CFLAGS -Werror"
4716 cat >conftest.$ac_ext <<_ACEOF
4717/* confdefs.h. */
4718_ACEOF
4719cat confdefs.h >>conftest.$ac_ext
4720cat >>conftest.$ac_ext <<_ACEOF
4721/* end confdefs.h. */
4722
4723 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4724
4725int
4726main ()
4727{
4728
4729 ;
4730 return 0;
4731}
4732_ACEOF
4733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004734if { (ac_try="$ac_compile"
4735case "(($ac_try" in
4736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4737 *) ac_try_echo=$ac_try;;
4738esac
4739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004741 ac_status=$?
4742 grep -v '^ *+' conftest.er1 >conftest.err
4743 rm -f conftest.er1
4744 cat conftest.err >&5
4745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004746 (exit $ac_status); } && {
4747 test -z "$ac_c_werror_flag" ||
4748 test ! -s conftest.err
4749 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004750
4751cat >>confdefs.h <<\_ACEOF
4752#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4753_ACEOF
4754
Martin v. Löwiseba40652007-08-30 20:10:57 +00004755 { echo "$as_me:$LINENO: result: yes" >&5
4756echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004757else
4758 echo "$as_me: failed program was:" >&5
4759sed 's/^/| /' conftest.$ac_ext >&5
4760
Martin v. Löwiseba40652007-08-30 20:10:57 +00004761 { echo "$as_me:$LINENO: result: no" >&5
4762echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004763
4764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004765
4766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004767 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004768fi
4769
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004770# On some compilers, pthreads are available without further options
4771# (e.g. MacOS X). On some of these systems, the compiler will not
4772# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4773# So we have to see first whether pthreads are available without
4774# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004775{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4776echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004777if test "${ac_cv_pthread_is_default+set}" = set; then
4778 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004779else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004780 if test "$cross_compiling" = yes; then
4781 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004782else
Martin v. Löwis11437992002-04-12 09:54:03 +00004783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004784/* confdefs.h. */
4785_ACEOF
4786cat confdefs.h >>conftest.$ac_ext
4787cat >>conftest.$ac_ext <<_ACEOF
4788/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004789
Martin v. Löwis130fb172001-07-19 11:00:41 +00004790#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004791
4792void* routine(void* p){return NULL;}
4793
4794int main(){
4795 pthread_t p;
4796 if(pthread_create(&p,NULL,routine,NULL)!=0)
4797 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004798 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004799 return 0;
4800}
4801
Martin v. Löwis11437992002-04-12 09:54:03 +00004802_ACEOF
4803rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004804if { (ac_try="$ac_link"
4805case "(($ac_try" in
4806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4807 *) ac_try_echo=$ac_try;;
4808esac
4809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4810 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004811 ac_status=$?
4812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4813 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004814 { (case "(($ac_try" in
4815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4816 *) ac_try_echo=$ac_try;;
4817esac
4818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4819 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004820 ac_status=$?
4821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4822 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004823
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004824 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004825 ac_cv_kthread=no
4826 ac_cv_pthread=no
4827
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004828else
Martin v. Löwis11437992002-04-12 09:54:03 +00004829 echo "$as_me: program exited with status $ac_status" >&5
4830echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004831sed 's/^/| /' conftest.$ac_ext >&5
4832
Martin v. Löwis11437992002-04-12 09:54:03 +00004833( exit $ac_status )
4834ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004836rm -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 +00004837fi
4838
Martin v. Löwiseba40652007-08-30 20:10:57 +00004839
4840
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004841fi
4842
Martin v. Löwiseba40652007-08-30 20:10:57 +00004843{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4844echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004845
Michael W. Hudson54241132001-12-07 15:38:26 +00004846
Martin v. Löwis11437992002-04-12 09:54:03 +00004847if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004848then
4849 ac_cv_kpthread=no
4850else
4851# -Kpthread, if available, provides the right #defines
4852# and linker options to make pthread_create available
4853# Some compilers won't report that they do not support -Kpthread,
4854# so we need to run a program to see whether it really made the
4855# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004856{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4857echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004858if test "${ac_cv_kpthread+set}" = set; then
4859 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004860else
4861 ac_save_cc="$CC"
4862CC="$CC -Kpthread"
4863if test "$cross_compiling" = yes; then
4864 ac_cv_kpthread=no
4865else
Martin v. Löwis11437992002-04-12 09:54:03 +00004866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004867/* confdefs.h. */
4868_ACEOF
4869cat confdefs.h >>conftest.$ac_ext
4870cat >>conftest.$ac_ext <<_ACEOF
4871/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004872
4873#include <pthread.h>
4874
4875void* routine(void* p){return NULL;}
4876
4877int main(){
4878 pthread_t p;
4879 if(pthread_create(&p,NULL,routine,NULL)!=0)
4880 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004881 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004882 return 0;
4883}
4884
Martin v. Löwis11437992002-04-12 09:54:03 +00004885_ACEOF
4886rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004887if { (ac_try="$ac_link"
4888case "(($ac_try" in
4889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4890 *) ac_try_echo=$ac_try;;
4891esac
4892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4893 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 ac_status=$?
4895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4896 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004897 { (case "(($ac_try" in
4898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4899 *) ac_try_echo=$ac_try;;
4900esac
4901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4902 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004903 ac_status=$?
4904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4905 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004906 ac_cv_kpthread=yes
4907else
Martin v. Löwis11437992002-04-12 09:54:03 +00004908 echo "$as_me: program exited with status $ac_status" >&5
4909echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004910sed 's/^/| /' conftest.$ac_ext >&5
4911
Martin v. Löwis11437992002-04-12 09:54:03 +00004912( exit $ac_status )
4913ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004915rm -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 +00004916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004917
4918
Martin v. Löwis130fb172001-07-19 11:00:41 +00004919CC="$ac_save_cc"
4920fi
4921
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4923echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004924fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004925
Skip Montanarod8d39a02003-07-10 20:44:10 +00004926if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004927then
4928# -Kthread, if available, provides the right #defines
4929# and linker options to make pthread_create available
4930# Some compilers won't report that they do not support -Kthread,
4931# so we need to run a program to see whether it really made the
4932# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004933{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4934echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004935if test "${ac_cv_kthread+set}" = set; then
4936 echo $ECHO_N "(cached) $ECHO_C" >&6
4937else
4938 ac_save_cc="$CC"
4939CC="$CC -Kthread"
4940if test "$cross_compiling" = yes; then
4941 ac_cv_kthread=no
4942else
4943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004944/* confdefs.h. */
4945_ACEOF
4946cat confdefs.h >>conftest.$ac_ext
4947cat >>conftest.$ac_ext <<_ACEOF
4948/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004949
4950#include <pthread.h>
4951
4952void* routine(void* p){return NULL;}
4953
4954int main(){
4955 pthread_t p;
4956 if(pthread_create(&p,NULL,routine,NULL)!=0)
4957 return 1;
4958 (void)pthread_detach(p);
4959 return 0;
4960}
4961
4962_ACEOF
4963rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004964if { (ac_try="$ac_link"
4965case "(($ac_try" in
4966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4967 *) ac_try_echo=$ac_try;;
4968esac
4969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4970 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004971 ac_status=$?
4972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4973 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004974 { (case "(($ac_try" in
4975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4976 *) ac_try_echo=$ac_try;;
4977esac
4978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4979 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004980 ac_status=$?
4981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4982 (exit $ac_status); }; }; then
4983 ac_cv_kthread=yes
4984else
4985 echo "$as_me: program exited with status $ac_status" >&5
4986echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004987sed 's/^/| /' conftest.$ac_ext >&5
4988
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004989( exit $ac_status )
4990ac_cv_kthread=no
4991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004992rm -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 +00004993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004994
4995
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004996CC="$ac_save_cc"
4997fi
4998
Martin v. Löwiseba40652007-08-30 20:10:57 +00004999{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5000echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005001fi
5002
Skip Montanarod8d39a02003-07-10 20:44:10 +00005003if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005004then
5005# -pthread, if available, provides the right #defines
5006# and linker options to make pthread_create available
5007# Some compilers won't report that they do not support -pthread,
5008# so we need to run a program to see whether it really made the
5009# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005010{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5011echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005012if test "${ac_cv_thread+set}" = set; then
5013 echo $ECHO_N "(cached) $ECHO_C" >&6
5014else
5015 ac_save_cc="$CC"
5016CC="$CC -pthread"
5017if test "$cross_compiling" = yes; then
5018 ac_cv_pthread=no
5019else
5020 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005021/* confdefs.h. */
5022_ACEOF
5023cat confdefs.h >>conftest.$ac_ext
5024cat >>conftest.$ac_ext <<_ACEOF
5025/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005026
5027#include <pthread.h>
5028
5029void* routine(void* p){return NULL;}
5030
5031int main(){
5032 pthread_t p;
5033 if(pthread_create(&p,NULL,routine,NULL)!=0)
5034 return 1;
5035 (void)pthread_detach(p);
5036 return 0;
5037}
5038
5039_ACEOF
5040rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005041if { (ac_try="$ac_link"
5042case "(($ac_try" in
5043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5044 *) ac_try_echo=$ac_try;;
5045esac
5046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5047 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005048 ac_status=$?
5049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5050 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005051 { (case "(($ac_try" in
5052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5053 *) ac_try_echo=$ac_try;;
5054esac
5055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5056 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005057 ac_status=$?
5058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5059 (exit $ac_status); }; }; then
5060 ac_cv_pthread=yes
5061else
5062 echo "$as_me: program exited with status $ac_status" >&5
5063echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005064sed 's/^/| /' conftest.$ac_ext >&5
5065
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005066( exit $ac_status )
5067ac_cv_pthread=no
5068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005069rm -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 +00005070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005071
5072
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005073CC="$ac_save_cc"
5074fi
5075
Martin v. Löwiseba40652007-08-30 20:10:57 +00005076{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5077echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005078fi
5079
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005080# If we have set a CC compiler flag for thread support then
5081# check if it works for CXX, too.
5082ac_cv_cxx_thread=no
5083if test ! -z "$CXX"
5084then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005085{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5086echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005087ac_save_cxx="$CXX"
5088
5089if test "$ac_cv_kpthread" = "yes"
5090then
5091 CXX="$CXX -Kpthread"
5092 ac_cv_cxx_thread=yes
5093elif test "$ac_cv_kthread" = "yes"
5094then
5095 CXX="$CXX -Kthread"
5096 ac_cv_cxx_thread=yes
5097elif test "$ac_cv_pthread" = "yes"
5098then
5099 CXX="$CXX -pthread"
5100 ac_cv_cxx_thread=yes
5101fi
5102
5103if test $ac_cv_cxx_thread = yes
5104then
5105 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5106 $CXX -c conftest.$ac_ext 2>&5
5107 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5108 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5109 then
5110 ac_cv_cxx_thread=yes
5111 else
5112 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005113 fi
5114 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005116{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5117echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005118fi
5119CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005120
Michael W. Hudson54241132001-12-07 15:38:26 +00005121
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005122# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005123{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5124echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005125if test "${ac_cv_header_stdc+set}" = set; then
5126 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005127else
Martin v. Löwis11437992002-04-12 09:54:03 +00005128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005129/* confdefs.h. */
5130_ACEOF
5131cat confdefs.h >>conftest.$ac_ext
5132cat >>conftest.$ac_ext <<_ACEOF
5133/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005134#include <stdlib.h>
5135#include <stdarg.h>
5136#include <string.h>
5137#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005138
Skip Montanaro6dead952003-09-25 14:50:04 +00005139int
5140main ()
5141{
5142
5143 ;
5144 return 0;
5145}
Martin v. Löwis11437992002-04-12 09:54:03 +00005146_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005147rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005148if { (ac_try="$ac_compile"
5149case "(($ac_try" in
5150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5151 *) ac_try_echo=$ac_try;;
5152esac
5153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005156 grep -v '^ *+' conftest.er1 >conftest.err
5157 rm -f conftest.er1
5158 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005160 (exit $ac_status); } && {
5161 test -z "$ac_c_werror_flag" ||
5162 test ! -s conftest.err
5163 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005164 ac_cv_header_stdc=yes
5165else
Martin v. Löwis11437992002-04-12 09:54:03 +00005166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005167sed 's/^/| /' conftest.$ac_ext >&5
5168
Martin v. Löwiseba40652007-08-30 20:10:57 +00005169 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005171
5172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005173
5174if test $ac_cv_header_stdc = yes; then
5175 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005176 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005177/* confdefs.h. */
5178_ACEOF
5179cat confdefs.h >>conftest.$ac_ext
5180cat >>conftest.$ac_ext <<_ACEOF
5181/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005182#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005183
5184_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005185if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005186 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005187 :
5188else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005189 ac_cv_header_stdc=no
5190fi
5191rm -f conftest*
5192
5193fi
5194
5195if test $ac_cv_header_stdc = yes; then
5196 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005197 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005198/* confdefs.h. */
5199_ACEOF
5200cat confdefs.h >>conftest.$ac_ext
5201cat >>conftest.$ac_ext <<_ACEOF
5202/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005203#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005204
5205_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005206if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005207 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005208 :
5209else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005210 ac_cv_header_stdc=no
5211fi
5212rm -f conftest*
5213
5214fi
5215
5216if test $ac_cv_header_stdc = yes; then
5217 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005218 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005219 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005220else
Martin v. Löwis11437992002-04-12 09:54:03 +00005221 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005222/* confdefs.h. */
5223_ACEOF
5224cat confdefs.h >>conftest.$ac_ext
5225cat >>conftest.$ac_ext <<_ACEOF
5226/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005227#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005228#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005229#if ((' ' & 0x0FF) == 0x020)
5230# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5231# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5232#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005233# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005234 (('a' <= (c) && (c) <= 'i') \
5235 || ('j' <= (c) && (c) <= 'r') \
5236 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005237# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5238#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005239
Martin v. Löwis11437992002-04-12 09:54:03 +00005240#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5241int
5242main ()
5243{
5244 int i;
5245 for (i = 0; i < 256; i++)
5246 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005247 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005248 return 2;
5249 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005250}
5251_ACEOF
5252rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005253if { (ac_try="$ac_link"
5254case "(($ac_try" in
5255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5256 *) ac_try_echo=$ac_try;;
5257esac
5258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5259 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005260 ac_status=$?
5261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5262 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005263 { (case "(($ac_try" in
5264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5265 *) ac_try_echo=$ac_try;;
5266esac
5267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5268 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005269 ac_status=$?
5270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5271 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005272 :
5273else
Martin v. Löwis11437992002-04-12 09:54:03 +00005274 echo "$as_me: program exited with status $ac_status" >&5
5275echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005276sed 's/^/| /' conftest.$ac_ext >&5
5277
Martin v. Löwis11437992002-04-12 09:54:03 +00005278( exit $ac_status )
5279ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5282fi
5283
5284
Michael W. Hudson54241132001-12-07 15:38:26 +00005285fi
5286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005287{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5288echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005289if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005290
5291cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005292#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005293_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005294
5295fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005296
Skip Montanarob9820a32004-01-17 00:16:12 +00005297# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005308 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005309do
5310as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005311{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5312echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5313if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005314 echo $ECHO_N "(cached) $ECHO_C" >&6
5315else
5316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005317/* confdefs.h. */
5318_ACEOF
5319cat confdefs.h >>conftest.$ac_ext
5320cat >>conftest.$ac_ext <<_ACEOF
5321/* end confdefs.h. */
5322$ac_includes_default
5323
5324#include <$ac_header>
5325_ACEOF
5326rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005327if { (ac_try="$ac_compile"
5328case "(($ac_try" in
5329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5330 *) ac_try_echo=$ac_try;;
5331esac
5332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5333 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005335 grep -v '^ *+' conftest.er1 >conftest.err
5336 rm -f conftest.er1
5337 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005339 (exit $ac_status); } && {
5340 test -z "$ac_c_werror_flag" ||
5341 test ! -s conftest.err
5342 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005343 eval "$as_ac_Header=yes"
5344else
5345 echo "$as_me: failed program was:" >&5
5346sed 's/^/| /' conftest.$ac_ext >&5
5347
Martin v. Löwiseba40652007-08-30 20:10:57 +00005348 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005350
5351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005353ac_res=`eval echo '${'$as_ac_Header'}'`
5354 { echo "$as_me:$LINENO: result: $ac_res" >&5
5355echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005356if test `eval echo '${'$as_ac_Header'}'` = yes; then
5357 cat >>confdefs.h <<_ACEOF
5358#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5359_ACEOF
5360
5361fi
5362
5363done
5364
5365
Martin v. Löwis11437992002-04-12 09:54:03 +00005366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
Anthony Baxter8a560de2004-10-13 15:30:56 +00005402
Martin v. Löwisc3001752005-01-23 09:27:24 +00005403
Martin v. Löwis11017b12006-01-14 18:12:57 +00005404
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005405
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005406
5407
5408
5409
5410
5411
5412
5413
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005414
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005415for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5416fcntl.h grp.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005417io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
5418shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005419unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00005420sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
5421sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005422sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5423sys/time.h \
5424sys/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 +00005425sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00005426bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005427do
Martin v. Löwis11437992002-04-12 09:54:03 +00005428as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005429if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5430 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5431echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5432if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005433 echo $ECHO_N "(cached) $ECHO_C" >&6
5434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005435ac_res=`eval echo '${'$as_ac_Header'}'`
5436 { echo "$as_me:$LINENO: result: $ac_res" >&5
5437echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005438else
Martin v. Löwis11437992002-04-12 09:54:03 +00005439 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005440{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5441echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005442cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005443/* confdefs.h. */
5444_ACEOF
5445cat confdefs.h >>conftest.$ac_ext
5446cat >>conftest.$ac_ext <<_ACEOF
5447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005448$ac_includes_default
5449#include <$ac_header>
5450_ACEOF
5451rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005452if { (ac_try="$ac_compile"
5453case "(($ac_try" in
5454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5455 *) ac_try_echo=$ac_try;;
5456esac
5457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005460 grep -v '^ *+' conftest.er1 >conftest.err
5461 rm -f conftest.er1
5462 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005464 (exit $ac_status); } && {
5465 test -z "$ac_c_werror_flag" ||
5466 test ! -s conftest.err
5467 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005468 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005469else
Martin v. Löwis11437992002-04-12 09:54:03 +00005470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005471sed 's/^/| /' conftest.$ac_ext >&5
5472
Martin v. Löwiseba40652007-08-30 20:10:57 +00005473 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005475
5476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5477{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5478echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005479
5480# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005481{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5482echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005484/* confdefs.h. */
5485_ACEOF
5486cat confdefs.h >>conftest.$ac_ext
5487cat >>conftest.$ac_ext <<_ACEOF
5488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005489#include <$ac_header>
5490_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005491if { (ac_try="$ac_cpp conftest.$ac_ext"
5492case "(($ac_try" in
5493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5494 *) ac_try_echo=$ac_try;;
5495esac
5496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5497 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005498 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005499 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005500 rm -f conftest.er1
5501 cat conftest.err >&5
5502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005503 (exit $ac_status); } >/dev/null && {
5504 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5505 test ! -s conftest.err
5506 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005507 ac_header_preproc=yes
5508else
5509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005510sed 's/^/| /' conftest.$ac_ext >&5
5511
Martin v. Löwis11437992002-04-12 09:54:03 +00005512 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005514
Martin v. Löwis11437992002-04-12 09:54:03 +00005515rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005516{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5517echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005518
5519# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005520case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5521 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005522 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5523echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005524 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5525echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5526 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005527 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005528 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005529 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5530echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005531 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5532echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5533 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5534echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5535 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5536echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005537 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5538echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005539 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5540echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005541 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005542## ------------------------------------------------ ##
5543## Report this to http://www.python.org/python-bugs ##
5544## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005545_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005546 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005547 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005548esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005549{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5550echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5551if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005552 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005553else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005554 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005556ac_res=`eval echo '${'$as_ac_Header'}'`
5557 { echo "$as_me:$LINENO: result: $ac_res" >&5
5558echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005559
5560fi
5561if test `eval echo '${'$as_ac_Header'}'` = yes; then
5562 cat >>confdefs.h <<_ACEOF
5563#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5564_ACEOF
5565
5566fi
5567
Guido van Rossum627b2d71993-12-24 10:39:16 +00005568done
5569
Martin v. Löwis11437992002-04-12 09:54:03 +00005570
5571
5572
5573
5574
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005575ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005576for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5577 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005578{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5579echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5580if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005581 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005582else
Martin v. Löwis11437992002-04-12 09:54:03 +00005583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005584/* confdefs.h. */
5585_ACEOF
5586cat confdefs.h >>conftest.$ac_ext
5587cat >>conftest.$ac_ext <<_ACEOF
5588/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005589#include <sys/types.h>
5590#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005591
Martin v. Löwis11437992002-04-12 09:54:03 +00005592int
5593main ()
5594{
5595if ((DIR *) 0)
5596return 0;
5597 ;
5598 return 0;
5599}
5600_ACEOF
5601rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005602if { (ac_try="$ac_compile"
5603case "(($ac_try" in
5604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5605 *) ac_try_echo=$ac_try;;
5606esac
5607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5608 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005610 grep -v '^ *+' conftest.er1 >conftest.err
5611 rm -f conftest.er1
5612 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005614 (exit $ac_status); } && {
5615 test -z "$ac_c_werror_flag" ||
5616 test ! -s conftest.err
5617 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005618 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005619else
Martin v. Löwis11437992002-04-12 09:54:03 +00005620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005621sed 's/^/| /' conftest.$ac_ext >&5
5622
Martin v. Löwiseba40652007-08-30 20:10:57 +00005623 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005625
5626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005628ac_res=`eval echo '${'$as_ac_Header'}'`
5629 { echo "$as_me:$LINENO: result: $ac_res" >&5
5630echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005631if test `eval echo '${'$as_ac_Header'}'` = yes; then
5632 cat >>confdefs.h <<_ACEOF
5633#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5634_ACEOF
5635
5636ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005637fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005638
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005639done
5640# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5641if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005642 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5643echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005644if test "${ac_cv_search_opendir+set}" = set; then
5645 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005646else
Martin v. Löwis11437992002-04-12 09:54:03 +00005647 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005649/* confdefs.h. */
5650_ACEOF
5651cat confdefs.h >>conftest.$ac_ext
5652cat >>conftest.$ac_ext <<_ACEOF
5653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005654
Martin v. Löwiseba40652007-08-30 20:10:57 +00005655/* Override any GCC internal prototype to avoid an error.
5656 Use char because int might match the return type of a GCC
5657 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005658#ifdef __cplusplus
5659extern "C"
5660#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005661char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005662int
5663main ()
5664{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005665return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005666 ;
5667 return 0;
5668}
5669_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005670for ac_lib in '' dir; do
5671 if test -z "$ac_lib"; then
5672 ac_res="none required"
5673 else
5674 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005675 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005676 fi
5677 rm -f conftest.$ac_objext conftest$ac_exeext
5678if { (ac_try="$ac_link"
5679case "(($ac_try" in
5680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5681 *) ac_try_echo=$ac_try;;
5682esac
5683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5684 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005685 ac_status=$?
5686 grep -v '^ *+' conftest.er1 >conftest.err
5687 rm -f conftest.er1
5688 cat conftest.err >&5
5689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005690 (exit $ac_status); } && {
5691 test -z "$ac_c_werror_flag" ||
5692 test ! -s conftest.err
5693 } && test -s conftest$ac_exeext &&
5694 $as_test_x conftest$ac_exeext; then
5695 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005696else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005697 echo "$as_me: failed program was:" >&5
5698sed 's/^/| /' conftest.$ac_ext >&5
5699
Martin v. Löwiseba40652007-08-30 20:10:57 +00005700
Brett Cannon19fab762007-06-02 03:02:29 +00005701fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005702
5703rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5704 conftest$ac_exeext
5705 if test "${ac_cv_search_opendir+set}" = set; then
5706 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005708done
5709if test "${ac_cv_search_opendir+set}" = set; then
5710 :
5711else
5712 ac_cv_search_opendir=no
5713fi
5714rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005715LIBS=$ac_func_search_save_LIBS
5716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005717{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5718echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5719ac_res=$ac_cv_search_opendir
5720if test "$ac_res" != no; then
5721 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005722
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005723fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005724
Michael W. Hudson54241132001-12-07 15:38:26 +00005725else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005726 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5727echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005728if test "${ac_cv_search_opendir+set}" = set; then
5729 echo $ECHO_N "(cached) $ECHO_C" >&6
5730else
5731 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005732cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005733/* confdefs.h. */
5734_ACEOF
5735cat confdefs.h >>conftest.$ac_ext
5736cat >>conftest.$ac_ext <<_ACEOF
5737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005738
Martin v. Löwiseba40652007-08-30 20:10:57 +00005739/* Override any GCC internal prototype to avoid an error.
5740 Use char because int might match the return type of a GCC
5741 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005742#ifdef __cplusplus
5743extern "C"
5744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005745char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005746int
5747main ()
5748{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005749return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005750 ;
5751 return 0;
5752}
5753_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005754for ac_lib in '' x; do
5755 if test -z "$ac_lib"; then
5756 ac_res="none required"
5757 else
5758 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005759 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005760 fi
5761 rm -f conftest.$ac_objext conftest$ac_exeext
5762if { (ac_try="$ac_link"
5763case "(($ac_try" in
5764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5765 *) ac_try_echo=$ac_try;;
5766esac
5767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5768 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005769 ac_status=$?
5770 grep -v '^ *+' conftest.er1 >conftest.err
5771 rm -f conftest.er1
5772 cat conftest.err >&5
5773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005774 (exit $ac_status); } && {
5775 test -z "$ac_c_werror_flag" ||
5776 test ! -s conftest.err
5777 } && test -s conftest$ac_exeext &&
5778 $as_test_x conftest$ac_exeext; then
5779 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005780else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005781 echo "$as_me: failed program was:" >&5
5782sed 's/^/| /' conftest.$ac_ext >&5
5783
Martin v. Löwiseba40652007-08-30 20:10:57 +00005784
Brett Cannon19fab762007-06-02 03:02:29 +00005785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005786
5787rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5788 conftest$ac_exeext
5789 if test "${ac_cv_search_opendir+set}" = set; then
5790 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005792done
5793if test "${ac_cv_search_opendir+set}" = set; then
5794 :
5795else
5796 ac_cv_search_opendir=no
5797fi
5798rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005799LIBS=$ac_func_search_save_LIBS
5800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005801{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5802echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5803ac_res=$ac_cv_search_opendir
5804if test "$ac_res" != no; then
5805 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005806
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005807fi
5808
5809fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005810
Martin v. Löwiseba40652007-08-30 20:10:57 +00005811{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5812echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005813if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5814 echo $ECHO_N "(cached) $ECHO_C" >&6
5815else
5816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005817/* confdefs.h. */
5818_ACEOF
5819cat confdefs.h >>conftest.$ac_ext
5820cat >>conftest.$ac_ext <<_ACEOF
5821/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005822#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005823int
5824main ()
5825{
5826return makedev(0, 0);
5827 ;
5828 return 0;
5829}
5830_ACEOF
5831rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005832if { (ac_try="$ac_link"
5833case "(($ac_try" in
5834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5835 *) ac_try_echo=$ac_try;;
5836esac
5837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5838 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005840 grep -v '^ *+' conftest.er1 >conftest.err
5841 rm -f conftest.er1
5842 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005844 (exit $ac_status); } && {
5845 test -z "$ac_c_werror_flag" ||
5846 test ! -s conftest.err
5847 } && test -s conftest$ac_exeext &&
5848 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005849 ac_cv_header_sys_types_h_makedev=yes
5850else
5851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005852sed 's/^/| /' conftest.$ac_ext >&5
5853
Martin v. Löwiseba40652007-08-30 20:10:57 +00005854 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005856
5857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005858 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005859
5860fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005861{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5862echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005863
5864if test $ac_cv_header_sys_types_h_makedev = no; then
5865if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005866 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5867echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005868if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5869 echo $ECHO_N "(cached) $ECHO_C" >&6
5870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005871{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5872echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005873else
5874 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005875{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5876echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005877cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005878/* confdefs.h. */
5879_ACEOF
5880cat confdefs.h >>conftest.$ac_ext
5881cat >>conftest.$ac_ext <<_ACEOF
5882/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005883$ac_includes_default
5884#include <sys/mkdev.h>
5885_ACEOF
5886rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005887if { (ac_try="$ac_compile"
5888case "(($ac_try" in
5889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5890 *) ac_try_echo=$ac_try;;
5891esac
5892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005895 grep -v '^ *+' conftest.er1 >conftest.err
5896 rm -f conftest.er1
5897 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005899 (exit $ac_status); } && {
5900 test -z "$ac_c_werror_flag" ||
5901 test ! -s conftest.err
5902 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005903 ac_header_compiler=yes
5904else
5905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005906sed 's/^/| /' conftest.$ac_ext >&5
5907
Martin v. Löwiseba40652007-08-30 20:10:57 +00005908 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005910
5911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5912{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5913echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005914
5915# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005916{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5917echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005918cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005919/* confdefs.h. */
5920_ACEOF
5921cat confdefs.h >>conftest.$ac_ext
5922cat >>conftest.$ac_ext <<_ACEOF
5923/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005924#include <sys/mkdev.h>
5925_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005926if { (ac_try="$ac_cpp conftest.$ac_ext"
5927case "(($ac_try" in
5928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5929 *) ac_try_echo=$ac_try;;
5930esac
5931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5932 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005933 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005934 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005935 rm -f conftest.er1
5936 cat conftest.err >&5
5937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005938 (exit $ac_status); } >/dev/null && {
5939 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5940 test ! -s conftest.err
5941 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005942 ac_header_preproc=yes
5943else
5944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005945sed 's/^/| /' conftest.$ac_ext >&5
5946
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005947 ac_header_preproc=no
5948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005949
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005950rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005951{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5952echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005953
5954# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005955case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5956 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005957 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5958echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005959 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5960echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5961 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005962 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005963 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005964 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5965echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005966 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5967echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5968 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5969echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5970 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5971echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005972 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5973echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005974 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5975echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005976 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005977## ------------------------------------------------ ##
5978## Report this to http://www.python.org/python-bugs ##
5979## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005980_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005981 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005982 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005983esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005984{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5985echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005986if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5987 echo $ECHO_N "(cached) $ECHO_C" >&6
5988else
5989 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005991{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5992echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005993
5994fi
5995if test $ac_cv_header_sys_mkdev_h = yes; then
5996
5997cat >>confdefs.h <<\_ACEOF
5998#define MAJOR_IN_MKDEV 1
5999_ACEOF
6000
6001fi
6002
6003
6004
6005 if test $ac_cv_header_sys_mkdev_h = no; then
6006 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006007 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6008echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006009if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6010 echo $ECHO_N "(cached) $ECHO_C" >&6
6011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006012{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6013echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006014else
6015 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006016{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6017echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006019/* confdefs.h. */
6020_ACEOF
6021cat confdefs.h >>conftest.$ac_ext
6022cat >>conftest.$ac_ext <<_ACEOF
6023/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024$ac_includes_default
6025#include <sys/sysmacros.h>
6026_ACEOF
6027rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006028if { (ac_try="$ac_compile"
6029case "(($ac_try" in
6030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6031 *) ac_try_echo=$ac_try;;
6032esac
6033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006036 grep -v '^ *+' conftest.er1 >conftest.err
6037 rm -f conftest.er1
6038 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006040 (exit $ac_status); } && {
6041 test -z "$ac_c_werror_flag" ||
6042 test ! -s conftest.err
6043 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044 ac_header_compiler=yes
6045else
6046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006047sed 's/^/| /' conftest.$ac_ext >&5
6048
Martin v. Löwiseba40652007-08-30 20:10:57 +00006049 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006051
6052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6053{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6054echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006055
6056# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006057{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6058echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006059cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006060/* confdefs.h. */
6061_ACEOF
6062cat confdefs.h >>conftest.$ac_ext
6063cat >>conftest.$ac_ext <<_ACEOF
6064/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065#include <sys/sysmacros.h>
6066_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006067if { (ac_try="$ac_cpp conftest.$ac_ext"
6068case "(($ac_try" in
6069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6070 *) ac_try_echo=$ac_try;;
6071esac
6072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6073 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006075 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076 rm -f conftest.er1
6077 cat conftest.err >&5
6078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006079 (exit $ac_status); } >/dev/null && {
6080 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6081 test ! -s conftest.err
6082 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006083 ac_header_preproc=yes
6084else
6085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006086sed 's/^/| /' conftest.$ac_ext >&5
6087
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088 ac_header_preproc=no
6089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006090
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006092{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6093echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094
6095# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006096case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6097 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6099echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006100 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6101echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6102 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006103 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006104 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006105 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6106echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006107 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6108echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6109 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6110echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6111 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6112echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006113 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6114echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006115 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6116echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006117 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006118## ------------------------------------------------ ##
6119## Report this to http://www.python.org/python-bugs ##
6120## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006121_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006122 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006123 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006124esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006125{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6126echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006127if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6128 echo $ECHO_N "(cached) $ECHO_C" >&6
6129else
6130 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006132{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6133echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134
6135fi
6136if test $ac_cv_header_sys_sysmacros_h = yes; then
6137
6138cat >>confdefs.h <<\_ACEOF
6139#define MAJOR_IN_SYSMACROS 1
6140_ACEOF
6141
6142fi
6143
6144
6145 fi
6146fi
6147
Michael W. Hudson54241132001-12-07 15:38:26 +00006148
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006149# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006150
6151for ac_header in term.h
6152do
6153as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006154{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6155echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6156if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006157 echo $ECHO_N "(cached) $ECHO_C" >&6
6158else
6159 cat >conftest.$ac_ext <<_ACEOF
6160/* confdefs.h. */
6161_ACEOF
6162cat confdefs.h >>conftest.$ac_ext
6163cat >>conftest.$ac_ext <<_ACEOF
6164/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006165
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006166#ifdef HAVE_CURSES_H
6167#include <curses.h>
6168#endif
6169
6170
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006171#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006172_ACEOF
6173rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006174if { (ac_try="$ac_compile"
6175case "(($ac_try" in
6176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6177 *) ac_try_echo=$ac_try;;
6178esac
6179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6180 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006181 ac_status=$?
6182 grep -v '^ *+' conftest.er1 >conftest.err
6183 rm -f conftest.er1
6184 cat conftest.err >&5
6185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006186 (exit $ac_status); } && {
6187 test -z "$ac_c_werror_flag" ||
6188 test ! -s conftest.err
6189 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006190 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006191else
6192 echo "$as_me: failed program was:" >&5
6193sed 's/^/| /' conftest.$ac_ext >&5
6194
Martin v. Löwiseba40652007-08-30 20:10:57 +00006195 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006197
6198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006200ac_res=`eval echo '${'$as_ac_Header'}'`
6201 { echo "$as_me:$LINENO: result: $ac_res" >&5
6202echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006203if test `eval echo '${'$as_ac_Header'}'` = yes; then
6204 cat >>confdefs.h <<_ACEOF
6205#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6206_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006207
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006208fi
6209
6210done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006211
6212
Martin v. Löwis11017b12006-01-14 18:12:57 +00006213# On Linux, netlink.h requires asm/types.h
6214
6215for ac_header in linux/netlink.h
6216do
6217as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006218{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6219echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6220if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006221 echo $ECHO_N "(cached) $ECHO_C" >&6
6222else
6223 cat >conftest.$ac_ext <<_ACEOF
6224/* confdefs.h. */
6225_ACEOF
6226cat confdefs.h >>conftest.$ac_ext
6227cat >>conftest.$ac_ext <<_ACEOF
6228/* end confdefs.h. */
6229
6230#ifdef HAVE_ASM_TYPES_H
6231#include <asm/types.h>
6232#endif
6233#ifdef HAVE_SYS_SOCKET_H
6234#include <sys/socket.h>
6235#endif
6236
6237
6238#include <$ac_header>
6239_ACEOF
6240rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006241if { (ac_try="$ac_compile"
6242case "(($ac_try" in
6243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6244 *) ac_try_echo=$ac_try;;
6245esac
6246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6247 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006248 ac_status=$?
6249 grep -v '^ *+' conftest.er1 >conftest.err
6250 rm -f conftest.er1
6251 cat conftest.err >&5
6252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006253 (exit $ac_status); } && {
6254 test -z "$ac_c_werror_flag" ||
6255 test ! -s conftest.err
6256 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006257 eval "$as_ac_Header=yes"
6258else
6259 echo "$as_me: failed program was:" >&5
6260sed 's/^/| /' conftest.$ac_ext >&5
6261
Martin v. Löwiseba40652007-08-30 20:10:57 +00006262 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006264
6265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267ac_res=`eval echo '${'$as_ac_Header'}'`
6268 { echo "$as_me:$LINENO: result: $ac_res" >&5
6269echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006270if test `eval echo '${'$as_ac_Header'}'` = yes; then
6271 cat >>confdefs.h <<_ACEOF
6272#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6273_ACEOF
6274
6275fi
6276
6277done
6278
6279
Guido van Rossum627b2d71993-12-24 10:39:16 +00006280# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006281was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006282{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6283echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006285/* confdefs.h. */
6286_ACEOF
6287cat confdefs.h >>conftest.$ac_ext
6288cat >>conftest.$ac_ext <<_ACEOF
6289/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006290#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006291
6292_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006293if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006294 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006295 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006296else
Martin v. Löwis11437992002-04-12 09:54:03 +00006297
6298
6299cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006300#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006301_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006302
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006303
Guido van Rossum627b2d71993-12-24 10:39:16 +00006304fi
6305rm -f conftest*
6306
Martin v. Löwiseba40652007-08-30 20:10:57 +00006307{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6308echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006309
Neal Norwitz11690112002-07-30 01:08:28 +00006310# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006311{ echo "$as_me:$LINENO: checking for makedev" >&5
6312echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006313cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006314/* confdefs.h. */
6315_ACEOF
6316cat confdefs.h >>conftest.$ac_ext
6317cat >>conftest.$ac_ext <<_ACEOF
6318/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006319#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006320int
6321main ()
6322{
6323 makedev(0, 0)
6324 ;
6325 return 0;
6326}
6327_ACEOF
6328rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006329if { (ac_try="$ac_link"
6330case "(($ac_try" in
6331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6332 *) ac_try_echo=$ac_try;;
6333esac
6334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6335 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006337 grep -v '^ *+' conftest.er1 >conftest.err
6338 rm -f conftest.er1
6339 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006341 (exit $ac_status); } && {
6342 test -z "$ac_c_werror_flag" ||
6343 test ! -s conftest.err
6344 } && test -s conftest$ac_exeext &&
6345 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006346 ac_cv_has_makedev=yes
6347else
6348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006349sed 's/^/| /' conftest.$ac_ext >&5
6350
Martin v. Löwiseba40652007-08-30 20:10:57 +00006351 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006353
6354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006355 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006356if test "$ac_cv_has_makedev" = "no"; then
6357 # we didn't link, try if _OSF_SOURCE will allow us to link
6358 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006359/* confdefs.h. */
6360_ACEOF
6361cat confdefs.h >>conftest.$ac_ext
6362cat >>conftest.$ac_ext <<_ACEOF
6363/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006364
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006365#define _OSF_SOURCE 1
6366#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006367
Neal Norwitz11690112002-07-30 01:08:28 +00006368int
6369main ()
6370{
6371 makedev(0, 0)
6372 ;
6373 return 0;
6374}
6375_ACEOF
6376rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006377if { (ac_try="$ac_link"
6378case "(($ac_try" in
6379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6380 *) ac_try_echo=$ac_try;;
6381esac
6382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6383 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006385 grep -v '^ *+' conftest.er1 >conftest.err
6386 rm -f conftest.er1
6387 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006389 (exit $ac_status); } && {
6390 test -z "$ac_c_werror_flag" ||
6391 test ! -s conftest.err
6392 } && test -s conftest$ac_exeext &&
6393 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006394 ac_cv_has_makedev=yes
6395else
6396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006397sed 's/^/| /' conftest.$ac_ext >&5
6398
Martin v. Löwiseba40652007-08-30 20:10:57 +00006399 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006401
6402rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006403 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006404 if test "$ac_cv_has_makedev" = "yes"; then
6405
6406cat >>confdefs.h <<\_ACEOF
6407#define _OSF_SOURCE 1
6408_ACEOF
6409
6410 fi
6411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006412{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6413echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006414if test "$ac_cv_has_makedev" = "yes"; then
6415
6416cat >>confdefs.h <<\_ACEOF
6417#define HAVE_MAKEDEV 1
6418_ACEOF
6419
6420fi
6421
Martin v. Löwis399a6892002-10-04 10:22:02 +00006422# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6423# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6424# defined, but the compiler does not support pragma redefine_extname,
6425# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6426# structures (such as rlimit64) without declaring them. As a
6427# work-around, disable LFS on such configurations
6428
6429use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006430{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6431echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006432cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006433/* confdefs.h. */
6434_ACEOF
6435cat confdefs.h >>conftest.$ac_ext
6436cat >>conftest.$ac_ext <<_ACEOF
6437/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006438
6439#define _LARGEFILE_SOURCE 1
6440#define _FILE_OFFSET_BITS 64
6441#include <sys/resource.h>
6442
Martin v. Löwis399a6892002-10-04 10:22:02 +00006443int
6444main ()
6445{
6446struct rlimit foo;
6447 ;
6448 return 0;
6449}
6450_ACEOF
6451rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006452if { (ac_try="$ac_compile"
6453case "(($ac_try" in
6454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6455 *) ac_try_echo=$ac_try;;
6456esac
6457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006460 grep -v '^ *+' conftest.er1 >conftest.err
6461 rm -f conftest.er1
6462 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006464 (exit $ac_status); } && {
6465 test -z "$ac_c_werror_flag" ||
6466 test ! -s conftest.err
6467 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006468 sol_lfs_bug=no
6469else
6470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006471sed 's/^/| /' conftest.$ac_ext >&5
6472
Martin v. Löwiseba40652007-08-30 20:10:57 +00006473 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006475
6476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6477{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6478echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006479if test "$sol_lfs_bug" = "yes"; then
6480 use_lfs=no
6481fi
6482
6483if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006484# Two defines needed to enable largefile support on various platforms
6485# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006486
Martin v. Löwis11437992002-04-12 09:54:03 +00006487cat >>confdefs.h <<\_ACEOF
6488#define _LARGEFILE_SOURCE 1
6489_ACEOF
6490
6491
6492cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006493#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006494_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006495
Martin v. Löwis399a6892002-10-04 10:22:02 +00006496fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006497
Guido van Rossum84e7b241996-08-19 21:59:00 +00006498# Add some code to confdefs.h so that the test for off_t works on SCO
6499cat >> confdefs.h <<\EOF
6500#if defined(SCO_DS)
6501#undef _OFF_T
6502#endif
6503EOF
6504
Guido van Rossumef2255b2000-03-10 22:30:29 +00006505# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006506{ echo "$as_me:$LINENO: checking for mode_t" >&5
6507echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006508if test "${ac_cv_type_mode_t+set}" = set; then
6509 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006510else
Martin v. Löwis11437992002-04-12 09:54:03 +00006511 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006512/* confdefs.h. */
6513_ACEOF
6514cat confdefs.h >>conftest.$ac_ext
6515cat >>conftest.$ac_ext <<_ACEOF
6516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006517$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006518typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006519int
6520main ()
6521{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006522if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006523 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006524if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006525 return 0;
6526 ;
6527 return 0;
6528}
6529_ACEOF
6530rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006531if { (ac_try="$ac_compile"
6532case "(($ac_try" in
6533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6534 *) ac_try_echo=$ac_try;;
6535esac
6536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6537 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006539 grep -v '^ *+' conftest.er1 >conftest.err
6540 rm -f conftest.er1
6541 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006543 (exit $ac_status); } && {
6544 test -z "$ac_c_werror_flag" ||
6545 test ! -s conftest.err
6546 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006547 ac_cv_type_mode_t=yes
6548else
Martin v. Löwis11437992002-04-12 09:54:03 +00006549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006550sed 's/^/| /' conftest.$ac_ext >&5
6551
Martin v. Löwiseba40652007-08-30 20:10:57 +00006552 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006554
6555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006557{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6558echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006559if test $ac_cv_type_mode_t = yes; then
6560 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006561else
Martin v. Löwis11437992002-04-12 09:54:03 +00006562
6563cat >>confdefs.h <<_ACEOF
6564#define mode_t int
6565_ACEOF
6566
6567fi
6568
Martin v. Löwiseba40652007-08-30 20:10:57 +00006569{ echo "$as_me:$LINENO: checking for off_t" >&5
6570echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006571if test "${ac_cv_type_off_t+set}" = set; then
6572 echo $ECHO_N "(cached) $ECHO_C" >&6
6573else
6574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006575/* confdefs.h. */
6576_ACEOF
6577cat confdefs.h >>conftest.$ac_ext
6578cat >>conftest.$ac_ext <<_ACEOF
6579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006580$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006582int
6583main ()
6584{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006585if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006586 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006587if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006588 return 0;
6589 ;
6590 return 0;
6591}
6592_ACEOF
6593rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006594if { (ac_try="$ac_compile"
6595case "(($ac_try" in
6596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6597 *) ac_try_echo=$ac_try;;
6598esac
6599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006602 grep -v '^ *+' conftest.er1 >conftest.err
6603 rm -f conftest.er1
6604 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006606 (exit $ac_status); } && {
6607 test -z "$ac_c_werror_flag" ||
6608 test ! -s conftest.err
6609 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006610 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006611else
Martin v. Löwis11437992002-04-12 09:54:03 +00006612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006613sed 's/^/| /' conftest.$ac_ext >&5
6614
Martin v. Löwiseba40652007-08-30 20:10:57 +00006615 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006617
6618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006619fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006620{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6621echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006622if test $ac_cv_type_off_t = yes; then
6623 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006624else
Martin v. Löwis11437992002-04-12 09:54:03 +00006625
6626cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006627#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006628_ACEOF
6629
6630fi
6631
Martin v. Löwiseba40652007-08-30 20:10:57 +00006632{ echo "$as_me:$LINENO: checking for pid_t" >&5
6633echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006634if test "${ac_cv_type_pid_t+set}" = set; then
6635 echo $ECHO_N "(cached) $ECHO_C" >&6
6636else
6637 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006638/* confdefs.h. */
6639_ACEOF
6640cat confdefs.h >>conftest.$ac_ext
6641cat >>conftest.$ac_ext <<_ACEOF
6642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006643$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006644typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006645int
6646main ()
6647{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006648if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006649 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006650if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006651 return 0;
6652 ;
6653 return 0;
6654}
6655_ACEOF
6656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006657if { (ac_try="$ac_compile"
6658case "(($ac_try" in
6659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6660 *) ac_try_echo=$ac_try;;
6661esac
6662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006665 grep -v '^ *+' conftest.er1 >conftest.err
6666 rm -f conftest.er1
6667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006669 (exit $ac_status); } && {
6670 test -z "$ac_c_werror_flag" ||
6671 test ! -s conftest.err
6672 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006673 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006674else
Martin v. Löwis11437992002-04-12 09:54:03 +00006675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006676sed 's/^/| /' conftest.$ac_ext >&5
6677
Martin v. Löwiseba40652007-08-30 20:10:57 +00006678 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006680
6681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6684echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006685if test $ac_cv_type_pid_t = yes; then
6686 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006687else
Martin v. Löwis11437992002-04-12 09:54:03 +00006688
6689cat >>confdefs.h <<_ACEOF
6690#define pid_t int
6691_ACEOF
6692
6693fi
6694
Martin v. Löwiseba40652007-08-30 20:10:57 +00006695{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6696echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006697if test "${ac_cv_type_signal+set}" = set; then
6698 echo $ECHO_N "(cached) $ECHO_C" >&6
6699else
6700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006701/* confdefs.h. */
6702_ACEOF
6703cat confdefs.h >>conftest.$ac_ext
6704cat >>conftest.$ac_ext <<_ACEOF
6705/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006706#include <sys/types.h>
6707#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006708
Martin v. Löwis11437992002-04-12 09:54:03 +00006709int
6710main ()
6711{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006712return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006713 ;
6714 return 0;
6715}
6716_ACEOF
6717rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006718if { (ac_try="$ac_compile"
6719case "(($ac_try" in
6720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6721 *) ac_try_echo=$ac_try;;
6722esac
6723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006726 grep -v '^ *+' conftest.er1 >conftest.err
6727 rm -f conftest.er1
6728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006730 (exit $ac_status); } && {
6731 test -z "$ac_c_werror_flag" ||
6732 test ! -s conftest.err
6733 } && test -s conftest.$ac_objext; then
6734 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006735else
Martin v. Löwis11437992002-04-12 09:54:03 +00006736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006737sed 's/^/| /' conftest.$ac_ext >&5
6738
Martin v. Löwiseba40652007-08-30 20:10:57 +00006739 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006741
6742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006744{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6745echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006746
Martin v. Löwis11437992002-04-12 09:54:03 +00006747cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006748#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006749_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006750
Michael W. Hudson54241132001-12-07 15:38:26 +00006751
Martin v. Löwiseba40652007-08-30 20:10:57 +00006752{ echo "$as_me:$LINENO: checking for size_t" >&5
6753echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006754if test "${ac_cv_type_size_t+set}" = set; then
6755 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006756else
Martin v. Löwis11437992002-04-12 09:54:03 +00006757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006758/* confdefs.h. */
6759_ACEOF
6760cat confdefs.h >>conftest.$ac_ext
6761cat >>conftest.$ac_ext <<_ACEOF
6762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006763$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006764typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006765int
6766main ()
6767{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006768if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006769 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006770if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006771 return 0;
6772 ;
6773 return 0;
6774}
6775_ACEOF
6776rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777if { (ac_try="$ac_compile"
6778case "(($ac_try" in
6779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6780 *) ac_try_echo=$ac_try;;
6781esac
6782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6783 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006785 grep -v '^ *+' conftest.er1 >conftest.err
6786 rm -f conftest.er1
6787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006789 (exit $ac_status); } && {
6790 test -z "$ac_c_werror_flag" ||
6791 test ! -s conftest.err
6792 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006793 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006794else
Martin v. Löwis11437992002-04-12 09:54:03 +00006795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006796sed 's/^/| /' conftest.$ac_ext >&5
6797
Martin v. Löwiseba40652007-08-30 20:10:57 +00006798 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006800
6801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006803{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6804echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006805if test $ac_cv_type_size_t = yes; then
6806 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006807else
Martin v. Löwis11437992002-04-12 09:54:03 +00006808
6809cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006810#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006811_ACEOF
6812
6813fi
6814
Martin v. Löwiseba40652007-08-30 20:10:57 +00006815{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6816echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006817if test "${ac_cv_type_uid_t+set}" = set; then
6818 echo $ECHO_N "(cached) $ECHO_C" >&6
6819else
6820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006821/* confdefs.h. */
6822_ACEOF
6823cat confdefs.h >>conftest.$ac_ext
6824cat >>conftest.$ac_ext <<_ACEOF
6825/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006826#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006827
6828_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006829if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006830 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006831 ac_cv_type_uid_t=yes
6832else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006833 ac_cv_type_uid_t=no
6834fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006835rm -f conftest*
6836
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006838{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6839echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006840if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006841
Martin v. Löwis11437992002-04-12 09:54:03 +00006842cat >>confdefs.h <<\_ACEOF
6843#define uid_t int
6844_ACEOF
6845
6846
6847cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006848#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006849_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006850
6851fi
6852
Martin v. Löwiseba40652007-08-30 20:10:57 +00006853{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6854echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006855if test "${ac_cv_type_ssize_t+set}" = set; then
6856 echo $ECHO_N "(cached) $ECHO_C" >&6
6857else
6858 cat >conftest.$ac_ext <<_ACEOF
6859/* confdefs.h. */
6860_ACEOF
6861cat confdefs.h >>conftest.$ac_ext
6862cat >>conftest.$ac_ext <<_ACEOF
6863/* end confdefs.h. */
6864$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006865typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006866int
6867main ()
6868{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006869if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006870 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006871if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006872 return 0;
6873 ;
6874 return 0;
6875}
6876_ACEOF
6877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006878if { (ac_try="$ac_compile"
6879case "(($ac_try" in
6880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6881 *) ac_try_echo=$ac_try;;
6882esac
6883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006885 ac_status=$?
6886 grep -v '^ *+' conftest.er1 >conftest.err
6887 rm -f conftest.er1
6888 cat conftest.err >&5
6889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006890 (exit $ac_status); } && {
6891 test -z "$ac_c_werror_flag" ||
6892 test ! -s conftest.err
6893 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006894 ac_cv_type_ssize_t=yes
6895else
6896 echo "$as_me: failed program was:" >&5
6897sed 's/^/| /' conftest.$ac_ext >&5
6898
Martin v. Löwiseba40652007-08-30 20:10:57 +00006899 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006901
6902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006904{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6905echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006906if test $ac_cv_type_ssize_t = yes; then
6907
6908cat >>confdefs.h <<\_ACEOF
6909#define HAVE_SSIZE_T 1
6910_ACEOF
6911
6912fi
6913
Jack Jansendd19cf82001-12-06 22:36:17 +00006914
Michael W. Hudson54241132001-12-07 15:38:26 +00006915# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006916# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006917{ echo "$as_me:$LINENO: checking for int" >&5
6918echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006919if test "${ac_cv_type_int+set}" = set; then
6920 echo $ECHO_N "(cached) $ECHO_C" >&6
6921else
6922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006923/* confdefs.h. */
6924_ACEOF
6925cat confdefs.h >>conftest.$ac_ext
6926cat >>conftest.$ac_ext <<_ACEOF
6927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006928$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006929typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006930int
6931main ()
6932{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006933if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006934 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006935if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006936 return 0;
6937 ;
6938 return 0;
6939}
6940_ACEOF
6941rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006942if { (ac_try="$ac_compile"
6943case "(($ac_try" in
6944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6945 *) ac_try_echo=$ac_try;;
6946esac
6947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006950 grep -v '^ *+' conftest.er1 >conftest.err
6951 rm -f conftest.er1
6952 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006954 (exit $ac_status); } && {
6955 test -z "$ac_c_werror_flag" ||
6956 test ! -s conftest.err
6957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 ac_cv_type_int=yes
6959else
6960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006961sed 's/^/| /' conftest.$ac_ext >&5
6962
Martin v. Löwiseba40652007-08-30 20:10:57 +00006963 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006964fi
Brett Cannon19fab762007-06-02 03:02:29 +00006965
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6967fi
6968{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6969echo "${ECHO_T}$ac_cv_type_int" >&6; }
6970
6971# The cast to long int works around a bug in the HP C Compiler
6972# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6973# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6974# This bug is HP SR number 8606223364.
6975{ echo "$as_me:$LINENO: checking size of int" >&5
6976echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006977if test "${ac_cv_sizeof_int+set}" = set; then
6978 echo $ECHO_N "(cached) $ECHO_C" >&6
6979else
Martin v. Löwis11437992002-04-12 09:54:03 +00006980 if test "$cross_compiling" = yes; then
6981 # Depending upon the size, compute the lo and hi bounds.
6982cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006983/* confdefs.h. */
6984_ACEOF
6985cat confdefs.h >>conftest.$ac_ext
6986cat >>conftest.$ac_ext <<_ACEOF
6987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006988$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006989 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006990int
6991main ()
6992{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006993static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006994test_array [0] = 0
6995
6996 ;
6997 return 0;
6998}
6999_ACEOF
7000rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007001if { (ac_try="$ac_compile"
7002case "(($ac_try" in
7003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7004 *) ac_try_echo=$ac_try;;
7005esac
7006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7007 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007009 grep -v '^ *+' conftest.er1 >conftest.err
7010 rm -f conftest.er1
7011 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007013 (exit $ac_status); } && {
7014 test -z "$ac_c_werror_flag" ||
7015 test ! -s conftest.err
7016 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007017 ac_lo=0 ac_mid=0
7018 while :; do
7019 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007020/* confdefs.h. */
7021_ACEOF
7022cat confdefs.h >>conftest.$ac_ext
7023cat >>conftest.$ac_ext <<_ACEOF
7024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007025$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007026 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007027int
7028main ()
7029{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007030static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007031test_array [0] = 0
7032
7033 ;
7034 return 0;
7035}
7036_ACEOF
7037rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007038if { (ac_try="$ac_compile"
7039case "(($ac_try" in
7040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7041 *) ac_try_echo=$ac_try;;
7042esac
7043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007046 grep -v '^ *+' conftest.er1 >conftest.err
7047 rm -f conftest.er1
7048 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007050 (exit $ac_status); } && {
7051 test -z "$ac_c_werror_flag" ||
7052 test ! -s conftest.err
7053 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007054 ac_hi=$ac_mid; break
7055else
7056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007057sed 's/^/| /' conftest.$ac_ext >&5
7058
Martin v. Löwiseba40652007-08-30 20:10:57 +00007059 ac_lo=`expr $ac_mid + 1`
7060 if test $ac_lo -le $ac_mid; then
7061 ac_lo= ac_hi=
7062 break
7063 fi
7064 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007066
7067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007068 done
7069else
7070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007071sed 's/^/| /' conftest.$ac_ext >&5
7072
Martin v. Löwiseba40652007-08-30 20:10:57 +00007073 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007074/* confdefs.h. */
7075_ACEOF
7076cat confdefs.h >>conftest.$ac_ext
7077cat >>conftest.$ac_ext <<_ACEOF
7078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007079$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007080 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007081int
7082main ()
7083{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007084static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007085test_array [0] = 0
7086
7087 ;
7088 return 0;
7089}
7090_ACEOF
7091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007092if { (ac_try="$ac_compile"
7093case "(($ac_try" in
7094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7095 *) ac_try_echo=$ac_try;;
7096esac
7097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007099 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007100 grep -v '^ *+' conftest.er1 >conftest.err
7101 rm -f conftest.er1
7102 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007104 (exit $ac_status); } && {
7105 test -z "$ac_c_werror_flag" ||
7106 test ! -s conftest.err
7107 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007108 ac_hi=-1 ac_mid=-1
7109 while :; do
7110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007111/* confdefs.h. */
7112_ACEOF
7113cat confdefs.h >>conftest.$ac_ext
7114cat >>conftest.$ac_ext <<_ACEOF
7115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007116$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007117 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007118int
7119main ()
7120{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007121static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007122test_array [0] = 0
7123
7124 ;
7125 return 0;
7126}
7127_ACEOF
7128rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007129if { (ac_try="$ac_compile"
7130case "(($ac_try" in
7131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7132 *) ac_try_echo=$ac_try;;
7133esac
7134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007137 grep -v '^ *+' conftest.er1 >conftest.err
7138 rm -f conftest.er1
7139 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007141 (exit $ac_status); } && {
7142 test -z "$ac_c_werror_flag" ||
7143 test ! -s conftest.err
7144 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007145 ac_lo=$ac_mid; break
7146else
7147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007148sed 's/^/| /' conftest.$ac_ext >&5
7149
Martin v. Löwiseba40652007-08-30 20:10:57 +00007150 ac_hi=`expr '(' $ac_mid ')' - 1`
7151 if test $ac_mid -le $ac_hi; then
7152 ac_lo= ac_hi=
7153 break
7154 fi
7155 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007157
7158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007159 done
7160else
7161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007162sed 's/^/| /' conftest.$ac_ext >&5
7163
Martin v. Löwiseba40652007-08-30 20:10:57 +00007164 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007166
7167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007169
7170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007171# Binary search between lo and hi bounds.
7172while test "x$ac_lo" != "x$ac_hi"; do
7173 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007175/* confdefs.h. */
7176_ACEOF
7177cat confdefs.h >>conftest.$ac_ext
7178cat >>conftest.$ac_ext <<_ACEOF
7179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007180$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007181 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007182int
7183main ()
7184{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007185static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007186test_array [0] = 0
7187
7188 ;
7189 return 0;
7190}
7191_ACEOF
7192rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007193if { (ac_try="$ac_compile"
7194case "(($ac_try" in
7195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7196 *) ac_try_echo=$ac_try;;
7197esac
7198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007201 grep -v '^ *+' conftest.er1 >conftest.err
7202 rm -f conftest.er1
7203 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007205 (exit $ac_status); } && {
7206 test -z "$ac_c_werror_flag" ||
7207 test ! -s conftest.err
7208 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007209 ac_hi=$ac_mid
7210else
7211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007212sed 's/^/| /' conftest.$ac_ext >&5
7213
Martin v. Löwiseba40652007-08-30 20:10:57 +00007214 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007216
7217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007218done
7219case $ac_lo in
7220?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007221'') if test "$ac_cv_type_int" = yes; then
7222 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007223See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007224echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007225See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007226 { (exit 77); exit 77; }; }
7227 else
7228 ac_cv_sizeof_int=0
7229 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007230esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007231else
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007233/* confdefs.h. */
7234_ACEOF
7235cat confdefs.h >>conftest.$ac_ext
7236cat >>conftest.$ac_ext <<_ACEOF
7237/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007238$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007239 typedef int ac__type_sizeof_;
7240static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7241static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007242#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007243#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007244int
7245main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007246{
Martin v. Löwis11437992002-04-12 09:54:03 +00007247
7248 FILE *f = fopen ("conftest.val", "w");
7249 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007250 return 1;
7251 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007252 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007253 long int i = longval ();
7254 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7255 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007256 fprintf (f, "%ld\n", i);
7257 }
7258 else
7259 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007260 unsigned long int i = ulongval ();
7261 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7262 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007263 fprintf (f, "%lu\n", i);
7264 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007265 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007266
7267 ;
7268 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007269}
Martin v. Löwis11437992002-04-12 09:54:03 +00007270_ACEOF
7271rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007272if { (ac_try="$ac_link"
7273case "(($ac_try" in
7274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7275 *) ac_try_echo=$ac_try;;
7276esac
7277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7278 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007279 ac_status=$?
7280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7281 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007282 { (case "(($ac_try" in
7283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7284 *) ac_try_echo=$ac_try;;
7285esac
7286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7287 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007288 ac_status=$?
7289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7290 (exit $ac_status); }; }; then
7291 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007292else
Martin v. Löwis11437992002-04-12 09:54:03 +00007293 echo "$as_me: program exited with status $ac_status" >&5
7294echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007295sed 's/^/| /' conftest.$ac_ext >&5
7296
Martin v. Löwis11437992002-04-12 09:54:03 +00007297( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007298if test "$ac_cv_type_int" = yes; then
7299 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007300See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007301echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007302See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007303 { (exit 77); exit 77; }; }
7304 else
7305 ac_cv_sizeof_int=0
7306 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007308rm -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 +00007309fi
7310rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007312{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7313echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7314
7315
7316
Martin v. Löwis11437992002-04-12 09:54:03 +00007317cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007318#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007319_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007320
7321
Martin v. Löwiseba40652007-08-30 20:10:57 +00007322{ echo "$as_me:$LINENO: checking for long" >&5
7323echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007324if test "${ac_cv_type_long+set}" = set; then
7325 echo $ECHO_N "(cached) $ECHO_C" >&6
7326else
7327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007328/* confdefs.h. */
7329_ACEOF
7330cat confdefs.h >>conftest.$ac_ext
7331cat >>conftest.$ac_ext <<_ACEOF
7332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007333$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007334typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007335int
7336main ()
7337{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007338if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007339 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007340if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007341 return 0;
7342 ;
7343 return 0;
7344}
7345_ACEOF
7346rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007347if { (ac_try="$ac_compile"
7348case "(($ac_try" in
7349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7350 *) ac_try_echo=$ac_try;;
7351esac
7352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007355 grep -v '^ *+' conftest.er1 >conftest.err
7356 rm -f conftest.er1
7357 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007359 (exit $ac_status); } && {
7360 test -z "$ac_c_werror_flag" ||
7361 test ! -s conftest.err
7362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007363 ac_cv_type_long=yes
7364else
7365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007366sed 's/^/| /' conftest.$ac_ext >&5
7367
Martin v. Löwiseba40652007-08-30 20:10:57 +00007368 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007369fi
Brett Cannon19fab762007-06-02 03:02:29 +00007370
Martin v. Löwiseba40652007-08-30 20:10:57 +00007371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7372fi
7373{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7374echo "${ECHO_T}$ac_cv_type_long" >&6; }
7375
7376# The cast to long int works around a bug in the HP C Compiler
7377# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7378# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7379# This bug is HP SR number 8606223364.
7380{ echo "$as_me:$LINENO: checking size of long" >&5
7381echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007382if test "${ac_cv_sizeof_long+set}" = set; then
7383 echo $ECHO_N "(cached) $ECHO_C" >&6
7384else
Martin v. Löwis11437992002-04-12 09:54:03 +00007385 if test "$cross_compiling" = yes; then
7386 # Depending upon the size, compute the lo and hi bounds.
7387cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007388/* confdefs.h. */
7389_ACEOF
7390cat confdefs.h >>conftest.$ac_ext
7391cat >>conftest.$ac_ext <<_ACEOF
7392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007393$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007394 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007395int
7396main ()
7397{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007398static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007399test_array [0] = 0
7400
7401 ;
7402 return 0;
7403}
7404_ACEOF
7405rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007406if { (ac_try="$ac_compile"
7407case "(($ac_try" in
7408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7409 *) ac_try_echo=$ac_try;;
7410esac
7411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7412 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007414 grep -v '^ *+' conftest.er1 >conftest.err
7415 rm -f conftest.er1
7416 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007418 (exit $ac_status); } && {
7419 test -z "$ac_c_werror_flag" ||
7420 test ! -s conftest.err
7421 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 ac_lo=0 ac_mid=0
7423 while :; do
7424 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007425/* confdefs.h. */
7426_ACEOF
7427cat confdefs.h >>conftest.$ac_ext
7428cat >>conftest.$ac_ext <<_ACEOF
7429/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007430$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007431 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007432int
7433main ()
7434{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007435static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007436test_array [0] = 0
7437
7438 ;
7439 return 0;
7440}
7441_ACEOF
7442rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007443if { (ac_try="$ac_compile"
7444case "(($ac_try" in
7445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7446 *) ac_try_echo=$ac_try;;
7447esac
7448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7449 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007451 grep -v '^ *+' conftest.er1 >conftest.err
7452 rm -f conftest.er1
7453 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007455 (exit $ac_status); } && {
7456 test -z "$ac_c_werror_flag" ||
7457 test ! -s conftest.err
7458 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007459 ac_hi=$ac_mid; break
7460else
7461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007462sed 's/^/| /' conftest.$ac_ext >&5
7463
Martin v. Löwiseba40652007-08-30 20:10:57 +00007464 ac_lo=`expr $ac_mid + 1`
7465 if test $ac_lo -le $ac_mid; then
7466 ac_lo= ac_hi=
7467 break
7468 fi
7469 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007471
7472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007473 done
7474else
7475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007476sed 's/^/| /' conftest.$ac_ext >&5
7477
Martin v. Löwiseba40652007-08-30 20:10:57 +00007478 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007479/* confdefs.h. */
7480_ACEOF
7481cat confdefs.h >>conftest.$ac_ext
7482cat >>conftest.$ac_ext <<_ACEOF
7483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007484$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007485 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007486int
7487main ()
7488{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007489static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007490test_array [0] = 0
7491
7492 ;
7493 return 0;
7494}
7495_ACEOF
7496rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007497if { (ac_try="$ac_compile"
7498case "(($ac_try" in
7499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7500 *) ac_try_echo=$ac_try;;
7501esac
7502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7503 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007505 grep -v '^ *+' conftest.er1 >conftest.err
7506 rm -f conftest.er1
7507 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007509 (exit $ac_status); } && {
7510 test -z "$ac_c_werror_flag" ||
7511 test ! -s conftest.err
7512 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007513 ac_hi=-1 ac_mid=-1
7514 while :; do
7515 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007516/* confdefs.h. */
7517_ACEOF
7518cat confdefs.h >>conftest.$ac_ext
7519cat >>conftest.$ac_ext <<_ACEOF
7520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007521$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007522 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007523int
7524main ()
7525{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007526static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007527test_array [0] = 0
7528
7529 ;
7530 return 0;
7531}
7532_ACEOF
7533rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007534if { (ac_try="$ac_compile"
7535case "(($ac_try" in
7536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7537 *) ac_try_echo=$ac_try;;
7538esac
7539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7540 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007542 grep -v '^ *+' conftest.er1 >conftest.err
7543 rm -f conftest.er1
7544 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007546 (exit $ac_status); } && {
7547 test -z "$ac_c_werror_flag" ||
7548 test ! -s conftest.err
7549 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007550 ac_lo=$ac_mid; break
7551else
7552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007553sed 's/^/| /' conftest.$ac_ext >&5
7554
Martin v. Löwiseba40652007-08-30 20:10:57 +00007555 ac_hi=`expr '(' $ac_mid ')' - 1`
7556 if test $ac_mid -le $ac_hi; then
7557 ac_lo= ac_hi=
7558 break
7559 fi
7560 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007562
7563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007564 done
7565else
7566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007567sed 's/^/| /' conftest.$ac_ext >&5
7568
Martin v. Löwiseba40652007-08-30 20:10:57 +00007569 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007571
7572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007573fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007574
7575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007576# Binary search between lo and hi bounds.
7577while test "x$ac_lo" != "x$ac_hi"; do
7578 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007580/* confdefs.h. */
7581_ACEOF
7582cat confdefs.h >>conftest.$ac_ext
7583cat >>conftest.$ac_ext <<_ACEOF
7584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007585$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007586 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007587int
7588main ()
7589{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007590static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007591test_array [0] = 0
7592
7593 ;
7594 return 0;
7595}
7596_ACEOF
7597rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007598if { (ac_try="$ac_compile"
7599case "(($ac_try" in
7600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7601 *) ac_try_echo=$ac_try;;
7602esac
7603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7604 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007606 grep -v '^ *+' conftest.er1 >conftest.err
7607 rm -f conftest.er1
7608 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007610 (exit $ac_status); } && {
7611 test -z "$ac_c_werror_flag" ||
7612 test ! -s conftest.err
7613 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007614 ac_hi=$ac_mid
7615else
7616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007617sed 's/^/| /' conftest.$ac_ext >&5
7618
Martin v. Löwiseba40652007-08-30 20:10:57 +00007619 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007621
7622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007623done
7624case $ac_lo in
7625?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007626'') if test "$ac_cv_type_long" = yes; then
7627 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007628See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007629echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007630See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007631 { (exit 77); exit 77; }; }
7632 else
7633 ac_cv_sizeof_long=0
7634 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007635esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007636else
Martin v. Löwis11437992002-04-12 09:54:03 +00007637 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007638/* confdefs.h. */
7639_ACEOF
7640cat confdefs.h >>conftest.$ac_ext
7641cat >>conftest.$ac_ext <<_ACEOF
7642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007643$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007644 typedef long ac__type_sizeof_;
7645static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7646static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007647#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007648#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007649int
7650main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007651{
Martin v. Löwis11437992002-04-12 09:54:03 +00007652
7653 FILE *f = fopen ("conftest.val", "w");
7654 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007655 return 1;
7656 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007657 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007658 long int i = longval ();
7659 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7660 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007661 fprintf (f, "%ld\n", i);
7662 }
7663 else
7664 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007665 unsigned long int i = ulongval ();
7666 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7667 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007668 fprintf (f, "%lu\n", i);
7669 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007670 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007671
7672 ;
7673 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007674}
Martin v. Löwis11437992002-04-12 09:54:03 +00007675_ACEOF
7676rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007677if { (ac_try="$ac_link"
7678case "(($ac_try" in
7679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7680 *) ac_try_echo=$ac_try;;
7681esac
7682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7683 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007684 ac_status=$?
7685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7686 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007687 { (case "(($ac_try" in
7688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7689 *) ac_try_echo=$ac_try;;
7690esac
7691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7692 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 ac_status=$?
7694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7695 (exit $ac_status); }; }; then
7696 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007697else
Martin v. Löwis11437992002-04-12 09:54:03 +00007698 echo "$as_me: program exited with status $ac_status" >&5
7699echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007700sed 's/^/| /' conftest.$ac_ext >&5
7701
Martin v. Löwis11437992002-04-12 09:54:03 +00007702( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007703if test "$ac_cv_type_long" = yes; then
7704 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007705See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007706echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007707See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007708 { (exit 77); exit 77; }; }
7709 else
7710 ac_cv_sizeof_long=0
7711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007713rm -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 +00007714fi
7715rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007717{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7718echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7719
7720
7721
Martin v. Löwis11437992002-04-12 09:54:03 +00007722cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007723#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007724_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007725
7726
Martin v. Löwiseba40652007-08-30 20:10:57 +00007727{ echo "$as_me:$LINENO: checking for void *" >&5
7728echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007729if test "${ac_cv_type_void_p+set}" = set; then
7730 echo $ECHO_N "(cached) $ECHO_C" >&6
7731else
7732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007733/* confdefs.h. */
7734_ACEOF
7735cat confdefs.h >>conftest.$ac_ext
7736cat >>conftest.$ac_ext <<_ACEOF
7737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007738$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007740int
7741main ()
7742{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007743if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 return 0;
7747 ;
7748 return 0;
7749}
7750_ACEOF
7751rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007752if { (ac_try="$ac_compile"
7753case "(($ac_try" in
7754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7755 *) ac_try_echo=$ac_try;;
7756esac
7757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007760 grep -v '^ *+' conftest.er1 >conftest.err
7761 rm -f conftest.er1
7762 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007764 (exit $ac_status); } && {
7765 test -z "$ac_c_werror_flag" ||
7766 test ! -s conftest.err
7767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 ac_cv_type_void_p=yes
7769else
7770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007771sed 's/^/| /' conftest.$ac_ext >&5
7772
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007774fi
Brett Cannon19fab762007-06-02 03:02:29 +00007775
Martin v. Löwiseba40652007-08-30 20:10:57 +00007776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7777fi
7778{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7779echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7780
7781# The cast to long int works around a bug in the HP C Compiler
7782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7784# This bug is HP SR number 8606223364.
7785{ echo "$as_me:$LINENO: checking size of void *" >&5
7786echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007787if test "${ac_cv_sizeof_void_p+set}" = set; then
7788 echo $ECHO_N "(cached) $ECHO_C" >&6
7789else
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 if test "$cross_compiling" = yes; then
7791 # Depending upon the size, compute the lo and hi bounds.
7792cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007793/* confdefs.h. */
7794_ACEOF
7795cat confdefs.h >>conftest.$ac_ext
7796cat >>conftest.$ac_ext <<_ACEOF
7797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007798$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007799 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007800int
7801main ()
7802{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007803static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007804test_array [0] = 0
7805
7806 ;
7807 return 0;
7808}
7809_ACEOF
7810rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007811if { (ac_try="$ac_compile"
7812case "(($ac_try" in
7813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7814 *) ac_try_echo=$ac_try;;
7815esac
7816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7817 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007819 grep -v '^ *+' conftest.er1 >conftest.err
7820 rm -f conftest.er1
7821 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007823 (exit $ac_status); } && {
7824 test -z "$ac_c_werror_flag" ||
7825 test ! -s conftest.err
7826 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 ac_lo=0 ac_mid=0
7828 while :; do
7829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007830/* confdefs.h. */
7831_ACEOF
7832cat confdefs.h >>conftest.$ac_ext
7833cat >>conftest.$ac_ext <<_ACEOF
7834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007835$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007836 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007837int
7838main ()
7839{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007840static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007841test_array [0] = 0
7842
7843 ;
7844 return 0;
7845}
7846_ACEOF
7847rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007848if { (ac_try="$ac_compile"
7849case "(($ac_try" in
7850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7851 *) ac_try_echo=$ac_try;;
7852esac
7853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7854 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007856 grep -v '^ *+' conftest.er1 >conftest.err
7857 rm -f conftest.er1
7858 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860 (exit $ac_status); } && {
7861 test -z "$ac_c_werror_flag" ||
7862 test ! -s conftest.err
7863 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007864 ac_hi=$ac_mid; break
7865else
7866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007867sed 's/^/| /' conftest.$ac_ext >&5
7868
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869 ac_lo=`expr $ac_mid + 1`
7870 if test $ac_lo -le $ac_mid; then
7871 ac_lo= ac_hi=
7872 break
7873 fi
7874 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007876
7877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007878 done
7879else
7880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007881sed 's/^/| /' conftest.$ac_ext >&5
7882
Martin v. Löwiseba40652007-08-30 20:10:57 +00007883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007884/* confdefs.h. */
7885_ACEOF
7886cat confdefs.h >>conftest.$ac_ext
7887cat >>conftest.$ac_ext <<_ACEOF
7888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007889$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007890 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007891int
7892main ()
7893{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007894static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007895test_array [0] = 0
7896
7897 ;
7898 return 0;
7899}
7900_ACEOF
7901rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007902if { (ac_try="$ac_compile"
7903case "(($ac_try" in
7904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7905 *) ac_try_echo=$ac_try;;
7906esac
7907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7908 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007910 grep -v '^ *+' conftest.er1 >conftest.err
7911 rm -f conftest.er1
7912 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007914 (exit $ac_status); } && {
7915 test -z "$ac_c_werror_flag" ||
7916 test ! -s conftest.err
7917 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 ac_hi=-1 ac_mid=-1
7919 while :; do
7920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007921/* confdefs.h. */
7922_ACEOF
7923cat confdefs.h >>conftest.$ac_ext
7924cat >>conftest.$ac_ext <<_ACEOF
7925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007926$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007927 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007928int
7929main ()
7930{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007931static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007932test_array [0] = 0
7933
7934 ;
7935 return 0;
7936}
7937_ACEOF
7938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007939if { (ac_try="$ac_compile"
7940case "(($ac_try" in
7941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7942 *) ac_try_echo=$ac_try;;
7943esac
7944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007947 grep -v '^ *+' conftest.er1 >conftest.err
7948 rm -f conftest.er1
7949 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007951 (exit $ac_status); } && {
7952 test -z "$ac_c_werror_flag" ||
7953 test ! -s conftest.err
7954 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 ac_lo=$ac_mid; break
7956else
7957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007958sed 's/^/| /' conftest.$ac_ext >&5
7959
Martin v. Löwiseba40652007-08-30 20:10:57 +00007960 ac_hi=`expr '(' $ac_mid ')' - 1`
7961 if test $ac_mid -le $ac_hi; then
7962 ac_lo= ac_hi=
7963 break
7964 fi
7965 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007967
7968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007969 done
7970else
7971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007972sed 's/^/| /' conftest.$ac_ext >&5
7973
Martin v. Löwiseba40652007-08-30 20:10:57 +00007974 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007976
7977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007978fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007979
7980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007981# Binary search between lo and hi bounds.
7982while test "x$ac_lo" != "x$ac_hi"; do
7983 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007985/* confdefs.h. */
7986_ACEOF
7987cat confdefs.h >>conftest.$ac_ext
7988cat >>conftest.$ac_ext <<_ACEOF
7989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007990$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007991 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007992int
7993main ()
7994{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007995static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007996test_array [0] = 0
7997
7998 ;
7999 return 0;
8000}
8001_ACEOF
8002rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008003if { (ac_try="$ac_compile"
8004case "(($ac_try" in
8005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8006 *) ac_try_echo=$ac_try;;
8007esac
8008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8009 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008011 grep -v '^ *+' conftest.er1 >conftest.err
8012 rm -f conftest.er1
8013 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008015 (exit $ac_status); } && {
8016 test -z "$ac_c_werror_flag" ||
8017 test ! -s conftest.err
8018 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008019 ac_hi=$ac_mid
8020else
8021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008022sed 's/^/| /' conftest.$ac_ext >&5
8023
Martin v. Löwiseba40652007-08-30 20:10:57 +00008024 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008026
8027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008028done
8029case $ac_lo in
8030?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008031'') if test "$ac_cv_type_void_p" = yes; then
8032 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008033See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008034echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008035See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008036 { (exit 77); exit 77; }; }
8037 else
8038 ac_cv_sizeof_void_p=0
8039 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008040esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008041else
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008043/* confdefs.h. */
8044_ACEOF
8045cat confdefs.h >>conftest.$ac_ext
8046cat >>conftest.$ac_ext <<_ACEOF
8047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008048$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008049 typedef void * ac__type_sizeof_;
8050static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8051static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008052#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008053#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008054int
8055main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008056{
Martin v. Löwis11437992002-04-12 09:54:03 +00008057
8058 FILE *f = fopen ("conftest.val", "w");
8059 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060 return 1;
8061 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008062 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008063 long int i = longval ();
8064 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8065 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008066 fprintf (f, "%ld\n", i);
8067 }
8068 else
8069 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008070 unsigned long int i = ulongval ();
8071 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8072 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008073 fprintf (f, "%lu\n", i);
8074 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008075 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008076
8077 ;
8078 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008079}
Martin v. Löwis11437992002-04-12 09:54:03 +00008080_ACEOF
8081rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008082if { (ac_try="$ac_link"
8083case "(($ac_try" in
8084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8085 *) ac_try_echo=$ac_try;;
8086esac
8087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8088 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008089 ac_status=$?
8090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8091 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008092 { (case "(($ac_try" in
8093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8094 *) ac_try_echo=$ac_try;;
8095esac
8096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8097 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 ac_status=$?
8099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8100 (exit $ac_status); }; }; then
8101 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008102else
Martin v. Löwis11437992002-04-12 09:54:03 +00008103 echo "$as_me: program exited with status $ac_status" >&5
8104echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008105sed 's/^/| /' conftest.$ac_ext >&5
8106
Martin v. Löwis11437992002-04-12 09:54:03 +00008107( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008108if test "$ac_cv_type_void_p" = yes; then
8109 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008110See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008111echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008112See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008113 { (exit 77); exit 77; }; }
8114 else
8115 ac_cv_sizeof_void_p=0
8116 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118rm -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 +00008119fi
8120rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008122{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8123echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8124
8125
8126
Martin v. Löwis11437992002-04-12 09:54:03 +00008127cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008128#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008129_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008130
8131
Martin v. Löwiseba40652007-08-30 20:10:57 +00008132{ echo "$as_me:$LINENO: checking for short" >&5
8133echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008134if test "${ac_cv_type_short+set}" = set; then
8135 echo $ECHO_N "(cached) $ECHO_C" >&6
8136else
8137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008138/* confdefs.h. */
8139_ACEOF
8140cat confdefs.h >>conftest.$ac_ext
8141cat >>conftest.$ac_ext <<_ACEOF
8142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008143$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008144typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008145int
8146main ()
8147{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008148if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008149 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 return 0;
8152 ;
8153 return 0;
8154}
8155_ACEOF
8156rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008157if { (ac_try="$ac_compile"
8158case "(($ac_try" in
8159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8160 *) ac_try_echo=$ac_try;;
8161esac
8162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008165 grep -v '^ *+' conftest.er1 >conftest.err
8166 rm -f conftest.er1
8167 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008169 (exit $ac_status); } && {
8170 test -z "$ac_c_werror_flag" ||
8171 test ! -s conftest.err
8172 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 ac_cv_type_short=yes
8174else
8175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008176sed 's/^/| /' conftest.$ac_ext >&5
8177
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008179fi
Brett Cannon19fab762007-06-02 03:02:29 +00008180
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8182fi
8183{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8184echo "${ECHO_T}$ac_cv_type_short" >&6; }
8185
8186# The cast to long int works around a bug in the HP C Compiler
8187# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8188# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8189# This bug is HP SR number 8606223364.
8190{ echo "$as_me:$LINENO: checking size of short" >&5
8191echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008192if test "${ac_cv_sizeof_short+set}" = set; then
8193 echo $ECHO_N "(cached) $ECHO_C" >&6
8194else
Martin v. Löwis11437992002-04-12 09:54:03 +00008195 if test "$cross_compiling" = yes; then
8196 # Depending upon the size, compute the lo and hi bounds.
8197cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008198/* confdefs.h. */
8199_ACEOF
8200cat confdefs.h >>conftest.$ac_ext
8201cat >>conftest.$ac_ext <<_ACEOF
8202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008203$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008204 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008205int
8206main ()
8207{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008208static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008209test_array [0] = 0
8210
8211 ;
8212 return 0;
8213}
8214_ACEOF
8215rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008216if { (ac_try="$ac_compile"
8217case "(($ac_try" in
8218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8219 *) ac_try_echo=$ac_try;;
8220esac
8221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8222 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008224 grep -v '^ *+' conftest.er1 >conftest.err
8225 rm -f conftest.er1
8226 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008228 (exit $ac_status); } && {
8229 test -z "$ac_c_werror_flag" ||
8230 test ! -s conftest.err
8231 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 ac_lo=0 ac_mid=0
8233 while :; do
8234 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008235/* confdefs.h. */
8236_ACEOF
8237cat confdefs.h >>conftest.$ac_ext
8238cat >>conftest.$ac_ext <<_ACEOF
8239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008240$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008241 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008242int
8243main ()
8244{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008245static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008246test_array [0] = 0
8247
8248 ;
8249 return 0;
8250}
8251_ACEOF
8252rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008253if { (ac_try="$ac_compile"
8254case "(($ac_try" in
8255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8256 *) ac_try_echo=$ac_try;;
8257esac
8258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008261 grep -v '^ *+' conftest.er1 >conftest.err
8262 rm -f conftest.er1
8263 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265 (exit $ac_status); } && {
8266 test -z "$ac_c_werror_flag" ||
8267 test ! -s conftest.err
8268 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008269 ac_hi=$ac_mid; break
8270else
8271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008272sed 's/^/| /' conftest.$ac_ext >&5
8273
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274 ac_lo=`expr $ac_mid + 1`
8275 if test $ac_lo -le $ac_mid; then
8276 ac_lo= ac_hi=
8277 break
8278 fi
8279 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008281
8282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008283 done
8284else
8285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008286sed 's/^/| /' conftest.$ac_ext >&5
8287
Martin v. Löwiseba40652007-08-30 20:10:57 +00008288 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008289/* confdefs.h. */
8290_ACEOF
8291cat confdefs.h >>conftest.$ac_ext
8292cat >>conftest.$ac_ext <<_ACEOF
8293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008294$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008295 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008296int
8297main ()
8298{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008299static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008300test_array [0] = 0
8301
8302 ;
8303 return 0;
8304}
8305_ACEOF
8306rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008307if { (ac_try="$ac_compile"
8308case "(($ac_try" in
8309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8310 *) ac_try_echo=$ac_try;;
8311esac
8312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8313 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008315 grep -v '^ *+' conftest.er1 >conftest.err
8316 rm -f conftest.er1
8317 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008319 (exit $ac_status); } && {
8320 test -z "$ac_c_werror_flag" ||
8321 test ! -s conftest.err
8322 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 ac_hi=-1 ac_mid=-1
8324 while :; do
8325 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008326/* confdefs.h. */
8327_ACEOF
8328cat confdefs.h >>conftest.$ac_ext
8329cat >>conftest.$ac_ext <<_ACEOF
8330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008331$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008332 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008333int
8334main ()
8335{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008336static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008337test_array [0] = 0
8338
8339 ;
8340 return 0;
8341}
8342_ACEOF
8343rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008344if { (ac_try="$ac_compile"
8345case "(($ac_try" in
8346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8347 *) ac_try_echo=$ac_try;;
8348esac
8349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008352 grep -v '^ *+' conftest.er1 >conftest.err
8353 rm -f conftest.er1
8354 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008356 (exit $ac_status); } && {
8357 test -z "$ac_c_werror_flag" ||
8358 test ! -s conftest.err
8359 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008360 ac_lo=$ac_mid; break
8361else
8362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008363sed 's/^/| /' conftest.$ac_ext >&5
8364
Martin v. Löwiseba40652007-08-30 20:10:57 +00008365 ac_hi=`expr '(' $ac_mid ')' - 1`
8366 if test $ac_mid -le $ac_hi; then
8367 ac_lo= ac_hi=
8368 break
8369 fi
8370 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008372
8373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008374 done
8375else
8376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008377sed 's/^/| /' conftest.$ac_ext >&5
8378
Martin v. Löwiseba40652007-08-30 20:10:57 +00008379 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008381
8382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008384
8385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008386# Binary search between lo and hi bounds.
8387while test "x$ac_lo" != "x$ac_hi"; do
8388 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8389 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008390/* confdefs.h. */
8391_ACEOF
8392cat confdefs.h >>conftest.$ac_ext
8393cat >>conftest.$ac_ext <<_ACEOF
8394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008395$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008396 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008397int
8398main ()
8399{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008400static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008401test_array [0] = 0
8402
8403 ;
8404 return 0;
8405}
8406_ACEOF
8407rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008408if { (ac_try="$ac_compile"
8409case "(($ac_try" in
8410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8411 *) ac_try_echo=$ac_try;;
8412esac
8413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008416 grep -v '^ *+' conftest.er1 >conftest.err
8417 rm -f conftest.er1
8418 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008420 (exit $ac_status); } && {
8421 test -z "$ac_c_werror_flag" ||
8422 test ! -s conftest.err
8423 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008424 ac_hi=$ac_mid
8425else
8426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008427sed 's/^/| /' conftest.$ac_ext >&5
8428
Martin v. Löwiseba40652007-08-30 20:10:57 +00008429 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008431
8432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008433done
8434case $ac_lo in
8435?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008436'') if test "$ac_cv_type_short" = yes; then
8437 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008438See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008439echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008440See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008441 { (exit 77); exit 77; }; }
8442 else
8443 ac_cv_sizeof_short=0
8444 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008445esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008446else
Martin v. Löwis11437992002-04-12 09:54:03 +00008447 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008448/* confdefs.h. */
8449_ACEOF
8450cat confdefs.h >>conftest.$ac_ext
8451cat >>conftest.$ac_ext <<_ACEOF
8452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008453$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008454 typedef short ac__type_sizeof_;
8455static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8456static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008457#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008458#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008459int
8460main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008461{
Martin v. Löwis11437992002-04-12 09:54:03 +00008462
8463 FILE *f = fopen ("conftest.val", "w");
8464 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008465 return 1;
8466 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008468 long int i = longval ();
8469 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8470 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 fprintf (f, "%ld\n", i);
8472 }
8473 else
8474 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008475 unsigned long int i = ulongval ();
8476 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8477 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 fprintf (f, "%lu\n", i);
8479 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008481
8482 ;
8483 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008484}
Martin v. Löwis11437992002-04-12 09:54:03 +00008485_ACEOF
8486rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008487if { (ac_try="$ac_link"
8488case "(($ac_try" in
8489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8490 *) ac_try_echo=$ac_try;;
8491esac
8492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8493 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008494 ac_status=$?
8495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008497 { (case "(($ac_try" in
8498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8499 *) ac_try_echo=$ac_try;;
8500esac
8501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8502 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 ac_status=$?
8504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8505 (exit $ac_status); }; }; then
8506 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008507else
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 echo "$as_me: program exited with status $ac_status" >&5
8509echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008510sed 's/^/| /' conftest.$ac_ext >&5
8511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008513if test "$ac_cv_type_short" = yes; then
8514 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008515See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008516echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008517See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008518 { (exit 77); exit 77; }; }
8519 else
8520 ac_cv_sizeof_short=0
8521 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008523rm -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 +00008524fi
8525rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008527{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8528echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8529
8530
8531
Martin v. Löwis11437992002-04-12 09:54:03 +00008532cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008533#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008534_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008535
8536
Martin v. Löwiseba40652007-08-30 20:10:57 +00008537{ echo "$as_me:$LINENO: checking for float" >&5
8538echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008539if test "${ac_cv_type_float+set}" = set; then
8540 echo $ECHO_N "(cached) $ECHO_C" >&6
8541else
8542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008543/* confdefs.h. */
8544_ACEOF
8545cat confdefs.h >>conftest.$ac_ext
8546cat >>conftest.$ac_ext <<_ACEOF
8547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008548$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008549typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008550int
8551main ()
8552{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008553if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008555if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008556 return 0;
8557 ;
8558 return 0;
8559}
8560_ACEOF
8561rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008562if { (ac_try="$ac_compile"
8563case "(($ac_try" in
8564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8565 *) ac_try_echo=$ac_try;;
8566esac
8567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008570 grep -v '^ *+' conftest.er1 >conftest.err
8571 rm -f conftest.er1
8572 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008574 (exit $ac_status); } && {
8575 test -z "$ac_c_werror_flag" ||
8576 test ! -s conftest.err
8577 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 ac_cv_type_float=yes
8579else
8580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008581sed 's/^/| /' conftest.$ac_ext >&5
8582
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008584fi
Brett Cannon19fab762007-06-02 03:02:29 +00008585
Martin v. Löwiseba40652007-08-30 20:10:57 +00008586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8587fi
8588{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8589echo "${ECHO_T}$ac_cv_type_float" >&6; }
8590
8591# The cast to long int works around a bug in the HP C Compiler
8592# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8593# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8594# This bug is HP SR number 8606223364.
8595{ echo "$as_me:$LINENO: checking size of float" >&5
8596echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008597if test "${ac_cv_sizeof_float+set}" = set; then
8598 echo $ECHO_N "(cached) $ECHO_C" >&6
8599else
Martin v. Löwis11437992002-04-12 09:54:03 +00008600 if test "$cross_compiling" = yes; then
8601 # Depending upon the size, compute the lo and hi bounds.
8602cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008603/* confdefs.h. */
8604_ACEOF
8605cat confdefs.h >>conftest.$ac_ext
8606cat >>conftest.$ac_ext <<_ACEOF
8607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008608$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008609 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008610int
8611main ()
8612{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008613static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008614test_array [0] = 0
8615
8616 ;
8617 return 0;
8618}
8619_ACEOF
8620rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008621if { (ac_try="$ac_compile"
8622case "(($ac_try" in
8623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8624 *) ac_try_echo=$ac_try;;
8625esac
8626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8627 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008629 grep -v '^ *+' conftest.er1 >conftest.err
8630 rm -f conftest.er1
8631 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008633 (exit $ac_status); } && {
8634 test -z "$ac_c_werror_flag" ||
8635 test ! -s conftest.err
8636 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 ac_lo=0 ac_mid=0
8638 while :; do
8639 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008640/* confdefs.h. */
8641_ACEOF
8642cat confdefs.h >>conftest.$ac_ext
8643cat >>conftest.$ac_ext <<_ACEOF
8644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008645$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008646 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008647int
8648main ()
8649{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008650static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008651test_array [0] = 0
8652
8653 ;
8654 return 0;
8655}
8656_ACEOF
8657rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008658if { (ac_try="$ac_compile"
8659case "(($ac_try" in
8660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8661 *) ac_try_echo=$ac_try;;
8662esac
8663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8664 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008666 grep -v '^ *+' conftest.er1 >conftest.err
8667 rm -f conftest.er1
8668 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670 (exit $ac_status); } && {
8671 test -z "$ac_c_werror_flag" ||
8672 test ! -s conftest.err
8673 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 ac_hi=$ac_mid; break
8675else
8676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008677sed 's/^/| /' conftest.$ac_ext >&5
8678
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679 ac_lo=`expr $ac_mid + 1`
8680 if test $ac_lo -le $ac_mid; then
8681 ac_lo= ac_hi=
8682 break
8683 fi
8684 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008686
8687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008688 done
8689else
8690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008691sed 's/^/| /' conftest.$ac_ext >&5
8692
Martin v. Löwiseba40652007-08-30 20:10:57 +00008693 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008694/* confdefs.h. */
8695_ACEOF
8696cat confdefs.h >>conftest.$ac_ext
8697cat >>conftest.$ac_ext <<_ACEOF
8698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008699$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008700 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008701int
8702main ()
8703{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008704static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008705test_array [0] = 0
8706
8707 ;
8708 return 0;
8709}
8710_ACEOF
8711rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008712if { (ac_try="$ac_compile"
8713case "(($ac_try" in
8714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8715 *) ac_try_echo=$ac_try;;
8716esac
8717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8718 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008720 grep -v '^ *+' conftest.er1 >conftest.err
8721 rm -f conftest.er1
8722 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008724 (exit $ac_status); } && {
8725 test -z "$ac_c_werror_flag" ||
8726 test ! -s conftest.err
8727 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 ac_hi=-1 ac_mid=-1
8729 while :; do
8730 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008731/* confdefs.h. */
8732_ACEOF
8733cat confdefs.h >>conftest.$ac_ext
8734cat >>conftest.$ac_ext <<_ACEOF
8735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008736$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008737 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008738int
8739main ()
8740{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008741static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008742test_array [0] = 0
8743
8744 ;
8745 return 0;
8746}
8747_ACEOF
8748rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008749if { (ac_try="$ac_compile"
8750case "(($ac_try" in
8751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8752 *) ac_try_echo=$ac_try;;
8753esac
8754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8755 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008757 grep -v '^ *+' conftest.er1 >conftest.err
8758 rm -f conftest.er1
8759 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008761 (exit $ac_status); } && {
8762 test -z "$ac_c_werror_flag" ||
8763 test ! -s conftest.err
8764 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ac_lo=$ac_mid; break
8766else
8767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008768sed 's/^/| /' conftest.$ac_ext >&5
8769
Martin v. Löwiseba40652007-08-30 20:10:57 +00008770 ac_hi=`expr '(' $ac_mid ')' - 1`
8771 if test $ac_mid -le $ac_hi; then
8772 ac_lo= ac_hi=
8773 break
8774 fi
8775 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008777
8778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008779 done
8780else
8781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008782sed 's/^/| /' conftest.$ac_ext >&5
8783
Martin v. Löwiseba40652007-08-30 20:10:57 +00008784 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008786
8787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008789
8790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008791# Binary search between lo and hi bounds.
8792while test "x$ac_lo" != "x$ac_hi"; do
8793 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008795/* confdefs.h. */
8796_ACEOF
8797cat confdefs.h >>conftest.$ac_ext
8798cat >>conftest.$ac_ext <<_ACEOF
8799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008800$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008801 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008802int
8803main ()
8804{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008805static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008806test_array [0] = 0
8807
8808 ;
8809 return 0;
8810}
8811_ACEOF
8812rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008813if { (ac_try="$ac_compile"
8814case "(($ac_try" in
8815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8816 *) ac_try_echo=$ac_try;;
8817esac
8818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8819 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008821 grep -v '^ *+' conftest.er1 >conftest.err
8822 rm -f conftest.er1
8823 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008825 (exit $ac_status); } && {
8826 test -z "$ac_c_werror_flag" ||
8827 test ! -s conftest.err
8828 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 ac_hi=$ac_mid
8830else
8831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008832sed 's/^/| /' conftest.$ac_ext >&5
8833
Martin v. Löwiseba40652007-08-30 20:10:57 +00008834 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008836
8837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008838done
8839case $ac_lo in
8840?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008841'') if test "$ac_cv_type_float" = yes; then
8842 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008843See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008844echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008845See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008846 { (exit 77); exit 77; }; }
8847 else
8848 ac_cv_sizeof_float=0
8849 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008850esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008851else
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008853/* confdefs.h. */
8854_ACEOF
8855cat confdefs.h >>conftest.$ac_ext
8856cat >>conftest.$ac_ext <<_ACEOF
8857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008858$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008859 typedef float ac__type_sizeof_;
8860static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8861static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008862#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008863#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008864int
8865main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008866{
Martin v. Löwis11437992002-04-12 09:54:03 +00008867
8868 FILE *f = fopen ("conftest.val", "w");
8869 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870 return 1;
8871 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008872 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008873 long int i = longval ();
8874 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8875 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 fprintf (f, "%ld\n", i);
8877 }
8878 else
8879 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008880 unsigned long int i = ulongval ();
8881 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8882 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 fprintf (f, "%lu\n", i);
8884 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008885 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008886
8887 ;
8888 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008889}
Martin v. Löwis11437992002-04-12 09:54:03 +00008890_ACEOF
8891rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008892if { (ac_try="$ac_link"
8893case "(($ac_try" in
8894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8895 *) ac_try_echo=$ac_try;;
8896esac
8897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8898 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 ac_status=$?
8900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008902 { (case "(($ac_try" in
8903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8904 *) ac_try_echo=$ac_try;;
8905esac
8906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8907 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ac_status=$?
8909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8910 (exit $ac_status); }; }; then
8911 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008912else
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 echo "$as_me: program exited with status $ac_status" >&5
8914echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008915sed 's/^/| /' conftest.$ac_ext >&5
8916
Martin v. Löwis11437992002-04-12 09:54:03 +00008917( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008918if test "$ac_cv_type_float" = yes; then
8919 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008920See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008921echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008922See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008923 { (exit 77); exit 77; }; }
8924 else
8925 ac_cv_sizeof_float=0
8926 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008928rm -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 +00008929fi
8930rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008932{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8933echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
8934
8935
8936
Martin v. Löwis11437992002-04-12 09:54:03 +00008937cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008938#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008939_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008940
8941
Martin v. Löwiseba40652007-08-30 20:10:57 +00008942{ echo "$as_me:$LINENO: checking for double" >&5
8943echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008944if test "${ac_cv_type_double+set}" = set; then
8945 echo $ECHO_N "(cached) $ECHO_C" >&6
8946else
8947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008948/* confdefs.h. */
8949_ACEOF
8950cat confdefs.h >>conftest.$ac_ext
8951cat >>conftest.$ac_ext <<_ACEOF
8952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008953$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008955int
8956main ()
8957{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008958if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 return 0;
8962 ;
8963 return 0;
8964}
8965_ACEOF
8966rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967if { (ac_try="$ac_compile"
8968case "(($ac_try" in
8969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8970 *) ac_try_echo=$ac_try;;
8971esac
8972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008975 grep -v '^ *+' conftest.er1 >conftest.err
8976 rm -f conftest.er1
8977 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008979 (exit $ac_status); } && {
8980 test -z "$ac_c_werror_flag" ||
8981 test ! -s conftest.err
8982 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 ac_cv_type_double=yes
8984else
8985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008986sed 's/^/| /' conftest.$ac_ext >&5
8987
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008989fi
Brett Cannon19fab762007-06-02 03:02:29 +00008990
Martin v. Löwiseba40652007-08-30 20:10:57 +00008991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8992fi
8993{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8994echo "${ECHO_T}$ac_cv_type_double" >&6; }
8995
8996# The cast to long int works around a bug in the HP C Compiler
8997# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8998# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8999# This bug is HP SR number 8606223364.
9000{ echo "$as_me:$LINENO: checking size of double" >&5
9001echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009002if test "${ac_cv_sizeof_double+set}" = set; then
9003 echo $ECHO_N "(cached) $ECHO_C" >&6
9004else
Martin v. Löwis11437992002-04-12 09:54:03 +00009005 if test "$cross_compiling" = yes; then
9006 # Depending upon the size, compute the lo and hi bounds.
9007cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009008/* confdefs.h. */
9009_ACEOF
9010cat confdefs.h >>conftest.$ac_ext
9011cat >>conftest.$ac_ext <<_ACEOF
9012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009013$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009015int
9016main ()
9017{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009018static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009019test_array [0] = 0
9020
9021 ;
9022 return 0;
9023}
9024_ACEOF
9025rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009026if { (ac_try="$ac_compile"
9027case "(($ac_try" in
9028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9029 *) ac_try_echo=$ac_try;;
9030esac
9031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9032 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009034 grep -v '^ *+' conftest.er1 >conftest.err
9035 rm -f conftest.er1
9036 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009038 (exit $ac_status); } && {
9039 test -z "$ac_c_werror_flag" ||
9040 test ! -s conftest.err
9041 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 ac_lo=0 ac_mid=0
9043 while :; do
9044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009045/* confdefs.h. */
9046_ACEOF
9047cat confdefs.h >>conftest.$ac_ext
9048cat >>conftest.$ac_ext <<_ACEOF
9049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009050$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009051 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009052int
9053main ()
9054{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009055static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009056test_array [0] = 0
9057
9058 ;
9059 return 0;
9060}
9061_ACEOF
9062rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009063if { (ac_try="$ac_compile"
9064case "(($ac_try" in
9065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9066 *) ac_try_echo=$ac_try;;
9067esac
9068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9069 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009071 grep -v '^ *+' conftest.er1 >conftest.err
9072 rm -f conftest.er1
9073 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075 (exit $ac_status); } && {
9076 test -z "$ac_c_werror_flag" ||
9077 test ! -s conftest.err
9078 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 ac_hi=$ac_mid; break
9080else
9081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009082sed 's/^/| /' conftest.$ac_ext >&5
9083
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084 ac_lo=`expr $ac_mid + 1`
9085 if test $ac_lo -le $ac_mid; then
9086 ac_lo= ac_hi=
9087 break
9088 fi
9089 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009091
9092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 done
9094else
9095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009096sed 's/^/| /' conftest.$ac_ext >&5
9097
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009099/* confdefs.h. */
9100_ACEOF
9101cat confdefs.h >>conftest.$ac_ext
9102cat >>conftest.$ac_ext <<_ACEOF
9103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009104$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009105 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009106int
9107main ()
9108{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009109static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009110test_array [0] = 0
9111
9112 ;
9113 return 0;
9114}
9115_ACEOF
9116rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009117if { (ac_try="$ac_compile"
9118case "(($ac_try" in
9119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9120 *) ac_try_echo=$ac_try;;
9121esac
9122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009125 grep -v '^ *+' conftest.er1 >conftest.err
9126 rm -f conftest.er1
9127 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009129 (exit $ac_status); } && {
9130 test -z "$ac_c_werror_flag" ||
9131 test ! -s conftest.err
9132 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 ac_hi=-1 ac_mid=-1
9134 while :; do
9135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009136/* confdefs.h. */
9137_ACEOF
9138cat confdefs.h >>conftest.$ac_ext
9139cat >>conftest.$ac_ext <<_ACEOF
9140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009141$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009142 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009143int
9144main ()
9145{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009146static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009147test_array [0] = 0
9148
9149 ;
9150 return 0;
9151}
9152_ACEOF
9153rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009154if { (ac_try="$ac_compile"
9155case "(($ac_try" in
9156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9157 *) ac_try_echo=$ac_try;;
9158esac
9159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9160 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009162 grep -v '^ *+' conftest.er1 >conftest.err
9163 rm -f conftest.er1
9164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009166 (exit $ac_status); } && {
9167 test -z "$ac_c_werror_flag" ||
9168 test ! -s conftest.err
9169 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 ac_lo=$ac_mid; break
9171else
9172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009173sed 's/^/| /' conftest.$ac_ext >&5
9174
Martin v. Löwiseba40652007-08-30 20:10:57 +00009175 ac_hi=`expr '(' $ac_mid ')' - 1`
9176 if test $ac_mid -le $ac_hi; then
9177 ac_lo= ac_hi=
9178 break
9179 fi
9180 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009182
9183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009184 done
9185else
9186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009187sed 's/^/| /' conftest.$ac_ext >&5
9188
Martin v. Löwiseba40652007-08-30 20:10:57 +00009189 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009191
9192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009194
9195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009196# Binary search between lo and hi bounds.
9197while test "x$ac_lo" != "x$ac_hi"; do
9198 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9199 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009200/* confdefs.h. */
9201_ACEOF
9202cat confdefs.h >>conftest.$ac_ext
9203cat >>conftest.$ac_ext <<_ACEOF
9204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009205$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009206 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009207int
9208main ()
9209{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009210static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009211test_array [0] = 0
9212
9213 ;
9214 return 0;
9215}
9216_ACEOF
9217rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009218if { (ac_try="$ac_compile"
9219case "(($ac_try" in
9220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9221 *) ac_try_echo=$ac_try;;
9222esac
9223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009226 grep -v '^ *+' conftest.er1 >conftest.err
9227 rm -f conftest.er1
9228 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009230 (exit $ac_status); } && {
9231 test -z "$ac_c_werror_flag" ||
9232 test ! -s conftest.err
9233 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009234 ac_hi=$ac_mid
9235else
9236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009237sed 's/^/| /' conftest.$ac_ext >&5
9238
Martin v. Löwiseba40652007-08-30 20:10:57 +00009239 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009241
9242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009243done
9244case $ac_lo in
9245?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009246'') if test "$ac_cv_type_double" = yes; then
9247 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009248See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009249echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009250See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009251 { (exit 77); exit 77; }; }
9252 else
9253 ac_cv_sizeof_double=0
9254 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009255esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009256else
Martin v. Löwis11437992002-04-12 09:54:03 +00009257 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009258/* confdefs.h. */
9259_ACEOF
9260cat confdefs.h >>conftest.$ac_ext
9261cat >>conftest.$ac_ext <<_ACEOF
9262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009263$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009264 typedef double ac__type_sizeof_;
9265static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9266static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009267#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009268#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009269int
9270main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009271{
Martin v. Löwis11437992002-04-12 09:54:03 +00009272
9273 FILE *f = fopen ("conftest.val", "w");
9274 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009275 return 1;
9276 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009278 long int i = longval ();
9279 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9280 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 fprintf (f, "%ld\n", i);
9282 }
9283 else
9284 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009285 unsigned long int i = ulongval ();
9286 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9287 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 fprintf (f, "%lu\n", i);
9289 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009290 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009291
9292 ;
9293 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009294}
Martin v. Löwis11437992002-04-12 09:54:03 +00009295_ACEOF
9296rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009297if { (ac_try="$ac_link"
9298case "(($ac_try" in
9299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9300 *) ac_try_echo=$ac_try;;
9301esac
9302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9303 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 ac_status=$?
9305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9306 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009307 { (case "(($ac_try" in
9308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9309 *) ac_try_echo=$ac_try;;
9310esac
9311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9312 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 ac_status=$?
9314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9315 (exit $ac_status); }; }; then
9316 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009317else
Martin v. Löwis11437992002-04-12 09:54:03 +00009318 echo "$as_me: program exited with status $ac_status" >&5
9319echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009320sed 's/^/| /' conftest.$ac_ext >&5
9321
Martin v. Löwis11437992002-04-12 09:54:03 +00009322( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009323if test "$ac_cv_type_double" = yes; then
9324 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009325See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009326echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009327See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009328 { (exit 77); exit 77; }; }
9329 else
9330 ac_cv_sizeof_double=0
9331 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009333rm -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 +00009334fi
9335rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009336fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009337{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9338echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9339
9340
9341
Martin v. Löwis11437992002-04-12 09:54:03 +00009342cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009343#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009344_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009345
9346
Martin v. Löwiseba40652007-08-30 20:10:57 +00009347{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9348echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009349if test "${ac_cv_type_fpos_t+set}" = set; then
9350 echo $ECHO_N "(cached) $ECHO_C" >&6
9351else
9352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009353/* confdefs.h. */
9354_ACEOF
9355cat confdefs.h >>conftest.$ac_ext
9356cat >>conftest.$ac_ext <<_ACEOF
9357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009358$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009359typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009360int
9361main ()
9362{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009363if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009365if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009366 return 0;
9367 ;
9368 return 0;
9369}
9370_ACEOF
9371rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009372if { (ac_try="$ac_compile"
9373case "(($ac_try" in
9374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9375 *) ac_try_echo=$ac_try;;
9376esac
9377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009380 grep -v '^ *+' conftest.er1 >conftest.err
9381 rm -f conftest.er1
9382 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009384 (exit $ac_status); } && {
9385 test -z "$ac_c_werror_flag" ||
9386 test ! -s conftest.err
9387 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 ac_cv_type_fpos_t=yes
9389else
9390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009391sed 's/^/| /' conftest.$ac_ext >&5
9392
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009394fi
Brett Cannon19fab762007-06-02 03:02:29 +00009395
Martin v. Löwiseba40652007-08-30 20:10:57 +00009396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9397fi
9398{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9399echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9400
9401# The cast to long int works around a bug in the HP C Compiler
9402# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9403# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9404# This bug is HP SR number 8606223364.
9405{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9406echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009407if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9408 echo $ECHO_N "(cached) $ECHO_C" >&6
9409else
Martin v. Löwis11437992002-04-12 09:54:03 +00009410 if test "$cross_compiling" = yes; then
9411 # Depending upon the size, compute the lo and hi bounds.
9412cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009413/* confdefs.h. */
9414_ACEOF
9415cat confdefs.h >>conftest.$ac_ext
9416cat >>conftest.$ac_ext <<_ACEOF
9417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009418$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009419 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009420int
9421main ()
9422{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009423static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009424test_array [0] = 0
9425
9426 ;
9427 return 0;
9428}
9429_ACEOF
9430rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009431if { (ac_try="$ac_compile"
9432case "(($ac_try" in
9433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9434 *) ac_try_echo=$ac_try;;
9435esac
9436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009439 grep -v '^ *+' conftest.er1 >conftest.err
9440 rm -f conftest.er1
9441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009443 (exit $ac_status); } && {
9444 test -z "$ac_c_werror_flag" ||
9445 test ! -s conftest.err
9446 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 ac_lo=0 ac_mid=0
9448 while :; do
9449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009450/* confdefs.h. */
9451_ACEOF
9452cat confdefs.h >>conftest.$ac_ext
9453cat >>conftest.$ac_ext <<_ACEOF
9454/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009455$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009456 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009457int
9458main ()
9459{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009460static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009461test_array [0] = 0
9462
9463 ;
9464 return 0;
9465}
9466_ACEOF
9467rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009468if { (ac_try="$ac_compile"
9469case "(($ac_try" in
9470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9471 *) ac_try_echo=$ac_try;;
9472esac
9473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9474 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009475 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009476 grep -v '^ *+' conftest.er1 >conftest.err
9477 rm -f conftest.er1
9478 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480 (exit $ac_status); } && {
9481 test -z "$ac_c_werror_flag" ||
9482 test ! -s conftest.err
9483 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 ac_hi=$ac_mid; break
9485else
9486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009487sed 's/^/| /' conftest.$ac_ext >&5
9488
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489 ac_lo=`expr $ac_mid + 1`
9490 if test $ac_lo -le $ac_mid; then
9491 ac_lo= ac_hi=
9492 break
9493 fi
9494 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009495fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009496
9497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 done
9499else
9500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009501sed 's/^/| /' conftest.$ac_ext >&5
9502
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009504/* confdefs.h. */
9505_ACEOF
9506cat confdefs.h >>conftest.$ac_ext
9507cat >>conftest.$ac_ext <<_ACEOF
9508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009509$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009510 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009511int
9512main ()
9513{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009514static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009515test_array [0] = 0
9516
9517 ;
9518 return 0;
9519}
9520_ACEOF
9521rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009522if { (ac_try="$ac_compile"
9523case "(($ac_try" in
9524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9525 *) ac_try_echo=$ac_try;;
9526esac
9527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009530 grep -v '^ *+' conftest.er1 >conftest.err
9531 rm -f conftest.er1
9532 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009534 (exit $ac_status); } && {
9535 test -z "$ac_c_werror_flag" ||
9536 test ! -s conftest.err
9537 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 ac_hi=-1 ac_mid=-1
9539 while :; do
9540 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009541/* confdefs.h. */
9542_ACEOF
9543cat confdefs.h >>conftest.$ac_ext
9544cat >>conftest.$ac_ext <<_ACEOF
9545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009546$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009547 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009548int
9549main ()
9550{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009551static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009552test_array [0] = 0
9553
9554 ;
9555 return 0;
9556}
9557_ACEOF
9558rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009559if { (ac_try="$ac_compile"
9560case "(($ac_try" in
9561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9562 *) ac_try_echo=$ac_try;;
9563esac
9564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009567 grep -v '^ *+' conftest.er1 >conftest.err
9568 rm -f conftest.er1
9569 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009571 (exit $ac_status); } && {
9572 test -z "$ac_c_werror_flag" ||
9573 test ! -s conftest.err
9574 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 ac_lo=$ac_mid; break
9576else
9577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009578sed 's/^/| /' conftest.$ac_ext >&5
9579
Martin v. Löwiseba40652007-08-30 20:10:57 +00009580 ac_hi=`expr '(' $ac_mid ')' - 1`
9581 if test $ac_mid -le $ac_hi; then
9582 ac_lo= ac_hi=
9583 break
9584 fi
9585 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009587
9588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 done
9590else
9591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009592sed 's/^/| /' conftest.$ac_ext >&5
9593
Martin v. Löwiseba40652007-08-30 20:10:57 +00009594 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009596
9597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009599
9600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009601# Binary search between lo and hi bounds.
9602while test "x$ac_lo" != "x$ac_hi"; do
9603 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9604 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009605/* confdefs.h. */
9606_ACEOF
9607cat confdefs.h >>conftest.$ac_ext
9608cat >>conftest.$ac_ext <<_ACEOF
9609/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009610$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009611 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009612int
9613main ()
9614{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009615static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009616test_array [0] = 0
9617
9618 ;
9619 return 0;
9620}
9621_ACEOF
9622rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009623if { (ac_try="$ac_compile"
9624case "(($ac_try" in
9625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9626 *) ac_try_echo=$ac_try;;
9627esac
9628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9629 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009631 grep -v '^ *+' conftest.er1 >conftest.err
9632 rm -f conftest.er1
9633 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009635 (exit $ac_status); } && {
9636 test -z "$ac_c_werror_flag" ||
9637 test ! -s conftest.err
9638 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 ac_hi=$ac_mid
9640else
9641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009642sed 's/^/| /' conftest.$ac_ext >&5
9643
Martin v. Löwiseba40652007-08-30 20:10:57 +00009644 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009646
9647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009648done
9649case $ac_lo in
9650?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009651'') if test "$ac_cv_type_fpos_t" = yes; then
9652 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009653See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009654echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009655See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009656 { (exit 77); exit 77; }; }
9657 else
9658 ac_cv_sizeof_fpos_t=0
9659 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009660esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009661else
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* confdefs.h. */
9664_ACEOF
9665cat confdefs.h >>conftest.$ac_ext
9666cat >>conftest.$ac_ext <<_ACEOF
9667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009668$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009669 typedef fpos_t ac__type_sizeof_;
9670static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9671static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009672#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009673#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009674int
9675main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009676{
Martin v. Löwis11437992002-04-12 09:54:03 +00009677
9678 FILE *f = fopen ("conftest.val", "w");
9679 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009680 return 1;
9681 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009683 long int i = longval ();
9684 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9685 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 fprintf (f, "%ld\n", i);
9687 }
9688 else
9689 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009690 unsigned long int i = ulongval ();
9691 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9692 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 fprintf (f, "%lu\n", i);
9694 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009695 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009696
9697 ;
9698 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009699}
Martin v. Löwis11437992002-04-12 09:54:03 +00009700_ACEOF
9701rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009702if { (ac_try="$ac_link"
9703case "(($ac_try" in
9704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9705 *) ac_try_echo=$ac_try;;
9706esac
9707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9708 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ac_status=$?
9710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9711 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009712 { (case "(($ac_try" in
9713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9714 *) ac_try_echo=$ac_try;;
9715esac
9716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9717 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_status=$?
9719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9720 (exit $ac_status); }; }; then
9721 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009722else
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 echo "$as_me: program exited with status $ac_status" >&5
9724echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009725sed 's/^/| /' conftest.$ac_ext >&5
9726
Martin v. Löwis11437992002-04-12 09:54:03 +00009727( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009728if test "$ac_cv_type_fpos_t" = yes; then
9729 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009730See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009731echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009732See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009733 { (exit 77); exit 77; }; }
9734 else
9735 ac_cv_sizeof_fpos_t=0
9736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009738rm -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 +00009739fi
9740rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009742{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9743echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9744
9745
9746
Martin v. Löwis11437992002-04-12 09:54:03 +00009747cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009748#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009749_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009750
Michael W. Hudson54241132001-12-07 15:38:26 +00009751
Martin v. Löwiseba40652007-08-30 20:10:57 +00009752{ echo "$as_me:$LINENO: checking for size_t" >&5
9753echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009754if test "${ac_cv_type_size_t+set}" = set; then
9755 echo $ECHO_N "(cached) $ECHO_C" >&6
9756else
9757 cat >conftest.$ac_ext <<_ACEOF
9758/* confdefs.h. */
9759_ACEOF
9760cat confdefs.h >>conftest.$ac_ext
9761cat >>conftest.$ac_ext <<_ACEOF
9762/* end confdefs.h. */
9763$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009765int
9766main ()
9767{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009768if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009769 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009770if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009771 return 0;
9772 ;
9773 return 0;
9774}
9775_ACEOF
9776rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777if { (ac_try="$ac_compile"
9778case "(($ac_try" in
9779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9780 *) ac_try_echo=$ac_try;;
9781esac
9782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9783 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009784 ac_status=$?
9785 grep -v '^ *+' conftest.er1 >conftest.err
9786 rm -f conftest.er1
9787 cat conftest.err >&5
9788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009789 (exit $ac_status); } && {
9790 test -z "$ac_c_werror_flag" ||
9791 test ! -s conftest.err
9792 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009793 ac_cv_type_size_t=yes
9794else
9795 echo "$as_me: failed program was:" >&5
9796sed 's/^/| /' conftest.$ac_ext >&5
9797
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009799fi
Brett Cannon19fab762007-06-02 03:02:29 +00009800
Martin v. Löwiseba40652007-08-30 20:10:57 +00009801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9802fi
9803{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9804echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9805
9806# The cast to long int works around a bug in the HP C Compiler
9807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9809# This bug is HP SR number 8606223364.
9810{ echo "$as_me:$LINENO: checking size of size_t" >&5
9811echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009812if test "${ac_cv_sizeof_size_t+set}" = set; then
9813 echo $ECHO_N "(cached) $ECHO_C" >&6
9814else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009815 if test "$cross_compiling" = yes; then
9816 # Depending upon the size, compute the lo and hi bounds.
9817cat >conftest.$ac_ext <<_ACEOF
9818/* confdefs.h. */
9819_ACEOF
9820cat confdefs.h >>conftest.$ac_ext
9821cat >>conftest.$ac_ext <<_ACEOF
9822/* end confdefs.h. */
9823$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009824 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009825int
9826main ()
9827{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009828static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009829test_array [0] = 0
9830
9831 ;
9832 return 0;
9833}
9834_ACEOF
9835rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009836if { (ac_try="$ac_compile"
9837case "(($ac_try" in
9838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9839 *) ac_try_echo=$ac_try;;
9840esac
9841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009843 ac_status=$?
9844 grep -v '^ *+' conftest.er1 >conftest.err
9845 rm -f conftest.er1
9846 cat conftest.err >&5
9847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009848 (exit $ac_status); } && {
9849 test -z "$ac_c_werror_flag" ||
9850 test ! -s conftest.err
9851 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009852 ac_lo=0 ac_mid=0
9853 while :; do
9854 cat >conftest.$ac_ext <<_ACEOF
9855/* confdefs.h. */
9856_ACEOF
9857cat confdefs.h >>conftest.$ac_ext
9858cat >>conftest.$ac_ext <<_ACEOF
9859/* end confdefs.h. */
9860$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009861 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009862int
9863main ()
9864{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009865static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009866test_array [0] = 0
9867
9868 ;
9869 return 0;
9870}
9871_ACEOF
9872rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009873if { (ac_try="$ac_compile"
9874case "(($ac_try" in
9875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9876 *) ac_try_echo=$ac_try;;
9877esac
9878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9879 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009880 ac_status=$?
9881 grep -v '^ *+' conftest.er1 >conftest.err
9882 rm -f conftest.er1
9883 cat conftest.err >&5
9884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885 (exit $ac_status); } && {
9886 test -z "$ac_c_werror_flag" ||
9887 test ! -s conftest.err
9888 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009889 ac_hi=$ac_mid; break
9890else
9891 echo "$as_me: failed program was:" >&5
9892sed 's/^/| /' conftest.$ac_ext >&5
9893
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894 ac_lo=`expr $ac_mid + 1`
9895 if test $ac_lo -le $ac_mid; then
9896 ac_lo= ac_hi=
9897 break
9898 fi
9899 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009901
9902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009903 done
9904else
9905 echo "$as_me: failed program was:" >&5
9906sed 's/^/| /' conftest.$ac_ext >&5
9907
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009909/* confdefs.h. */
9910_ACEOF
9911cat confdefs.h >>conftest.$ac_ext
9912cat >>conftest.$ac_ext <<_ACEOF
9913/* end confdefs.h. */
9914$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009915 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009916int
9917main ()
9918{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009919static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009920test_array [0] = 0
9921
9922 ;
9923 return 0;
9924}
9925_ACEOF
9926rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009927if { (ac_try="$ac_compile"
9928case "(($ac_try" in
9929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9930 *) ac_try_echo=$ac_try;;
9931esac
9932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9933 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009934 ac_status=$?
9935 grep -v '^ *+' conftest.er1 >conftest.err
9936 rm -f conftest.er1
9937 cat conftest.err >&5
9938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009939 (exit $ac_status); } && {
9940 test -z "$ac_c_werror_flag" ||
9941 test ! -s conftest.err
9942 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009943 ac_hi=-1 ac_mid=-1
9944 while :; do
9945 cat >conftest.$ac_ext <<_ACEOF
9946/* confdefs.h. */
9947_ACEOF
9948cat confdefs.h >>conftest.$ac_ext
9949cat >>conftest.$ac_ext <<_ACEOF
9950/* end confdefs.h. */
9951$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009952 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009953int
9954main ()
9955{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009956static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009957test_array [0] = 0
9958
9959 ;
9960 return 0;
9961}
9962_ACEOF
9963rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009964if { (ac_try="$ac_compile"
9965case "(($ac_try" in
9966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9967 *) ac_try_echo=$ac_try;;
9968esac
9969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9970 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009971 ac_status=$?
9972 grep -v '^ *+' conftest.er1 >conftest.err
9973 rm -f conftest.er1
9974 cat conftest.err >&5
9975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009976 (exit $ac_status); } && {
9977 test -z "$ac_c_werror_flag" ||
9978 test ! -s conftest.err
9979 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009980 ac_lo=$ac_mid; break
9981else
9982 echo "$as_me: failed program was:" >&5
9983sed 's/^/| /' conftest.$ac_ext >&5
9984
Martin v. Löwiseba40652007-08-30 20:10:57 +00009985 ac_hi=`expr '(' $ac_mid ')' - 1`
9986 if test $ac_mid -le $ac_hi; then
9987 ac_lo= ac_hi=
9988 break
9989 fi
9990 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009992
9993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009994 done
9995else
9996 echo "$as_me: failed program was:" >&5
9997sed 's/^/| /' conftest.$ac_ext >&5
9998
Martin v. Löwiseba40652007-08-30 20:10:57 +00009999 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010001
10002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010004
10005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010006# Binary search between lo and hi bounds.
10007while test "x$ac_lo" != "x$ac_hi"; do
10008 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10009 cat >conftest.$ac_ext <<_ACEOF
10010/* confdefs.h. */
10011_ACEOF
10012cat confdefs.h >>conftest.$ac_ext
10013cat >>conftest.$ac_ext <<_ACEOF
10014/* end confdefs.h. */
10015$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010016 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010017int
10018main ()
10019{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010020static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010021test_array [0] = 0
10022
10023 ;
10024 return 0;
10025}
10026_ACEOF
10027rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010028if { (ac_try="$ac_compile"
10029case "(($ac_try" in
10030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10031 *) ac_try_echo=$ac_try;;
10032esac
10033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010035 ac_status=$?
10036 grep -v '^ *+' conftest.er1 >conftest.err
10037 rm -f conftest.er1
10038 cat conftest.err >&5
10039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010040 (exit $ac_status); } && {
10041 test -z "$ac_c_werror_flag" ||
10042 test ! -s conftest.err
10043 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010044 ac_hi=$ac_mid
10045else
10046 echo "$as_me: failed program was:" >&5
10047sed 's/^/| /' conftest.$ac_ext >&5
10048
Martin v. Löwiseba40652007-08-30 20:10:57 +000010049 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010051
10052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010053done
10054case $ac_lo in
10055?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010056'') if test "$ac_cv_type_size_t" = yes; then
10057 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010058See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010059echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010060See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010061 { (exit 77); exit 77; }; }
10062 else
10063 ac_cv_sizeof_size_t=0
10064 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010065esac
10066else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010067 cat >conftest.$ac_ext <<_ACEOF
10068/* confdefs.h. */
10069_ACEOF
10070cat confdefs.h >>conftest.$ac_ext
10071cat >>conftest.$ac_ext <<_ACEOF
10072/* end confdefs.h. */
10073$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010074 typedef size_t ac__type_sizeof_;
10075static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10076static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010077#include <stdio.h>
10078#include <stdlib.h>
10079int
10080main ()
10081{
10082
10083 FILE *f = fopen ("conftest.val", "w");
10084 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010085 return 1;
10086 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010087 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010088 long int i = longval ();
10089 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10090 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010091 fprintf (f, "%ld\n", i);
10092 }
10093 else
10094 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010095 unsigned long int i = ulongval ();
10096 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10097 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010098 fprintf (f, "%lu\n", i);
10099 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010101
10102 ;
10103 return 0;
10104}
10105_ACEOF
10106rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010107if { (ac_try="$ac_link"
10108case "(($ac_try" in
10109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10110 *) ac_try_echo=$ac_try;;
10111esac
10112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10113 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010114 ac_status=$?
10115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10116 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010117 { (case "(($ac_try" in
10118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10119 *) ac_try_echo=$ac_try;;
10120esac
10121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10122 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010123 ac_status=$?
10124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10125 (exit $ac_status); }; }; then
10126 ac_cv_sizeof_size_t=`cat conftest.val`
10127else
10128 echo "$as_me: program exited with status $ac_status" >&5
10129echo "$as_me: failed program was:" >&5
10130sed 's/^/| /' conftest.$ac_ext >&5
10131
10132( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010133if test "$ac_cv_type_size_t" = yes; then
10134 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010135See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010136echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010137See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010138 { (exit 77); exit 77; }; }
10139 else
10140 ac_cv_sizeof_size_t=0
10141 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010143rm -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 +000010144fi
10145rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010147{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10148echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10149
10150
10151
Martin v. Löwis18e16552006-02-15 17:27:45 +000010152cat >>confdefs.h <<_ACEOF
10153#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10154_ACEOF
10155
10156
Michael W. Hudson54241132001-12-07 15:38:26 +000010157
Martin v. Löwiseba40652007-08-30 20:10:57 +000010158{ echo "$as_me:$LINENO: checking for long long support" >&5
10159echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010160have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010161cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010162/* confdefs.h. */
10163_ACEOF
10164cat confdefs.h >>conftest.$ac_ext
10165cat >>conftest.$ac_ext <<_ACEOF
10166/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010167
Martin v. Löwis11437992002-04-12 09:54:03 +000010168int
10169main ()
10170{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010171long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 ;
10173 return 0;
10174}
10175_ACEOF
10176rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010177if { (ac_try="$ac_compile"
10178case "(($ac_try" in
10179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10180 *) ac_try_echo=$ac_try;;
10181esac
10182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10183 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010185 grep -v '^ *+' conftest.er1 >conftest.err
10186 rm -f conftest.er1
10187 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010189 (exit $ac_status); } && {
10190 test -z "$ac_c_werror_flag" ||
10191 test ! -s conftest.err
10192 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010193
10194
10195cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010196#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010197_ACEOF
10198
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010199 have_long_long=yes
10200
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010201else
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010203sed 's/^/| /' conftest.$ac_ext >&5
10204
Martin v. Löwiseba40652007-08-30 20:10:57 +000010205
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010207
10208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10209{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10210echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010211if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010212{ echo "$as_me:$LINENO: checking for long long" >&5
10213echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010214if test "${ac_cv_type_long_long+set}" = set; then
10215 echo $ECHO_N "(cached) $ECHO_C" >&6
10216else
10217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010218/* confdefs.h. */
10219_ACEOF
10220cat confdefs.h >>conftest.$ac_ext
10221cat >>conftest.$ac_ext <<_ACEOF
10222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010223$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010224typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010225int
10226main ()
10227{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010228if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010230if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010231 return 0;
10232 ;
10233 return 0;
10234}
10235_ACEOF
10236rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010237if { (ac_try="$ac_compile"
10238case "(($ac_try" in
10239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10240 *) ac_try_echo=$ac_try;;
10241esac
10242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10243 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010245 grep -v '^ *+' conftest.er1 >conftest.err
10246 rm -f conftest.er1
10247 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010249 (exit $ac_status); } && {
10250 test -z "$ac_c_werror_flag" ||
10251 test ! -s conftest.err
10252 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 ac_cv_type_long_long=yes
10254else
10255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010256sed 's/^/| /' conftest.$ac_ext >&5
10257
Martin v. Löwiseba40652007-08-30 20:10:57 +000010258 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010259fi
Brett Cannon19fab762007-06-02 03:02:29 +000010260
Martin v. Löwiseba40652007-08-30 20:10:57 +000010261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10262fi
10263{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10264echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10265
10266# The cast to long int works around a bug in the HP C Compiler
10267# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10268# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10269# This bug is HP SR number 8606223364.
10270{ echo "$as_me:$LINENO: checking size of long long" >&5
10271echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010272if test "${ac_cv_sizeof_long_long+set}" = set; then
10273 echo $ECHO_N "(cached) $ECHO_C" >&6
10274else
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 if test "$cross_compiling" = yes; then
10276 # Depending upon the size, compute the lo and hi bounds.
10277cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010278/* confdefs.h. */
10279_ACEOF
10280cat confdefs.h >>conftest.$ac_ext
10281cat >>conftest.$ac_ext <<_ACEOF
10282/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010283$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010284 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010285int
10286main ()
10287{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010288static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010289test_array [0] = 0
10290
10291 ;
10292 return 0;
10293}
10294_ACEOF
10295rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010296if { (ac_try="$ac_compile"
10297case "(($ac_try" in
10298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10299 *) ac_try_echo=$ac_try;;
10300esac
10301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10302 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010304 grep -v '^ *+' conftest.er1 >conftest.err
10305 rm -f conftest.er1
10306 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010308 (exit $ac_status); } && {
10309 test -z "$ac_c_werror_flag" ||
10310 test ! -s conftest.err
10311 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 ac_lo=0 ac_mid=0
10313 while :; do
10314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010315/* confdefs.h. */
10316_ACEOF
10317cat confdefs.h >>conftest.$ac_ext
10318cat >>conftest.$ac_ext <<_ACEOF
10319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010320$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010321 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010322int
10323main ()
10324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010325static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010326test_array [0] = 0
10327
10328 ;
10329 return 0;
10330}
10331_ACEOF
10332rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010333if { (ac_try="$ac_compile"
10334case "(($ac_try" in
10335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10336 *) ac_try_echo=$ac_try;;
10337esac
10338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10339 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010341 grep -v '^ *+' conftest.er1 >conftest.err
10342 rm -f conftest.er1
10343 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010345 (exit $ac_status); } && {
10346 test -z "$ac_c_werror_flag" ||
10347 test ! -s conftest.err
10348 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 ac_hi=$ac_mid; break
10350else
10351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010352sed 's/^/| /' conftest.$ac_ext >&5
10353
Martin v. Löwiseba40652007-08-30 20:10:57 +000010354 ac_lo=`expr $ac_mid + 1`
10355 if test $ac_lo -le $ac_mid; then
10356 ac_lo= ac_hi=
10357 break
10358 fi
10359 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010361
10362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 done
10364else
10365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010366sed 's/^/| /' conftest.$ac_ext >&5
10367
Martin v. Löwiseba40652007-08-30 20:10:57 +000010368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010369/* confdefs.h. */
10370_ACEOF
10371cat confdefs.h >>conftest.$ac_ext
10372cat >>conftest.$ac_ext <<_ACEOF
10373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010374$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010375 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010376int
10377main ()
10378{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010379static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010380test_array [0] = 0
10381
10382 ;
10383 return 0;
10384}
10385_ACEOF
10386rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010387if { (ac_try="$ac_compile"
10388case "(($ac_try" in
10389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10390 *) ac_try_echo=$ac_try;;
10391esac
10392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10393 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010395 grep -v '^ *+' conftest.er1 >conftest.err
10396 rm -f conftest.er1
10397 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010399 (exit $ac_status); } && {
10400 test -z "$ac_c_werror_flag" ||
10401 test ! -s conftest.err
10402 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 ac_hi=-1 ac_mid=-1
10404 while :; do
10405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010406/* confdefs.h. */
10407_ACEOF
10408cat confdefs.h >>conftest.$ac_ext
10409cat >>conftest.$ac_ext <<_ACEOF
10410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010411$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010412 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010413int
10414main ()
10415{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010416static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010417test_array [0] = 0
10418
10419 ;
10420 return 0;
10421}
10422_ACEOF
10423rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010424if { (ac_try="$ac_compile"
10425case "(($ac_try" in
10426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10427 *) ac_try_echo=$ac_try;;
10428esac
10429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10430 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010432 grep -v '^ *+' conftest.er1 >conftest.err
10433 rm -f conftest.er1
10434 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010436 (exit $ac_status); } && {
10437 test -z "$ac_c_werror_flag" ||
10438 test ! -s conftest.err
10439 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 ac_lo=$ac_mid; break
10441else
10442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010443sed 's/^/| /' conftest.$ac_ext >&5
10444
Martin v. Löwiseba40652007-08-30 20:10:57 +000010445 ac_hi=`expr '(' $ac_mid ')' - 1`
10446 if test $ac_mid -le $ac_hi; then
10447 ac_lo= ac_hi=
10448 break
10449 fi
10450 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010452
10453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 done
10455else
10456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010457sed 's/^/| /' conftest.$ac_ext >&5
10458
Martin v. Löwiseba40652007-08-30 20:10:57 +000010459 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010461
10462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010464
10465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010466# Binary search between lo and hi bounds.
10467while test "x$ac_lo" != "x$ac_hi"; do
10468 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010470/* confdefs.h. */
10471_ACEOF
10472cat confdefs.h >>conftest.$ac_ext
10473cat >>conftest.$ac_ext <<_ACEOF
10474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010475$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010476 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010477int
10478main ()
10479{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010480static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010481test_array [0] = 0
10482
10483 ;
10484 return 0;
10485}
10486_ACEOF
10487rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010488if { (ac_try="$ac_compile"
10489case "(($ac_try" in
10490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10491 *) ac_try_echo=$ac_try;;
10492esac
10493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10494 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010496 grep -v '^ *+' conftest.er1 >conftest.err
10497 rm -f conftest.er1
10498 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010500 (exit $ac_status); } && {
10501 test -z "$ac_c_werror_flag" ||
10502 test ! -s conftest.err
10503 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010504 ac_hi=$ac_mid
10505else
10506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010507sed 's/^/| /' conftest.$ac_ext >&5
10508
Martin v. Löwiseba40652007-08-30 20:10:57 +000010509 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010511
10512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010513done
10514case $ac_lo in
10515?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010516'') if test "$ac_cv_type_long_long" = yes; then
10517 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010518See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010519echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010520See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010521 { (exit 77); exit 77; }; }
10522 else
10523 ac_cv_sizeof_long_long=0
10524 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010525esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010526else
Martin v. Löwis11437992002-04-12 09:54:03 +000010527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010528/* confdefs.h. */
10529_ACEOF
10530cat confdefs.h >>conftest.$ac_ext
10531cat >>conftest.$ac_ext <<_ACEOF
10532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010533$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010534 typedef long long ac__type_sizeof_;
10535static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10536static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010537#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010538#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010539int
10540main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010541{
Martin v. Löwis11437992002-04-12 09:54:03 +000010542
10543 FILE *f = fopen ("conftest.val", "w");
10544 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010545 return 1;
10546 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010547 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010548 long int i = longval ();
10549 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10550 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 fprintf (f, "%ld\n", i);
10552 }
10553 else
10554 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010555 unsigned long int i = ulongval ();
10556 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10557 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010558 fprintf (f, "%lu\n", i);
10559 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010560 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010561
10562 ;
10563 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010564}
Martin v. Löwis11437992002-04-12 09:54:03 +000010565_ACEOF
10566rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010567if { (ac_try="$ac_link"
10568case "(($ac_try" in
10569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10570 *) ac_try_echo=$ac_try;;
10571esac
10572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10573 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010574 ac_status=$?
10575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10576 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010577 { (case "(($ac_try" in
10578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10579 *) ac_try_echo=$ac_try;;
10580esac
10581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10582 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010583 ac_status=$?
10584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10585 (exit $ac_status); }; }; then
10586 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010587else
Martin v. Löwis11437992002-04-12 09:54:03 +000010588 echo "$as_me: program exited with status $ac_status" >&5
10589echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010590sed 's/^/| /' conftest.$ac_ext >&5
10591
Martin v. Löwis11437992002-04-12 09:54:03 +000010592( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010593if test "$ac_cv_type_long_long" = yes; then
10594 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010595See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010596echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010597See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010598 { (exit 77); exit 77; }; }
10599 else
10600 ac_cv_sizeof_long_long=0
10601 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010603rm -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 +000010604fi
10605rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010607{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
10608echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
10609
10610
10611
Martin v. Löwis11437992002-04-12 09:54:03 +000010612cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010613#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000010614_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010615
Michael W. Hudson54241132001-12-07 15:38:26 +000010616
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010617fi
10618
Martin v. Löwiseba40652007-08-30 20:10:57 +000010619{ echo "$as_me:$LINENO: checking for _Bool support" >&5
10620echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010621have_c99_bool=no
10622cat >conftest.$ac_ext <<_ACEOF
10623/* confdefs.h. */
10624_ACEOF
10625cat confdefs.h >>conftest.$ac_ext
10626cat >>conftest.$ac_ext <<_ACEOF
10627/* end confdefs.h. */
10628
10629int
10630main ()
10631{
10632_Bool x; x = (_Bool)0;
10633 ;
10634 return 0;
10635}
10636_ACEOF
10637rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010638if { (ac_try="$ac_compile"
10639case "(($ac_try" in
10640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10641 *) ac_try_echo=$ac_try;;
10642esac
10643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010645 ac_status=$?
10646 grep -v '^ *+' conftest.er1 >conftest.err
10647 rm -f conftest.er1
10648 cat conftest.err >&5
10649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010650 (exit $ac_status); } && {
10651 test -z "$ac_c_werror_flag" ||
10652 test ! -s conftest.err
10653 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010654
10655
10656cat >>confdefs.h <<\_ACEOF
10657#define HAVE_C99_BOOL 1
10658_ACEOF
10659
10660 have_c99_bool=yes
10661
10662else
10663 echo "$as_me: failed program was:" >&5
10664sed 's/^/| /' conftest.$ac_ext >&5
10665
Martin v. Löwiseba40652007-08-30 20:10:57 +000010666
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010668
10669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10670{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
10671echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010672if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010673{ echo "$as_me:$LINENO: checking for _Bool" >&5
10674echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010675if test "${ac_cv_type__Bool+set}" = set; then
10676 echo $ECHO_N "(cached) $ECHO_C" >&6
10677else
10678 cat >conftest.$ac_ext <<_ACEOF
10679/* confdefs.h. */
10680_ACEOF
10681cat confdefs.h >>conftest.$ac_ext
10682cat >>conftest.$ac_ext <<_ACEOF
10683/* end confdefs.h. */
10684$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010685typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010686int
10687main ()
10688{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010689if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010690 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010691if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010692 return 0;
10693 ;
10694 return 0;
10695}
10696_ACEOF
10697rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010698if { (ac_try="$ac_compile"
10699case "(($ac_try" in
10700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10701 *) ac_try_echo=$ac_try;;
10702esac
10703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010705 ac_status=$?
10706 grep -v '^ *+' conftest.er1 >conftest.err
10707 rm -f conftest.er1
10708 cat conftest.err >&5
10709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010710 (exit $ac_status); } && {
10711 test -z "$ac_c_werror_flag" ||
10712 test ! -s conftest.err
10713 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010714 ac_cv_type__Bool=yes
10715else
10716 echo "$as_me: failed program was:" >&5
10717sed 's/^/| /' conftest.$ac_ext >&5
10718
Martin v. Löwiseba40652007-08-30 20:10:57 +000010719 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010720fi
Brett Cannon19fab762007-06-02 03:02:29 +000010721
Martin v. Löwiseba40652007-08-30 20:10:57 +000010722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10723fi
10724{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
10725echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
10726
10727# The cast to long int works around a bug in the HP C Compiler
10728# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10729# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10730# This bug is HP SR number 8606223364.
10731{ echo "$as_me:$LINENO: checking size of _Bool" >&5
10732echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010733if test "${ac_cv_sizeof__Bool+set}" = set; then
10734 echo $ECHO_N "(cached) $ECHO_C" >&6
10735else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010736 if test "$cross_compiling" = yes; then
10737 # Depending upon the size, compute the lo and hi bounds.
10738cat >conftest.$ac_ext <<_ACEOF
10739/* confdefs.h. */
10740_ACEOF
10741cat confdefs.h >>conftest.$ac_ext
10742cat >>conftest.$ac_ext <<_ACEOF
10743/* end confdefs.h. */
10744$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010745 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010746int
10747main ()
10748{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010749static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010750test_array [0] = 0
10751
10752 ;
10753 return 0;
10754}
10755_ACEOF
10756rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010757if { (ac_try="$ac_compile"
10758case "(($ac_try" in
10759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10760 *) ac_try_echo=$ac_try;;
10761esac
10762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010764 ac_status=$?
10765 grep -v '^ *+' conftest.er1 >conftest.err
10766 rm -f conftest.er1
10767 cat conftest.err >&5
10768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010769 (exit $ac_status); } && {
10770 test -z "$ac_c_werror_flag" ||
10771 test ! -s conftest.err
10772 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010773 ac_lo=0 ac_mid=0
10774 while :; do
10775 cat >conftest.$ac_ext <<_ACEOF
10776/* confdefs.h. */
10777_ACEOF
10778cat confdefs.h >>conftest.$ac_ext
10779cat >>conftest.$ac_ext <<_ACEOF
10780/* end confdefs.h. */
10781$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010782 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010783int
10784main ()
10785{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010786static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010787test_array [0] = 0
10788
10789 ;
10790 return 0;
10791}
10792_ACEOF
10793rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010794if { (ac_try="$ac_compile"
10795case "(($ac_try" in
10796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10797 *) ac_try_echo=$ac_try;;
10798esac
10799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010801 ac_status=$?
10802 grep -v '^ *+' conftest.er1 >conftest.err
10803 rm -f conftest.er1
10804 cat conftest.err >&5
10805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010806 (exit $ac_status); } && {
10807 test -z "$ac_c_werror_flag" ||
10808 test ! -s conftest.err
10809 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010810 ac_hi=$ac_mid; break
10811else
10812 echo "$as_me: failed program was:" >&5
10813sed 's/^/| /' conftest.$ac_ext >&5
10814
Martin v. Löwiseba40652007-08-30 20:10:57 +000010815 ac_lo=`expr $ac_mid + 1`
10816 if test $ac_lo -le $ac_mid; then
10817 ac_lo= ac_hi=
10818 break
10819 fi
10820 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010822
10823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010824 done
10825else
10826 echo "$as_me: failed program was:" >&5
10827sed 's/^/| /' conftest.$ac_ext >&5
10828
Martin v. Löwiseba40652007-08-30 20:10:57 +000010829 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010830/* confdefs.h. */
10831_ACEOF
10832cat confdefs.h >>conftest.$ac_ext
10833cat >>conftest.$ac_ext <<_ACEOF
10834/* end confdefs.h. */
10835$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010836 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010837int
10838main ()
10839{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010840static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010841test_array [0] = 0
10842
10843 ;
10844 return 0;
10845}
10846_ACEOF
10847rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010848if { (ac_try="$ac_compile"
10849case "(($ac_try" in
10850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10851 *) ac_try_echo=$ac_try;;
10852esac
10853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10854 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010855 ac_status=$?
10856 grep -v '^ *+' conftest.er1 >conftest.err
10857 rm -f conftest.er1
10858 cat conftest.err >&5
10859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010860 (exit $ac_status); } && {
10861 test -z "$ac_c_werror_flag" ||
10862 test ! -s conftest.err
10863 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010864 ac_hi=-1 ac_mid=-1
10865 while :; do
10866 cat >conftest.$ac_ext <<_ACEOF
10867/* confdefs.h. */
10868_ACEOF
10869cat confdefs.h >>conftest.$ac_ext
10870cat >>conftest.$ac_ext <<_ACEOF
10871/* end confdefs.h. */
10872$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010873 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010874int
10875main ()
10876{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010877static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010878test_array [0] = 0
10879
10880 ;
10881 return 0;
10882}
10883_ACEOF
10884rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010885if { (ac_try="$ac_compile"
10886case "(($ac_try" in
10887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10888 *) ac_try_echo=$ac_try;;
10889esac
10890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010892 ac_status=$?
10893 grep -v '^ *+' conftest.er1 >conftest.err
10894 rm -f conftest.er1
10895 cat conftest.err >&5
10896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010897 (exit $ac_status); } && {
10898 test -z "$ac_c_werror_flag" ||
10899 test ! -s conftest.err
10900 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010901 ac_lo=$ac_mid; break
10902else
10903 echo "$as_me: failed program was:" >&5
10904sed 's/^/| /' conftest.$ac_ext >&5
10905
Martin v. Löwiseba40652007-08-30 20:10:57 +000010906 ac_hi=`expr '(' $ac_mid ')' - 1`
10907 if test $ac_mid -le $ac_hi; then
10908 ac_lo= ac_hi=
10909 break
10910 fi
10911 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010913
10914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010915 done
10916else
10917 echo "$as_me: failed program was:" >&5
10918sed 's/^/| /' conftest.$ac_ext >&5
10919
Martin v. Löwiseba40652007-08-30 20:10:57 +000010920 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010922
10923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010925
10926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010927# Binary search between lo and hi bounds.
10928while test "x$ac_lo" != "x$ac_hi"; do
10929 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10930 cat >conftest.$ac_ext <<_ACEOF
10931/* confdefs.h. */
10932_ACEOF
10933cat confdefs.h >>conftest.$ac_ext
10934cat >>conftest.$ac_ext <<_ACEOF
10935/* end confdefs.h. */
10936$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010937 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010938int
10939main ()
10940{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010941static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010942test_array [0] = 0
10943
10944 ;
10945 return 0;
10946}
10947_ACEOF
10948rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010949if { (ac_try="$ac_compile"
10950case "(($ac_try" in
10951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10952 *) ac_try_echo=$ac_try;;
10953esac
10954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010956 ac_status=$?
10957 grep -v '^ *+' conftest.er1 >conftest.err
10958 rm -f conftest.er1
10959 cat conftest.err >&5
10960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010961 (exit $ac_status); } && {
10962 test -z "$ac_c_werror_flag" ||
10963 test ! -s conftest.err
10964 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010965 ac_hi=$ac_mid
10966else
10967 echo "$as_me: failed program was:" >&5
10968sed 's/^/| /' conftest.$ac_ext >&5
10969
Martin v. Löwiseba40652007-08-30 20:10:57 +000010970 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010972
10973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010974done
10975case $ac_lo in
10976?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010977'') if test "$ac_cv_type__Bool" = yes; then
10978 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010979See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010980echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010981See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010982 { (exit 77); exit 77; }; }
10983 else
10984 ac_cv_sizeof__Bool=0
10985 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010986esac
10987else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010988 cat >conftest.$ac_ext <<_ACEOF
10989/* confdefs.h. */
10990_ACEOF
10991cat confdefs.h >>conftest.$ac_ext
10992cat >>conftest.$ac_ext <<_ACEOF
10993/* end confdefs.h. */
10994$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010995 typedef _Bool ac__type_sizeof_;
10996static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10997static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010998#include <stdio.h>
10999#include <stdlib.h>
11000int
11001main ()
11002{
11003
11004 FILE *f = fopen ("conftest.val", "w");
11005 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011006 return 1;
11007 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011008 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011009 long int i = longval ();
11010 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11011 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011012 fprintf (f, "%ld\n", i);
11013 }
11014 else
11015 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011016 unsigned long int i = ulongval ();
11017 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11018 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011019 fprintf (f, "%lu\n", i);
11020 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011021 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011022
11023 ;
11024 return 0;
11025}
11026_ACEOF
11027rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011028if { (ac_try="$ac_link"
11029case "(($ac_try" in
11030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11031 *) ac_try_echo=$ac_try;;
11032esac
11033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11034 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011035 ac_status=$?
11036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11037 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011038 { (case "(($ac_try" in
11039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11040 *) ac_try_echo=$ac_try;;
11041esac
11042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11043 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011044 ac_status=$?
11045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11046 (exit $ac_status); }; }; then
11047 ac_cv_sizeof__Bool=`cat conftest.val`
11048else
11049 echo "$as_me: program exited with status $ac_status" >&5
11050echo "$as_me: failed program was:" >&5
11051sed 's/^/| /' conftest.$ac_ext >&5
11052
11053( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011054if test "$ac_cv_type__Bool" = yes; then
11055 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011056See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011057echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011058See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011059 { (exit 77); exit 77; }; }
11060 else
11061 ac_cv_sizeof__Bool=0
11062 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011064rm -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 +000011065fi
11066rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011068{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11069echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11070
11071
11072
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011073cat >>confdefs.h <<_ACEOF
11074#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11075_ACEOF
11076
11077
11078fi
11079
Martin v. Löwiseba40652007-08-30 20:10:57 +000011080{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11081echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011082if test "${ac_cv_type_uintptr_t+set}" = set; then
11083 echo $ECHO_N "(cached) $ECHO_C" >&6
11084else
11085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011086/* confdefs.h. */
11087_ACEOF
11088cat confdefs.h >>conftest.$ac_ext
11089cat >>conftest.$ac_ext <<_ACEOF
11090/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011091#ifdef HAVE_STDINT_H
11092 #include <stdint.h>
11093 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011094
Martin v. Löwiseba40652007-08-30 20:10:57 +000011095typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011096int
11097main ()
11098{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011099if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011100 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011101if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011102 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 ;
11104 return 0;
11105}
11106_ACEOF
11107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011108if { (ac_try="$ac_compile"
11109case "(($ac_try" in
11110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11111 *) ac_try_echo=$ac_try;;
11112esac
11113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011116 grep -v '^ *+' conftest.er1 >conftest.err
11117 rm -f conftest.er1
11118 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011120 (exit $ac_status); } && {
11121 test -z "$ac_c_werror_flag" ||
11122 test ! -s conftest.err
11123 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011124 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011125else
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011127sed 's/^/| /' conftest.$ac_ext >&5
11128
Martin v. Löwiseba40652007-08-30 20:10:57 +000011129 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011131
11132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011134{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11135echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011136if test $ac_cv_type_uintptr_t = yes; then
11137
11138cat >>confdefs.h <<_ACEOF
11139#define HAVE_UINTPTR_T 1
11140_ACEOF
11141
Martin v. Löwiseba40652007-08-30 20:10:57 +000011142{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11143echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011144if test "${ac_cv_type_uintptr_t+set}" = set; then
11145 echo $ECHO_N "(cached) $ECHO_C" >&6
11146else
11147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011148/* confdefs.h. */
11149_ACEOF
11150cat confdefs.h >>conftest.$ac_ext
11151cat >>conftest.$ac_ext <<_ACEOF
11152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011153$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011154typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011155int
11156main ()
11157{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011158if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011160if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 return 0;
11162 ;
11163 return 0;
11164}
11165_ACEOF
11166rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011167if { (ac_try="$ac_compile"
11168case "(($ac_try" in
11169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11170 *) ac_try_echo=$ac_try;;
11171esac
11172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011175 grep -v '^ *+' conftest.er1 >conftest.err
11176 rm -f conftest.er1
11177 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011179 (exit $ac_status); } && {
11180 test -z "$ac_c_werror_flag" ||
11181 test ! -s conftest.err
11182 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011183 ac_cv_type_uintptr_t=yes
11184else
11185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011186sed 's/^/| /' conftest.$ac_ext >&5
11187
Martin v. Löwiseba40652007-08-30 20:10:57 +000011188 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011189fi
Brett Cannon19fab762007-06-02 03:02:29 +000011190
Martin v. Löwiseba40652007-08-30 20:10:57 +000011191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11192fi
11193{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11194echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11195
11196# The cast to long int works around a bug in the HP C Compiler
11197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11198# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11199# This bug is HP SR number 8606223364.
11200{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11201echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011202if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11203 echo $ECHO_N "(cached) $ECHO_C" >&6
11204else
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 if test "$cross_compiling" = yes; then
11206 # Depending upon the size, compute the lo and hi bounds.
11207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011208/* confdefs.h. */
11209_ACEOF
11210cat confdefs.h >>conftest.$ac_ext
11211cat >>conftest.$ac_ext <<_ACEOF
11212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011213$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011214 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011215int
11216main ()
11217{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011218static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011219test_array [0] = 0
11220
11221 ;
11222 return 0;
11223}
11224_ACEOF
11225rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011226if { (ac_try="$ac_compile"
11227case "(($ac_try" in
11228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11229 *) ac_try_echo=$ac_try;;
11230esac
11231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011234 grep -v '^ *+' conftest.er1 >conftest.err
11235 rm -f conftest.er1
11236 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011238 (exit $ac_status); } && {
11239 test -z "$ac_c_werror_flag" ||
11240 test ! -s conftest.err
11241 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011242 ac_lo=0 ac_mid=0
11243 while :; do
11244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011245/* confdefs.h. */
11246_ACEOF
11247cat confdefs.h >>conftest.$ac_ext
11248cat >>conftest.$ac_ext <<_ACEOF
11249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011250$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011251 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011252int
11253main ()
11254{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011255static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000011270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011271 grep -v '^ *+' conftest.er1 >conftest.err
11272 rm -f conftest.er1
11273 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011274 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öwis11437992002-04-12 09:54:03 +000011279 ac_hi=$ac_mid; break
11280else
11281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011282sed 's/^/| /' conftest.$ac_ext >&5
11283
Martin v. Löwiseba40652007-08-30 20:10:57 +000011284 ac_lo=`expr $ac_mid + 1`
11285 if test $ac_lo -le $ac_mid; then
11286 ac_lo= ac_hi=
11287 break
11288 fi
11289 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011291
11292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011293 done
11294else
11295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011296sed 's/^/| /' conftest.$ac_ext >&5
11297
Martin v. Löwiseba40652007-08-30 20:10:57 +000011298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011299/* confdefs.h. */
11300_ACEOF
11301cat confdefs.h >>conftest.$ac_ext
11302cat >>conftest.$ac_ext <<_ACEOF
11303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011304$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011305 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011306int
11307main ()
11308{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011309static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011310test_array [0] = 0
11311
11312 ;
11313 return 0;
11314}
11315_ACEOF
11316rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011317if { (ac_try="$ac_compile"
11318case "(($ac_try" in
11319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11320 *) ac_try_echo=$ac_try;;
11321esac
11322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011325 grep -v '^ *+' conftest.er1 >conftest.err
11326 rm -f conftest.er1
11327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011329 (exit $ac_status); } && {
11330 test -z "$ac_c_werror_flag" ||
11331 test ! -s conftest.err
11332 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 ac_hi=-1 ac_mid=-1
11334 while :; do
11335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011336/* confdefs.h. */
11337_ACEOF
11338cat confdefs.h >>conftest.$ac_ext
11339cat >>conftest.$ac_ext <<_ACEOF
11340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011341$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011342 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011343int
11344main ()
11345{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011346static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011347test_array [0] = 0
11348
11349 ;
11350 return 0;
11351}
11352_ACEOF
11353rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011354if { (ac_try="$ac_compile"
11355case "(($ac_try" in
11356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11357 *) ac_try_echo=$ac_try;;
11358esac
11359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011362 grep -v '^ *+' conftest.er1 >conftest.err
11363 rm -f conftest.er1
11364 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011366 (exit $ac_status); } && {
11367 test -z "$ac_c_werror_flag" ||
11368 test ! -s conftest.err
11369 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011370 ac_lo=$ac_mid; break
11371else
11372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011373sed 's/^/| /' conftest.$ac_ext >&5
11374
Martin v. Löwiseba40652007-08-30 20:10:57 +000011375 ac_hi=`expr '(' $ac_mid ')' - 1`
11376 if test $ac_mid -le $ac_hi; then
11377 ac_lo= ac_hi=
11378 break
11379 fi
11380 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011382
11383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011384 done
11385else
11386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011387sed 's/^/| /' conftest.$ac_ext >&5
11388
Martin v. Löwiseba40652007-08-30 20:10:57 +000011389 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011391
11392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011394
11395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011396# Binary search between lo and hi bounds.
11397while test "x$ac_lo" != "x$ac_hi"; do
11398 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011400/* confdefs.h. */
11401_ACEOF
11402cat confdefs.h >>conftest.$ac_ext
11403cat >>conftest.$ac_ext <<_ACEOF
11404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011405$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011406 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011407int
11408main ()
11409{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011411test_array [0] = 0
11412
11413 ;
11414 return 0;
11415}
11416_ACEOF
11417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011418if { (ac_try="$ac_compile"
11419case "(($ac_try" in
11420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11421 *) ac_try_echo=$ac_try;;
11422esac
11423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011426 grep -v '^ *+' conftest.er1 >conftest.err
11427 rm -f conftest.er1
11428 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011430 (exit $ac_status); } && {
11431 test -z "$ac_c_werror_flag" ||
11432 test ! -s conftest.err
11433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011434 ac_hi=$ac_mid
11435else
11436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011437sed 's/^/| /' conftest.$ac_ext >&5
11438
Martin v. Löwiseba40652007-08-30 20:10:57 +000011439 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011441
11442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011443done
11444case $ac_lo in
11445?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011446'') if test "$ac_cv_type_uintptr_t" = yes; then
11447 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011448See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011449echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011450See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011451 { (exit 77); exit 77; }; }
11452 else
11453 ac_cv_sizeof_uintptr_t=0
11454 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011455esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011456else
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011458/* confdefs.h. */
11459_ACEOF
11460cat confdefs.h >>conftest.$ac_ext
11461cat >>conftest.$ac_ext <<_ACEOF
11462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011463$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011464 typedef uintptr_t ac__type_sizeof_;
11465static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11466static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011467#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011468#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011469int
11470main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011471{
Martin v. Löwis11437992002-04-12 09:54:03 +000011472
11473 FILE *f = fopen ("conftest.val", "w");
11474 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011475 return 1;
11476 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011477 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011478 long int i = longval ();
11479 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11480 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011481 fprintf (f, "%ld\n", i);
11482 }
11483 else
11484 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011485 unsigned long int i = ulongval ();
11486 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11487 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 fprintf (f, "%lu\n", i);
11489 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011490 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011491
11492 ;
11493 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011494}
Martin v. Löwis11437992002-04-12 09:54:03 +000011495_ACEOF
11496rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011497if { (ac_try="$ac_link"
11498case "(($ac_try" in
11499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11500 *) ac_try_echo=$ac_try;;
11501esac
11502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11503 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011504 ac_status=$?
11505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11506 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011507 { (case "(($ac_try" in
11508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11509 *) ac_try_echo=$ac_try;;
11510esac
11511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11512 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 ac_status=$?
11514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11515 (exit $ac_status); }; }; then
11516 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011517else
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 echo "$as_me: program exited with status $ac_status" >&5
11519echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011520sed 's/^/| /' conftest.$ac_ext >&5
11521
Martin v. Löwis11437992002-04-12 09:54:03 +000011522( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011523if test "$ac_cv_type_uintptr_t" = yes; then
11524 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011525See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011526echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011527See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011528 { (exit 77); exit 77; }; }
11529 else
11530 ac_cv_sizeof_uintptr_t=0
11531 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011533rm -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 +000011534fi
11535rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011537{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11538echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
11539
11540
11541
Martin v. Löwis11437992002-04-12 09:54:03 +000011542cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011543#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011544_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011545
Michael W. Hudson54241132001-12-07 15:38:26 +000011546
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011547fi
11548
Martin v. Löwisebe26702006-10-02 14:55:51 +000011549
11550
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011551# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011552{ echo "$as_me:$LINENO: checking size of off_t" >&5
11553echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011554if test "${ac_cv_sizeof_off_t+set}" = set; then
11555 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011556else
11557 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011558 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011559else
Martin v. Löwis11437992002-04-12 09:54:03 +000011560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011561/* confdefs.h. */
11562_ACEOF
11563cat confdefs.h >>conftest.$ac_ext
11564cat >>conftest.$ac_ext <<_ACEOF
11565/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011566#include <stdio.h>
11567#include <sys/types.h>
11568main()
11569{
11570 FILE *f=fopen("conftestval", "w");
11571 if (!f) exit(1);
11572 fprintf(f, "%d\n", sizeof(off_t));
11573 exit(0);
11574}
Martin v. Löwis11437992002-04-12 09:54:03 +000011575_ACEOF
11576rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011577if { (ac_try="$ac_link"
11578case "(($ac_try" in
11579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11580 *) ac_try_echo=$ac_try;;
11581esac
11582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11583 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 ac_status=$?
11585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11586 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011587 { (case "(($ac_try" in
11588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11589 *) ac_try_echo=$ac_try;;
11590esac
11591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11592 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 ac_status=$?
11594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11595 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011596 ac_cv_sizeof_off_t=`cat conftestval`
11597else
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 echo "$as_me: program exited with status $ac_status" >&5
11599echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011600sed 's/^/| /' conftest.$ac_ext >&5
11601
Martin v. Löwis11437992002-04-12 09:54:03 +000011602( exit $ac_status )
11603ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011605rm -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 +000011606fi
11607
Martin v. Löwiseba40652007-08-30 20:10:57 +000011608
11609
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011610fi
11611
Martin v. Löwiseba40652007-08-30 20:10:57 +000011612{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
11613echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011614
11615cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011616#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011617_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011618
Michael W. Hudson54241132001-12-07 15:38:26 +000011619
Martin v. Löwiseba40652007-08-30 20:10:57 +000011620{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
11621echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011622if test "$have_long_long" = yes -a \
11623 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
11624 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011625
Martin v. Löwis11437992002-04-12 09:54:03 +000011626cat >>confdefs.h <<\_ACEOF
11627#define HAVE_LARGEFILE_SUPPORT 1
11628_ACEOF
11629
Martin v. Löwiseba40652007-08-30 20:10:57 +000011630 { echo "$as_me:$LINENO: result: yes" >&5
11631echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011632else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011633 { echo "$as_me:$LINENO: result: no" >&5
11634echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011635fi
11636
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011637# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011638{ echo "$as_me:$LINENO: checking size of time_t" >&5
11639echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011640if test "${ac_cv_sizeof_time_t+set}" = set; then
11641 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011642else
11643 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011644 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011645else
Martin v. Löwis11437992002-04-12 09:54:03 +000011646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011647/* confdefs.h. */
11648_ACEOF
11649cat confdefs.h >>conftest.$ac_ext
11650cat >>conftest.$ac_ext <<_ACEOF
11651/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011652#include <stdio.h>
11653#include <time.h>
11654main()
11655{
11656 FILE *f=fopen("conftestval", "w");
11657 if (!f) exit(1);
11658 fprintf(f, "%d\n", sizeof(time_t));
11659 exit(0);
11660}
Martin v. Löwis11437992002-04-12 09:54:03 +000011661_ACEOF
11662rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011663if { (ac_try="$ac_link"
11664case "(($ac_try" in
11665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11666 *) ac_try_echo=$ac_try;;
11667esac
11668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11669 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011670 ac_status=$?
11671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11672 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011673 { (case "(($ac_try" in
11674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11675 *) ac_try_echo=$ac_try;;
11676esac
11677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11678 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011679 ac_status=$?
11680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11681 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011682 ac_cv_sizeof_time_t=`cat conftestval`
11683else
Martin v. Löwis11437992002-04-12 09:54:03 +000011684 echo "$as_me: program exited with status $ac_status" >&5
11685echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011686sed 's/^/| /' conftest.$ac_ext >&5
11687
Martin v. Löwis11437992002-04-12 09:54:03 +000011688( exit $ac_status )
11689ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011691rm -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 +000011692fi
11693
Martin v. Löwiseba40652007-08-30 20:10:57 +000011694
11695
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011696fi
11697
Martin v. Löwiseba40652007-08-30 20:10:57 +000011698{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
11699echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011700
11701cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011702#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011703_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011704
Michael W. Hudson54241132001-12-07 15:38:26 +000011705
11706
Trent Mick635f6fb2000-08-23 21:33:05 +000011707# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011708ac_save_cc="$CC"
11709if test "$ac_cv_kpthread" = "yes"
11710then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011711elif test "$ac_cv_kthread" = "yes"
11712then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011713elif test "$ac_cv_pthread" = "yes"
11714then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011716{ echo "$as_me:$LINENO: checking for pthread_t" >&5
11717echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000011718have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011719cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011720/* confdefs.h. */
11721_ACEOF
11722cat confdefs.h >>conftest.$ac_ext
11723cat >>conftest.$ac_ext <<_ACEOF
11724/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000011725#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011726int
11727main ()
11728{
Guido van Rossum12580492000-09-24 16:47:19 +000011729pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011730 ;
11731 return 0;
11732}
11733_ACEOF
11734rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011735if { (ac_try="$ac_compile"
11736case "(($ac_try" in
11737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11738 *) ac_try_echo=$ac_try;;
11739esac
11740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11741 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011743 grep -v '^ *+' conftest.er1 >conftest.err
11744 rm -f conftest.er1
11745 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011747 (exit $ac_status); } && {
11748 test -z "$ac_c_werror_flag" ||
11749 test ! -s conftest.err
11750 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000011751 have_pthread_t=yes
11752else
Martin v. Löwis11437992002-04-12 09:54:03 +000011753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011754sed 's/^/| /' conftest.$ac_ext >&5
11755
Martin v. Löwiseba40652007-08-30 20:10:57 +000011756
Trent Mick635f6fb2000-08-23 21:33:05 +000011757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011758
11759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11760{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
11761echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000011762if test "$have_pthread_t" = yes ; then
11763 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011764 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
11765echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
11767 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000011768else
11769 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011770 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000011771else
Martin v. Löwis11437992002-04-12 09:54:03 +000011772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011773/* confdefs.h. */
11774_ACEOF
11775cat confdefs.h >>conftest.$ac_ext
11776cat >>conftest.$ac_ext <<_ACEOF
11777/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000011778#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011779#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000011780 main()
11781 {
11782 FILE *f=fopen("conftestval", "w");
11783 if (!f) exit(1);
11784 fprintf(f, "%d\n", sizeof(pthread_t));
11785 exit(0);
11786 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011787_ACEOF
11788rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011789if { (ac_try="$ac_link"
11790case "(($ac_try" in
11791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11792 *) ac_try_echo=$ac_try;;
11793esac
11794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11795 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011796 ac_status=$?
11797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11798 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011799 { (case "(($ac_try" in
11800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11801 *) ac_try_echo=$ac_try;;
11802esac
11803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11804 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011805 ac_status=$?
11806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11807 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000011808 ac_cv_sizeof_pthread_t=`cat conftestval`
11809else
Martin v. Löwis11437992002-04-12 09:54:03 +000011810 echo "$as_me: program exited with status $ac_status" >&5
11811echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011812sed 's/^/| /' conftest.$ac_ext >&5
11813
Martin v. Löwis11437992002-04-12 09:54:03 +000011814( exit $ac_status )
11815ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000011816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011817rm -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 +000011818fi
11819
Martin v. Löwiseba40652007-08-30 20:10:57 +000011820
11821
Trent Mick635f6fb2000-08-23 21:33:05 +000011822fi
11823
Martin v. Löwiseba40652007-08-30 20:10:57 +000011824 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
11825echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011826
11827cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000011828#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011829_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000011830
11831fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011832CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000011833
Martin v. Löwiseba40652007-08-30 20:10:57 +000011834{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
11835echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
11836# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000011837if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011838 enableval=$enable_toolbox_glue;
11839fi
Jack Jansene578a632001-08-15 01:27:14 +000011840
11841
11842if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000011843then
Jack Jansene578a632001-08-15 01:27:14 +000011844 case $ac_sys_system/$ac_sys_release in
11845 Darwin/*)
11846 enable_toolbox_glue="yes";;
11847 *)
11848 enable_toolbox_glue="no";;
11849 esac
11850fi
11851case "$enable_toolbox_glue" in
11852yes)
Jack Jansene578a632001-08-15 01:27:14 +000011853 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011854 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000011855
11856cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000011857#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011858_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000011859
11860 ;;
11861*)
Jack Jansene578a632001-08-15 01:27:14 +000011862 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000011863 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000011864 ;;
11865esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000011866{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
11867echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011868
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011869
11870case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000011871 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000011872 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
11873 ;;
11874 Darwin/*)
11875 OTHER_LIBTOOL_OPT=""
11876 ;;
11877esac
11878
11879
11880case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000011881 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000011882 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
11883 if test "${enable_universalsdk}"; then
11884 :
11885 else
11886 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
11887 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000011888 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000011889 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000011890 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000011891 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
11892 if test ${gcc_version} '<' 4.0
11893 then
11894 LIBTOOL_CRUFT="-lcc_dynamic"
11895 else
11896 LIBTOOL_CRUFT=""
11897 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000011898 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000011899 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011900 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011901esac
11902
Martin v. Löwiseba40652007-08-30 20:10:57 +000011903{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
11904echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000011905if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011906then
Skip Montanarodecc6a42003-01-01 20:07:49 +000011907 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000011908 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000011909 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011910
Martin v. Löwis11437992002-04-12 09:54:03 +000011911cat >>confdefs.h <<\_ACEOF
11912#define WITH_NEXT_FRAMEWORK 1
11913_ACEOF
11914
Martin v. Löwiseba40652007-08-30 20:10:57 +000011915 { echo "$as_me:$LINENO: result: yes" >&5
11916echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011917else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011918 { echo "$as_me:$LINENO: result: no" >&5
11919echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011920fi
11921
Martin v. Löwiseba40652007-08-30 20:10:57 +000011922{ echo "$as_me:$LINENO: checking for dyld" >&5
11923echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011924case $ac_sys_system/$ac_sys_release in
11925 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011926
Martin v. Löwis11437992002-04-12 09:54:03 +000011927cat >>confdefs.h <<\_ACEOF
11928#define WITH_DYLD 1
11929_ACEOF
11930
Martin v. Löwiseba40652007-08-30 20:10:57 +000011931 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
11932echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011933 ;;
11934 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011935 { echo "$as_me:$LINENO: result: no" >&5
11936echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000011937 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011938esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011939
Guido van Rossum0a516c91994-09-12 10:58:40 +000011940# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000011941
Michael W. Hudson54241132001-12-07 15:38:26 +000011942
11943
11944
11945
Guido van Rossum0a516c91994-09-12 10:58:40 +000011946# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000011947# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000011948{ echo "$as_me:$LINENO: checking SO" >&5
11949echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000011950if test -z "$SO"
11951then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011952 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000011953 hp*|HP*)
11954 case `uname -m` in
11955 ia64) SO=.so;;
11956 *) SO=.sl;;
11957 esac
11958 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000011959 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011960 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011961 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000011962else
11963 # this might also be a termcap variable, see #610332
11964 echo
11965 echo '====================================================================='
11966 echo '+ +'
11967 echo '+ WARNING: You have set SO in your environment. +'
11968 echo '+ Do you really mean to change the extension for shared libraries? +'
11969 echo '+ Continuing in 10 seconds to let you to ponder. +'
11970 echo '+ +'
11971 echo '====================================================================='
11972 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000011973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011974{ echo "$as_me:$LINENO: result: $SO" >&5
11975echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000011976
11977cat >>confdefs.h <<_ACEOF
11978#define SHLIB_EXT "$SO"
11979_ACEOF
11980
Guido van Rossum0a516c91994-09-12 10:58:40 +000011981# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000011982# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011983# (Shared libraries in this instance are shared modules to be loaded into
11984# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011985{ echo "$as_me:$LINENO: checking LDSHARED" >&5
11986echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000011987if test -z "$LDSHARED"
11988then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011989 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011990 AIX*)
11991 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000011992 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011993 ;;
11994 BeOS*)
11995 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000011996 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011997 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000011998 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000011999 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012000 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012001 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012002 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012003 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012004 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012005 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012006 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012007 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012008 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12009 if test "$enable_framework" ; then
12010 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012011 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12012 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012013 else
12014 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012015 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012016 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012017 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012018 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12019 if test "$enable_framework" ; then
12020 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012021 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12022 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012023 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012024 # No framework, use the Python app as bundle-loader
12025 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012026 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012027 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012028 Darwin/*)
12029 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12030 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012031 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012032 if test ${cur_target} '>' 10.2; then
12033 cur_target=10.3
12034 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012035 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012036
12037 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12038 # environment with a value that is the same as what we'll use
12039 # in the Makefile to ensure that we'll get the same compiler
12040 # environment during configure and build time.
12041 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12042 export MACOSX_DEPLOYMENT_TARGET
12043
Ronald Oussoren988117f2006-04-29 11:31:35 +000012044 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012045 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012046 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012047 if test "${enable_universalsdk}"; then
12048 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12049 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012050 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12051 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012052 else
12053 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12054 if test "$enable_framework" ; then
12055 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012056 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12057 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012058 else
12059 # No framework, use the Python app as bundle-loader
12060 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12061 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12062 fi
12063 fi
12064 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012065 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012066 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012067 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012068 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012069 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012070 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012071 else
12072 LDSHARED="ld -Bshareable ${LDFLAGS}"
12073 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012074 OpenBSD*)
12075 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12076 then
12077 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12078 else
12079 case `uname -r` in
12080 [01].* | 2.[0-7] | 2.[0-7].*)
12081 LDSHARED="ld -Bshareable ${LDFLAGS}"
12082 ;;
12083 *)
12084 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12085 ;;
12086 esac
12087 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012088 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012089 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012090 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012091 then LDSHARED='$(CC) -shared'
12092 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012093 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012094 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012095 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012096 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012097 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012098 *) LDSHARED="ld";;
12099 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012101{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12102echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012103BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012104# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012105# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012106{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12107echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012108if test -z "$CCSHARED"
12109then
Guido van Rossum07397971997-04-29 21:49:50 +000012110 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012111 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012112 then CCSHARED="-fPIC";
12113 elif test `uname -p` = sparc;
12114 then CCSHARED="-xcode=pic32";
12115 else CCSHARED="-Kpic";
12116 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012117 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012118 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012119 else CCSHARED="+z";
12120 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012121 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012122 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012123 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012124 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012125 if test "$GCC" = "yes"
12126 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012127 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012128 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012129 SCO_SV*)
12130 if test "$GCC" = "yes"
12131 then CCSHARED="-fPIC"
12132 else CCSHARED="-Kpic -belf"
12133 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012134 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012135 IRIX*/6*) case $CC in
12136 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012137 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012138 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012139 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012140 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012142{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12143echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012144# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012145# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012146{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12147echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012148if test -z "$LINKFORSHARED"
12149then
Guido van Rossum07397971997-04-29 21:49:50 +000012150 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012151 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012152 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012153 LINKFORSHARED="-Wl,-E -Wl,+s";;
12154# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012155 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012156 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012157 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012159 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12160 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012161 # not used by the core itself but which needs to be in the core so
12162 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012163 # -prebind is no longer used, because it actually seems to give a
12164 # slowdown in stead of a speedup, maybe due to the large number of
12165 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012166
12167 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012168 if test "$enable_framework"
12169 then
Jack Jansenda49e192005-01-07 13:08:22 +000012170 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012171 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012172 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012173 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012174 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012175 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012176 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012177 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12178 then
12179 LINKFORSHARED="-Wl,--export-dynamic"
12180 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012181 SunOS/5*) case $CC in
12182 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012183 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012184 then
12185 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012186 fi;;
12187 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012188 CYGWIN*)
12189 if test $enable_shared = "no"
12190 then
12191 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12192 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012193 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012195{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12196echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012197
Michael W. Hudson54241132001-12-07 15:38:26 +000012198
Martin v. Löwiseba40652007-08-30 20:10:57 +000012199{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12200echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012201if test ! "$LIBRARY" = "$LDLIBRARY"
12202then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012203 case $ac_sys_system in
12204 CYGWIN*)
12205 # Cygwin needs CCSHARED when building extension DLLs
12206 # but not when building the interpreter DLL.
12207 CFLAGSFORSHARED='';;
12208 *)
12209 CFLAGSFORSHARED='$(CCSHARED)'
12210 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012212{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12213echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012214
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012215# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12216# library (with --enable-shared).
12217# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012218# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12219# if it is not required, since it creates a dependency of the shared library
12220# to LIBS. This, in turn, means that applications linking the shared libpython
12221# don't need to link LIBS explicitly. The default should be only changed
12222# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012223
Martin v. Löwiseba40652007-08-30 20:10:57 +000012224{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12225echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012226case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012227 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012228 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012229esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012230{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12231echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012232
12233
Guido van Rossum627b2d71993-12-24 10:39:16 +000012234# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012235
Martin v. Löwiseba40652007-08-30 20:10:57 +000012236{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12237echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012238if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12239 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012240else
Martin v. Löwis11437992002-04-12 09:54:03 +000012241 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012242LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012244/* confdefs.h. */
12245_ACEOF
12246cat confdefs.h >>conftest.$ac_ext
12247cat >>conftest.$ac_ext <<_ACEOF
12248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012249
Martin v. Löwiseba40652007-08-30 20:10:57 +000012250/* Override any GCC internal prototype to avoid an error.
12251 Use char because int might match the return type of a GCC
12252 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012253#ifdef __cplusplus
12254extern "C"
12255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012256char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012257int
12258main ()
12259{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012260return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 ;
12262 return 0;
12263}
12264_ACEOF
12265rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012266if { (ac_try="$ac_link"
12267case "(($ac_try" in
12268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12269 *) ac_try_echo=$ac_try;;
12270esac
12271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12272 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012273 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012274 grep -v '^ *+' conftest.er1 >conftest.err
12275 rm -f conftest.er1
12276 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012278 (exit $ac_status); } && {
12279 test -z "$ac_c_werror_flag" ||
12280 test ! -s conftest.err
12281 } && test -s conftest$ac_exeext &&
12282 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012284else
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012286sed 's/^/| /' conftest.$ac_ext >&5
12287
Martin v. Löwiseba40652007-08-30 20:10:57 +000012288 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012290
12291rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012292 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012293LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012295{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12296echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012297if test $ac_cv_lib_dl_dlopen = yes; then
12298 cat >>confdefs.h <<_ACEOF
12299#define HAVE_LIBDL 1
12300_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012301
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012302 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012303
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012304fi
12305 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012306
Martin v. Löwiseba40652007-08-30 20:10:57 +000012307{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12308echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012309if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12310 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012311else
Martin v. Löwis11437992002-04-12 09:54:03 +000012312 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012313LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012314cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* confdefs.h. */
12316_ACEOF
12317cat confdefs.h >>conftest.$ac_ext
12318cat >>conftest.$ac_ext <<_ACEOF
12319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012320
Martin v. Löwiseba40652007-08-30 20:10:57 +000012321/* Override any GCC internal prototype to avoid an error.
12322 Use char because int might match the return type of a GCC
12323 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012324#ifdef __cplusplus
12325extern "C"
12326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012327char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012328int
12329main ()
12330{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012331return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012332 ;
12333 return 0;
12334}
12335_ACEOF
12336rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012337if { (ac_try="$ac_link"
12338case "(($ac_try" in
12339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12340 *) ac_try_echo=$ac_try;;
12341esac
12342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12343 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012345 grep -v '^ *+' conftest.er1 >conftest.err
12346 rm -f conftest.er1
12347 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012349 (exit $ac_status); } && {
12350 test -z "$ac_c_werror_flag" ||
12351 test ! -s conftest.err
12352 } && test -s conftest$ac_exeext &&
12353 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012355else
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012357sed 's/^/| /' conftest.$ac_ext >&5
12358
Martin v. Löwiseba40652007-08-30 20:10:57 +000012359 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012361
12362rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012363 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012364LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012366{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12367echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012368if test $ac_cv_lib_dld_shl_load = yes; then
12369 cat >>confdefs.h <<_ACEOF
12370#define HAVE_LIBDLD 1
12371_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012372
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012373 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012374
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012375fi
12376 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012377
12378# only check for sem_ini if thread support is requested
12379if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012380 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12381echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012382if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012383 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012384else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012385 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012386cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012387/* confdefs.h. */
12388_ACEOF
12389cat confdefs.h >>conftest.$ac_ext
12390cat >>conftest.$ac_ext <<_ACEOF
12391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012392
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393/* Override any GCC internal prototype to avoid an error.
12394 Use char because int might match the return type of a GCC
12395 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012396#ifdef __cplusplus
12397extern "C"
12398#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012399char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012400int
12401main ()
12402{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012403return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012404 ;
12405 return 0;
12406}
12407_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012408for ac_lib in '' pthread rt posix4; do
12409 if test -z "$ac_lib"; then
12410 ac_res="none required"
12411 else
12412 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012413 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012414 fi
12415 rm -f conftest.$ac_objext conftest$ac_exeext
12416if { (ac_try="$ac_link"
12417case "(($ac_try" in
12418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12419 *) ac_try_echo=$ac_try;;
12420esac
12421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12422 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012423 ac_status=$?
12424 grep -v '^ *+' conftest.er1 >conftest.err
12425 rm -f conftest.er1
12426 cat conftest.err >&5
12427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012428 (exit $ac_status); } && {
12429 test -z "$ac_c_werror_flag" ||
12430 test ! -s conftest.err
12431 } && test -s conftest$ac_exeext &&
12432 $as_test_x conftest$ac_exeext; then
12433 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012434else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012435 echo "$as_me: failed program was:" >&5
12436sed 's/^/| /' conftest.$ac_ext >&5
12437
Martin v. Löwiseba40652007-08-30 20:10:57 +000012438
Brett Cannon19fab762007-06-02 03:02:29 +000012439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012440
12441rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12442 conftest$ac_exeext
12443 if test "${ac_cv_search_sem_init+set}" = set; then
12444 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012446done
12447if test "${ac_cv_search_sem_init+set}" = set; then
12448 :
12449else
12450 ac_cv_search_sem_init=no
12451fi
12452rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012453LIBS=$ac_func_search_save_LIBS
12454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012455{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12456echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12457ac_res=$ac_cv_search_sem_init
12458if test "$ac_res" != no; then
12459 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012460
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012461fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012462 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012463 # posix4 on Solaris 2.6
12464 # pthread (first!) on Linux
12465fi
12466
Martin v. Löwis19d17342003-06-14 21:03:05 +000012467# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012468{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12469echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012470if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12471 echo $ECHO_N "(cached) $ECHO_C" >&6
12472else
12473 ac_check_lib_save_LIBS=$LIBS
12474LIBS="-lintl $LIBS"
12475cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012476/* confdefs.h. */
12477_ACEOF
12478cat confdefs.h >>conftest.$ac_ext
12479cat >>conftest.$ac_ext <<_ACEOF
12480/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012481
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482/* Override any GCC internal prototype to avoid an error.
12483 Use char because int might match the return type of a GCC
12484 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012485#ifdef __cplusplus
12486extern "C"
12487#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012488char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012489int
12490main ()
12491{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012493 ;
12494 return 0;
12495}
12496_ACEOF
12497rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012498if { (ac_try="$ac_link"
12499case "(($ac_try" in
12500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12501 *) ac_try_echo=$ac_try;;
12502esac
12503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12504 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012506 grep -v '^ *+' conftest.er1 >conftest.err
12507 rm -f conftest.er1
12508 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012510 (exit $ac_status); } && {
12511 test -z "$ac_c_werror_flag" ||
12512 test ! -s conftest.err
12513 } && test -s conftest$ac_exeext &&
12514 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012515 ac_cv_lib_intl_textdomain=yes
12516else
12517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012518sed 's/^/| /' conftest.$ac_ext >&5
12519
Martin v. Löwiseba40652007-08-30 20:10:57 +000012520 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012522
12523rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012525LIBS=$ac_check_lib_save_LIBS
12526fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012527{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12528echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012529if test $ac_cv_lib_intl_textdomain = yes; then
12530
12531cat >>confdefs.h <<\_ACEOF
12532#define WITH_LIBINTL 1
12533_ACEOF
12534
12535fi
12536
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012537
12538# checks for system dependent C++ extensions support
12539case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000012540 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12541echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012543/* confdefs.h. */
12544_ACEOF
12545cat confdefs.h >>conftest.$ac_ext
12546cat >>conftest.$ac_ext <<_ACEOF
12547/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012548#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012549int
12550main ()
12551{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012552loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 ;
12554 return 0;
12555}
12556_ACEOF
12557rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012558if { (ac_try="$ac_link"
12559case "(($ac_try" in
12560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12561 *) ac_try_echo=$ac_try;;
12562esac
12563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12564 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012566 grep -v '^ *+' conftest.er1 >conftest.err
12567 rm -f conftest.er1
12568 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570 (exit $ac_status); } && {
12571 test -z "$ac_c_werror_flag" ||
12572 test ! -s conftest.err
12573 } && test -s conftest$ac_exeext &&
12574 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012575
Martin v. Löwis11437992002-04-12 09:54:03 +000012576cat >>confdefs.h <<\_ACEOF
12577#define AIX_GENUINE_CPLUSPLUS 1
12578_ACEOF
12579
Martin v. Löwiseba40652007-08-30 20:10:57 +000012580 { echo "$as_me:$LINENO: result: yes" >&5
12581echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012582else
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012584sed 's/^/| /' conftest.$ac_ext >&5
12585
Martin v. Löwiseba40652007-08-30 20:10:57 +000012586 { echo "$as_me:$LINENO: result: no" >&5
12587echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012589
12590rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012591 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012592 *) ;;
12593esac
12594
Guido van Rossum70c7f481998-03-26 18:44:10 +000012595# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012596# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012597{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
12598echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012599if test "${ac_cv_lib_nsl_t_open+set}" = set; then
12600 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012601else
Martin v. Löwis11437992002-04-12 09:54:03 +000012602 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012603LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012604cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012605/* confdefs.h. */
12606_ACEOF
12607cat confdefs.h >>conftest.$ac_ext
12608cat >>conftest.$ac_ext <<_ACEOF
12609/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012610
Martin v. Löwiseba40652007-08-30 20:10:57 +000012611/* Override any GCC internal prototype to avoid an error.
12612 Use char because int might match the return type of a GCC
12613 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012614#ifdef __cplusplus
12615extern "C"
12616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012617char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012618int
12619main ()
12620{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012621return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 ;
12623 return 0;
12624}
12625_ACEOF
12626rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012627if { (ac_try="$ac_link"
12628case "(($ac_try" in
12629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12630 *) ac_try_echo=$ac_try;;
12631esac
12632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12633 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012635 grep -v '^ *+' conftest.er1 >conftest.err
12636 rm -f conftest.er1
12637 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012639 (exit $ac_status); } && {
12640 test -z "$ac_c_werror_flag" ||
12641 test ! -s conftest.err
12642 } && test -s conftest$ac_exeext &&
12643 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012644 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012645else
Martin v. Löwis11437992002-04-12 09:54:03 +000012646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012647sed 's/^/| /' conftest.$ac_ext >&5
12648
Martin v. Löwiseba40652007-08-30 20:10:57 +000012649 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012651
12652rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012653 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012654LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012656{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
12657echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012658if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012659 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012660fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000012661 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000012662{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
12663echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012664if test "${ac_cv_lib_socket_socket+set}" = set; then
12665 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012666else
Martin v. Löwis11437992002-04-12 09:54:03 +000012667 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012668LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012670/* confdefs.h. */
12671_ACEOF
12672cat confdefs.h >>conftest.$ac_ext
12673cat >>conftest.$ac_ext <<_ACEOF
12674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012675
Martin v. Löwiseba40652007-08-30 20:10:57 +000012676/* Override any GCC internal prototype to avoid an error.
12677 Use char because int might match the return type of a GCC
12678 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012679#ifdef __cplusplus
12680extern "C"
12681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012682char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012683int
12684main ()
12685{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012686return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 ;
12688 return 0;
12689}
12690_ACEOF
12691rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012692if { (ac_try="$ac_link"
12693case "(($ac_try" in
12694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12695 *) ac_try_echo=$ac_try;;
12696esac
12697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12698 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012700 grep -v '^ *+' conftest.er1 >conftest.err
12701 rm -f conftest.er1
12702 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012704 (exit $ac_status); } && {
12705 test -z "$ac_c_werror_flag" ||
12706 test ! -s conftest.err
12707 } && test -s conftest$ac_exeext &&
12708 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012710else
Martin v. Löwis11437992002-04-12 09:54:03 +000012711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012712sed 's/^/| /' conftest.$ac_ext >&5
12713
Martin v. Löwiseba40652007-08-30 20:10:57 +000012714 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012716
12717rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012718 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012719LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012720fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012721{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
12722echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012723if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000012724 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000012725fi
12726 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000012727
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000012728case "$ac_sys_system" in
12729BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012730{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
12731echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012732if test "${ac_cv_lib_net_socket+set}" = set; then
12733 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000012734else
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000012736LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012737cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012738/* confdefs.h. */
12739_ACEOF
12740cat confdefs.h >>conftest.$ac_ext
12741cat >>conftest.$ac_ext <<_ACEOF
12742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012743
Martin v. Löwiseba40652007-08-30 20:10:57 +000012744/* Override any GCC internal prototype to avoid an error.
12745 Use char because int might match the return type of a GCC
12746 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012747#ifdef __cplusplus
12748extern "C"
12749#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012750char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012751int
12752main ()
12753{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012754return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 ;
12756 return 0;
12757}
12758_ACEOF
12759rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012760if { (ac_try="$ac_link"
12761case "(($ac_try" in
12762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12763 *) ac_try_echo=$ac_try;;
12764esac
12765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12766 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012768 grep -v '^ *+' conftest.er1 >conftest.err
12769 rm -f conftest.er1
12770 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012772 (exit $ac_status); } && {
12773 test -z "$ac_c_werror_flag" ||
12774 test ! -s conftest.err
12775 } && test -s conftest$ac_exeext &&
12776 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012777 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000012778else
Martin v. Löwis11437992002-04-12 09:54:03 +000012779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012780sed 's/^/| /' conftest.$ac_ext >&5
12781
Martin v. Löwiseba40652007-08-30 20:10:57 +000012782 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000012783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012784
12785rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012786 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012787LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000012788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012789{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
12790echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012791if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012792 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012793fi
12794 # BeOS
12795;;
12796esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000012797
Martin v. Löwiseba40652007-08-30 20:10:57 +000012798{ echo "$as_me:$LINENO: checking for --with-libs" >&5
12799echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012800
Martin v. Löwiseba40652007-08-30 20:10:57 +000012801# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000012802if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012803 withval=$with_libs;
12804{ echo "$as_me:$LINENO: result: $withval" >&5
12805echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000012806LIBS="$withval $LIBS"
12807
12808else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012809 { echo "$as_me:$LINENO: result: no" >&5
12810echo "${ECHO_T}no" >&6; }
12811fi
12812
Guido van Rossum7f43da71994-08-01 12:15:30 +000012813
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012814# Check for use of the system libffi library
Matthias Klose9afb9852007-10-24 20:00:44 +000012815if test "${ac_cv_header_ffi_h+set}" = set; then
12816 { echo "$as_me:$LINENO: checking for ffi.h" >&5
12817echo $ECHO_N "checking for ffi.h... $ECHO_C" >&6; }
12818if test "${ac_cv_header_ffi_h+set}" = set; then
12819 echo $ECHO_N "(cached) $ECHO_C" >&6
12820fi
12821{ echo "$as_me:$LINENO: result: $ac_cv_header_ffi_h" >&5
12822echo "${ECHO_T}$ac_cv_header_ffi_h" >&6; }
12823else
12824 # Is the header compilable?
12825{ echo "$as_me:$LINENO: checking ffi.h usability" >&5
12826echo $ECHO_N "checking ffi.h usability... $ECHO_C" >&6; }
12827cat >conftest.$ac_ext <<_ACEOF
12828/* confdefs.h. */
12829_ACEOF
12830cat confdefs.h >>conftest.$ac_ext
12831cat >>conftest.$ac_ext <<_ACEOF
12832/* end confdefs.h. */
12833$ac_includes_default
12834#include <ffi.h>
12835_ACEOF
12836rm -f conftest.$ac_objext
12837if { (ac_try="$ac_compile"
12838case "(($ac_try" in
12839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12840 *) ac_try_echo=$ac_try;;
12841esac
12842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12843 (eval "$ac_compile") 2>conftest.er1
12844 ac_status=$?
12845 grep -v '^ *+' conftest.er1 >conftest.err
12846 rm -f conftest.er1
12847 cat conftest.err >&5
12848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12849 (exit $ac_status); } && {
12850 test -z "$ac_c_werror_flag" ||
12851 test ! -s conftest.err
12852 } && test -s conftest.$ac_objext; then
12853 ac_header_compiler=yes
12854else
12855 echo "$as_me: failed program was:" >&5
12856sed 's/^/| /' conftest.$ac_ext >&5
12857
12858 ac_header_compiler=no
12859fi
12860
12861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12862{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12863echo "${ECHO_T}$ac_header_compiler" >&6; }
12864
12865# Is the header present?
12866{ echo "$as_me:$LINENO: checking ffi.h presence" >&5
12867echo $ECHO_N "checking ffi.h presence... $ECHO_C" >&6; }
12868cat >conftest.$ac_ext <<_ACEOF
12869/* confdefs.h. */
12870_ACEOF
12871cat confdefs.h >>conftest.$ac_ext
12872cat >>conftest.$ac_ext <<_ACEOF
12873/* end confdefs.h. */
12874#include <ffi.h>
12875_ACEOF
12876if { (ac_try="$ac_cpp conftest.$ac_ext"
12877case "(($ac_try" in
12878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12879 *) ac_try_echo=$ac_try;;
12880esac
12881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12882 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12883 ac_status=$?
12884 grep -v '^ *+' conftest.er1 >conftest.err
12885 rm -f conftest.er1
12886 cat conftest.err >&5
12887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12888 (exit $ac_status); } >/dev/null && {
12889 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12890 test ! -s conftest.err
12891 }; then
12892 ac_header_preproc=yes
12893else
12894 echo "$as_me: failed program was:" >&5
12895sed 's/^/| /' conftest.$ac_ext >&5
12896
12897 ac_header_preproc=no
12898fi
12899
12900rm -f conftest.err conftest.$ac_ext
12901{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12902echo "${ECHO_T}$ac_header_preproc" >&6; }
12903
12904# So? What about this header?
12905case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12906 yes:no: )
12907 { echo "$as_me:$LINENO: WARNING: ffi.h: accepted by the compiler, rejected by the preprocessor!" >&5
12908echo "$as_me: WARNING: ffi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12909 { echo "$as_me:$LINENO: WARNING: ffi.h: proceeding with the compiler's result" >&5
12910echo "$as_me: WARNING: ffi.h: proceeding with the compiler's result" >&2;}
12911 ac_header_preproc=yes
12912 ;;
12913 no:yes:* )
12914 { echo "$as_me:$LINENO: WARNING: ffi.h: present but cannot be compiled" >&5
12915echo "$as_me: WARNING: ffi.h: present but cannot be compiled" >&2;}
12916 { echo "$as_me:$LINENO: WARNING: ffi.h: check for missing prerequisite headers?" >&5
12917echo "$as_me: WARNING: ffi.h: check for missing prerequisite headers?" >&2;}
12918 { echo "$as_me:$LINENO: WARNING: ffi.h: see the Autoconf documentation" >&5
12919echo "$as_me: WARNING: ffi.h: see the Autoconf documentation" >&2;}
12920 { echo "$as_me:$LINENO: WARNING: ffi.h: section \"Present But Cannot Be Compiled\"" >&5
12921echo "$as_me: WARNING: ffi.h: section \"Present But Cannot Be Compiled\"" >&2;}
12922 { echo "$as_me:$LINENO: WARNING: ffi.h: proceeding with the preprocessor's result" >&5
12923echo "$as_me: WARNING: ffi.h: proceeding with the preprocessor's result" >&2;}
12924 { echo "$as_me:$LINENO: WARNING: ffi.h: in the future, the compiler will take precedence" >&5
12925echo "$as_me: WARNING: ffi.h: in the future, the compiler will take precedence" >&2;}
12926 ( cat <<\_ASBOX
12927## ------------------------------------------------ ##
12928## Report this to http://www.python.org/python-bugs ##
12929## ------------------------------------------------ ##
12930_ASBOX
12931 ) | sed "s/^/$as_me: WARNING: /" >&2
12932 ;;
12933esac
12934{ echo "$as_me:$LINENO: checking for ffi.h" >&5
12935echo $ECHO_N "checking for ffi.h... $ECHO_C" >&6; }
12936if test "${ac_cv_header_ffi_h+set}" = set; then
12937 echo $ECHO_N "(cached) $ECHO_C" >&6
12938else
12939 ac_cv_header_ffi_h=$ac_header_preproc
12940fi
12941{ echo "$as_me:$LINENO: result: $ac_cv_header_ffi_h" >&5
12942echo "${ECHO_T}$ac_cv_header_ffi_h" >&6; }
12943
12944fi
12945
12946
Martin v. Löwiseba40652007-08-30 20:10:57 +000012947{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
12948echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012949
Martin v. Löwiseba40652007-08-30 20:10:57 +000012950# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012951if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012952 withval=$with_system_ffi;
12953fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012954
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012955
Matthias Klose9afb9852007-10-24 20:00:44 +000012956if test -z "$with_system_ffi" && test "$ac_cv_header_ffi_h" = yes; then
12957 case "$ac_sys_system/`uname -m`" in
Thomas Heller486b1b02007-11-02 19:10:24 +000012958 Linux/alpha*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
Matthias Klose6e183f82007-10-25 06:37:24 +000012959 Linux/arm*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
Thomas Heller486b1b02007-11-02 19:10:24 +000012960 Linux/ppc*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
12961 Linux/s390*) with_system_ffi="yes"; CONFIG_ARGS="$CONFIG_ARGS --with-system-ffi";;
Matthias Klose9afb9852007-10-24 20:00:44 +000012962 *) with_system_ffi="no"
12963 esac
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012965{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
12966echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012967
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012968# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012969
12970
Martin v. Löwiseba40652007-08-30 20:10:57 +000012971{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
12972echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012973
Martin v. Löwiseba40652007-08-30 20:10:57 +000012974# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012975if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012976 withval=$with_signal_module;
12977fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012978
12979
12980if test -z "$with_signal_module"
12981then with_signal_module="yes"
12982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012983{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
12984echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012985
12986if test "${with_signal_module}" = "yes"; then
12987 USE_SIGNAL_MODULE=""
12988 SIGNAL_OBJS=""
12989else
12990 USE_SIGNAL_MODULE="#"
12991 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
12992fi
12993
Guido van Rossum3d15bd82001-01-10 18:53:48 +000012994# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000012995
Barry Warsawc0d24d82000-06-29 16:12:00 +000012996USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000012997
Martin v. Löwiseba40652007-08-30 20:10:57 +000012998{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
12999echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013000
Guido van Rossumec2f0731997-01-22 20:54:01 +000013001
Martin v. Löwiseba40652007-08-30 20:10:57 +000013002# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013003if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013004 withval=$with_dec_threads;
13005{ echo "$as_me:$LINENO: result: $withval" >&5
13006echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013007LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013008if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013009 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013010fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013011else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013012 { echo "$as_me:$LINENO: result: no" >&5
13013echo "${ECHO_T}no" >&6; }
13014fi
13015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016
13017# Templates for things AC_DEFINEd more than once.
13018# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013019
13020
Martin v. Löwis11437992002-04-12 09:54:03 +000013021
13022
13023
13024
13025
Martin v. Löwiseba40652007-08-30 20:10:57 +000013026{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13027echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013028
Martin v. Löwiseba40652007-08-30 20:10:57 +000013029# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013030if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013031 withval=$with_threads;
13032fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013033
13034
Barry Warsawc0d24d82000-06-29 16:12:00 +000013035# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013036
Martin v. Löwiseba40652007-08-30 20:10:57 +000013037# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013038if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013039 withval=$with_thread; with_threads=$with_thread
13040fi
13041
Barry Warsawc0d24d82000-06-29 16:12:00 +000013042
13043if test -z "$with_threads"
13044then with_threads="yes"
13045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013046{ echo "$as_me:$LINENO: result: $with_threads" >&5
13047echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013048
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013049
Barry Warsawc0d24d82000-06-29 16:12:00 +000013050if test "$with_threads" = "no"
13051then
13052 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013053elif test "$ac_cv_pthread_is_default" = yes
13054then
Martin v. Löwis11437992002-04-12 09:54:03 +000013055 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013056#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013057_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013058
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013059 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013060 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013061#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013062_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013063
13064 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013066elif test "$ac_cv_kpthread" = "yes"
13067then
13068 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013069 if test "$ac_cv_cxx_thread" = "yes"; then
13070 CXX="$CXX -Kpthread"
13071 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013072 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013073#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013074_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013075
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013076 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013077 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013078elif test "$ac_cv_kthread" = "yes"
13079then
13080 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013081 if test "$ac_cv_cxx_thread" = "yes"; then
13082 CXX="$CXX -Kthread"
13083 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013084 cat >>confdefs.h <<\_ACEOF
13085#define WITH_THREAD 1
13086_ACEOF
13087
13088 posix_threads=yes
13089 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013090elif test "$ac_cv_pthread" = "yes"
13091then
13092 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013093 if test "$ac_cv_cxx_thread" = "yes"; then
13094 CXX="$CXX -pthread"
13095 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013096 cat >>confdefs.h <<\_ACEOF
13097#define WITH_THREAD 1
13098_ACEOF
13099
13100 posix_threads=yes
13101 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013102else
13103 if test ! -z "$with_threads" -a -d "$with_threads"
13104 then LDFLAGS="$LDFLAGS -L$with_threads"
13105 fi
13106 if test ! -z "$withval" -a -d "$withval"
13107 then LDFLAGS="$LDFLAGS -L$withval"
13108 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013109
13110 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013111 # define _POSIX_THREADS in unistd.h. Some apparently don't
13112 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013113 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13114echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013116/* confdefs.h. */
13117_ACEOF
13118cat confdefs.h >>conftest.$ac_ext
13119cat >>conftest.$ac_ext <<_ACEOF
13120/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013121
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013122#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013123#ifdef _POSIX_THREADS
13124yes
13125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013126
13127_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013129 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013130 unistd_defines_pthreads=yes
13131else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013132 unistd_defines_pthreads=no
13133fi
13134rm -f conftest*
13135
Martin v. Löwiseba40652007-08-30 20:10:57 +000013136 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13137echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013138
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013140#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013141_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013142
Martin v. Löwis11437992002-04-12 09:54:03 +000013143 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013144 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13145echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013146if test "${ac_cv_header_cthreads_h+set}" = set; then
13147 echo $ECHO_N "(cached) $ECHO_C" >&6
13148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013149{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13150echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013151else
Martin v. Löwis11437992002-04-12 09:54:03 +000013152 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013153{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13154echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013155cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013156/* confdefs.h. */
13157_ACEOF
13158cat confdefs.h >>conftest.$ac_ext
13159cat >>conftest.$ac_ext <<_ACEOF
13160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013161$ac_includes_default
13162#include <cthreads.h>
13163_ACEOF
13164rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013165if { (ac_try="$ac_compile"
13166case "(($ac_try" in
13167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13168 *) ac_try_echo=$ac_try;;
13169esac
13170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13171 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013173 grep -v '^ *+' conftest.er1 >conftest.err
13174 rm -f conftest.er1
13175 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013177 (exit $ac_status); } && {
13178 test -z "$ac_c_werror_flag" ||
13179 test ! -s conftest.err
13180 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013181 ac_header_compiler=yes
13182else
13183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013184sed 's/^/| /' conftest.$ac_ext >&5
13185
Martin v. Löwiseba40652007-08-30 20:10:57 +000013186 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013188
13189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13190{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13191echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013192
13193# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013194{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13195echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013196cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013197/* confdefs.h. */
13198_ACEOF
13199cat confdefs.h >>conftest.$ac_ext
13200cat >>conftest.$ac_ext <<_ACEOF
13201/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013202#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013203_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013204if { (ac_try="$ac_cpp conftest.$ac_ext"
13205case "(($ac_try" in
13206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13207 *) ac_try_echo=$ac_try;;
13208esac
13209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13210 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013211 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013212 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013213 rm -f conftest.er1
13214 cat conftest.err >&5
13215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013216 (exit $ac_status); } >/dev/null && {
13217 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13218 test ! -s conftest.err
13219 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013220 ac_header_preproc=yes
13221else
13222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013223sed 's/^/| /' conftest.$ac_ext >&5
13224
Martin v. Löwis11437992002-04-12 09:54:03 +000013225 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013227
Martin v. Löwis11437992002-04-12 09:54:03 +000013228rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013229{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13230echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013231
13232# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013233case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13234 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13236echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013237 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13238echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13239 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013240 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013241 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013242 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13243echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013244 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13245echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13246 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13247echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13248 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13249echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013250 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13251echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013252 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13253echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013254 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013255## ------------------------------------------------ ##
13256## Report this to http://www.python.org/python-bugs ##
13257## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013258_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013259 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013260 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013261esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013262{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13263echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013264if test "${ac_cv_header_cthreads_h+set}" = set; then
13265 echo $ECHO_N "(cached) $ECHO_C" >&6
13266else
13267 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013269{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13270echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013271
13272fi
13273if test $ac_cv_header_cthreads_h = yes; then
13274 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013275#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013276_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013277
Martin v. Löwis11437992002-04-12 09:54:03 +000013278 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013279#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013280_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013281
Martin v. Löwis11437992002-04-12 09:54:03 +000013282
13283cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013284#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013285_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013286
13287 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013288 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013289else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013290
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013292 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13293echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013294if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13295 echo $ECHO_N "(cached) $ECHO_C" >&6
13296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013297{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13298echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013299else
Martin v. Löwis11437992002-04-12 09:54:03 +000013300 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013301{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13302echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013303cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013304/* confdefs.h. */
13305_ACEOF
13306cat confdefs.h >>conftest.$ac_ext
13307cat >>conftest.$ac_ext <<_ACEOF
13308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013309$ac_includes_default
13310#include <mach/cthreads.h>
13311_ACEOF
13312rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013313if { (ac_try="$ac_compile"
13314case "(($ac_try" in
13315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13316 *) ac_try_echo=$ac_try;;
13317esac
13318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013321 grep -v '^ *+' conftest.er1 >conftest.err
13322 rm -f conftest.er1
13323 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013325 (exit $ac_status); } && {
13326 test -z "$ac_c_werror_flag" ||
13327 test ! -s conftest.err
13328 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013329 ac_header_compiler=yes
13330else
13331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013332sed 's/^/| /' conftest.$ac_ext >&5
13333
Martin v. Löwiseba40652007-08-30 20:10:57 +000013334 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013336
13337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13338{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13339echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013340
13341# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013342{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13343echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013344cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013345/* confdefs.h. */
13346_ACEOF
13347cat confdefs.h >>conftest.$ac_ext
13348cat >>conftest.$ac_ext <<_ACEOF
13349/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013350#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013351_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013352if { (ac_try="$ac_cpp conftest.$ac_ext"
13353case "(($ac_try" in
13354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13355 *) ac_try_echo=$ac_try;;
13356esac
13357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13358 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013360 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 rm -f conftest.er1
13362 cat conftest.err >&5
13363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013364 (exit $ac_status); } >/dev/null && {
13365 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13366 test ! -s conftest.err
13367 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 ac_header_preproc=yes
13369else
13370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013371sed 's/^/| /' conftest.$ac_ext >&5
13372
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013375
Martin v. Löwis11437992002-04-12 09:54:03 +000013376rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013377{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13378echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
13380# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013381case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13382 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013383 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13384echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013385 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13386echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13387 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013388 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013389 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013390 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13391echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013392 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13393echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13394 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13395echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13396 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13397echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013398 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13399echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013400 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13401echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013402 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013403## ------------------------------------------------ ##
13404## Report this to http://www.python.org/python-bugs ##
13405## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013406_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013407 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013408 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013409esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013410{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13411echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013412if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13413 echo $ECHO_N "(cached) $ECHO_C" >&6
13414else
13415 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013417{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13418echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
13420fi
13421if test $ac_cv_header_mach_cthreads_h = yes; then
13422 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013423#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013424_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013425
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013427#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013428_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013429
Martin v. Löwis11437992002-04-12 09:54:03 +000013430
13431cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013432#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013433_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013434
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013435 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013436else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013437
Martin v. Löwiseba40652007-08-30 20:10:57 +000013438 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13439echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
Martin v. Löwiseba40652007-08-30 20:10:57 +000013441# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013442if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013443 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13444echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013445 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013446#define WITH_THREAD 1
13447_ACEOF
13448
13449
13450cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013451#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013452_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013453
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013454 LIBS="-lpth $LIBS"
13455 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013456else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013457 { echo "$as_me:$LINENO: result: no" >&5
13458echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013459
13460 # Just looking for pthread_create in libpthread is not enough:
13461 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13462 # So we really have to include pthread.h, and then link.
13463 _libs=$LIBS
13464 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013465 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13466echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013468/* confdefs.h. */
13469_ACEOF
13470cat confdefs.h >>conftest.$ac_ext
13471cat >>conftest.$ac_ext <<_ACEOF
13472/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013473#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013474
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013475void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013476int
13477main ()
13478{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013479
13480pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 ;
13482 return 0;
13483}
13484_ACEOF
13485rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013486if { (ac_try="$ac_link"
13487case "(($ac_try" in
13488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13489 *) ac_try_echo=$ac_try;;
13490esac
13491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13492 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013494 grep -v '^ *+' conftest.er1 >conftest.err
13495 rm -f conftest.er1
13496 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013498 (exit $ac_status); } && {
13499 test -z "$ac_c_werror_flag" ||
13500 test ! -s conftest.err
13501 } && test -s conftest$ac_exeext &&
13502 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013503
Martin v. Löwiseba40652007-08-30 20:10:57 +000013504 { echo "$as_me:$LINENO: result: yes" >&5
13505echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013507#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013508_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013509
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013510 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013511 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013512else
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013514sed 's/^/| /' conftest.$ac_ext >&5
13515
Martin v. Löwis11437992002-04-12 09:54:03 +000013516
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013517 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013518 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13519echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013520if test "${ac_cv_func_pthread_detach+set}" = set; then
13521 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013522else
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013524/* confdefs.h. */
13525_ACEOF
13526cat confdefs.h >>conftest.$ac_ext
13527cat >>conftest.$ac_ext <<_ACEOF
13528/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013529/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13530 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13531#define pthread_detach innocuous_pthread_detach
13532
Guido van Rossumad678af1998-10-02 14:42:15 +000013533/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013534 which can conflict with char pthread_detach (); below.
13535 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013536 <limits.h> exists even on freestanding compilers. */
13537
13538#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013539# include <limits.h>
13540#else
13541# include <assert.h>
13542#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013543
13544#undef pthread_detach
13545
Martin v. Löwiseba40652007-08-30 20:10:57 +000013546/* Override any GCC internal prototype to avoid an error.
13547 Use char because int might match the return type of a GCC
13548 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013549#ifdef __cplusplus
13550extern "C"
13551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013552char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013553/* The GNU C library defines this for functions which it implements
13554 to always fail with ENOSYS. Some functions are actually named
13555 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013556#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013557choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013558#endif
13559
Skip Montanaro6dead952003-09-25 14:50:04 +000013560int
13561main ()
13562{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013563return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 ;
13565 return 0;
13566}
13567_ACEOF
13568rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013569if { (ac_try="$ac_link"
13570case "(($ac_try" in
13571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13572 *) ac_try_echo=$ac_try;;
13573esac
13574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13575 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013577 grep -v '^ *+' conftest.er1 >conftest.err
13578 rm -f conftest.er1
13579 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013581 (exit $ac_status); } && {
13582 test -z "$ac_c_werror_flag" ||
13583 test ! -s conftest.err
13584 } && test -s conftest$ac_exeext &&
13585 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013586 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013587else
Martin v. Löwis11437992002-04-12 09:54:03 +000013588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013589sed 's/^/| /' conftest.$ac_ext >&5
13590
Martin v. Löwiseba40652007-08-30 20:10:57 +000013591 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013593
13594rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013595 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013597{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13598echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013599if test $ac_cv_func_pthread_detach = yes; then
13600 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013601#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013602_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013603
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013604 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013605 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013606else
Guido van Rossumad678af1998-10-02 14:42:15 +000013607
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013608 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013609 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13610echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013611if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13612 echo $ECHO_N "(cached) $ECHO_C" >&6
13613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013614{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13615echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013616else
13617 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013618{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13619echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013621/* confdefs.h. */
13622_ACEOF
13623cat confdefs.h >>conftest.$ac_ext
13624cat >>conftest.$ac_ext <<_ACEOF
13625/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013626$ac_includes_default
13627#include <atheos/threads.h>
13628_ACEOF
13629rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013630if { (ac_try="$ac_compile"
13631case "(($ac_try" in
13632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13633 *) ac_try_echo=$ac_try;;
13634esac
13635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013638 grep -v '^ *+' conftest.er1 >conftest.err
13639 rm -f conftest.er1
13640 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013642 (exit $ac_status); } && {
13643 test -z "$ac_c_werror_flag" ||
13644 test ! -s conftest.err
13645 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013646 ac_header_compiler=yes
13647else
13648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013649sed 's/^/| /' conftest.$ac_ext >&5
13650
Martin v. Löwiseba40652007-08-30 20:10:57 +000013651 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013653
13654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13655{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13656echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013657
13658# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013659{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13660echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013661cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013662/* confdefs.h. */
13663_ACEOF
13664cat confdefs.h >>conftest.$ac_ext
13665cat >>conftest.$ac_ext <<_ACEOF
13666/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013667#include <atheos/threads.h>
13668_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013669if { (ac_try="$ac_cpp conftest.$ac_ext"
13670case "(($ac_try" in
13671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13672 *) ac_try_echo=$ac_try;;
13673esac
13674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13675 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013676 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013677 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013678 rm -f conftest.er1
13679 cat conftest.err >&5
13680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013681 (exit $ac_status); } >/dev/null && {
13682 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13683 test ! -s conftest.err
13684 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013685 ac_header_preproc=yes
13686else
13687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013688sed 's/^/| /' conftest.$ac_ext >&5
13689
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013690 ac_header_preproc=no
13691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013692
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013693rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013694{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13695echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013696
13697# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013698case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13699 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013700 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13701echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013702 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
13703echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
13704 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013705 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013706 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013707 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
13708echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013709 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
13710echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
13711 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
13712echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
13713 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
13714echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013715 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
13716echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013717 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
13718echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013719 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013720## ------------------------------------------------ ##
13721## Report this to http://www.python.org/python-bugs ##
13722## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013723_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013724 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013725 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013726esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013727{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13728echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013729if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13730 echo $ECHO_N "(cached) $ECHO_C" >&6
13731else
13732 ac_cv_header_atheos_threads_h=$ac_header_preproc
13733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013734{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13735echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013736
13737fi
13738if test $ac_cv_header_atheos_threads_h = yes; then
13739 cat >>confdefs.h <<\_ACEOF
13740#define WITH_THREAD 1
13741_ACEOF
13742
13743
13744cat >>confdefs.h <<\_ACEOF
13745#define ATHEOS_THREADS 1
13746_ACEOF
13747
13748 THREADOBJ="Python/thread.o"
13749else
13750
Martin v. Löwis11437992002-04-12 09:54:03 +000013751 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013752 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
13753echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013754if test "${ac_cv_header_kernel_OS_h+set}" = set; then
13755 echo $ECHO_N "(cached) $ECHO_C" >&6
13756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013757{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
13758echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013759else
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013761{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
13762echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013764/* confdefs.h. */
13765_ACEOF
13766cat confdefs.h >>conftest.$ac_ext
13767cat >>conftest.$ac_ext <<_ACEOF
13768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013769$ac_includes_default
13770#include <kernel/OS.h>
13771_ACEOF
13772rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013773if { (ac_try="$ac_compile"
13774case "(($ac_try" in
13775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13776 *) ac_try_echo=$ac_try;;
13777esac
13778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013781 grep -v '^ *+' conftest.er1 >conftest.err
13782 rm -f conftest.er1
13783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013785 (exit $ac_status); } && {
13786 test -z "$ac_c_werror_flag" ||
13787 test ! -s conftest.err
13788 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013789 ac_header_compiler=yes
13790else
13791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013792sed 's/^/| /' conftest.$ac_ext >&5
13793
Martin v. Löwiseba40652007-08-30 20:10:57 +000013794 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013796
13797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13798{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13799echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013800
13801# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013802{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
13803echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013805/* confdefs.h. */
13806_ACEOF
13807cat confdefs.h >>conftest.$ac_ext
13808cat >>conftest.$ac_ext <<_ACEOF
13809/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013810#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013811_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013812if { (ac_try="$ac_cpp conftest.$ac_ext"
13813case "(($ac_try" in
13814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13815 *) ac_try_echo=$ac_try;;
13816esac
13817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13818 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013820 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 rm -f conftest.er1
13822 cat conftest.err >&5
13823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013824 (exit $ac_status); } >/dev/null && {
13825 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13826 test ! -s conftest.err
13827 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 ac_header_preproc=yes
13829else
13830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013831sed 's/^/| /' conftest.$ac_ext >&5
13832
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013835
Martin v. Löwis11437992002-04-12 09:54:03 +000013836rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013837{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13838echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013839
Martin v. Löwis11437992002-04-12 09:54:03 +000013840# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013841case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13842 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
13844echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013845 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
13846echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
13847 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013848 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013849 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013850 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
13851echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013852 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
13853echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
13854 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
13855echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
13856 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
13857echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013858 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
13859echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013860 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
13861echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013862 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013863## ------------------------------------------------ ##
13864## Report this to http://www.python.org/python-bugs ##
13865## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013866_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013867 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013868 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013869esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013870{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
13871echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013872if test "${ac_cv_header_kernel_OS_h+set}" = set; then
13873 echo $ECHO_N "(cached) $ECHO_C" >&6
13874else
13875 ac_cv_header_kernel_OS_h=$ac_header_preproc
13876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013877{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
13878echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013879
13880fi
13881if test $ac_cv_header_kernel_OS_h = yes; then
13882 cat >>confdefs.h <<\_ACEOF
13883#define WITH_THREAD 1
13884_ACEOF
13885
13886
13887cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013888#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013889_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013890
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013891 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013892else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013893
Martin v. Löwiseba40652007-08-30 20:10:57 +000013894 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
13895echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013896if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
13897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013898else
Martin v. Löwis11437992002-04-12 09:54:03 +000013899 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013900LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013901cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013902/* confdefs.h. */
13903_ACEOF
13904cat confdefs.h >>conftest.$ac_ext
13905cat >>conftest.$ac_ext <<_ACEOF
13906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013907
Martin v. Löwiseba40652007-08-30 20:10:57 +000013908/* Override any GCC internal prototype to avoid an error.
13909 Use char because int might match the return type of a GCC
13910 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013911#ifdef __cplusplus
13912extern "C"
13913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013914char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013915int
13916main ()
13917{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013918return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 ;
13920 return 0;
13921}
13922_ACEOF
13923rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013924if { (ac_try="$ac_link"
13925case "(($ac_try" in
13926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13927 *) ac_try_echo=$ac_try;;
13928esac
13929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13930 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013932 grep -v '^ *+' conftest.er1 >conftest.err
13933 rm -f conftest.er1
13934 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013936 (exit $ac_status); } && {
13937 test -z "$ac_c_werror_flag" ||
13938 test ! -s conftest.err
13939 } && test -s conftest$ac_exeext &&
13940 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013941 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000013942else
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013944sed 's/^/| /' conftest.$ac_ext >&5
13945
Martin v. Löwiseba40652007-08-30 20:10:57 +000013946 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000013947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013948
13949rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013950 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013951LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000013952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013953{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
13954echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013955if test $ac_cv_lib_pthreads_pthread_create = yes; then
13956 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000013957#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013958_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000013959
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013960 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013961 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013962 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000013963else
Greg Steinadf63d62000-07-05 10:38:09 +000013964
Martin v. Löwiseba40652007-08-30 20:10:57 +000013965 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
13966echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013967if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
13968 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000013969else
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000013971LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013972cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013973/* confdefs.h. */
13974_ACEOF
13975cat confdefs.h >>conftest.$ac_ext
13976cat >>conftest.$ac_ext <<_ACEOF
13977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013978
Martin v. Löwiseba40652007-08-30 20:10:57 +000013979/* Override any GCC internal prototype to avoid an error.
13980 Use char because int might match the return type of a GCC
13981 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013982#ifdef __cplusplus
13983extern "C"
13984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013985char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013986int
13987main ()
13988{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013989return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013990 ;
13991 return 0;
13992}
13993_ACEOF
13994rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013995if { (ac_try="$ac_link"
13996case "(($ac_try" in
13997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13998 *) ac_try_echo=$ac_try;;
13999esac
14000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14001 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014003 grep -v '^ *+' conftest.er1 >conftest.err
14004 rm -f conftest.er1
14005 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014007 (exit $ac_status); } && {
14008 test -z "$ac_c_werror_flag" ||
14009 test ! -s conftest.err
14010 } && test -s conftest$ac_exeext &&
14011 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014012 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014013else
Martin v. Löwis11437992002-04-12 09:54:03 +000014014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014015sed 's/^/| /' conftest.$ac_ext >&5
14016
Martin v. Löwiseba40652007-08-30 20:10:57 +000014017 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014019
14020rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014021 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014022LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014024{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14025echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014026if test $ac_cv_lib_c_r_pthread_create = yes; then
14027 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014028#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014029_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014030
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014031 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014032 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014033 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014034else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014035
Martin v. Löwiseba40652007-08-30 20:10:57 +000014036 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14037echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014038if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14039 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014040else
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014042LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014043cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014044/* confdefs.h. */
14045_ACEOF
14046cat confdefs.h >>conftest.$ac_ext
14047cat >>conftest.$ac_ext <<_ACEOF
14048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014049
Martin v. Löwiseba40652007-08-30 20:10:57 +000014050/* Override any GCC internal prototype to avoid an error.
14051 Use char because int might match the return type of a GCC
14052 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014053#ifdef __cplusplus
14054extern "C"
14055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014056char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014057int
14058main ()
14059{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014060return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 ;
14062 return 0;
14063}
14064_ACEOF
14065rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014066if { (ac_try="$ac_link"
14067case "(($ac_try" in
14068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14069 *) ac_try_echo=$ac_try;;
14070esac
14071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14072 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014074 grep -v '^ *+' conftest.er1 >conftest.err
14075 rm -f conftest.er1
14076 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014078 (exit $ac_status); } && {
14079 test -z "$ac_c_werror_flag" ||
14080 test ! -s conftest.err
14081 } && test -s conftest$ac_exeext &&
14082 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014083 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014084else
Martin v. Löwis11437992002-04-12 09:54:03 +000014085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014086sed 's/^/| /' conftest.$ac_ext >&5
14087
Martin v. Löwiseba40652007-08-30 20:10:57 +000014088 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014090
14091rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014092 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014093LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014095{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14096echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014097if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14098 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014099#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014100_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014101
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014102 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014103 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014104 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014105else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014106
Martin v. Löwiseba40652007-08-30 20:10:57 +000014107 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14108echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014109if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14110 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014111else
Martin v. Löwis11437992002-04-12 09:54:03 +000014112 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014113LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014114cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014115/* confdefs.h. */
14116_ACEOF
14117cat confdefs.h >>conftest.$ac_ext
14118cat >>conftest.$ac_ext <<_ACEOF
14119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014120
Martin v. Löwiseba40652007-08-30 20:10:57 +000014121/* Override any GCC internal prototype to avoid an error.
14122 Use char because int might match the return type of a GCC
14123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014124#ifdef __cplusplus
14125extern "C"
14126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014127char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014128int
14129main ()
14130{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014131return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014132 ;
14133 return 0;
14134}
14135_ACEOF
14136rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014137if { (ac_try="$ac_link"
14138case "(($ac_try" in
14139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14140 *) ac_try_echo=$ac_try;;
14141esac
14142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14143 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014145 grep -v '^ *+' conftest.er1 >conftest.err
14146 rm -f conftest.er1
14147 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014149 (exit $ac_status); } && {
14150 test -z "$ac_c_werror_flag" ||
14151 test ! -s conftest.err
14152 } && test -s conftest$ac_exeext &&
14153 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014155else
Martin v. Löwis11437992002-04-12 09:54:03 +000014156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014157sed 's/^/| /' conftest.$ac_ext >&5
14158
Martin v. Löwiseba40652007-08-30 20:10:57 +000014159 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014161
14162rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014164LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014166{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14167echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014168if test $ac_cv_lib_cma_pthread_create = yes; then
14169 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014170#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014171_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014172
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014173 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014174 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014175 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014176else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014177
Martin v. Löwis130fb172001-07-19 11:00:41 +000014178 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014179fi
14180
Guido van Rossum627b2d71993-12-24 10:39:16 +000014181
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014182fi
14183
Guido van Rossum0be3e491997-05-22 20:33:33 +000014184fi
14185
Guido van Rossum49545951997-12-02 19:28:29 +000014186fi
14187
Guido van Rossumb93a8621998-05-07 13:27:32 +000014188fi
14189
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014190
Michael W. Hudson54241132001-12-07 15:38:26 +000014191fi
14192
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014193
14194fi
14195
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014197
14198rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014199 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014200fi
14201
Martin v. Löwis11437992002-04-12 09:54:03 +000014202fi
14203
14204
14205fi
14206
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014207
Michael W. Hudson54241132001-12-07 15:38:26 +000014208
Martin v. Löwiseba40652007-08-30 20:10:57 +000014209 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14210echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014211if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14212 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014213else
Martin v. Löwis11437992002-04-12 09:54:03 +000014214 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014215LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014217/* confdefs.h. */
14218_ACEOF
14219cat confdefs.h >>conftest.$ac_ext
14220cat >>conftest.$ac_ext <<_ACEOF
14221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014222
Martin v. Löwiseba40652007-08-30 20:10:57 +000014223/* Override any GCC internal prototype to avoid an error.
14224 Use char because int might match the return type of a GCC
14225 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014226#ifdef __cplusplus
14227extern "C"
14228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014229char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014230int
14231main ()
14232{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014233return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014234 ;
14235 return 0;
14236}
14237_ACEOF
14238rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014239if { (ac_try="$ac_link"
14240case "(($ac_try" in
14241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14242 *) ac_try_echo=$ac_try;;
14243esac
14244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14245 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014247 grep -v '^ *+' conftest.er1 >conftest.err
14248 rm -f conftest.er1
14249 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014251 (exit $ac_status); } && {
14252 test -z "$ac_c_werror_flag" ||
14253 test ! -s conftest.err
14254 } && test -s conftest$ac_exeext &&
14255 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014256 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014257else
Martin v. Löwis11437992002-04-12 09:54:03 +000014258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014259sed 's/^/| /' conftest.$ac_ext >&5
14260
Martin v. Löwiseba40652007-08-30 20:10:57 +000014261 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014262fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014263
14264rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014265 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014266LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014268{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14269echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014270if test $ac_cv_lib_mpc_usconfig = yes; then
14271 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014272#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014273_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014274
Martin v. Löwis130fb172001-07-19 11:00:41 +000014275 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014276 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014277 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014278fi
14279
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014280
Neal Norwitza978ab02002-11-02 16:58:05 +000014281 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014282 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14283echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014284if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014286else
Martin v. Löwis11437992002-04-12 09:54:03 +000014287 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014288LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014290/* confdefs.h. */
14291_ACEOF
14292cat confdefs.h >>conftest.$ac_ext
14293cat >>conftest.$ac_ext <<_ACEOF
14294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014295
Martin v. Löwiseba40652007-08-30 20:10:57 +000014296/* Override any GCC internal prototype to avoid an error.
14297 Use char because int might match the return type of a GCC
14298 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014299#ifdef __cplusplus
14300extern "C"
14301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014302char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014303int
14304main ()
14305{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014306return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 ;
14308 return 0;
14309}
14310_ACEOF
14311rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014312if { (ac_try="$ac_link"
14313case "(($ac_try" in
14314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14315 *) ac_try_echo=$ac_try;;
14316esac
14317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14318 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014320 grep -v '^ *+' conftest.er1 >conftest.err
14321 rm -f conftest.er1
14322 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014324 (exit $ac_status); } && {
14325 test -z "$ac_c_werror_flag" ||
14326 test ! -s conftest.err
14327 } && test -s conftest$ac_exeext &&
14328 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014329 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014330else
Martin v. Löwis11437992002-04-12 09:54:03 +000014331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014332sed 's/^/| /' conftest.$ac_ext >&5
14333
Martin v. Löwiseba40652007-08-30 20:10:57 +000014334 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014336
14337rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014338 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014339LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014341{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14342echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014343if test $ac_cv_lib_thread_thr_create = yes; then
14344 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014345#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014346_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014347
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014348 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014349 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014350 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014351fi
14352
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014353 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014354
Martin v. Löwis130fb172001-07-19 11:00:41 +000014355 if test "$USE_THREAD_MODULE" != "#"
14356 then
14357 # If the above checks didn't disable threads, (at least) OSF1
14358 # needs this '-threads' argument during linking.
14359 case $ac_sys_system in
14360 OSF1) LDLAST=-threads;;
14361 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014362 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014363fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014364
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014365if test "$posix_threads" = "yes"; then
14366 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014367
14368cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014369#define _POSIX_THREADS 1
14370_ACEOF
14371
14372 fi
14373
14374 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14375 case $ac_sys_system/$ac_sys_release in
14376 SunOS/5.6)
14377cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014378#define HAVE_PTHREAD_DESTRUCTOR 1
14379_ACEOF
14380
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014381 ;;
14382 SunOS/5.8)
14383cat >>confdefs.h <<\_ACEOF
14384#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14385_ACEOF
14386
14387 ;;
14388 esac
14389
Martin v. Löwiseba40652007-08-30 20:10:57 +000014390 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14391echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014392 if test "${ac_cv_pthread_system_supported+set}" = set; then
14393 echo $ECHO_N "(cached) $ECHO_C" >&6
14394else
14395 if test "$cross_compiling" = yes; then
14396 ac_cv_pthread_system_supported=no
14397else
14398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014399/* confdefs.h. */
14400_ACEOF
14401cat confdefs.h >>conftest.$ac_ext
14402cat >>conftest.$ac_ext <<_ACEOF
14403/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014404#include <pthread.h>
14405 void *foo(void *parm) {
14406 return NULL;
14407 }
14408 main() {
14409 pthread_attr_t attr;
14410 pthread_t id;
14411 if (pthread_attr_init(&attr)) exit(-1);
14412 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14413 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14414 exit(0);
14415 }
14416_ACEOF
14417rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014418if { (ac_try="$ac_link"
14419case "(($ac_try" in
14420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14421 *) ac_try_echo=$ac_try;;
14422esac
14423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14424 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014425 ac_status=$?
14426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14427 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014428 { (case "(($ac_try" in
14429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14430 *) ac_try_echo=$ac_try;;
14431esac
14432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14433 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014434 ac_status=$?
14435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14436 (exit $ac_status); }; }; then
14437 ac_cv_pthread_system_supported=yes
14438else
14439 echo "$as_me: program exited with status $ac_status" >&5
14440echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014441sed 's/^/| /' conftest.$ac_ext >&5
14442
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014443( exit $ac_status )
14444ac_cv_pthread_system_supported=no
14445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014446rm -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 +000014447fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014448
Martin v. Löwiseba40652007-08-30 20:10:57 +000014449
14450
Guido van Rossum627b2d71993-12-24 10:39:16 +000014451fi
14452
Martin v. Löwiseba40652007-08-30 20:10:57 +000014453 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14454echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014455 if test "$ac_cv_pthread_system_supported" = "yes"; then
14456
14457cat >>confdefs.h <<\_ACEOF
14458#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14459_ACEOF
14460
14461 fi
14462
14463for ac_func in pthread_sigmask
14464do
14465as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014466{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14467echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14468if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014469 echo $ECHO_N "(cached) $ECHO_C" >&6
14470else
14471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014472/* confdefs.h. */
14473_ACEOF
14474cat confdefs.h >>conftest.$ac_ext
14475cat >>conftest.$ac_ext <<_ACEOF
14476/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014477/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14478 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14479#define $ac_func innocuous_$ac_func
14480
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014481/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014482 which can conflict with char $ac_func (); below.
14483 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014484 <limits.h> exists even on freestanding compilers. */
14485
14486#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014487# include <limits.h>
14488#else
14489# include <assert.h>
14490#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014491
14492#undef $ac_func
14493
Martin v. Löwiseba40652007-08-30 20:10:57 +000014494/* Override any GCC internal prototype to avoid an error.
14495 Use char because int might match the return type of a GCC
14496 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014497#ifdef __cplusplus
14498extern "C"
14499#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014500char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014501/* The GNU C library defines this for functions which it implements
14502 to always fail with ENOSYS. Some functions are actually named
14503 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014504#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014505choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014506#endif
14507
Skip Montanaro6dead952003-09-25 14:50:04 +000014508int
14509main ()
14510{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014511return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014512 ;
14513 return 0;
14514}
14515_ACEOF
14516rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014517if { (ac_try="$ac_link"
14518case "(($ac_try" in
14519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14520 *) ac_try_echo=$ac_try;;
14521esac
14522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14523 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014525 grep -v '^ *+' conftest.er1 >conftest.err
14526 rm -f conftest.er1
14527 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014529 (exit $ac_status); } && {
14530 test -z "$ac_c_werror_flag" ||
14531 test ! -s conftest.err
14532 } && test -s conftest$ac_exeext &&
14533 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014534 eval "$as_ac_var=yes"
14535else
14536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014537sed 's/^/| /' conftest.$ac_ext >&5
14538
Martin v. Löwiseba40652007-08-30 20:10:57 +000014539 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014541
14542rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014543 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014545ac_res=`eval echo '${'$as_ac_var'}'`
14546 { echo "$as_me:$LINENO: result: $ac_res" >&5
14547echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014548if test `eval echo '${'$as_ac_var'}'` = yes; then
14549 cat >>confdefs.h <<_ACEOF
14550#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14551_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014552 case $ac_sys_system in
14553 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014554
Jason Tishlerfac083d2003-07-22 15:20:49 +000014555cat >>confdefs.h <<\_ACEOF
14556#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14557_ACEOF
14558
14559 ;;
14560 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014561fi
14562done
14563
14564fi
14565
14566
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014567# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014568
14569
Martin v. Löwiseba40652007-08-30 20:10:57 +000014570{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14571echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14572# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014573if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014574 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014575 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014576 { echo "$as_me:$LINENO: result: no" >&5
14577echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014578 ipv6=no
14579 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014580 *) { echo "$as_me:$LINENO: result: yes" >&5
14581echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014582 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014583#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014584_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014585
14586 ipv6=yes
14587 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014588 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014589else
Martin v. Löwis11437992002-04-12 09:54:03 +000014590
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014591 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014592 { echo "$as_me:$LINENO: result: no" >&5
14593echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014594 ipv6=no
14595
14596else
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014598/* confdefs.h. */
14599_ACEOF
14600cat confdefs.h >>conftest.$ac_ext
14601cat >>conftest.$ac_ext <<_ACEOF
14602/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014603 /* AF_INET6 available check */
14604#include <sys/types.h>
14605#include <sys/socket.h>
14606main()
14607{
14608 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14609 exit(1);
14610 else
14611 exit(0);
14612}
14613
Martin v. Löwis11437992002-04-12 09:54:03 +000014614_ACEOF
14615rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014616if { (ac_try="$ac_link"
14617case "(($ac_try" in
14618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14619 *) ac_try_echo=$ac_try;;
14620esac
14621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14622 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014623 ac_status=$?
14624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014626 { (case "(($ac_try" in
14627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14628 *) ac_try_echo=$ac_try;;
14629esac
14630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14631 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 ac_status=$?
14633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14634 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014635 { echo "$as_me:$LINENO: result: yes" >&5
14636echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014637 ipv6=yes
14638else
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 echo "$as_me: program exited with status $ac_status" >&5
14640echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014641sed 's/^/| /' conftest.$ac_ext >&5
14642
Martin v. Löwis11437992002-04-12 09:54:03 +000014643( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014644{ echo "$as_me:$LINENO: result: no" >&5
14645echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014646 ipv6=no
14647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014648rm -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 +000014649fi
14650
Martin v. Löwiseba40652007-08-30 20:10:57 +000014651
14652
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014653if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014654 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14655echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014657/* confdefs.h. */
14658_ACEOF
14659cat confdefs.h >>conftest.$ac_ext
14660cat >>conftest.$ac_ext <<_ACEOF
14661/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014662#include <sys/types.h>
14663#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014664int
14665main ()
14666{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014667struct sockaddr_in6 x;
14668x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 ;
14670 return 0;
14671}
14672_ACEOF
14673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014674if { (ac_try="$ac_compile"
14675case "(($ac_try" in
14676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14677 *) ac_try_echo=$ac_try;;
14678esac
14679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014682 grep -v '^ *+' conftest.er1 >conftest.err
14683 rm -f conftest.er1
14684 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014686 (exit $ac_status); } && {
14687 test -z "$ac_c_werror_flag" ||
14688 test ! -s conftest.err
14689 } && test -s conftest.$ac_objext; then
14690 { echo "$as_me:$LINENO: result: yes" >&5
14691echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014692 ipv6=yes
14693else
Martin v. Löwis11437992002-04-12 09:54:03 +000014694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014695sed 's/^/| /' conftest.$ac_ext >&5
14696
Martin v. Löwiseba40652007-08-30 20:10:57 +000014697 { echo "$as_me:$LINENO: result: no" >&5
14698echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014699 ipv6=no
14700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014701
14702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014703fi
14704
14705if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014706 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014707#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014708_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014709
14710fi
14711
Martin v. Löwiseba40652007-08-30 20:10:57 +000014712fi
14713
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014714
14715ipv6type=unknown
14716ipv6lib=none
14717ipv6trylibc=no
14718
14719if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014720 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
14721echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000014722 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
14723 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014724 case $i in
14725 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000014726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014727/* confdefs.h. */
14728_ACEOF
14729cat confdefs.h >>conftest.$ac_ext
14730cat >>conftest.$ac_ext <<_ACEOF
14731/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014732
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014733#include <netinet/in.h>
14734#ifdef IPV6_INRIA_VERSION
14735yes
14736#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014737_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014738if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014739 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014740 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014741fi
14742rm -f conftest*
14743
14744 ;;
14745 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000014746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014747/* confdefs.h. */
14748_ACEOF
14749cat confdefs.h >>conftest.$ac_ext
14750cat >>conftest.$ac_ext <<_ACEOF
14751/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014752
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014753#include <netinet/in.h>
14754#ifdef __KAME__
14755yes
14756#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014757_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014759 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014760 ipv6type=$i;
14761 ipv6lib=inet6
14762 ipv6libdir=/usr/local/v6/lib
14763 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014764fi
14765rm -f conftest*
14766
14767 ;;
14768 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000014769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014770/* confdefs.h. */
14771_ACEOF
14772cat confdefs.h >>conftest.$ac_ext
14773cat >>conftest.$ac_ext <<_ACEOF
14774/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014775
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014776#include <features.h>
14777#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
14778yes
14779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014780_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014782 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014783 ipv6type=$i;
14784 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014785fi
14786rm -f conftest*
14787
14788 ;;
14789 linux-inet6)
14790 if test -d /usr/inet6; then
14791 ipv6type=$i
14792 ipv6lib=inet6
14793 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000014794 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014795 fi
14796 ;;
14797 solaris)
14798 if test -f /etc/netconfig; then
14799 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
14800 ipv6type=$i
14801 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014802 fi
14803 fi
14804 ;;
14805 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014807/* confdefs.h. */
14808_ACEOF
14809cat confdefs.h >>conftest.$ac_ext
14810cat >>conftest.$ac_ext <<_ACEOF
14811/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014812
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014813#include <sys/param.h>
14814#ifdef _TOSHIBA_INET6
14815yes
14816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014817_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014819 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014820 ipv6type=$i;
14821 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014822 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014823fi
14824rm -f conftest*
14825
14826 ;;
14827 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000014828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014829/* confdefs.h. */
14830_ACEOF
14831cat confdefs.h >>conftest.$ac_ext
14832cat >>conftest.$ac_ext <<_ACEOF
14833/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014834
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014835#include </usr/local/v6/include/sys/v6config.h>
14836#ifdef __V6D__
14837yes
14838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014839_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014841 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014842 ipv6type=$i;
14843 ipv6lib=v6;
14844 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000014845 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014846fi
14847rm -f conftest*
14848
14849 ;;
14850 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000014851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014852/* confdefs.h. */
14853_ACEOF
14854cat confdefs.h >>conftest.$ac_ext
14855cat >>conftest.$ac_ext <<_ACEOF
14856/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014857
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014858#include <sys/param.h>
14859#ifdef _ZETA_MINAMI_INET6
14860yes
14861#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014862_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014863if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014864 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014865 ipv6type=$i;
14866 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014867 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014868fi
14869rm -f conftest*
14870
14871 ;;
14872 esac
14873 if test "$ipv6type" != "unknown"; then
14874 break
14875 fi
14876 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014877 { echo "$as_me:$LINENO: result: $ipv6type" >&5
14878echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014879fi
14880
14881if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
14882 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
14883 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
14884 echo "using lib$ipv6lib"
14885 else
14886 if test $ipv6trylibc = "yes"; then
14887 echo "using libc"
14888 else
14889 echo 'Fatal: no $ipv6lib library found. cannot continue.'
14890 echo "You need to fetch lib$ipv6lib.a from appropriate"
14891 echo 'ipv6 kit and compile beforehand.'
14892 exit 1
14893 fi
14894 fi
14895fi
14896
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014897# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000014898{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
14899echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014900
Martin v. Löwiseba40652007-08-30 20:10:57 +000014901# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014902if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014903 withval=$with_doc_strings;
14904fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014905
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014906
14907if test -z "$with_doc_strings"
14908then with_doc_strings="yes"
14909fi
14910if test "$with_doc_strings" != "no"
14911then
14912
14913cat >>confdefs.h <<\_ACEOF
14914#define WITH_DOC_STRINGS 1
14915_ACEOF
14916
14917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014918{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
14919echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014920
Neil Schemenauera35c6882001-02-27 04:45:05 +000014921# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000014922{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
14923echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014924
Martin v. Löwiseba40652007-08-30 20:10:57 +000014925# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014926if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014927 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014928if test "$withval" != no
14929then
14930
14931cat >>confdefs.h <<\_ACEOF
14932#define WITH_TSC 1
14933_ACEOF
14934
Martin v. Löwiseba40652007-08-30 20:10:57 +000014935 { echo "$as_me:$LINENO: result: yes" >&5
14936echo "${ECHO_T}yes" >&6; }
14937else { echo "$as_me:$LINENO: result: no" >&5
14938echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014939fi
14940else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014941 { echo "$as_me:$LINENO: result: no" >&5
14942echo "${ECHO_T}no" >&6; }
14943fi
14944
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014945
14946# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000014947{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
14948echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014949
Martin v. Löwiseba40652007-08-30 20:10:57 +000014950# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000014951if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952 withval=$with_pymalloc;
14953fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014954
Neil Schemenauera35c6882001-02-27 04:45:05 +000014955
Neil Schemenauer16c22972002-03-22 15:34:49 +000014956if test -z "$with_pymalloc"
14957then with_pymalloc="yes"
14958fi
14959if test "$with_pymalloc" != "no"
14960then
Martin v. Löwis11437992002-04-12 09:54:03 +000014961
14962cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014963#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014964_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014965
14966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014967{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
14968echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000014969
Barry Warsawef82cd72000-06-30 16:21:01 +000014970# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000014971{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
14972echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014973
Martin v. Löwiseba40652007-08-30 20:10:57 +000014974# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000014975if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014976 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000014977if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014978then
14979
14980cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000014981#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014982_ACEOF
14983
Martin v. Löwiseba40652007-08-30 20:10:57 +000014984 { echo "$as_me:$LINENO: result: yes" >&5
14985echo "${ECHO_T}yes" >&6; }
14986else { echo "$as_me:$LINENO: result: no" >&5
14987echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000014988fi
14989else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014990 { echo "$as_me:$LINENO: result: no" >&5
14991echo "${ECHO_T}no" >&6; }
14992fi
14993
Barry Warsawef82cd72000-06-30 16:21:01 +000014994
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014995# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000014996
Guido van Rossum98935bf2001-09-05 19:13:16 +000014997DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000014998
Guido van Rossume97ee181999-12-20 21:27:22 +000014999# the dlopen() function means we might want to use dynload_shlib.o. some
15000# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015001
Thomas Wouters3a584202000-08-05 23:28:51 +000015002for ac_func in dlopen
15003do
Martin v. Löwis11437992002-04-12 09:54:03 +000015004as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015005{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15006echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15007if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015009else
Martin v. Löwis11437992002-04-12 09:54:03 +000015010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015011/* confdefs.h. */
15012_ACEOF
15013cat confdefs.h >>conftest.$ac_ext
15014cat >>conftest.$ac_ext <<_ACEOF
15015/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015016/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15017 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15018#define $ac_func innocuous_$ac_func
15019
Guido van Rossume97ee181999-12-20 21:27:22 +000015020/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015021 which can conflict with char $ac_func (); below.
15022 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015023 <limits.h> exists even on freestanding compilers. */
15024
15025#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015026# include <limits.h>
15027#else
15028# include <assert.h>
15029#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015030
15031#undef $ac_func
15032
Martin v. Löwiseba40652007-08-30 20:10:57 +000015033/* Override any GCC internal prototype to avoid an error.
15034 Use char because int might match the return type of a GCC
15035 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015036#ifdef __cplusplus
15037extern "C"
15038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015039char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015040/* The GNU C library defines this for functions which it implements
15041 to always fail with ENOSYS. Some functions are actually named
15042 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015043#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015044choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015045#endif
15046
Skip Montanaro6dead952003-09-25 14:50:04 +000015047int
15048main ()
15049{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015050return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 ;
15052 return 0;
15053}
15054_ACEOF
15055rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015056if { (ac_try="$ac_link"
15057case "(($ac_try" in
15058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15059 *) ac_try_echo=$ac_try;;
15060esac
15061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15062 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015064 grep -v '^ *+' conftest.er1 >conftest.err
15065 rm -f conftest.er1
15066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015068 (exit $ac_status); } && {
15069 test -z "$ac_c_werror_flag" ||
15070 test ! -s conftest.err
15071 } && test -s conftest$ac_exeext &&
15072 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015073 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015074else
Martin v. Löwis11437992002-04-12 09:54:03 +000015075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015076sed 's/^/| /' conftest.$ac_ext >&5
15077
Martin v. Löwiseba40652007-08-30 20:10:57 +000015078 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015080
15081rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015082 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015084ac_res=`eval echo '${'$as_ac_var'}'`
15085 { echo "$as_me:$LINENO: result: $ac_res" >&5
15086echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015087if test `eval echo '${'$as_ac_var'}'` = yes; then
15088 cat >>confdefs.h <<_ACEOF
15089#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15090_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015091
Guido van Rossume97ee181999-12-20 21:27:22 +000015092fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015093done
Guido van Rossume97ee181999-12-20 21:27:22 +000015094
Michael W. Hudson54241132001-12-07 15:38:26 +000015095
Guido van Rossume97ee181999-12-20 21:27:22 +000015096# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15097# loading of modules.
15098
Martin v. Löwiseba40652007-08-30 20:10:57 +000015099{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15100echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015101if test -z "$DYNLOADFILE"
15102then
15103 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015104 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15105 if test "$ac_cv_func_dlopen" = yes
15106 then DYNLOADFILE="dynload_shlib.o"
15107 else DYNLOADFILE="dynload_aix.o"
15108 fi
15109 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015110 BeOS*) DYNLOADFILE="dynload_beos.o";;
15111 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015112 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15113 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015114 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015115 *)
15116 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15117 # out any dynamic loading
15118 if test "$ac_cv_func_dlopen" = yes
15119 then DYNLOADFILE="dynload_shlib.o"
15120 else DYNLOADFILE="dynload_stub.o"
15121 fi
15122 ;;
15123 esac
15124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015125{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15126echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015127if test "$DYNLOADFILE" != "dynload_stub.o"
15128then
Martin v. Löwis11437992002-04-12 09:54:03 +000015129
15130cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015131#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015132_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015133
15134fi
15135
Neil Schemenauer4e425612001-06-19 15:44:15 +000015136# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15137
Michael W. Hudson54241132001-12-07 15:38:26 +000015138
Martin v. Löwiseba40652007-08-30 20:10:57 +000015139{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15140echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015141if test -z "$MACHDEP_OBJS"
15142then
Jack Jansene578a632001-08-15 01:27:14 +000015143 MACHDEP_OBJS=$extra_machdep_objs
15144else
15145 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015147{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15148echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015149
Guido van Rossum627b2d71993-12-24 10:39:16 +000015150# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
Martin v. Löwisd6320502004-08-12 13:45:08 +000015222
Martin v. Löwisc3001752005-01-23 09:27:24 +000015223
15224
Neal Norwitz05a45592006-03-20 06:30:08 +000015225
15226
Martin v. Löwis382abef2007-02-19 10:55:19 +000015227
15228
15229for ac_func in alarm bind_textdomain_codeset chflags chown clock confstr \
15230 ctermid execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015231 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015232 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis382abef2007-02-19 10:55:19 +000015233 kill killpg lchflags lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015234 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015235 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015236 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015237 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015238 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015239 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015240 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015241do
Martin v. Löwis11437992002-04-12 09:54:03 +000015242as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015243{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15244echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15245if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015247else
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015249/* confdefs.h. */
15250_ACEOF
15251cat confdefs.h >>conftest.$ac_ext
15252cat >>conftest.$ac_ext <<_ACEOF
15253/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015254/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15255 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15256#define $ac_func innocuous_$ac_func
15257
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015258/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015259 which can conflict with char $ac_func (); below.
15260 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015261 <limits.h> exists even on freestanding compilers. */
15262
15263#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015264# include <limits.h>
15265#else
15266# include <assert.h>
15267#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015268
15269#undef $ac_func
15270
Martin v. Löwiseba40652007-08-30 20:10:57 +000015271/* Override any GCC internal prototype to avoid an error.
15272 Use char because int might match the return type of a GCC
15273 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015274#ifdef __cplusplus
15275extern "C"
15276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015277char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015278/* The GNU C library defines this for functions which it implements
15279 to always fail with ENOSYS. Some functions are actually named
15280 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015281#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015282choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015283#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015284
Skip Montanaro6dead952003-09-25 14:50:04 +000015285int
15286main ()
15287{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015288return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 ;
15290 return 0;
15291}
15292_ACEOF
15293rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294if { (ac_try="$ac_link"
15295case "(($ac_try" in
15296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15297 *) ac_try_echo=$ac_try;;
15298esac
15299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15300 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015302 grep -v '^ *+' conftest.er1 >conftest.err
15303 rm -f conftest.er1
15304 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015306 (exit $ac_status); } && {
15307 test -z "$ac_c_werror_flag" ||
15308 test ! -s conftest.err
15309 } && test -s conftest$ac_exeext &&
15310 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015311 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015312else
Martin v. Löwis11437992002-04-12 09:54:03 +000015313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015314sed 's/^/| /' conftest.$ac_ext >&5
15315
Martin v. Löwiseba40652007-08-30 20:10:57 +000015316 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015318
15319rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015320 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015322ac_res=`eval echo '${'$as_ac_var'}'`
15323 { echo "$as_me:$LINENO: result: $ac_res" >&5
15324echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015325if test `eval echo '${'$as_ac_var'}'` = yes; then
15326 cat >>confdefs.h <<_ACEOF
15327#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15328_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015329
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015330fi
15331done
15332
Michael W. Hudson54241132001-12-07 15:38:26 +000015333
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015334# For some functions, having a definition is not sufficient, since
15335# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015336{ echo "$as_me:$LINENO: checking for chroot" >&5
15337echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015338cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015339/* confdefs.h. */
15340_ACEOF
15341cat confdefs.h >>conftest.$ac_ext
15342cat >>conftest.$ac_ext <<_ACEOF
15343/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015344#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015345int
15346main ()
15347{
15348void *x=chroot
15349 ;
15350 return 0;
15351}
15352_ACEOF
15353rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015354if { (ac_try="$ac_compile"
15355case "(($ac_try" in
15356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15357 *) ac_try_echo=$ac_try;;
15358esac
15359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015362 grep -v '^ *+' conftest.er1 >conftest.err
15363 rm -f conftest.er1
15364 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015366 (exit $ac_status); } && {
15367 test -z "$ac_c_werror_flag" ||
15368 test ! -s conftest.err
15369 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015370
15371cat >>confdefs.h <<\_ACEOF
15372#define HAVE_CHROOT 1
15373_ACEOF
15374
Martin v. Löwiseba40652007-08-30 20:10:57 +000015375 { echo "$as_me:$LINENO: result: yes" >&5
15376echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015377else
15378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015379sed 's/^/| /' conftest.$ac_ext >&5
15380
Martin v. Löwiseba40652007-08-30 20:10:57 +000015381 { echo "$as_me:$LINENO: result: no" >&5
15382echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015383
15384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015385
15386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15387{ echo "$as_me:$LINENO: checking for link" >&5
15388echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015389cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015390/* confdefs.h. */
15391_ACEOF
15392cat confdefs.h >>conftest.$ac_ext
15393cat >>conftest.$ac_ext <<_ACEOF
15394/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015395#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015396int
15397main ()
15398{
15399void *x=link
15400 ;
15401 return 0;
15402}
15403_ACEOF
15404rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015405if { (ac_try="$ac_compile"
15406case "(($ac_try" in
15407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15408 *) ac_try_echo=$ac_try;;
15409esac
15410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015413 grep -v '^ *+' conftest.er1 >conftest.err
15414 rm -f conftest.er1
15415 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015417 (exit $ac_status); } && {
15418 test -z "$ac_c_werror_flag" ||
15419 test ! -s conftest.err
15420 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015421
15422cat >>confdefs.h <<\_ACEOF
15423#define HAVE_LINK 1
15424_ACEOF
15425
Martin v. Löwiseba40652007-08-30 20:10:57 +000015426 { echo "$as_me:$LINENO: result: yes" >&5
15427echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015428else
15429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015430sed 's/^/| /' conftest.$ac_ext >&5
15431
Martin v. Löwiseba40652007-08-30 20:10:57 +000015432 { echo "$as_me:$LINENO: result: no" >&5
15433echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015434
15435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015436
15437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15438{ echo "$as_me:$LINENO: checking for symlink" >&5
15439echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015440cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015441/* confdefs.h. */
15442_ACEOF
15443cat confdefs.h >>conftest.$ac_ext
15444cat >>conftest.$ac_ext <<_ACEOF
15445/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015446#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015447int
15448main ()
15449{
15450void *x=symlink
15451 ;
15452 return 0;
15453}
15454_ACEOF
15455rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015456if { (ac_try="$ac_compile"
15457case "(($ac_try" in
15458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15459 *) ac_try_echo=$ac_try;;
15460esac
15461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15462 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015463 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015464 grep -v '^ *+' conftest.er1 >conftest.err
15465 rm -f conftest.er1
15466 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015468 (exit $ac_status); } && {
15469 test -z "$ac_c_werror_flag" ||
15470 test ! -s conftest.err
15471 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015472
15473cat >>confdefs.h <<\_ACEOF
15474#define HAVE_SYMLINK 1
15475_ACEOF
15476
Martin v. Löwiseba40652007-08-30 20:10:57 +000015477 { echo "$as_me:$LINENO: result: yes" >&5
15478echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015479else
15480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015481sed 's/^/| /' conftest.$ac_ext >&5
15482
Martin v. Löwiseba40652007-08-30 20:10:57 +000015483 { echo "$as_me:$LINENO: result: no" >&5
15484echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015485
15486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487
15488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15489{ echo "$as_me:$LINENO: checking for fchdir" >&5
15490echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015492/* confdefs.h. */
15493_ACEOF
15494cat confdefs.h >>conftest.$ac_ext
15495cat >>conftest.$ac_ext <<_ACEOF
15496/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015497#include <unistd.h>
15498int
15499main ()
15500{
15501void *x=fchdir
15502 ;
15503 return 0;
15504}
15505_ACEOF
15506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015507if { (ac_try="$ac_compile"
15508case "(($ac_try" in
15509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15510 *) ac_try_echo=$ac_try;;
15511esac
15512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015515 grep -v '^ *+' conftest.er1 >conftest.err
15516 rm -f conftest.er1
15517 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015519 (exit $ac_status); } && {
15520 test -z "$ac_c_werror_flag" ||
15521 test ! -s conftest.err
15522 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015523
15524cat >>confdefs.h <<\_ACEOF
15525#define HAVE_FCHDIR 1
15526_ACEOF
15527
Martin v. Löwiseba40652007-08-30 20:10:57 +000015528 { echo "$as_me:$LINENO: result: yes" >&5
15529echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015530else
15531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015532sed 's/^/| /' conftest.$ac_ext >&5
15533
Martin v. Löwiseba40652007-08-30 20:10:57 +000015534 { echo "$as_me:$LINENO: result: no" >&5
15535echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015536
15537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015538
15539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15540{ echo "$as_me:$LINENO: checking for fsync" >&5
15541echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015543/* confdefs.h. */
15544_ACEOF
15545cat confdefs.h >>conftest.$ac_ext
15546cat >>conftest.$ac_ext <<_ACEOF
15547/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015548#include <unistd.h>
15549int
15550main ()
15551{
15552void *x=fsync
15553 ;
15554 return 0;
15555}
15556_ACEOF
15557rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015558if { (ac_try="$ac_compile"
15559case "(($ac_try" in
15560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15561 *) ac_try_echo=$ac_try;;
15562esac
15563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015566 grep -v '^ *+' conftest.er1 >conftest.err
15567 rm -f conftest.er1
15568 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015570 (exit $ac_status); } && {
15571 test -z "$ac_c_werror_flag" ||
15572 test ! -s conftest.err
15573 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015574
15575cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015576#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015577_ACEOF
15578
Martin v. Löwiseba40652007-08-30 20:10:57 +000015579 { echo "$as_me:$LINENO: result: yes" >&5
15580echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015581else
15582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015583sed 's/^/| /' conftest.$ac_ext >&5
15584
Martin v. Löwiseba40652007-08-30 20:10:57 +000015585 { echo "$as_me:$LINENO: result: no" >&5
15586echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015587
15588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015589
15590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15591{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15592echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015593cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015594/* confdefs.h. */
15595_ACEOF
15596cat confdefs.h >>conftest.$ac_ext
15597cat >>conftest.$ac_ext <<_ACEOF
15598/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015599#include <unistd.h>
15600int
15601main ()
15602{
15603void *x=fdatasync
15604 ;
15605 return 0;
15606}
15607_ACEOF
15608rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015609if { (ac_try="$ac_compile"
15610case "(($ac_try" in
15611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15612 *) ac_try_echo=$ac_try;;
15613esac
15614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15615 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015617 grep -v '^ *+' conftest.er1 >conftest.err
15618 rm -f conftest.er1
15619 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015621 (exit $ac_status); } && {
15622 test -z "$ac_c_werror_flag" ||
15623 test ! -s conftest.err
15624 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015625
15626cat >>confdefs.h <<\_ACEOF
15627#define HAVE_FDATASYNC 1
15628_ACEOF
15629
Martin v. Löwiseba40652007-08-30 20:10:57 +000015630 { echo "$as_me:$LINENO: result: yes" >&5
15631echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015632else
15633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015634sed 's/^/| /' conftest.$ac_ext >&5
15635
Martin v. Löwiseba40652007-08-30 20:10:57 +000015636 { echo "$as_me:$LINENO: result: no" >&5
15637echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015638
15639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015640
15641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015642
Martin v. Löwisd5843682002-11-21 20:41:28 +000015643# On some systems (eg. FreeBSD 5), we would find a definition of the
15644# functions ctermid_r, setgroups in the library, but no prototype
15645# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
15646# address to avoid compiler warnings and potential miscompilations
15647# because of the missing prototypes.
15648
Martin v. Löwiseba40652007-08-30 20:10:57 +000015649{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
15650echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015652/* confdefs.h. */
15653_ACEOF
15654cat confdefs.h >>conftest.$ac_ext
15655cat >>conftest.$ac_ext <<_ACEOF
15656/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000015657
15658#include "confdefs.h"
15659#include <stdio.h>
15660
Martin v. Löwisd5843682002-11-21 20:41:28 +000015661int
15662main ()
15663{
15664void* p = ctermid_r
15665 ;
15666 return 0;
15667}
15668_ACEOF
15669rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015670if { (ac_try="$ac_compile"
15671case "(($ac_try" in
15672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15673 *) ac_try_echo=$ac_try;;
15674esac
15675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000015677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015678 grep -v '^ *+' conftest.er1 >conftest.err
15679 rm -f conftest.er1
15680 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000015681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015682 (exit $ac_status); } && {
15683 test -z "$ac_c_werror_flag" ||
15684 test ! -s conftest.err
15685 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000015686
15687cat >>confdefs.h <<\_ACEOF
15688#define HAVE_CTERMID_R 1
15689_ACEOF
15690
Martin v. Löwiseba40652007-08-30 20:10:57 +000015691 { echo "$as_me:$LINENO: result: yes" >&5
15692echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015693else
15694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015695sed 's/^/| /' conftest.$ac_ext >&5
15696
Martin v. Löwiseba40652007-08-30 20:10:57 +000015697 { echo "$as_me:$LINENO: result: no" >&5
15698echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015699
15700fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000015701
Martin v. Löwiseba40652007-08-30 20:10:57 +000015702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15703
15704{ echo "$as_me:$LINENO: checking for flock" >&5
15705echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015706cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015707/* confdefs.h. */
15708_ACEOF
15709cat confdefs.h >>conftest.$ac_ext
15710cat >>conftest.$ac_ext <<_ACEOF
15711/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015712
15713#include "confdefs.h"
15714#include <sys/file.h>
15715
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015716int
15717main ()
15718{
15719void* p = flock
15720 ;
15721 return 0;
15722}
15723_ACEOF
15724rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015725if { (ac_try="$ac_compile"
15726case "(($ac_try" in
15727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15728 *) ac_try_echo=$ac_try;;
15729esac
15730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015733 grep -v '^ *+' conftest.er1 >conftest.err
15734 rm -f conftest.er1
15735 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015737 (exit $ac_status); } && {
15738 test -z "$ac_c_werror_flag" ||
15739 test ! -s conftest.err
15740 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015741
15742cat >>confdefs.h <<\_ACEOF
15743#define HAVE_FLOCK 1
15744_ACEOF
15745
Martin v. Löwiseba40652007-08-30 20:10:57 +000015746 { echo "$as_me:$LINENO: result: yes" >&5
15747echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015748else
15749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015750sed 's/^/| /' conftest.$ac_ext >&5
15751
Martin v. Löwiseba40652007-08-30 20:10:57 +000015752 { echo "$as_me:$LINENO: result: no" >&5
15753echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015754
15755fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015756
Martin v. Löwiseba40652007-08-30 20:10:57 +000015757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15758
15759{ echo "$as_me:$LINENO: checking for getpagesize" >&5
15760echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015761cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015762/* confdefs.h. */
15763_ACEOF
15764cat confdefs.h >>conftest.$ac_ext
15765cat >>conftest.$ac_ext <<_ACEOF
15766/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015767
15768#include "confdefs.h"
15769#include <unistd.h>
15770
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015771int
15772main ()
15773{
15774void* p = getpagesize
15775 ;
15776 return 0;
15777}
15778_ACEOF
15779rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015780if { (ac_try="$ac_compile"
15781case "(($ac_try" in
15782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15783 *) ac_try_echo=$ac_try;;
15784esac
15785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15786 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015788 grep -v '^ *+' conftest.er1 >conftest.err
15789 rm -f conftest.er1
15790 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015792 (exit $ac_status); } && {
15793 test -z "$ac_c_werror_flag" ||
15794 test ! -s conftest.err
15795 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015796
15797cat >>confdefs.h <<\_ACEOF
15798#define HAVE_GETPAGESIZE 1
15799_ACEOF
15800
Martin v. Löwiseba40652007-08-30 20:10:57 +000015801 { echo "$as_me:$LINENO: result: yes" >&5
15802echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015803else
15804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015805sed 's/^/| /' conftest.$ac_ext >&5
15806
Martin v. Löwiseba40652007-08-30 20:10:57 +000015807 { echo "$as_me:$LINENO: result: no" >&5
15808echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015809
15810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015811
15812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015813
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015814for ac_prog in true
15815do
15816 # Extract the first word of "$ac_prog", so it can be a program name with args.
15817set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15819echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015820if test "${ac_cv_prog_TRUE+set}" = set; then
15821 echo $ECHO_N "(cached) $ECHO_C" >&6
15822else
15823 if test -n "$TRUE"; then
15824 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
15825else
15826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15827for as_dir in $PATH
15828do
15829 IFS=$as_save_IFS
15830 test -z "$as_dir" && as_dir=.
15831 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015832 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 +000015833 ac_cv_prog_TRUE="$ac_prog"
15834 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15835 break 2
15836 fi
15837done
15838done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015839IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015840
15841fi
15842fi
15843TRUE=$ac_cv_prog_TRUE
15844if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845 { echo "$as_me:$LINENO: result: $TRUE" >&5
15846echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015847else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015848 { echo "$as_me:$LINENO: result: no" >&5
15849echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015850fi
15851
Martin v. Löwiseba40652007-08-30 20:10:57 +000015852
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015853 test -n "$TRUE" && break
15854done
15855test -n "$TRUE" || TRUE="/bin/true"
15856
15857
Martin v. Löwiseba40652007-08-30 20:10:57 +000015858{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
15859echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015860if test "${ac_cv_lib_c_inet_aton+set}" = set; then
15861 echo $ECHO_N "(cached) $ECHO_C" >&6
15862else
15863 ac_check_lib_save_LIBS=$LIBS
15864LIBS="-lc $LIBS"
15865cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015866/* confdefs.h. */
15867_ACEOF
15868cat confdefs.h >>conftest.$ac_ext
15869cat >>conftest.$ac_ext <<_ACEOF
15870/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015871
Martin v. Löwiseba40652007-08-30 20:10:57 +000015872/* Override any GCC internal prototype to avoid an error.
15873 Use char because int might match the return type of a GCC
15874 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015875#ifdef __cplusplus
15876extern "C"
15877#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015878char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015879int
15880main ()
15881{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015882return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015883 ;
15884 return 0;
15885}
15886_ACEOF
15887rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015888if { (ac_try="$ac_link"
15889case "(($ac_try" in
15890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15891 *) ac_try_echo=$ac_try;;
15892esac
15893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15894 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015896 grep -v '^ *+' conftest.er1 >conftest.err
15897 rm -f conftest.er1
15898 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015900 (exit $ac_status); } && {
15901 test -z "$ac_c_werror_flag" ||
15902 test ! -s conftest.err
15903 } && test -s conftest$ac_exeext &&
15904 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015905 ac_cv_lib_c_inet_aton=yes
15906else
15907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015908sed 's/^/| /' conftest.$ac_ext >&5
15909
Martin v. Löwiseba40652007-08-30 20:10:57 +000015910 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015912
15913rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015914 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015915LIBS=$ac_check_lib_save_LIBS
15916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015917{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
15918echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015919if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015920 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015921else
15922
Martin v. Löwiseba40652007-08-30 20:10:57 +000015923{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
15924echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015925if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
15926 echo $ECHO_N "(cached) $ECHO_C" >&6
15927else
15928 ac_check_lib_save_LIBS=$LIBS
15929LIBS="-lresolv $LIBS"
15930cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015931/* confdefs.h. */
15932_ACEOF
15933cat confdefs.h >>conftest.$ac_ext
15934cat >>conftest.$ac_ext <<_ACEOF
15935/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015936
Martin v. Löwiseba40652007-08-30 20:10:57 +000015937/* Override any GCC internal prototype to avoid an error.
15938 Use char because int might match the return type of a GCC
15939 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015940#ifdef __cplusplus
15941extern "C"
15942#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015943char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015944int
15945main ()
15946{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015947return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015948 ;
15949 return 0;
15950}
15951_ACEOF
15952rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015953if { (ac_try="$ac_link"
15954case "(($ac_try" in
15955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15956 *) ac_try_echo=$ac_try;;
15957esac
15958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15959 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015961 grep -v '^ *+' conftest.er1 >conftest.err
15962 rm -f conftest.er1
15963 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015965 (exit $ac_status); } && {
15966 test -z "$ac_c_werror_flag" ||
15967 test ! -s conftest.err
15968 } && test -s conftest$ac_exeext &&
15969 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015970 ac_cv_lib_resolv_inet_aton=yes
15971else
15972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015973sed 's/^/| /' conftest.$ac_ext >&5
15974
Martin v. Löwiseba40652007-08-30 20:10:57 +000015975 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015977
15978rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015979 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015980LIBS=$ac_check_lib_save_LIBS
15981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015982{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
15983echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015984if test $ac_cv_lib_resolv_inet_aton = yes; then
15985 cat >>confdefs.h <<_ACEOF
15986#define HAVE_LIBRESOLV 1
15987_ACEOF
15988
15989 LIBS="-lresolv $LIBS"
15990
15991fi
15992
15993
15994fi
15995
15996
Ronald Oussorenf8752642006-07-06 10:13:35 +000015997case $ac_sys_system/$ac_sys_release in
15998Darwin/*)
15999 _CUR_CFLAGS="${CFLAGS}"
16000 _CUR_LDFLAGS="${LDFLAGS}"
16001 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16002 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16003 ;;
16004esac
16005
Martin v. Löwiseba40652007-08-30 20:10:57 +000016006{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16007echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016008if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16009 echo $ECHO_N "(cached) $ECHO_C" >&6
16010else
16011 ac_check_lib_save_LIBS=$LIBS
16012LIBS="-lz $LIBS"
16013cat >conftest.$ac_ext <<_ACEOF
16014/* confdefs.h. */
16015_ACEOF
16016cat confdefs.h >>conftest.$ac_ext
16017cat >>conftest.$ac_ext <<_ACEOF
16018/* end confdefs.h. */
16019
Martin v. Löwiseba40652007-08-30 20:10:57 +000016020/* Override any GCC internal prototype to avoid an error.
16021 Use char because int might match the return type of a GCC
16022 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016023#ifdef __cplusplus
16024extern "C"
16025#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016026char inflateCopy ();
16027int
16028main ()
16029{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016030return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016031 ;
16032 return 0;
16033}
16034_ACEOF
16035rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016036if { (ac_try="$ac_link"
16037case "(($ac_try" in
16038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16039 *) ac_try_echo=$ac_try;;
16040esac
16041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16042 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016043 ac_status=$?
16044 grep -v '^ *+' conftest.er1 >conftest.err
16045 rm -f conftest.er1
16046 cat conftest.err >&5
16047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016048 (exit $ac_status); } && {
16049 test -z "$ac_c_werror_flag" ||
16050 test ! -s conftest.err
16051 } && test -s conftest$ac_exeext &&
16052 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016053 ac_cv_lib_z_inflateCopy=yes
16054else
16055 echo "$as_me: failed program was:" >&5
16056sed 's/^/| /' conftest.$ac_ext >&5
16057
Martin v. Löwiseba40652007-08-30 20:10:57 +000016058 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016060
16061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016062 conftest$ac_exeext conftest.$ac_ext
16063LIBS=$ac_check_lib_save_LIBS
16064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016065{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16066echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016067if test $ac_cv_lib_z_inflateCopy = yes; then
16068
16069cat >>confdefs.h <<\_ACEOF
16070#define HAVE_ZLIB_COPY 1
16071_ACEOF
16072
16073fi
16074
16075
Ronald Oussorenf8752642006-07-06 10:13:35 +000016076case $ac_sys_system/$ac_sys_release in
16077Darwin/*)
16078 CFLAGS="${_CUR_CFLAGS}"
16079 LDFLAGS="${_CUR_LDFLAGS}"
16080 ;;
16081esac
16082
Martin v. Löwiseba40652007-08-30 20:10:57 +000016083{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16084echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016085cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016086/* confdefs.h. */
16087_ACEOF
16088cat confdefs.h >>conftest.$ac_ext
16089cat >>conftest.$ac_ext <<_ACEOF
16090/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016091
16092#include "confdefs.h"
16093#include <netdb.h>
16094
Martin v. Löwise9416172003-05-03 10:12:45 +000016095int
16096main ()
16097{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016098void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016099 ;
16100 return 0;
16101}
16102_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016103rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016104if { (ac_try="$ac_link"
16105case "(($ac_try" in
16106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16107 *) ac_try_echo=$ac_try;;
16108esac
16109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16110 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016112 grep -v '^ *+' conftest.er1 >conftest.err
16113 rm -f conftest.er1
16114 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016116 (exit $ac_status); } && {
16117 test -z "$ac_c_werror_flag" ||
16118 test ! -s conftest.err
16119 } && test -s conftest$ac_exeext &&
16120 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016121
16122cat >>confdefs.h <<\_ACEOF
16123#define HAVE_HSTRERROR 1
16124_ACEOF
16125
Martin v. Löwiseba40652007-08-30 20:10:57 +000016126 { echo "$as_me:$LINENO: result: yes" >&5
16127echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016128else
16129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016130sed 's/^/| /' conftest.$ac_ext >&5
16131
Martin v. Löwiseba40652007-08-30 20:10:57 +000016132 { echo "$as_me:$LINENO: result: no" >&5
16133echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016134
16135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016136
16137rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016138 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016139
Martin v. Löwiseba40652007-08-30 20:10:57 +000016140{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16141echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016143/* confdefs.h. */
16144_ACEOF
16145cat confdefs.h >>conftest.$ac_ext
16146cat >>conftest.$ac_ext <<_ACEOF
16147/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016148
16149#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016150#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016151#include <sys/socket.h>
16152#include <netinet/in.h>
16153#include <arpa/inet.h>
16154
Martin v. Löwise9416172003-05-03 10:12:45 +000016155int
16156main ()
16157{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016158void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016159 ;
16160 return 0;
16161}
16162_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016163rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016164if { (ac_try="$ac_link"
16165case "(($ac_try" in
16166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16167 *) ac_try_echo=$ac_try;;
16168esac
16169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16170 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016172 grep -v '^ *+' conftest.er1 >conftest.err
16173 rm -f conftest.er1
16174 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016176 (exit $ac_status); } && {
16177 test -z "$ac_c_werror_flag" ||
16178 test ! -s conftest.err
16179 } && test -s conftest$ac_exeext &&
16180 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016181
16182cat >>confdefs.h <<\_ACEOF
16183#define HAVE_INET_ATON 1
16184_ACEOF
16185
Martin v. Löwiseba40652007-08-30 20:10:57 +000016186 { echo "$as_me:$LINENO: result: yes" >&5
16187echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016188else
16189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016190sed 's/^/| /' conftest.$ac_ext >&5
16191
Martin v. Löwiseba40652007-08-30 20:10:57 +000016192 { echo "$as_me:$LINENO: result: no" >&5
16193echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016194
16195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016196
16197rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016198 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016199
Martin v. Löwiseba40652007-08-30 20:10:57 +000016200{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16201echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016202cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016203/* confdefs.h. */
16204_ACEOF
16205cat confdefs.h >>conftest.$ac_ext
16206cat >>conftest.$ac_ext <<_ACEOF
16207/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016208
16209#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016210#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016211#include <sys/socket.h>
16212#include <netinet/in.h>
16213#include <arpa/inet.h>
16214
Martin v. Löwise9416172003-05-03 10:12:45 +000016215int
16216main ()
16217{
16218void* p = inet_pton
16219 ;
16220 return 0;
16221}
16222_ACEOF
16223rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016224if { (ac_try="$ac_compile"
16225case "(($ac_try" in
16226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16227 *) ac_try_echo=$ac_try;;
16228esac
16229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16230 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016232 grep -v '^ *+' conftest.er1 >conftest.err
16233 rm -f conftest.er1
16234 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016236 (exit $ac_status); } && {
16237 test -z "$ac_c_werror_flag" ||
16238 test ! -s conftest.err
16239 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016240
16241cat >>confdefs.h <<\_ACEOF
16242#define HAVE_INET_PTON 1
16243_ACEOF
16244
Martin v. Löwiseba40652007-08-30 20:10:57 +000016245 { echo "$as_me:$LINENO: result: yes" >&5
16246echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016247else
16248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016249sed 's/^/| /' conftest.$ac_ext >&5
16250
Martin v. Löwiseba40652007-08-30 20:10:57 +000016251 { echo "$as_me:$LINENO: result: no" >&5
16252echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016253
16254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016255
16256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016257
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016258# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016259{ echo "$as_me:$LINENO: checking for setgroups" >&5
16260echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016261cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016262/* confdefs.h. */
16263_ACEOF
16264cat confdefs.h >>conftest.$ac_ext
16265cat >>conftest.$ac_ext <<_ACEOF
16266/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016267
16268#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016269#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016270#ifdef HAVE_GRP_H
16271#include <grp.h>
16272#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016273
Martin v. Löwisd5843682002-11-21 20:41:28 +000016274int
16275main ()
16276{
16277void* p = setgroups
16278 ;
16279 return 0;
16280}
16281_ACEOF
16282rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016283if { (ac_try="$ac_compile"
16284case "(($ac_try" in
16285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16286 *) ac_try_echo=$ac_try;;
16287esac
16288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016291 grep -v '^ *+' conftest.er1 >conftest.err
16292 rm -f conftest.er1
16293 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016295 (exit $ac_status); } && {
16296 test -z "$ac_c_werror_flag" ||
16297 test ! -s conftest.err
16298 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016299
16300cat >>confdefs.h <<\_ACEOF
16301#define HAVE_SETGROUPS 1
16302_ACEOF
16303
Martin v. Löwiseba40652007-08-30 20:10:57 +000016304 { echo "$as_me:$LINENO: result: yes" >&5
16305echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016306else
16307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016308sed 's/^/| /' conftest.$ac_ext >&5
16309
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310 { echo "$as_me:$LINENO: result: no" >&5
16311echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016312
16313fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016314
16315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016316
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016317# check for openpty and forkpty
16318
Martin v. Löwis11437992002-04-12 09:54:03 +000016319
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016320for ac_func in openpty
16321do
Martin v. Löwis11437992002-04-12 09:54:03 +000016322as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016323{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16324echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16325if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016326 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016327else
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016329/* confdefs.h. */
16330_ACEOF
16331cat confdefs.h >>conftest.$ac_ext
16332cat >>conftest.$ac_ext <<_ACEOF
16333/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016334/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16335 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16336#define $ac_func innocuous_$ac_func
16337
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016338/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016339 which can conflict with char $ac_func (); below.
16340 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016341 <limits.h> exists even on freestanding compilers. */
16342
16343#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016344# include <limits.h>
16345#else
16346# include <assert.h>
16347#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016348
16349#undef $ac_func
16350
Martin v. Löwiseba40652007-08-30 20:10:57 +000016351/* Override any GCC internal prototype to avoid an error.
16352 Use char because int might match the return type of a GCC
16353 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016354#ifdef __cplusplus
16355extern "C"
16356#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016357char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016358/* The GNU C library defines this for functions which it implements
16359 to always fail with ENOSYS. Some functions are actually named
16360 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016361#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016362choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016363#endif
16364
Skip Montanaro6dead952003-09-25 14:50:04 +000016365int
16366main ()
16367{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016368return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016369 ;
16370 return 0;
16371}
16372_ACEOF
16373rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016374if { (ac_try="$ac_link"
16375case "(($ac_try" in
16376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16377 *) ac_try_echo=$ac_try;;
16378esac
16379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16380 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016382 grep -v '^ *+' conftest.er1 >conftest.err
16383 rm -f conftest.er1
16384 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016386 (exit $ac_status); } && {
16387 test -z "$ac_c_werror_flag" ||
16388 test ! -s conftest.err
16389 } && test -s conftest$ac_exeext &&
16390 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016391 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016392else
Martin v. Löwis11437992002-04-12 09:54:03 +000016393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016394sed 's/^/| /' conftest.$ac_ext >&5
16395
Martin v. Löwiseba40652007-08-30 20:10:57 +000016396 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016398
16399rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016400 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016402ac_res=`eval echo '${'$as_ac_var'}'`
16403 { echo "$as_me:$LINENO: result: $ac_res" >&5
16404echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016405if test `eval echo '${'$as_ac_var'}'` = yes; then
16406 cat >>confdefs.h <<_ACEOF
16407#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16408_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016409
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016410else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016411 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16412echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016413if test "${ac_cv_lib_util_openpty+set}" = set; then
16414 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016415else
Martin v. Löwis11437992002-04-12 09:54:03 +000016416 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016417LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016418cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016419/* confdefs.h. */
16420_ACEOF
16421cat confdefs.h >>conftest.$ac_ext
16422cat >>conftest.$ac_ext <<_ACEOF
16423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016424
Martin v. Löwiseba40652007-08-30 20:10:57 +000016425/* Override any GCC internal prototype to avoid an error.
16426 Use char because int might match the return type of a GCC
16427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016428#ifdef __cplusplus
16429extern "C"
16430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016431char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016432int
16433main ()
16434{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016435return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016436 ;
16437 return 0;
16438}
16439_ACEOF
16440rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016441if { (ac_try="$ac_link"
16442case "(($ac_try" in
16443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16444 *) ac_try_echo=$ac_try;;
16445esac
16446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16447 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016448 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016449 grep -v '^ *+' conftest.er1 >conftest.err
16450 rm -f conftest.er1
16451 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016453 (exit $ac_status); } && {
16454 test -z "$ac_c_werror_flag" ||
16455 test ! -s conftest.err
16456 } && test -s conftest$ac_exeext &&
16457 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016458 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016459else
Martin v. Löwis11437992002-04-12 09:54:03 +000016460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016461sed 's/^/| /' conftest.$ac_ext >&5
16462
Martin v. Löwiseba40652007-08-30 20:10:57 +000016463 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016465
16466rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016467 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016468LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016470{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
16471echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016472if test $ac_cv_lib_util_openpty = yes; then
16473 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016474#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016475_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016476 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016477else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016478 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
16479echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016480if test "${ac_cv_lib_bsd_openpty+set}" = set; then
16481 echo $ECHO_N "(cached) $ECHO_C" >&6
16482else
16483 ac_check_lib_save_LIBS=$LIBS
16484LIBS="-lbsd $LIBS"
16485cat >conftest.$ac_ext <<_ACEOF
16486/* confdefs.h. */
16487_ACEOF
16488cat confdefs.h >>conftest.$ac_ext
16489cat >>conftest.$ac_ext <<_ACEOF
16490/* end confdefs.h. */
16491
Martin v. Löwiseba40652007-08-30 20:10:57 +000016492/* Override any GCC internal prototype to avoid an error.
16493 Use char because int might match the return type of a GCC
16494 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016495#ifdef __cplusplus
16496extern "C"
16497#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016498char openpty ();
16499int
16500main ()
16501{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016502return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016503 ;
16504 return 0;
16505}
16506_ACEOF
16507rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016508if { (ac_try="$ac_link"
16509case "(($ac_try" in
16510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16511 *) ac_try_echo=$ac_try;;
16512esac
16513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16514 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016515 ac_status=$?
16516 grep -v '^ *+' conftest.er1 >conftest.err
16517 rm -f conftest.er1
16518 cat conftest.err >&5
16519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016520 (exit $ac_status); } && {
16521 test -z "$ac_c_werror_flag" ||
16522 test ! -s conftest.err
16523 } && test -s conftest$ac_exeext &&
16524 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016525 ac_cv_lib_bsd_openpty=yes
16526else
16527 echo "$as_me: failed program was:" >&5
16528sed 's/^/| /' conftest.$ac_ext >&5
16529
Martin v. Löwiseba40652007-08-30 20:10:57 +000016530 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016532
16533rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016534 conftest$ac_exeext conftest.$ac_ext
16535LIBS=$ac_check_lib_save_LIBS
16536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016537{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
16538echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016539if test $ac_cv_lib_bsd_openpty = yes; then
16540 cat >>confdefs.h <<\_ACEOF
16541#define HAVE_OPENPTY 1
16542_ACEOF
16543 LIBS="$LIBS -lbsd"
16544fi
16545
16546
16547fi
16548
Fred Drake8cef4cf2000-06-28 16:40:38 +000016549
16550fi
16551done
16552
Martin v. Löwis11437992002-04-12 09:54:03 +000016553
Fred Drake8cef4cf2000-06-28 16:40:38 +000016554for ac_func in forkpty
16555do
Martin v. Löwis11437992002-04-12 09:54:03 +000016556as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016557{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16558echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16559if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016560 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016561else
Martin v. Löwis11437992002-04-12 09:54:03 +000016562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016563/* confdefs.h. */
16564_ACEOF
16565cat confdefs.h >>conftest.$ac_ext
16566cat >>conftest.$ac_ext <<_ACEOF
16567/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016568/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16569 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16570#define $ac_func innocuous_$ac_func
16571
Fred Drake8cef4cf2000-06-28 16:40:38 +000016572/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016573 which can conflict with char $ac_func (); below.
16574 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016575 <limits.h> exists even on freestanding compilers. */
16576
16577#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016578# include <limits.h>
16579#else
16580# include <assert.h>
16581#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016582
16583#undef $ac_func
16584
Martin v. Löwiseba40652007-08-30 20:10:57 +000016585/* Override any GCC internal prototype to avoid an error.
16586 Use char because int might match the return type of a GCC
16587 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016588#ifdef __cplusplus
16589extern "C"
16590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016591char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000016592/* The GNU C library defines this for functions which it implements
16593 to always fail with ENOSYS. Some functions are actually named
16594 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016595#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000016596choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000016597#endif
16598
Skip Montanaro6dead952003-09-25 14:50:04 +000016599int
16600main ()
16601{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016602return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 ;
16604 return 0;
16605}
16606_ACEOF
16607rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016608if { (ac_try="$ac_link"
16609case "(($ac_try" in
16610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16611 *) ac_try_echo=$ac_try;;
16612esac
16613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16614 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016616 grep -v '^ *+' conftest.er1 >conftest.err
16617 rm -f conftest.er1
16618 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016620 (exit $ac_status); } && {
16621 test -z "$ac_c_werror_flag" ||
16622 test ! -s conftest.err
16623 } && test -s conftest$ac_exeext &&
16624 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016625 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016626else
Martin v. Löwis11437992002-04-12 09:54:03 +000016627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016628sed 's/^/| /' conftest.$ac_ext >&5
16629
Martin v. Löwiseba40652007-08-30 20:10:57 +000016630 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016632
16633rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016634 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016636ac_res=`eval echo '${'$as_ac_var'}'`
16637 { echo "$as_me:$LINENO: result: $ac_res" >&5
16638echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016639if test `eval echo '${'$as_ac_var'}'` = yes; then
16640 cat >>confdefs.h <<_ACEOF
16641#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16642_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016643
Fred Drake8cef4cf2000-06-28 16:40:38 +000016644else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016645 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
16646echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016647if test "${ac_cv_lib_util_forkpty+set}" = set; then
16648 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016649else
Martin v. Löwis11437992002-04-12 09:54:03 +000016650 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016651LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016653/* confdefs.h. */
16654_ACEOF
16655cat confdefs.h >>conftest.$ac_ext
16656cat >>conftest.$ac_ext <<_ACEOF
16657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016658
Martin v. Löwiseba40652007-08-30 20:10:57 +000016659/* Override any GCC internal prototype to avoid an error.
16660 Use char because int might match the return type of a GCC
16661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016662#ifdef __cplusplus
16663extern "C"
16664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016665char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016666int
16667main ()
16668{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016669return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016670 ;
16671 return 0;
16672}
16673_ACEOF
16674rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016675if { (ac_try="$ac_link"
16676case "(($ac_try" in
16677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16678 *) ac_try_echo=$ac_try;;
16679esac
16680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16681 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016683 grep -v '^ *+' conftest.er1 >conftest.err
16684 rm -f conftest.er1
16685 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016687 (exit $ac_status); } && {
16688 test -z "$ac_c_werror_flag" ||
16689 test ! -s conftest.err
16690 } && test -s conftest$ac_exeext &&
16691 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016693else
Martin v. Löwis11437992002-04-12 09:54:03 +000016694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016695sed 's/^/| /' conftest.$ac_ext >&5
16696
Martin v. Löwiseba40652007-08-30 20:10:57 +000016697 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016699
16700rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016702LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016704{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
16705echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016706if test $ac_cv_lib_util_forkpty = yes; then
16707 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016708#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016709_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016710 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016711else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016712 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
16713echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016714if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
16715 echo $ECHO_N "(cached) $ECHO_C" >&6
16716else
16717 ac_check_lib_save_LIBS=$LIBS
16718LIBS="-lbsd $LIBS"
16719cat >conftest.$ac_ext <<_ACEOF
16720/* confdefs.h. */
16721_ACEOF
16722cat confdefs.h >>conftest.$ac_ext
16723cat >>conftest.$ac_ext <<_ACEOF
16724/* end confdefs.h. */
16725
Martin v. Löwiseba40652007-08-30 20:10:57 +000016726/* Override any GCC internal prototype to avoid an error.
16727 Use char because int might match the return type of a GCC
16728 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016729#ifdef __cplusplus
16730extern "C"
16731#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016732char forkpty ();
16733int
16734main ()
16735{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016736return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016737 ;
16738 return 0;
16739}
16740_ACEOF
16741rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016742if { (ac_try="$ac_link"
16743case "(($ac_try" in
16744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16745 *) ac_try_echo=$ac_try;;
16746esac
16747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16748 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016749 ac_status=$?
16750 grep -v '^ *+' conftest.er1 >conftest.err
16751 rm -f conftest.er1
16752 cat conftest.err >&5
16753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016754 (exit $ac_status); } && {
16755 test -z "$ac_c_werror_flag" ||
16756 test ! -s conftest.err
16757 } && test -s conftest$ac_exeext &&
16758 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016759 ac_cv_lib_bsd_forkpty=yes
16760else
16761 echo "$as_me: failed program was:" >&5
16762sed 's/^/| /' conftest.$ac_ext >&5
16763
Martin v. Löwiseba40652007-08-30 20:10:57 +000016764 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016766
16767rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016768 conftest$ac_exeext conftest.$ac_ext
16769LIBS=$ac_check_lib_save_LIBS
16770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016771{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
16772echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016773if test $ac_cv_lib_bsd_forkpty = yes; then
16774 cat >>confdefs.h <<\_ACEOF
16775#define HAVE_FORKPTY 1
16776_ACEOF
16777 LIBS="$LIBS -lbsd"
16778fi
16779
16780
16781fi
16782
Fred Drake8cef4cf2000-06-28 16:40:38 +000016783
16784fi
16785done
16786
Jack Jansendd19cf82001-12-06 22:36:17 +000016787
Michael W. Hudson54241132001-12-07 15:38:26 +000016788# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016789
16790
16791
16792
16793
16794
Fred Drake8cef4cf2000-06-28 16:40:38 +000016795for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
16796do
Martin v. Löwis11437992002-04-12 09:54:03 +000016797as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016798{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16799echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16800if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016801 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016802else
Martin v. Löwis11437992002-04-12 09:54:03 +000016803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016804/* confdefs.h. */
16805_ACEOF
16806cat confdefs.h >>conftest.$ac_ext
16807cat >>conftest.$ac_ext <<_ACEOF
16808/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016809/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16810 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16811#define $ac_func innocuous_$ac_func
16812
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016813/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016814 which can conflict with char $ac_func (); below.
16815 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016816 <limits.h> exists even on freestanding compilers. */
16817
16818#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016819# include <limits.h>
16820#else
16821# include <assert.h>
16822#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016823
16824#undef $ac_func
16825
Martin v. Löwiseba40652007-08-30 20:10:57 +000016826/* Override any GCC internal prototype to avoid an error.
16827 Use char because int might match the return type of a GCC
16828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016829#ifdef __cplusplus
16830extern "C"
16831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016832char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016833/* The GNU C library defines this for functions which it implements
16834 to always fail with ENOSYS. Some functions are actually named
16835 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016836#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016837choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016838#endif
16839
Skip Montanaro6dead952003-09-25 14:50:04 +000016840int
16841main ()
16842{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016843return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016844 ;
16845 return 0;
16846}
16847_ACEOF
16848rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016849if { (ac_try="$ac_link"
16850case "(($ac_try" in
16851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16852 *) ac_try_echo=$ac_try;;
16853esac
16854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16855 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016857 grep -v '^ *+' conftest.er1 >conftest.err
16858 rm -f conftest.er1
16859 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016861 (exit $ac_status); } && {
16862 test -z "$ac_c_werror_flag" ||
16863 test ! -s conftest.err
16864 } && test -s conftest$ac_exeext &&
16865 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016866 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016867else
Martin v. Löwis11437992002-04-12 09:54:03 +000016868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016869sed 's/^/| /' conftest.$ac_ext >&5
16870
Martin v. Löwiseba40652007-08-30 20:10:57 +000016871 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016873
16874rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016875 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016877ac_res=`eval echo '${'$as_ac_var'}'`
16878 { echo "$as_me:$LINENO: result: $ac_res" >&5
16879echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016880if test `eval echo '${'$as_ac_var'}'` = yes; then
16881 cat >>confdefs.h <<_ACEOF
16882#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16883_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016884
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016885fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016886done
16887
Michael W. Hudson54241132001-12-07 15:38:26 +000016888
Martin v. Löwis11437992002-04-12 09:54:03 +000016889
16890
16891
16892
16893
Martin v. Löwis1142de32002-03-29 16:28:31 +000016894for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000016895do
Martin v. Löwis11437992002-04-12 09:54:03 +000016896as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016897{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16898echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16899if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016900 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016901else
Martin v. Löwis11437992002-04-12 09:54:03 +000016902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016903/* confdefs.h. */
16904_ACEOF
16905cat confdefs.h >>conftest.$ac_ext
16906cat >>conftest.$ac_ext <<_ACEOF
16907/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016908/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16909 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16910#define $ac_func innocuous_$ac_func
16911
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016912/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016913 which can conflict with char $ac_func (); below.
16914 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016915 <limits.h> exists even on freestanding compilers. */
16916
16917#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016918# include <limits.h>
16919#else
16920# include <assert.h>
16921#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016922
16923#undef $ac_func
16924
Martin v. Löwiseba40652007-08-30 20:10:57 +000016925/* Override any GCC internal prototype to avoid an error.
16926 Use char because int might match the return type of a GCC
16927 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016928#ifdef __cplusplus
16929extern "C"
16930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016931char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016932/* The GNU C library defines this for functions which it implements
16933 to always fail with ENOSYS. Some functions are actually named
16934 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016935#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016936choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016937#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016938
Skip Montanaro6dead952003-09-25 14:50:04 +000016939int
16940main ()
16941{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016942return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016943 ;
16944 return 0;
16945}
16946_ACEOF
16947rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016948if { (ac_try="$ac_link"
16949case "(($ac_try" in
16950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16951 *) ac_try_echo=$ac_try;;
16952esac
16953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16954 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016956 grep -v '^ *+' conftest.er1 >conftest.err
16957 rm -f conftest.er1
16958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016960 (exit $ac_status); } && {
16961 test -z "$ac_c_werror_flag" ||
16962 test ! -s conftest.err
16963 } && test -s conftest$ac_exeext &&
16964 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016965 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000016966else
Martin v. Löwis11437992002-04-12 09:54:03 +000016967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016968sed 's/^/| /' conftest.$ac_ext >&5
16969
Martin v. Löwiseba40652007-08-30 20:10:57 +000016970 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000016971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016972
16973rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016974 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000016975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016976ac_res=`eval echo '${'$as_ac_var'}'`
16977 { echo "$as_me:$LINENO: result: $ac_res" >&5
16978echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016979if test `eval echo '${'$as_ac_var'}'` = yes; then
16980 cat >>confdefs.h <<_ACEOF
16981#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16982_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000016983
Martin v. Löwis1142de32002-03-29 16:28:31 +000016984else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016985 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000016986 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016987 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
16988 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016989esac
16990
Martin v. Löwis1142de32002-03-29 16:28:31 +000016991fi
16992done
16993
16994
Martin v. Löwis11437992002-04-12 09:54:03 +000016995
Martin v. Löwis1142de32002-03-29 16:28:31 +000016996for ac_func in getpgrp
16997do
Martin v. Löwis11437992002-04-12 09:54:03 +000016998as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016999{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17000echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17001if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017002 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017003else
Martin v. Löwis11437992002-04-12 09:54:03 +000017004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017005/* confdefs.h. */
17006_ACEOF
17007cat confdefs.h >>conftest.$ac_ext
17008cat >>conftest.$ac_ext <<_ACEOF
17009/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017010/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17011 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17012#define $ac_func innocuous_$ac_func
17013
Martin v. Löwis1142de32002-03-29 16:28:31 +000017014/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017015 which can conflict with char $ac_func (); below.
17016 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017017 <limits.h> exists even on freestanding compilers. */
17018
17019#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017020# include <limits.h>
17021#else
17022# include <assert.h>
17023#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017024
17025#undef $ac_func
17026
Martin v. Löwiseba40652007-08-30 20:10:57 +000017027/* Override any GCC internal prototype to avoid an error.
17028 Use char because int might match the return type of a GCC
17029 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017030#ifdef __cplusplus
17031extern "C"
17032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017033char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017034/* The GNU C library defines this for functions which it implements
17035 to always fail with ENOSYS. Some functions are actually named
17036 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017037#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017038choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017039#endif
17040
Skip Montanaro6dead952003-09-25 14:50:04 +000017041int
17042main ()
17043{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017044return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017045 ;
17046 return 0;
17047}
17048_ACEOF
17049rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017050if { (ac_try="$ac_link"
17051case "(($ac_try" in
17052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17053 *) ac_try_echo=$ac_try;;
17054esac
17055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17056 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017058 grep -v '^ *+' conftest.er1 >conftest.err
17059 rm -f conftest.er1
17060 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017062 (exit $ac_status); } && {
17063 test -z "$ac_c_werror_flag" ||
17064 test ! -s conftest.err
17065 } && test -s conftest$ac_exeext &&
17066 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017067 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017068else
Martin v. Löwis11437992002-04-12 09:54:03 +000017069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017070sed 's/^/| /' conftest.$ac_ext >&5
17071
Martin v. Löwiseba40652007-08-30 20:10:57 +000017072 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017074
17075rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017076 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017078ac_res=`eval echo '${'$as_ac_var'}'`
17079 { echo "$as_me:$LINENO: result: $ac_res" >&5
17080echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017081if test `eval echo '${'$as_ac_var'}'` = yes; then
17082 cat >>confdefs.h <<_ACEOF
17083#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17084_ACEOF
17085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017086/* confdefs.h. */
17087_ACEOF
17088cat confdefs.h >>conftest.$ac_ext
17089cat >>conftest.$ac_ext <<_ACEOF
17090/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017091#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017092int
17093main ()
17094{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017095getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017096 ;
17097 return 0;
17098}
17099_ACEOF
17100rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017101if { (ac_try="$ac_compile"
17102case "(($ac_try" in
17103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17104 *) ac_try_echo=$ac_try;;
17105esac
17106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017109 grep -v '^ *+' conftest.er1 >conftest.err
17110 rm -f conftest.er1
17111 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017113 (exit $ac_status); } && {
17114 test -z "$ac_c_werror_flag" ||
17115 test ! -s conftest.err
17116 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017117
17118cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017119#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017120_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017121
Martin v. Löwis11437992002-04-12 09:54:03 +000017122
Guido van Rossumf78abae1997-01-21 22:02:36 +000017123else
Martin v. Löwis11437992002-04-12 09:54:03 +000017124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017125sed 's/^/| /' conftest.$ac_ext >&5
17126
Martin v. Löwiseba40652007-08-30 20:10:57 +000017127
Guido van Rossum627b2d71993-12-24 10:39:16 +000017128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017129
17130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017131
Guido van Rossum627b2d71993-12-24 10:39:16 +000017132fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017133done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017134
Jack Jansen150753c2003-03-29 22:07:47 +000017135
17136for ac_func in setpgrp
17137do
17138as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017139{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17140echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17141if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017142 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017143else
Martin v. Löwis11437992002-04-12 09:54:03 +000017144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017145/* confdefs.h. */
17146_ACEOF
17147cat confdefs.h >>conftest.$ac_ext
17148cat >>conftest.$ac_ext <<_ACEOF
17149/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017150/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17151 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17152#define $ac_func innocuous_$ac_func
17153
Jack Jansen150753c2003-03-29 22:07:47 +000017154/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017155 which can conflict with char $ac_func (); below.
17156 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017157 <limits.h> exists even on freestanding compilers. */
17158
17159#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017160# include <limits.h>
17161#else
17162# include <assert.h>
17163#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017164
17165#undef $ac_func
17166
Martin v. Löwiseba40652007-08-30 20:10:57 +000017167/* Override any GCC internal prototype to avoid an error.
17168 Use char because int might match the return type of a GCC
17169 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017170#ifdef __cplusplus
17171extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017172#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017173char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017174/* The GNU C library defines this for functions which it implements
17175 to always fail with ENOSYS. Some functions are actually named
17176 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017177#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017178choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017179#endif
17180
Skip Montanaro6dead952003-09-25 14:50:04 +000017181int
17182main ()
17183{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017184return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017185 ;
17186 return 0;
17187}
17188_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017189rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017190if { (ac_try="$ac_link"
17191case "(($ac_try" in
17192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17193 *) ac_try_echo=$ac_try;;
17194esac
17195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17196 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017198 grep -v '^ *+' conftest.er1 >conftest.err
17199 rm -f conftest.er1
17200 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017202 (exit $ac_status); } && {
17203 test -z "$ac_c_werror_flag" ||
17204 test ! -s conftest.err
17205 } && test -s conftest$ac_exeext &&
17206 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017207 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017208else
Jack Jansen150753c2003-03-29 22:07:47 +000017209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017210sed 's/^/| /' conftest.$ac_ext >&5
17211
Martin v. Löwiseba40652007-08-30 20:10:57 +000017212 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017214
17215rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017216 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017218ac_res=`eval echo '${'$as_ac_var'}'`
17219 { echo "$as_me:$LINENO: result: $ac_res" >&5
17220echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017221if test `eval echo '${'$as_ac_var'}'` = yes; then
17222 cat >>confdefs.h <<_ACEOF
17223#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17224_ACEOF
17225 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017226/* confdefs.h. */
17227_ACEOF
17228cat confdefs.h >>conftest.$ac_ext
17229cat >>conftest.$ac_ext <<_ACEOF
17230/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017231#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017232int
17233main ()
17234{
17235setpgrp(0,0);
17236 ;
17237 return 0;
17238}
17239_ACEOF
17240rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017241if { (ac_try="$ac_compile"
17242case "(($ac_try" in
17243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17244 *) ac_try_echo=$ac_try;;
17245esac
17246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17247 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017249 grep -v '^ *+' conftest.er1 >conftest.err
17250 rm -f conftest.er1
17251 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017253 (exit $ac_status); } && {
17254 test -z "$ac_c_werror_flag" ||
17255 test ! -s conftest.err
17256 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017257
17258cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017259#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017260_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017261
Jack Jansen150753c2003-03-29 22:07:47 +000017262
17263else
17264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017265sed 's/^/| /' conftest.$ac_ext >&5
17266
Martin v. Löwiseba40652007-08-30 20:10:57 +000017267
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017269
17270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017271
17272fi
17273done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017274
Martin v. Löwis11437992002-04-12 09:54:03 +000017275
Thomas Wouters3a584202000-08-05 23:28:51 +000017276for ac_func in gettimeofday
17277do
Martin v. Löwis11437992002-04-12 09:54:03 +000017278as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017279{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17280echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17281if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017282 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017283else
Martin v. Löwis11437992002-04-12 09:54:03 +000017284 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017285/* confdefs.h. */
17286_ACEOF
17287cat confdefs.h >>conftest.$ac_ext
17288cat >>conftest.$ac_ext <<_ACEOF
17289/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017290/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17291 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17292#define $ac_func innocuous_$ac_func
17293
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017294/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017295 which can conflict with char $ac_func (); below.
17296 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017297 <limits.h> exists even on freestanding compilers. */
17298
17299#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017300# include <limits.h>
17301#else
17302# include <assert.h>
17303#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017304
17305#undef $ac_func
17306
Martin v. Löwiseba40652007-08-30 20:10:57 +000017307/* Override any GCC internal prototype to avoid an error.
17308 Use char because int might match the return type of a GCC
17309 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017310#ifdef __cplusplus
17311extern "C"
17312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017313char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017314/* The GNU C library defines this for functions which it implements
17315 to always fail with ENOSYS. Some functions are actually named
17316 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017317#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017318choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017319#endif
17320
Skip Montanaro6dead952003-09-25 14:50:04 +000017321int
17322main ()
17323{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017324return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017325 ;
17326 return 0;
17327}
17328_ACEOF
17329rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017330if { (ac_try="$ac_link"
17331case "(($ac_try" in
17332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17333 *) ac_try_echo=$ac_try;;
17334esac
17335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17336 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017338 grep -v '^ *+' conftest.er1 >conftest.err
17339 rm -f conftest.er1
17340 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017342 (exit $ac_status); } && {
17343 test -z "$ac_c_werror_flag" ||
17344 test ! -s conftest.err
17345 } && test -s conftest$ac_exeext &&
17346 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017347 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017348else
Martin v. Löwis11437992002-04-12 09:54:03 +000017349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017350sed 's/^/| /' conftest.$ac_ext >&5
17351
Martin v. Löwiseba40652007-08-30 20:10:57 +000017352 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017354
17355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017356 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017358ac_res=`eval echo '${'$as_ac_var'}'`
17359 { echo "$as_me:$LINENO: result: $ac_res" >&5
17360echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017361if test `eval echo '${'$as_ac_var'}'` = yes; then
17362 cat >>confdefs.h <<_ACEOF
17363#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17364_ACEOF
17365 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017366/* confdefs.h. */
17367_ACEOF
17368cat confdefs.h >>conftest.$ac_ext
17369cat >>conftest.$ac_ext <<_ACEOF
17370/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017371#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017372int
17373main ()
17374{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017375gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017376 ;
17377 return 0;
17378}
17379_ACEOF
17380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017381if { (ac_try="$ac_compile"
17382case "(($ac_try" in
17383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17384 *) ac_try_echo=$ac_try;;
17385esac
17386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017389 grep -v '^ *+' conftest.er1 >conftest.err
17390 rm -f conftest.er1
17391 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017393 (exit $ac_status); } && {
17394 test -z "$ac_c_werror_flag" ||
17395 test ! -s conftest.err
17396 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000017397 :
17398else
Martin v. Löwis11437992002-04-12 09:54:03 +000017399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017400sed 's/^/| /' conftest.$ac_ext >&5
17401
Martin v. Löwis11437992002-04-12 09:54:03 +000017402
17403cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017404#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017405_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017406
Martin v. Löwis11437992002-04-12 09:54:03 +000017407
Guido van Rossum627b2d71993-12-24 10:39:16 +000017408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017409
17410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017411
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017412fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017413done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017414
Michael W. Hudson54241132001-12-07 15:38:26 +000017415
Martin v. Löwiseba40652007-08-30 20:10:57 +000017416{ echo "$as_me:$LINENO: checking for major" >&5
17417echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017418cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017419/* confdefs.h. */
17420_ACEOF
17421cat confdefs.h >>conftest.$ac_ext
17422cat >>conftest.$ac_ext <<_ACEOF
17423/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017424
Neal Norwitz6eb37f02003-02-23 23:28:15 +000017425#if defined(MAJOR_IN_MKDEV)
17426#include <sys/mkdev.h>
17427#elif defined(MAJOR_IN_SYSMACROS)
17428#include <sys/sysmacros.h>
17429#else
17430#include <sys/types.h>
17431#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017432
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017433int
17434main ()
17435{
17436
17437 makedev(major(0),minor(0));
17438
17439 ;
17440 return 0;
17441}
17442_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000017443rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017444if { (ac_try="$ac_link"
17445case "(($ac_try" in
17446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17447 *) ac_try_echo=$ac_try;;
17448esac
17449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17450 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017452 grep -v '^ *+' conftest.er1 >conftest.err
17453 rm -f conftest.er1
17454 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017456 (exit $ac_status); } && {
17457 test -z "$ac_c_werror_flag" ||
17458 test ! -s conftest.err
17459 } && test -s conftest$ac_exeext &&
17460 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017461
17462
17463cat >>confdefs.h <<\_ACEOF
17464#define HAVE_DEVICE_MACROS 1
17465_ACEOF
17466
Martin v. Löwiseba40652007-08-30 20:10:57 +000017467 { echo "$as_me:$LINENO: result: yes" >&5
17468echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017469
17470else
17471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017472sed 's/^/| /' conftest.$ac_ext >&5
17473
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017474
Martin v. Löwiseba40652007-08-30 20:10:57 +000017475 { echo "$as_me:$LINENO: result: no" >&5
17476echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017477
17478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017479
17480rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017481 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017482
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017483# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000017484# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000017485{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
17486echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017487cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017488/* confdefs.h. */
17489_ACEOF
17490cat confdefs.h >>conftest.$ac_ext
17491cat >>conftest.$ac_ext <<_ACEOF
17492/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017493
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000017494#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017495#include <sys/socket.h>
17496#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000017497#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017498
Martin v. Löwis11437992002-04-12 09:54:03 +000017499int
17500main ()
17501{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017502
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017503getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017504
Martin v. Löwis11437992002-04-12 09:54:03 +000017505 ;
17506 return 0;
17507}
17508_ACEOF
17509rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017510if { (ac_try="$ac_link"
17511case "(($ac_try" in
17512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17513 *) ac_try_echo=$ac_try;;
17514esac
17515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17516 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017518 grep -v '^ *+' conftest.er1 >conftest.err
17519 rm -f conftest.er1
17520 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017522 (exit $ac_status); } && {
17523 test -z "$ac_c_werror_flag" ||
17524 test ! -s conftest.err
17525 } && test -s conftest$ac_exeext &&
17526 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017527
Martin v. Löwiseba40652007-08-30 20:10:57 +000017528{ echo "$as_me:$LINENO: result: yes" >&5
17529echo "${ECHO_T}yes" >&6; }
17530{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
17531echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017532if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017533 { echo "$as_me:$LINENO: result: buggy" >&5
17534echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017535buggygetaddrinfo=yes
17536else
Martin v. Löwis11437992002-04-12 09:54:03 +000017537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017538/* confdefs.h. */
17539_ACEOF
17540cat confdefs.h >>conftest.$ac_ext
17541cat >>conftest.$ac_ext <<_ACEOF
17542/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017543
17544#include <sys/types.h>
17545#include <netdb.h>
17546#include <string.h>
17547#include <sys/socket.h>
17548#include <netinet/in.h>
17549
17550main()
17551{
17552 int passive, gaierr, inet4 = 0, inet6 = 0;
17553 struct addrinfo hints, *ai, *aitop;
17554 char straddr[INET6_ADDRSTRLEN], strport[16];
17555
17556 for (passive = 0; passive <= 1; passive++) {
17557 memset(&hints, 0, sizeof(hints));
17558 hints.ai_family = AF_UNSPEC;
17559 hints.ai_flags = passive ? AI_PASSIVE : 0;
17560 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000017561 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017562 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
17563 (void)gai_strerror(gaierr);
17564 goto bad;
17565 }
17566 for (ai = aitop; ai; ai = ai->ai_next) {
17567 if (ai->ai_addr == NULL ||
17568 ai->ai_addrlen == 0 ||
17569 getnameinfo(ai->ai_addr, ai->ai_addrlen,
17570 straddr, sizeof(straddr), strport, sizeof(strport),
17571 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
17572 goto bad;
17573 }
17574 switch (ai->ai_family) {
17575 case AF_INET:
17576 if (strcmp(strport, "54321") != 0) {
17577 goto bad;
17578 }
17579 if (passive) {
17580 if (strcmp(straddr, "0.0.0.0") != 0) {
17581 goto bad;
17582 }
17583 } else {
17584 if (strcmp(straddr, "127.0.0.1") != 0) {
17585 goto bad;
17586 }
17587 }
17588 inet4++;
17589 break;
17590 case AF_INET6:
17591 if (strcmp(strport, "54321") != 0) {
17592 goto bad;
17593 }
17594 if (passive) {
17595 if (strcmp(straddr, "::") != 0) {
17596 goto bad;
17597 }
17598 } else {
17599 if (strcmp(straddr, "::1") != 0) {
17600 goto bad;
17601 }
17602 }
17603 inet6++;
17604 break;
17605 case AF_UNSPEC:
17606 goto bad;
17607 break;
17608 default:
17609 /* another family support? */
17610 break;
17611 }
17612 }
17613 }
17614
17615 if (!(inet4 == 0 || inet4 == 2))
17616 goto bad;
17617 if (!(inet6 == 0 || inet6 == 2))
17618 goto bad;
17619
17620 if (aitop)
17621 freeaddrinfo(aitop);
17622 exit(0);
17623
17624 bad:
17625 if (aitop)
17626 freeaddrinfo(aitop);
17627 exit(1);
17628}
17629
Martin v. Löwis11437992002-04-12 09:54:03 +000017630_ACEOF
17631rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017632if { (ac_try="$ac_link"
17633case "(($ac_try" in
17634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17635 *) ac_try_echo=$ac_try;;
17636esac
17637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17638 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017639 ac_status=$?
17640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17641 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017642 { (case "(($ac_try" in
17643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17644 *) ac_try_echo=$ac_try;;
17645esac
17646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17647 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017648 ac_status=$?
17649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17650 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017651 { echo "$as_me:$LINENO: result: good" >&5
17652echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017653buggygetaddrinfo=no
17654else
Martin v. Löwis11437992002-04-12 09:54:03 +000017655 echo "$as_me: program exited with status $ac_status" >&5
17656echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017657sed 's/^/| /' conftest.$ac_ext >&5
17658
Martin v. Löwis11437992002-04-12 09:54:03 +000017659( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000017660{ echo "$as_me:$LINENO: result: buggy" >&5
17661echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017662buggygetaddrinfo=yes
17663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017664rm -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 +000017665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017666
17667
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017668else
Martin v. Löwis11437992002-04-12 09:54:03 +000017669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017670sed 's/^/| /' conftest.$ac_ext >&5
17671
Martin v. Löwis11437992002-04-12 09:54:03 +000017672
Martin v. Löwiseba40652007-08-30 20:10:57 +000017673{ echo "$as_me:$LINENO: result: no" >&5
17674echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017675buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017676
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017678
17679rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017681
17682if test "$buggygetaddrinfo" = "yes"; then
17683 if test "$ipv6" = "yes"; then
17684 echo 'Fatal: You must get working getaddrinfo() function.'
17685 echo ' or you can specify "--disable-ipv6"'.
17686 exit 1
17687 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017688else
Martin v. Löwis11437992002-04-12 09:54:03 +000017689
17690cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017691#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017692_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017693
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017694fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017695
Jack Jansen9a66b6d2001-08-08 13:56:14 +000017696for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017697do
Martin v. Löwis11437992002-04-12 09:54:03 +000017698as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017699{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17700echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17701if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017702 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017703else
Martin v. Löwis11437992002-04-12 09:54:03 +000017704 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. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017710/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17711 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17712#define $ac_func innocuous_$ac_func
17713
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017714/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017715 which can conflict with char $ac_func (); below.
17716 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017717 <limits.h> exists even on freestanding compilers. */
17718
17719#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017720# include <limits.h>
17721#else
17722# include <assert.h>
17723#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017724
17725#undef $ac_func
17726
Martin v. Löwiseba40652007-08-30 20:10:57 +000017727/* Override any GCC internal prototype to avoid an error.
17728 Use char because int might match the return type of a GCC
17729 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017730#ifdef __cplusplus
17731extern "C"
17732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017733char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017734/* The GNU C library defines this for functions which it implements
17735 to always fail with ENOSYS. Some functions are actually named
17736 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017737#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017738choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017739#endif
17740
Skip Montanaro6dead952003-09-25 14:50:04 +000017741int
17742main ()
17743{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017744return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 ;
17746 return 0;
17747}
17748_ACEOF
17749rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017750if { (ac_try="$ac_link"
17751case "(($ac_try" in
17752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17753 *) ac_try_echo=$ac_try;;
17754esac
17755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17756 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017758 grep -v '^ *+' conftest.er1 >conftest.err
17759 rm -f conftest.er1
17760 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017762 (exit $ac_status); } && {
17763 test -z "$ac_c_werror_flag" ||
17764 test ! -s conftest.err
17765 } && test -s conftest$ac_exeext &&
17766 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017767 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017768else
Martin v. Löwis11437992002-04-12 09:54:03 +000017769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017770sed 's/^/| /' conftest.$ac_ext >&5
17771
Martin v. Löwiseba40652007-08-30 20:10:57 +000017772 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017774
17775rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017776 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017778ac_res=`eval echo '${'$as_ac_var'}'`
17779 { echo "$as_me:$LINENO: result: $ac_res" >&5
17780echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017781if test `eval echo '${'$as_ac_var'}'` = yes; then
17782 cat >>confdefs.h <<_ACEOF
17783#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17784_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017785
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017786fi
17787done
17788
Michael W. Hudson54241132001-12-07 15:38:26 +000017789
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017790# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000017791{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
17792echo $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 +000017793if test "${ac_cv_header_time+set}" = set; then
17794 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017795else
Martin v. Löwis11437992002-04-12 09:54:03 +000017796 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017797/* confdefs.h. */
17798_ACEOF
17799cat confdefs.h >>conftest.$ac_ext
17800cat >>conftest.$ac_ext <<_ACEOF
17801/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017802#include <sys/types.h>
17803#include <sys/time.h>
17804#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017805
Martin v. Löwis11437992002-04-12 09:54:03 +000017806int
17807main ()
17808{
17809if ((struct tm *) 0)
17810return 0;
17811 ;
17812 return 0;
17813}
17814_ACEOF
17815rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017816if { (ac_try="$ac_compile"
17817case "(($ac_try" in
17818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17819 *) ac_try_echo=$ac_try;;
17820esac
17821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017824 grep -v '^ *+' conftest.er1 >conftest.err
17825 rm -f conftest.er1
17826 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017828 (exit $ac_status); } && {
17829 test -z "$ac_c_werror_flag" ||
17830 test ! -s conftest.err
17831 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017832 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017833else
Martin v. Löwis11437992002-04-12 09:54:03 +000017834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017835sed 's/^/| /' conftest.$ac_ext >&5
17836
Martin v. Löwiseba40652007-08-30 20:10:57 +000017837 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017838fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017839
17840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017842{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
17843echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017844if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017845
17846cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017847#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017848_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017849
17850fi
17851
Martin v. Löwiseba40652007-08-30 20:10:57 +000017852{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
17853echo $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 +000017854if test "${ac_cv_struct_tm+set}" = set; then
17855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017856else
Martin v. Löwis11437992002-04-12 09:54:03 +000017857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017858/* confdefs.h. */
17859_ACEOF
17860cat confdefs.h >>conftest.$ac_ext
17861cat >>conftest.$ac_ext <<_ACEOF
17862/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017863#include <sys/types.h>
17864#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017865
Martin v. Löwis11437992002-04-12 09:54:03 +000017866int
17867main ()
17868{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017869struct tm tm;
17870 int *p = &tm.tm_sec;
17871 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000017872 ;
17873 return 0;
17874}
17875_ACEOF
17876rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017877if { (ac_try="$ac_compile"
17878case "(($ac_try" in
17879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17880 *) ac_try_echo=$ac_try;;
17881esac
17882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17883 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017885 grep -v '^ *+' conftest.er1 >conftest.err
17886 rm -f conftest.er1
17887 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017889 (exit $ac_status); } && {
17890 test -z "$ac_c_werror_flag" ||
17891 test ! -s conftest.err
17892 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017893 ac_cv_struct_tm=time.h
17894else
Martin v. Löwis11437992002-04-12 09:54:03 +000017895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017896sed 's/^/| /' conftest.$ac_ext >&5
17897
Martin v. Löwiseba40652007-08-30 20:10:57 +000017898 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017900
17901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017903{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
17904echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017905if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017906
17907cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017908#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017909_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017910
17911fi
17912
Martin v. Löwiseba40652007-08-30 20:10:57 +000017913{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
17914echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017915if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
17916 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017917else
Martin v. Löwis11437992002-04-12 09:54:03 +000017918 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017919/* confdefs.h. */
17920_ACEOF
17921cat confdefs.h >>conftest.$ac_ext
17922cat >>conftest.$ac_ext <<_ACEOF
17923/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017924#include <sys/types.h>
17925#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000017926
17927
Martin v. Löwis11437992002-04-12 09:54:03 +000017928int
17929main ()
17930{
17931static struct tm ac_aggr;
17932if (ac_aggr.tm_zone)
17933return 0;
17934 ;
17935 return 0;
17936}
17937_ACEOF
17938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017939if { (ac_try="$ac_compile"
17940case "(($ac_try" in
17941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17942 *) ac_try_echo=$ac_try;;
17943esac
17944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017947 grep -v '^ *+' conftest.er1 >conftest.err
17948 rm -f conftest.er1
17949 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017951 (exit $ac_status); } && {
17952 test -z "$ac_c_werror_flag" ||
17953 test ! -s conftest.err
17954 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017956else
Martin v. Löwis11437992002-04-12 09:54:03 +000017957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017958sed 's/^/| /' conftest.$ac_ext >&5
17959
Martin v. Löwiseba40652007-08-30 20:10:57 +000017960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017961/* confdefs.h. */
17962_ACEOF
17963cat confdefs.h >>conftest.$ac_ext
17964cat >>conftest.$ac_ext <<_ACEOF
17965/* end confdefs.h. */
17966#include <sys/types.h>
17967#include <$ac_cv_struct_tm>
17968
17969
17970int
17971main ()
17972{
17973static struct tm ac_aggr;
17974if (sizeof ac_aggr.tm_zone)
17975return 0;
17976 ;
17977 return 0;
17978}
17979_ACEOF
17980rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017981if { (ac_try="$ac_compile"
17982case "(($ac_try" in
17983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17984 *) ac_try_echo=$ac_try;;
17985esac
17986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17987 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017989 grep -v '^ *+' conftest.er1 >conftest.err
17990 rm -f conftest.er1
17991 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017993 (exit $ac_status); } && {
17994 test -z "$ac_c_werror_flag" ||
17995 test ! -s conftest.err
17996 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017997 ac_cv_member_struct_tm_tm_zone=yes
17998else
17999 echo "$as_me: failed program was:" >&5
18000sed 's/^/| /' conftest.$ac_ext >&5
18001
Martin v. Löwiseba40652007-08-30 20:10:57 +000018002 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018004
18005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018007
18008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018010{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18011echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018012if test $ac_cv_member_struct_tm_tm_zone = yes; then
18013
18014cat >>confdefs.h <<_ACEOF
18015#define HAVE_STRUCT_TM_TM_ZONE 1
18016_ACEOF
18017
18018
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018019fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018020
Martin v. Löwis11437992002-04-12 09:54:03 +000018021if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18022
18023cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018024#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018025_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018026
18027else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018028 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18029echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18030if test "${ac_cv_have_decl_tzname+set}" = set; then
18031 echo $ECHO_N "(cached) $ECHO_C" >&6
18032else
18033 cat >conftest.$ac_ext <<_ACEOF
18034/* confdefs.h. */
18035_ACEOF
18036cat confdefs.h >>conftest.$ac_ext
18037cat >>conftest.$ac_ext <<_ACEOF
18038/* end confdefs.h. */
18039#include <time.h>
18040
18041int
18042main ()
18043{
18044#ifndef tzname
18045 (void) tzname;
18046#endif
18047
18048 ;
18049 return 0;
18050}
18051_ACEOF
18052rm -f conftest.$ac_objext
18053if { (ac_try="$ac_compile"
18054case "(($ac_try" in
18055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18056 *) ac_try_echo=$ac_try;;
18057esac
18058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18059 (eval "$ac_compile") 2>conftest.er1
18060 ac_status=$?
18061 grep -v '^ *+' conftest.er1 >conftest.err
18062 rm -f conftest.er1
18063 cat conftest.err >&5
18064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18065 (exit $ac_status); } && {
18066 test -z "$ac_c_werror_flag" ||
18067 test ! -s conftest.err
18068 } && test -s conftest.$ac_objext; then
18069 ac_cv_have_decl_tzname=yes
18070else
18071 echo "$as_me: failed program was:" >&5
18072sed 's/^/| /' conftest.$ac_ext >&5
18073
18074 ac_cv_have_decl_tzname=no
18075fi
18076
18077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18078fi
18079{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18080echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18081if test $ac_cv_have_decl_tzname = yes; then
18082
18083cat >>confdefs.h <<_ACEOF
18084#define HAVE_DECL_TZNAME 1
18085_ACEOF
18086
18087
18088else
18089 cat >>confdefs.h <<_ACEOF
18090#define HAVE_DECL_TZNAME 0
18091_ACEOF
18092
18093
18094fi
18095
18096
18097 { echo "$as_me:$LINENO: checking for tzname" >&5
18098echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018099if test "${ac_cv_var_tzname+set}" = set; then
18100 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018101else
Martin v. Löwis11437992002-04-12 09:54:03 +000018102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018103/* confdefs.h. */
18104_ACEOF
18105cat confdefs.h >>conftest.$ac_ext
18106cat >>conftest.$ac_ext <<_ACEOF
18107/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018108#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018109#if !HAVE_DECL_TZNAME
18110extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018112
Martin v. Löwis11437992002-04-12 09:54:03 +000018113int
18114main ()
18115{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018116return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018117 ;
18118 return 0;
18119}
18120_ACEOF
18121rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018122if { (ac_try="$ac_link"
18123case "(($ac_try" in
18124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18125 *) ac_try_echo=$ac_try;;
18126esac
18127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18128 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018130 grep -v '^ *+' conftest.er1 >conftest.err
18131 rm -f conftest.er1
18132 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018134 (exit $ac_status); } && {
18135 test -z "$ac_c_werror_flag" ||
18136 test ! -s conftest.err
18137 } && test -s conftest$ac_exeext &&
18138 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018139 ac_cv_var_tzname=yes
18140else
Martin v. Löwis11437992002-04-12 09:54:03 +000018141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018142sed 's/^/| /' conftest.$ac_ext >&5
18143
Martin v. Löwiseba40652007-08-30 20:10:57 +000018144 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018146
18147rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018148 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018150{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18151echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018152 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018153
18154cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018155#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018156_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018157
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018158 fi
18159fi
18160
Martin v. Löwiseba40652007-08-30 20:10:57 +000018161{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18162echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018163if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18164 echo $ECHO_N "(cached) $ECHO_C" >&6
18165else
18166 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018167/* confdefs.h. */
18168_ACEOF
18169cat confdefs.h >>conftest.$ac_ext
18170cat >>conftest.$ac_ext <<_ACEOF
18171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018172$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018173int
18174main ()
18175{
18176static struct stat ac_aggr;
18177if (ac_aggr.st_rdev)
18178return 0;
18179 ;
18180 return 0;
18181}
18182_ACEOF
18183rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018184if { (ac_try="$ac_compile"
18185case "(($ac_try" in
18186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18187 *) ac_try_echo=$ac_try;;
18188esac
18189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018192 grep -v '^ *+' conftest.er1 >conftest.err
18193 rm -f conftest.er1
18194 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018196 (exit $ac_status); } && {
18197 test -z "$ac_c_werror_flag" ||
18198 test ! -s conftest.err
18199 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018200 ac_cv_member_struct_stat_st_rdev=yes
18201else
18202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018203sed 's/^/| /' conftest.$ac_ext >&5
18204
Martin v. Löwiseba40652007-08-30 20:10:57 +000018205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018206/* confdefs.h. */
18207_ACEOF
18208cat confdefs.h >>conftest.$ac_ext
18209cat >>conftest.$ac_ext <<_ACEOF
18210/* end confdefs.h. */
18211$ac_includes_default
18212int
18213main ()
18214{
18215static struct stat ac_aggr;
18216if (sizeof ac_aggr.st_rdev)
18217return 0;
18218 ;
18219 return 0;
18220}
18221_ACEOF
18222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018223if { (ac_try="$ac_compile"
18224case "(($ac_try" in
18225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18226 *) ac_try_echo=$ac_try;;
18227esac
18228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18229 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018231 grep -v '^ *+' conftest.er1 >conftest.err
18232 rm -f conftest.er1
18233 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018235 (exit $ac_status); } && {
18236 test -z "$ac_c_werror_flag" ||
18237 test ! -s conftest.err
18238 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018239 ac_cv_member_struct_stat_st_rdev=yes
18240else
18241 echo "$as_me: failed program was:" >&5
18242sed 's/^/| /' conftest.$ac_ext >&5
18243
Martin v. Löwiseba40652007-08-30 20:10:57 +000018244 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018246
18247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018249
18250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018252{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18253echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018254if test $ac_cv_member_struct_stat_st_rdev = yes; then
18255
18256cat >>confdefs.h <<_ACEOF
18257#define HAVE_STRUCT_STAT_ST_RDEV 1
18258_ACEOF
18259
18260
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018261fi
18262
Martin v. Löwiseba40652007-08-30 20:10:57 +000018263{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18264echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018265if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18266 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018267else
Martin v. Löwis11437992002-04-12 09:54:03 +000018268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018269/* confdefs.h. */
18270_ACEOF
18271cat confdefs.h >>conftest.$ac_ext
18272cat >>conftest.$ac_ext <<_ACEOF
18273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018274$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018275int
18276main ()
18277{
18278static struct stat ac_aggr;
18279if (ac_aggr.st_blksize)
18280return 0;
18281 ;
18282 return 0;
18283}
18284_ACEOF
18285rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018286if { (ac_try="$ac_compile"
18287case "(($ac_try" in
18288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18289 *) ac_try_echo=$ac_try;;
18290esac
18291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18292 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018294 grep -v '^ *+' conftest.er1 >conftest.err
18295 rm -f conftest.er1
18296 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018298 (exit $ac_status); } && {
18299 test -z "$ac_c_werror_flag" ||
18300 test ! -s conftest.err
18301 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018302 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018303else
Martin v. Löwis11437992002-04-12 09:54:03 +000018304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018305sed 's/^/| /' conftest.$ac_ext >&5
18306
Martin v. Löwiseba40652007-08-30 20:10:57 +000018307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018308/* confdefs.h. */
18309_ACEOF
18310cat confdefs.h >>conftest.$ac_ext
18311cat >>conftest.$ac_ext <<_ACEOF
18312/* end confdefs.h. */
18313$ac_includes_default
18314int
18315main ()
18316{
18317static struct stat ac_aggr;
18318if (sizeof ac_aggr.st_blksize)
18319return 0;
18320 ;
18321 return 0;
18322}
18323_ACEOF
18324rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018325if { (ac_try="$ac_compile"
18326case "(($ac_try" in
18327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18328 *) ac_try_echo=$ac_try;;
18329esac
18330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18331 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018333 grep -v '^ *+' conftest.er1 >conftest.err
18334 rm -f conftest.er1
18335 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018337 (exit $ac_status); } && {
18338 test -z "$ac_c_werror_flag" ||
18339 test ! -s conftest.err
18340 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018341 ac_cv_member_struct_stat_st_blksize=yes
18342else
18343 echo "$as_me: failed program was:" >&5
18344sed 's/^/| /' conftest.$ac_ext >&5
18345
Martin v. Löwiseba40652007-08-30 20:10:57 +000018346 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018348
18349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018351
18352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018354{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
18355echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018356if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018357
Martin v. Löwis11437992002-04-12 09:54:03 +000018358cat >>confdefs.h <<_ACEOF
18359#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
18360_ACEOF
18361
18362
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018363fi
18364
Martin v. Löwiseba40652007-08-30 20:10:57 +000018365{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
18366echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018367if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
18368 echo $ECHO_N "(cached) $ECHO_C" >&6
18369else
18370 cat >conftest.$ac_ext <<_ACEOF
18371/* confdefs.h. */
18372_ACEOF
18373cat confdefs.h >>conftest.$ac_ext
18374cat >>conftest.$ac_ext <<_ACEOF
18375/* end confdefs.h. */
18376$ac_includes_default
18377int
18378main ()
18379{
18380static struct stat ac_aggr;
18381if (ac_aggr.st_flags)
18382return 0;
18383 ;
18384 return 0;
18385}
18386_ACEOF
18387rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018388if { (ac_try="$ac_compile"
18389case "(($ac_try" in
18390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18391 *) ac_try_echo=$ac_try;;
18392esac
18393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18394 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018395 ac_status=$?
18396 grep -v '^ *+' conftest.er1 >conftest.err
18397 rm -f conftest.er1
18398 cat conftest.err >&5
18399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018400 (exit $ac_status); } && {
18401 test -z "$ac_c_werror_flag" ||
18402 test ! -s conftest.err
18403 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018404 ac_cv_member_struct_stat_st_flags=yes
18405else
18406 echo "$as_me: failed program was:" >&5
18407sed 's/^/| /' conftest.$ac_ext >&5
18408
Martin v. Löwiseba40652007-08-30 20:10:57 +000018409 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018410/* confdefs.h. */
18411_ACEOF
18412cat confdefs.h >>conftest.$ac_ext
18413cat >>conftest.$ac_ext <<_ACEOF
18414/* end confdefs.h. */
18415$ac_includes_default
18416int
18417main ()
18418{
18419static struct stat ac_aggr;
18420if (sizeof ac_aggr.st_flags)
18421return 0;
18422 ;
18423 return 0;
18424}
18425_ACEOF
18426rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018427if { (ac_try="$ac_compile"
18428case "(($ac_try" in
18429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18430 *) ac_try_echo=$ac_try;;
18431esac
18432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18433 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018434 ac_status=$?
18435 grep -v '^ *+' conftest.er1 >conftest.err
18436 rm -f conftest.er1
18437 cat conftest.err >&5
18438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018439 (exit $ac_status); } && {
18440 test -z "$ac_c_werror_flag" ||
18441 test ! -s conftest.err
18442 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018443 ac_cv_member_struct_stat_st_flags=yes
18444else
18445 echo "$as_me: failed program was:" >&5
18446sed 's/^/| /' conftest.$ac_ext >&5
18447
Martin v. Löwiseba40652007-08-30 20:10:57 +000018448 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018450
18451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018453
18454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018456{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
18457echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018458if test $ac_cv_member_struct_stat_st_flags = yes; then
18459
18460cat >>confdefs.h <<_ACEOF
18461#define HAVE_STRUCT_STAT_ST_FLAGS 1
18462_ACEOF
18463
18464
18465fi
18466
Martin v. Löwiseba40652007-08-30 20:10:57 +000018467{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
18468echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018469if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
18470 echo $ECHO_N "(cached) $ECHO_C" >&6
18471else
18472 cat >conftest.$ac_ext <<_ACEOF
18473/* confdefs.h. */
18474_ACEOF
18475cat confdefs.h >>conftest.$ac_ext
18476cat >>conftest.$ac_ext <<_ACEOF
18477/* end confdefs.h. */
18478$ac_includes_default
18479int
18480main ()
18481{
18482static struct stat ac_aggr;
18483if (ac_aggr.st_gen)
18484return 0;
18485 ;
18486 return 0;
18487}
18488_ACEOF
18489rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018490if { (ac_try="$ac_compile"
18491case "(($ac_try" in
18492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18493 *) ac_try_echo=$ac_try;;
18494esac
18495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018497 ac_status=$?
18498 grep -v '^ *+' conftest.er1 >conftest.err
18499 rm -f conftest.er1
18500 cat conftest.err >&5
18501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018502 (exit $ac_status); } && {
18503 test -z "$ac_c_werror_flag" ||
18504 test ! -s conftest.err
18505 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018506 ac_cv_member_struct_stat_st_gen=yes
18507else
18508 echo "$as_me: failed program was:" >&5
18509sed 's/^/| /' conftest.$ac_ext >&5
18510
Martin v. Löwiseba40652007-08-30 20:10:57 +000018511 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018512/* confdefs.h. */
18513_ACEOF
18514cat confdefs.h >>conftest.$ac_ext
18515cat >>conftest.$ac_ext <<_ACEOF
18516/* end confdefs.h. */
18517$ac_includes_default
18518int
18519main ()
18520{
18521static struct stat ac_aggr;
18522if (sizeof ac_aggr.st_gen)
18523return 0;
18524 ;
18525 return 0;
18526}
18527_ACEOF
18528rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018529if { (ac_try="$ac_compile"
18530case "(($ac_try" in
18531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18532 *) ac_try_echo=$ac_try;;
18533esac
18534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018536 ac_status=$?
18537 grep -v '^ *+' conftest.er1 >conftest.err
18538 rm -f conftest.er1
18539 cat conftest.err >&5
18540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018541 (exit $ac_status); } && {
18542 test -z "$ac_c_werror_flag" ||
18543 test ! -s conftest.err
18544 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018545 ac_cv_member_struct_stat_st_gen=yes
18546else
18547 echo "$as_me: failed program was:" >&5
18548sed 's/^/| /' conftest.$ac_ext >&5
18549
Martin v. Löwiseba40652007-08-30 20:10:57 +000018550 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018552
18553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018555
18556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018558{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
18559echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018560if test $ac_cv_member_struct_stat_st_gen = yes; then
18561
18562cat >>confdefs.h <<_ACEOF
18563#define HAVE_STRUCT_STAT_ST_GEN 1
18564_ACEOF
18565
18566
18567fi
18568
Martin v. Löwiseba40652007-08-30 20:10:57 +000018569{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
18570echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018571if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
18572 echo $ECHO_N "(cached) $ECHO_C" >&6
18573else
18574 cat >conftest.$ac_ext <<_ACEOF
18575/* confdefs.h. */
18576_ACEOF
18577cat confdefs.h >>conftest.$ac_ext
18578cat >>conftest.$ac_ext <<_ACEOF
18579/* end confdefs.h. */
18580$ac_includes_default
18581int
18582main ()
18583{
18584static struct stat ac_aggr;
18585if (ac_aggr.st_birthtime)
18586return 0;
18587 ;
18588 return 0;
18589}
18590_ACEOF
18591rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018592if { (ac_try="$ac_compile"
18593case "(($ac_try" in
18594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18595 *) ac_try_echo=$ac_try;;
18596esac
18597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018599 ac_status=$?
18600 grep -v '^ *+' conftest.er1 >conftest.err
18601 rm -f conftest.er1
18602 cat conftest.err >&5
18603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018604 (exit $ac_status); } && {
18605 test -z "$ac_c_werror_flag" ||
18606 test ! -s conftest.err
18607 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018608 ac_cv_member_struct_stat_st_birthtime=yes
18609else
18610 echo "$as_me: failed program was:" >&5
18611sed 's/^/| /' conftest.$ac_ext >&5
18612
Martin v. Löwiseba40652007-08-30 20:10:57 +000018613 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018614/* confdefs.h. */
18615_ACEOF
18616cat confdefs.h >>conftest.$ac_ext
18617cat >>conftest.$ac_ext <<_ACEOF
18618/* end confdefs.h. */
18619$ac_includes_default
18620int
18621main ()
18622{
18623static struct stat ac_aggr;
18624if (sizeof ac_aggr.st_birthtime)
18625return 0;
18626 ;
18627 return 0;
18628}
18629_ACEOF
18630rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018631if { (ac_try="$ac_compile"
18632case "(($ac_try" in
18633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18634 *) ac_try_echo=$ac_try;;
18635esac
18636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018638 ac_status=$?
18639 grep -v '^ *+' conftest.er1 >conftest.err
18640 rm -f conftest.er1
18641 cat conftest.err >&5
18642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018643 (exit $ac_status); } && {
18644 test -z "$ac_c_werror_flag" ||
18645 test ! -s conftest.err
18646 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018647 ac_cv_member_struct_stat_st_birthtime=yes
18648else
18649 echo "$as_me: failed program was:" >&5
18650sed 's/^/| /' conftest.$ac_ext >&5
18651
Martin v. Löwiseba40652007-08-30 20:10:57 +000018652 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018654
18655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018657
18658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018660{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
18661echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018662if test $ac_cv_member_struct_stat_st_birthtime = yes; then
18663
18664cat >>confdefs.h <<_ACEOF
18665#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
18666_ACEOF
18667
18668
18669fi
18670
Martin v. Löwiseba40652007-08-30 20:10:57 +000018671{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
18672echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018673if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
18674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018675else
Martin v. Löwis11437992002-04-12 09:54:03 +000018676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018677/* confdefs.h. */
18678_ACEOF
18679cat confdefs.h >>conftest.$ac_ext
18680cat >>conftest.$ac_ext <<_ACEOF
18681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018682$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018683int
18684main ()
18685{
18686static struct stat ac_aggr;
18687if (ac_aggr.st_blocks)
18688return 0;
18689 ;
18690 return 0;
18691}
18692_ACEOF
18693rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018694if { (ac_try="$ac_compile"
18695case "(($ac_try" in
18696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18697 *) ac_try_echo=$ac_try;;
18698esac
18699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018702 grep -v '^ *+' conftest.er1 >conftest.err
18703 rm -f conftest.er1
18704 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018706 (exit $ac_status); } && {
18707 test -z "$ac_c_werror_flag" ||
18708 test ! -s conftest.err
18709 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018710 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018711else
Martin v. Löwis11437992002-04-12 09:54:03 +000018712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018713sed 's/^/| /' conftest.$ac_ext >&5
18714
Martin v. Löwiseba40652007-08-30 20:10:57 +000018715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018716/* confdefs.h. */
18717_ACEOF
18718cat confdefs.h >>conftest.$ac_ext
18719cat >>conftest.$ac_ext <<_ACEOF
18720/* end confdefs.h. */
18721$ac_includes_default
18722int
18723main ()
18724{
18725static struct stat ac_aggr;
18726if (sizeof ac_aggr.st_blocks)
18727return 0;
18728 ;
18729 return 0;
18730}
18731_ACEOF
18732rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018733if { (ac_try="$ac_compile"
18734case "(($ac_try" in
18735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18736 *) ac_try_echo=$ac_try;;
18737esac
18738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18739 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018741 grep -v '^ *+' conftest.er1 >conftest.err
18742 rm -f conftest.er1
18743 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018745 (exit $ac_status); } && {
18746 test -z "$ac_c_werror_flag" ||
18747 test ! -s conftest.err
18748 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018749 ac_cv_member_struct_stat_st_blocks=yes
18750else
18751 echo "$as_me: failed program was:" >&5
18752sed 's/^/| /' conftest.$ac_ext >&5
18753
Martin v. Löwiseba40652007-08-30 20:10:57 +000018754 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018756
18757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018758fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018759
18760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018762{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
18763echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018764if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018765
Martin v. Löwis11437992002-04-12 09:54:03 +000018766cat >>confdefs.h <<_ACEOF
18767#define HAVE_STRUCT_STAT_ST_BLOCKS 1
18768_ACEOF
18769
18770
18771cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018772#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018773_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018774
18775else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018776 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018777 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018778 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
18779 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018780esac
18781
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018782fi
18783
Michael W. Hudson54241132001-12-07 15:38:26 +000018784
Martin v. Löwis11437992002-04-12 09:54:03 +000018785
Martin v. Löwiseba40652007-08-30 20:10:57 +000018786{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
18787echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018788if test "${ac_cv_header_time_altzone+set}" = set; then
18789 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018790else
Martin v. Löwis11437992002-04-12 09:54:03 +000018791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018792/* confdefs.h. */
18793_ACEOF
18794cat confdefs.h >>conftest.$ac_ext
18795cat >>conftest.$ac_ext <<_ACEOF
18796/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018797#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018798int
18799main ()
18800{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018801return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000018802 ;
18803 return 0;
18804}
18805_ACEOF
18806rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018807if { (ac_try="$ac_compile"
18808case "(($ac_try" in
18809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18810 *) ac_try_echo=$ac_try;;
18811esac
18812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18813 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018815 grep -v '^ *+' conftest.er1 >conftest.err
18816 rm -f conftest.er1
18817 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018819 (exit $ac_status); } && {
18820 test -z "$ac_c_werror_flag" ||
18821 test ! -s conftest.err
18822 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018823 ac_cv_header_time_altzone=yes
18824else
Martin v. Löwis11437992002-04-12 09:54:03 +000018825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018826sed 's/^/| /' conftest.$ac_ext >&5
18827
Martin v. Löwiseba40652007-08-30 20:10:57 +000018828 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018829fi
18830
Martin v. Löwiseba40652007-08-30 20:10:57 +000018831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18832fi
18833
18834{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
18835echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018836if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018837
18838cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018839#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018840_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018841
18842fi
18843
Guido van Rossumda88dad1995-01-26 00:46:29 +000018844was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000018845{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
18846echo $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 +000018847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018848/* confdefs.h. */
18849_ACEOF
18850cat confdefs.h >>conftest.$ac_ext
18851cat >>conftest.$ac_ext <<_ACEOF
18852/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018853
18854#include <sys/types.h>
18855#include <sys/select.h>
18856#include <sys/time.h>
18857
Martin v. Löwis11437992002-04-12 09:54:03 +000018858int
18859main ()
18860{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018861;
Martin v. Löwis11437992002-04-12 09:54:03 +000018862 ;
18863 return 0;
18864}
18865_ACEOF
18866rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018867if { (ac_try="$ac_compile"
18868case "(($ac_try" in
18869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18870 *) ac_try_echo=$ac_try;;
18871esac
18872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18873 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018875 grep -v '^ *+' conftest.er1 >conftest.err
18876 rm -f conftest.er1
18877 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018879 (exit $ac_status); } && {
18880 test -z "$ac_c_werror_flag" ||
18881 test ! -s conftest.err
18882 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018883
18884
18885cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018886#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018887_ACEOF
18888
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018889 was_it_defined=yes
18890
Guido van Rossumf78abae1997-01-21 22:02:36 +000018891else
Martin v. Löwis11437992002-04-12 09:54:03 +000018892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018893sed 's/^/| /' conftest.$ac_ext >&5
18894
Brett Cannon19fab762007-06-02 03:02:29 +000018895
Martin v. Löwiseba40652007-08-30 20:10:57 +000018896fi
18897
18898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18899{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
18900echo "${ECHO_T}$was_it_defined" >&6; }
18901
18902{ echo "$as_me:$LINENO: checking for addrinfo" >&5
18903echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018904if test "${ac_cv_struct_addrinfo+set}" = set; then
18905 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018906else
Martin v. Löwis11437992002-04-12 09:54:03 +000018907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018908/* confdefs.h. */
18909_ACEOF
18910cat confdefs.h >>conftest.$ac_ext
18911cat >>conftest.$ac_ext <<_ACEOF
18912/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018913
18914# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018915int
18916main ()
18917{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018918struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000018919 ;
18920 return 0;
18921}
18922_ACEOF
18923rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018924if { (ac_try="$ac_compile"
18925case "(($ac_try" in
18926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18927 *) ac_try_echo=$ac_try;;
18928esac
18929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018932 grep -v '^ *+' conftest.er1 >conftest.err
18933 rm -f conftest.er1
18934 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018936 (exit $ac_status); } && {
18937 test -z "$ac_c_werror_flag" ||
18938 test ! -s conftest.err
18939 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018940 ac_cv_struct_addrinfo=yes
18941else
Martin v. Löwis11437992002-04-12 09:54:03 +000018942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018943sed 's/^/| /' conftest.$ac_ext >&5
18944
Martin v. Löwiseba40652007-08-30 20:10:57 +000018945 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018946fi
18947
Martin v. Löwiseba40652007-08-30 20:10:57 +000018948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18949fi
18950
18951{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
18952echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018953if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018954
18955cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018956#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018957_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018958
18959fi
18960
Martin v. Löwiseba40652007-08-30 20:10:57 +000018961{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
18962echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018963if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
18964 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018965else
Martin v. Löwis11437992002-04-12 09:54:03 +000018966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018967/* confdefs.h. */
18968_ACEOF
18969cat confdefs.h >>conftest.$ac_ext
18970cat >>conftest.$ac_ext <<_ACEOF
18971/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018972
18973# include <sys/types.h>
18974# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018975int
18976main ()
18977{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018978struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000018979 ;
18980 return 0;
18981}
18982_ACEOF
18983rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018984if { (ac_try="$ac_compile"
18985case "(($ac_try" in
18986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18987 *) ac_try_echo=$ac_try;;
18988esac
18989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18990 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018992 grep -v '^ *+' conftest.er1 >conftest.err
18993 rm -f conftest.er1
18994 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018996 (exit $ac_status); } && {
18997 test -z "$ac_c_werror_flag" ||
18998 test ! -s conftest.err
18999 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019000 ac_cv_struct_sockaddr_storage=yes
19001else
Martin v. Löwis11437992002-04-12 09:54:03 +000019002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019003sed 's/^/| /' conftest.$ac_ext >&5
19004
Martin v. Löwiseba40652007-08-30 20:10:57 +000019005 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019006fi
19007
Martin v. Löwiseba40652007-08-30 20:10:57 +000019008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19009fi
19010
19011{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19012echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019013if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019014
19015cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019016#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019017_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019018
19019fi
19020
Guido van Rossum627b2d71993-12-24 10:39:16 +000019021# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019022
Michael W. Hudson54241132001-12-07 15:38:26 +000019023
Martin v. Löwiseba40652007-08-30 20:10:57 +000019024{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19025echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019026if test "${ac_cv_c_char_unsigned+set}" = set; then
19027 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019028else
Martin v. Löwis11437992002-04-12 09:54:03 +000019029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019030/* confdefs.h. */
19031_ACEOF
19032cat confdefs.h >>conftest.$ac_ext
19033cat >>conftest.$ac_ext <<_ACEOF
19034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019035$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019036int
19037main ()
19038{
19039static int test_array [1 - 2 * !(((char) -1) < 0)];
19040test_array [0] = 0
19041
19042 ;
19043 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019044}
Martin v. Löwis11437992002-04-12 09:54:03 +000019045_ACEOF
19046rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019047if { (ac_try="$ac_compile"
19048case "(($ac_try" in
19049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19050 *) ac_try_echo=$ac_try;;
19051esac
19052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19053 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019055 grep -v '^ *+' conftest.er1 >conftest.err
19056 rm -f conftest.er1
19057 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019059 (exit $ac_status); } && {
19060 test -z "$ac_c_werror_flag" ||
19061 test ! -s conftest.err
19062 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019063 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019064else
19065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019066sed 's/^/| /' conftest.$ac_ext >&5
19067
Martin v. Löwiseba40652007-08-30 20:10:57 +000019068 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019070
19071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019073{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19074echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019075if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019076 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019077#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019078_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019079
19080fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019081
Martin v. Löwiseba40652007-08-30 20:10:57 +000019082{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19083echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019084if test "${ac_cv_c_const+set}" = set; then
19085 echo $ECHO_N "(cached) $ECHO_C" >&6
19086else
19087 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019088/* confdefs.h. */
19089_ACEOF
19090cat confdefs.h >>conftest.$ac_ext
19091cat >>conftest.$ac_ext <<_ACEOF
19092/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019093
Martin v. Löwis11437992002-04-12 09:54:03 +000019094int
19095main ()
19096{
19097/* FIXME: Include the comments suggested by Paul. */
19098#ifndef __cplusplus
19099 /* Ultrix mips cc rejects this. */
19100 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019101 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019102 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019103 char const *const *pcpcc;
19104 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019105 /* NEC SVR4.0.2 mips cc rejects this. */
19106 struct point {int x, y;};
19107 static struct point const zero = {0,0};
19108 /* AIX XL C 1.02.0.0 rejects this.
19109 It does not let you subtract one const X* pointer from another in
19110 an arm of an if-expression whose if-part is not a constant
19111 expression */
19112 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019113 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019114 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019115 ++pcpcc;
19116 ppc = (char**) pcpcc;
19117 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019118 { /* SCO 3.2v4 cc rejects this. */
19119 char *t;
19120 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019121
Martin v. Löwis11437992002-04-12 09:54:03 +000019122 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019123 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019124 }
19125 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19126 int x[] = {25, 17};
19127 const int *foo = &x[0];
19128 ++foo;
19129 }
19130 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19131 typedef const int *iptr;
19132 iptr p = 0;
19133 ++p;
19134 }
19135 { /* AIX XL C 1.02.0.0 rejects this saying
19136 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19137 struct s { int j; const int *ap[3]; };
19138 struct s *b; b->j = 5;
19139 }
19140 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19141 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019142 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019143 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019144 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019145#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019146
Martin v. Löwis11437992002-04-12 09:54:03 +000019147 ;
19148 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019149}
Martin v. Löwis11437992002-04-12 09:54:03 +000019150_ACEOF
19151rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019152if { (ac_try="$ac_compile"
19153case "(($ac_try" in
19154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19155 *) ac_try_echo=$ac_try;;
19156esac
19157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019160 grep -v '^ *+' conftest.er1 >conftest.err
19161 rm -f conftest.er1
19162 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019164 (exit $ac_status); } && {
19165 test -z "$ac_c_werror_flag" ||
19166 test ! -s conftest.err
19167 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019168 ac_cv_c_const=yes
19169else
Martin v. Löwis11437992002-04-12 09:54:03 +000019170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019171sed 's/^/| /' conftest.$ac_ext >&5
19172
Martin v. Löwiseba40652007-08-30 20:10:57 +000019173 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019175
19176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019178{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19179echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019180if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019181
19182cat >>confdefs.h <<\_ACEOF
19183#define const
19184_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019185
19186fi
19187
Michael W. Hudson54241132001-12-07 15:38:26 +000019188
Guido van Rossumda88dad1995-01-26 00:46:29 +000019189works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019190{ echo "$as_me:$LINENO: checking for working volatile" >&5
19191echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019192cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019193/* confdefs.h. */
19194_ACEOF
19195cat confdefs.h >>conftest.$ac_ext
19196cat >>conftest.$ac_ext <<_ACEOF
19197/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019198
Martin v. Löwis11437992002-04-12 09:54:03 +000019199int
19200main ()
19201{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019202volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019203 ;
19204 return 0;
19205}
19206_ACEOF
19207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019208if { (ac_try="$ac_compile"
19209case "(($ac_try" in
19210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19211 *) ac_try_echo=$ac_try;;
19212esac
19213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019216 grep -v '^ *+' conftest.er1 >conftest.err
19217 rm -f conftest.er1
19218 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019220 (exit $ac_status); } && {
19221 test -z "$ac_c_werror_flag" ||
19222 test ! -s conftest.err
19223 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019224 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019225else
Martin v. Löwis11437992002-04-12 09:54:03 +000019226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019227sed 's/^/| /' conftest.$ac_ext >&5
19228
Martin v. Löwis11437992002-04-12 09:54:03 +000019229
19230cat >>confdefs.h <<\_ACEOF
19231#define volatile
19232_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019233
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019234
Guido van Rossum627b2d71993-12-24 10:39:16 +000019235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019236
19237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19238{ echo "$as_me:$LINENO: result: $works" >&5
19239echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019240
Guido van Rossumda88dad1995-01-26 00:46:29 +000019241works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019242{ echo "$as_me:$LINENO: checking for working signed char" >&5
19243echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019244cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019245/* confdefs.h. */
19246_ACEOF
19247cat confdefs.h >>conftest.$ac_ext
19248cat >>conftest.$ac_ext <<_ACEOF
19249/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019250
Martin v. Löwis11437992002-04-12 09:54:03 +000019251int
19252main ()
19253{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019254signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019255 ;
19256 return 0;
19257}
19258_ACEOF
19259rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019260if { (ac_try="$ac_compile"
19261case "(($ac_try" in
19262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19263 *) ac_try_echo=$ac_try;;
19264esac
19265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019268 grep -v '^ *+' conftest.er1 >conftest.err
19269 rm -f conftest.er1
19270 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019272 (exit $ac_status); } && {
19273 test -z "$ac_c_werror_flag" ||
19274 test ! -s conftest.err
19275 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019276 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019277else
Martin v. Löwis11437992002-04-12 09:54:03 +000019278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019279sed 's/^/| /' conftest.$ac_ext >&5
19280
Martin v. Löwis11437992002-04-12 09:54:03 +000019281
19282cat >>confdefs.h <<\_ACEOF
19283#define signed
19284_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019285
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019286
Guido van Rossum7f43da71994-08-01 12:15:30 +000019287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019288
19289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19290{ echo "$as_me:$LINENO: result: $works" >&5
19291echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019292
Guido van Rossumda88dad1995-01-26 00:46:29 +000019293have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019294{ echo "$as_me:$LINENO: checking for prototypes" >&5
19295echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019296cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019297/* confdefs.h. */
19298_ACEOF
19299cat confdefs.h >>conftest.$ac_ext
19300cat >>conftest.$ac_ext <<_ACEOF
19301/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019302int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019303int
19304main ()
19305{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019306return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019307 ;
19308 return 0;
19309}
19310_ACEOF
19311rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019312if { (ac_try="$ac_compile"
19313case "(($ac_try" in
19314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19315 *) ac_try_echo=$ac_try;;
19316esac
19317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19318 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019320 grep -v '^ *+' conftest.er1 >conftest.err
19321 rm -f conftest.er1
19322 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019324 (exit $ac_status); } && {
19325 test -z "$ac_c_werror_flag" ||
19326 test ! -s conftest.err
19327 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019328
19329
19330cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019331#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019332_ACEOF
19333
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019334 have_prototypes=yes
19335
Guido van Rossumf78abae1997-01-21 22:02:36 +000019336else
Martin v. Löwis11437992002-04-12 09:54:03 +000019337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019338sed 's/^/| /' conftest.$ac_ext >&5
19339
Martin v. Löwiseba40652007-08-30 20:10:57 +000019340
Guido van Rossum7f43da71994-08-01 12:15:30 +000019341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019342
19343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19344{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
19345echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019346
Guido van Rossumda88dad1995-01-26 00:46:29 +000019347works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019348{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
19349echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019350cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019351/* confdefs.h. */
19352_ACEOF
19353cat confdefs.h >>conftest.$ac_ext
19354cat >>conftest.$ac_ext <<_ACEOF
19355/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019356
19357#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019358int foo(int x, ...) {
19359 va_list va;
19360 va_start(va, x);
19361 va_arg(va, int);
19362 va_arg(va, char *);
19363 va_arg(va, double);
19364 return 0;
19365}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019366
Martin v. Löwis11437992002-04-12 09:54:03 +000019367int
19368main ()
19369{
Guido van Rossum90eea071996-08-30 20:58:57 +000019370return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000019371 ;
19372 return 0;
19373}
19374_ACEOF
19375rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019376if { (ac_try="$ac_compile"
19377case "(($ac_try" in
19378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19379 *) ac_try_echo=$ac_try;;
19380esac
19381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019384 grep -v '^ *+' conftest.er1 >conftest.err
19385 rm -f conftest.er1
19386 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019388 (exit $ac_status); } && {
19389 test -z "$ac_c_werror_flag" ||
19390 test ! -s conftest.err
19391 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019392
19393
19394cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019395#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019396_ACEOF
19397
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019398 works=yes
19399
Guido van Rossumf78abae1997-01-21 22:02:36 +000019400else
Martin v. Löwis11437992002-04-12 09:54:03 +000019401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019402sed 's/^/| /' conftest.$ac_ext >&5
19403
Martin v. Löwiseba40652007-08-30 20:10:57 +000019404
Guido van Rossum627b2d71993-12-24 10:39:16 +000019405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019406
19407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19408{ echo "$as_me:$LINENO: result: $works" >&5
19409echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019410
Martin v. Löwisd6320502004-08-12 13:45:08 +000019411# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000019412{ echo "$as_me:$LINENO: checking for socketpair" >&5
19413echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019414cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000019415/* confdefs.h. */
19416_ACEOF
19417cat confdefs.h >>conftest.$ac_ext
19418cat >>conftest.$ac_ext <<_ACEOF
19419/* end confdefs.h. */
19420
19421#include <sys/types.h>
19422#include <sys/socket.h>
19423
19424int
19425main ()
19426{
19427void *x=socketpair
19428 ;
19429 return 0;
19430}
19431_ACEOF
19432rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019433if { (ac_try="$ac_compile"
19434case "(($ac_try" in
19435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19436 *) ac_try_echo=$ac_try;;
19437esac
19438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19439 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000019440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019441 grep -v '^ *+' conftest.er1 >conftest.err
19442 rm -f conftest.er1
19443 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000019444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019445 (exit $ac_status); } && {
19446 test -z "$ac_c_werror_flag" ||
19447 test ! -s conftest.err
19448 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000019449
19450cat >>confdefs.h <<\_ACEOF
19451#define HAVE_SOCKETPAIR 1
19452_ACEOF
19453
Martin v. Löwiseba40652007-08-30 20:10:57 +000019454 { echo "$as_me:$LINENO: result: yes" >&5
19455echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019456else
19457 echo "$as_me: failed program was:" >&5
19458sed 's/^/| /' conftest.$ac_ext >&5
19459
Martin v. Löwiseba40652007-08-30 20:10:57 +000019460 { echo "$as_me:$LINENO: result: no" >&5
19461echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019462
19463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019464
19465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000019466
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019467# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000019468{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
19469echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019470cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019471/* confdefs.h. */
19472_ACEOF
19473cat confdefs.h >>conftest.$ac_ext
19474cat >>conftest.$ac_ext <<_ACEOF
19475/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019476#include <sys/types.h>
19477#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019478int
19479main ()
19480{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019481struct sockaddr x;
19482x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019483 ;
19484 return 0;
19485}
19486_ACEOF
19487rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019488if { (ac_try="$ac_compile"
19489case "(($ac_try" in
19490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19491 *) ac_try_echo=$ac_try;;
19492esac
19493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19494 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019496 grep -v '^ *+' conftest.er1 >conftest.err
19497 rm -f conftest.er1
19498 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019500 (exit $ac_status); } && {
19501 test -z "$ac_c_werror_flag" ||
19502 test ! -s conftest.err
19503 } && test -s conftest.$ac_objext; then
19504 { echo "$as_me:$LINENO: result: yes" >&5
19505echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019506
19507cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019508#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019509_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019510
19511else
Martin v. Löwis11437992002-04-12 09:54:03 +000019512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019513sed 's/^/| /' conftest.$ac_ext >&5
19514
Martin v. Löwiseba40652007-08-30 20:10:57 +000019515 { echo "$as_me:$LINENO: result: no" >&5
19516echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019518
19519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019520
Guido van Rossumda88dad1995-01-26 00:46:29 +000019521va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019522{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
19523echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019524cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019525/* confdefs.h. */
19526_ACEOF
19527cat confdefs.h >>conftest.$ac_ext
19528cat >>conftest.$ac_ext <<_ACEOF
19529/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019530
19531#ifdef HAVE_STDARG_PROTOTYPES
19532#include <stdarg.h>
19533#else
19534#include <varargs.h>
19535#endif
19536
Martin v. Löwis11437992002-04-12 09:54:03 +000019537int
19538main ()
19539{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019540va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000019541 ;
19542 return 0;
19543}
19544_ACEOF
19545rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019546if { (ac_try="$ac_compile"
19547case "(($ac_try" in
19548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19549 *) ac_try_echo=$ac_try;;
19550esac
19551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019554 grep -v '^ *+' conftest.er1 >conftest.err
19555 rm -f conftest.er1
19556 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019558 (exit $ac_status); } && {
19559 test -z "$ac_c_werror_flag" ||
19560 test ! -s conftest.err
19561 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019562 :
19563else
Martin v. Löwis11437992002-04-12 09:54:03 +000019564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019565sed 's/^/| /' conftest.$ac_ext >&5
19566
Martin v. Löwis11437992002-04-12 09:54:03 +000019567
19568
19569cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019570#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019571_ACEOF
19572
Guido van Rossumda88dad1995-01-26 00:46:29 +000019573 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019574
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019576
19577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19578{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
19579echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019580
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019581# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000019582
19583
19584
Martin v. Löwiseba40652007-08-30 20:10:57 +000019585{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
19586echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019587if test "${ac_cv_func_gethostbyname_r+set}" = set; then
19588 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019589else
Martin v. Löwis11437992002-04-12 09:54:03 +000019590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019591/* confdefs.h. */
19592_ACEOF
19593cat confdefs.h >>conftest.$ac_ext
19594cat >>conftest.$ac_ext <<_ACEOF
19595/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019596/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
19597 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19598#define gethostbyname_r innocuous_gethostbyname_r
19599
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019600/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019601 which can conflict with char gethostbyname_r (); below.
19602 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019603 <limits.h> exists even on freestanding compilers. */
19604
19605#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019606# include <limits.h>
19607#else
19608# include <assert.h>
19609#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019610
19611#undef gethostbyname_r
19612
Martin v. Löwiseba40652007-08-30 20:10:57 +000019613/* Override any GCC internal prototype to avoid an error.
19614 Use char because int might match the return type of a GCC
19615 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019616#ifdef __cplusplus
19617extern "C"
19618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019619char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019620/* The GNU C library defines this for functions which it implements
19621 to always fail with ENOSYS. Some functions are actually named
19622 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019623#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019624choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019625#endif
19626
Skip Montanaro6dead952003-09-25 14:50:04 +000019627int
19628main ()
19629{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019630return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019631 ;
19632 return 0;
19633}
19634_ACEOF
19635rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019636if { (ac_try="$ac_link"
19637case "(($ac_try" in
19638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19639 *) ac_try_echo=$ac_try;;
19640esac
19641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19642 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019644 grep -v '^ *+' conftest.er1 >conftest.err
19645 rm -f conftest.er1
19646 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019648 (exit $ac_status); } && {
19649 test -z "$ac_c_werror_flag" ||
19650 test ! -s conftest.err
19651 } && test -s conftest$ac_exeext &&
19652 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019653 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019654else
Martin v. Löwis11437992002-04-12 09:54:03 +000019655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019656sed 's/^/| /' conftest.$ac_ext >&5
19657
Martin v. Löwiseba40652007-08-30 20:10:57 +000019658 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019660
19661rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019662 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019664{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
19665echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019666if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019667
Martin v. Löwis11437992002-04-12 09:54:03 +000019668 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019669#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019670_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019671
Martin v. Löwiseba40652007-08-30 20:10:57 +000019672 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
19673echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019674 OLD_CFLAGS=$CFLAGS
19675 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019677/* confdefs.h. */
19678_ACEOF
19679cat confdefs.h >>conftest.$ac_ext
19680cat >>conftest.$ac_ext <<_ACEOF
19681/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019682
19683# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019684
Martin v. Löwis11437992002-04-12 09:54:03 +000019685int
19686main ()
19687{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019688
19689 char *name;
19690 struct hostent *he, *res;
19691 char buffer[2048];
19692 int buflen = 2048;
19693 int h_errnop;
19694
19695 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019696
19697 ;
19698 return 0;
19699}
19700_ACEOF
19701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019702if { (ac_try="$ac_compile"
19703case "(($ac_try" in
19704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19705 *) ac_try_echo=$ac_try;;
19706esac
19707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019710 grep -v '^ *+' conftest.er1 >conftest.err
19711 rm -f conftest.er1
19712 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019714 (exit $ac_status); } && {
19715 test -z "$ac_c_werror_flag" ||
19716 test ! -s conftest.err
19717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019718
19719 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019720#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019721_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019722
Martin v. Löwis11437992002-04-12 09:54:03 +000019723
19724cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019725#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019726_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019727
Martin v. Löwiseba40652007-08-30 20:10:57 +000019728 { echo "$as_me:$LINENO: result: yes" >&5
19729echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019730
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019731else
Martin v. Löwis11437992002-04-12 09:54:03 +000019732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019733sed 's/^/| /' conftest.$ac_ext >&5
19734
Martin v. Löwis11437992002-04-12 09:54:03 +000019735
Martin v. Löwiseba40652007-08-30 20:10:57 +000019736 { echo "$as_me:$LINENO: result: no" >&5
19737echo "${ECHO_T}no" >&6; }
19738 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
19739echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019741/* confdefs.h. */
19742_ACEOF
19743cat confdefs.h >>conftest.$ac_ext
19744cat >>conftest.$ac_ext <<_ACEOF
19745/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019746
19747# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019748
Martin v. Löwis11437992002-04-12 09:54:03 +000019749int
19750main ()
19751{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019752
19753 char *name;
19754 struct hostent *he;
19755 char buffer[2048];
19756 int buflen = 2048;
19757 int h_errnop;
19758
19759 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019760
19761 ;
19762 return 0;
19763}
19764_ACEOF
19765rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019766if { (ac_try="$ac_compile"
19767case "(($ac_try" in
19768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19769 *) ac_try_echo=$ac_try;;
19770esac
19771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019774 grep -v '^ *+' conftest.er1 >conftest.err
19775 rm -f conftest.er1
19776 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019778 (exit $ac_status); } && {
19779 test -z "$ac_c_werror_flag" ||
19780 test ! -s conftest.err
19781 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019782
19783 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019784#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019785_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019786
Martin v. Löwis11437992002-04-12 09:54:03 +000019787
19788cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019789#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019790_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019791
Martin v. Löwiseba40652007-08-30 20:10:57 +000019792 { echo "$as_me:$LINENO: result: yes" >&5
19793echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019794
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019795else
Martin v. Löwis11437992002-04-12 09:54:03 +000019796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019797sed 's/^/| /' conftest.$ac_ext >&5
19798
Martin v. Löwis11437992002-04-12 09:54:03 +000019799
Martin v. Löwiseba40652007-08-30 20:10:57 +000019800 { echo "$as_me:$LINENO: result: no" >&5
19801echo "${ECHO_T}no" >&6; }
19802 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
19803echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019805/* confdefs.h. */
19806_ACEOF
19807cat confdefs.h >>conftest.$ac_ext
19808cat >>conftest.$ac_ext <<_ACEOF
19809/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019810
19811# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019812
Martin v. Löwis11437992002-04-12 09:54:03 +000019813int
19814main ()
19815{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019816
19817 char *name;
19818 struct hostent *he;
19819 struct hostent_data data;
19820
19821 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000019822
19823 ;
19824 return 0;
19825}
19826_ACEOF
19827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019828if { (ac_try="$ac_compile"
19829case "(($ac_try" in
19830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19831 *) ac_try_echo=$ac_try;;
19832esac
19833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019836 grep -v '^ *+' conftest.er1 >conftest.err
19837 rm -f conftest.er1
19838 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019840 (exit $ac_status); } && {
19841 test -z "$ac_c_werror_flag" ||
19842 test ! -s conftest.err
19843 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019844
19845 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019846#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019847_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019848
Martin v. Löwis11437992002-04-12 09:54:03 +000019849
19850cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019851#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019852_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019853
Martin v. Löwiseba40652007-08-30 20:10:57 +000019854 { echo "$as_me:$LINENO: result: yes" >&5
19855echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019856
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019857else
Martin v. Löwis11437992002-04-12 09:54:03 +000019858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019859sed 's/^/| /' conftest.$ac_ext >&5
19860
Martin v. Löwis11437992002-04-12 09:54:03 +000019861
Martin v. Löwiseba40652007-08-30 20:10:57 +000019862 { echo "$as_me:$LINENO: result: no" >&5
19863echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019864
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019866
19867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019868
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019870
19871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019872
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019874
19875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019876 CFLAGS=$OLD_CFLAGS
19877
19878else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019879
Martin v. Löwis11437992002-04-12 09:54:03 +000019880
19881for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000019882do
Martin v. Löwis11437992002-04-12 09:54:03 +000019883as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000019884{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19885echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19886if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019887 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019888else
Martin v. Löwis11437992002-04-12 09:54:03 +000019889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019890/* confdefs.h. */
19891_ACEOF
19892cat confdefs.h >>conftest.$ac_ext
19893cat >>conftest.$ac_ext <<_ACEOF
19894/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019895/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19896 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19897#define $ac_func innocuous_$ac_func
19898
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019899/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019900 which can conflict with char $ac_func (); below.
19901 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019902 <limits.h> exists even on freestanding compilers. */
19903
19904#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019905# include <limits.h>
19906#else
19907# include <assert.h>
19908#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019909
19910#undef $ac_func
19911
Martin v. Löwiseba40652007-08-30 20:10:57 +000019912/* Override any GCC internal prototype to avoid an error.
19913 Use char because int might match the return type of a GCC
19914 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019915#ifdef __cplusplus
19916extern "C"
19917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019918char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019919/* The GNU C library defines this for functions which it implements
19920 to always fail with ENOSYS. Some functions are actually named
19921 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019922#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019923choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019924#endif
19925
Skip Montanaro6dead952003-09-25 14:50:04 +000019926int
19927main ()
19928{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019929return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019930 ;
19931 return 0;
19932}
19933_ACEOF
19934rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019935if { (ac_try="$ac_link"
19936case "(($ac_try" in
19937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19938 *) ac_try_echo=$ac_try;;
19939esac
19940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19941 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019943 grep -v '^ *+' conftest.er1 >conftest.err
19944 rm -f conftest.er1
19945 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019947 (exit $ac_status); } && {
19948 test -z "$ac_c_werror_flag" ||
19949 test ! -s conftest.err
19950 } && test -s conftest$ac_exeext &&
19951 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019952 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019953else
Martin v. Löwis11437992002-04-12 09:54:03 +000019954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019955sed 's/^/| /' conftest.$ac_ext >&5
19956
Martin v. Löwiseba40652007-08-30 20:10:57 +000019957 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019959
19960rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019961 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019963ac_res=`eval echo '${'$as_ac_var'}'`
19964 { echo "$as_me:$LINENO: result: $ac_res" >&5
19965echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019966if test `eval echo '${'$as_ac_var'}'` = yes; then
19967 cat >>confdefs.h <<_ACEOF
19968#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19969_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019970
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019971fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019972done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019973
Michael W. Hudson54241132001-12-07 15:38:26 +000019974
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019975fi
19976
Michael W. Hudson54241132001-12-07 15:38:26 +000019977
19978
19979
19980
19981
19982
Guido van Rossum627b2d71993-12-24 10:39:16 +000019983# checks for system services
19984# (none yet)
19985
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019986# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000019987{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
19988echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019989if test "${ac_cv_func___fpu_control+set}" = set; then
19990 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019991else
Martin v. Löwis11437992002-04-12 09:54:03 +000019992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019993/* confdefs.h. */
19994_ACEOF
19995cat confdefs.h >>conftest.$ac_ext
19996cat >>conftest.$ac_ext <<_ACEOF
19997/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019998/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
19999 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20000#define __fpu_control innocuous___fpu_control
20001
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020002/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020003 which can conflict with char __fpu_control (); below.
20004 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020005 <limits.h> exists even on freestanding compilers. */
20006
20007#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020008# include <limits.h>
20009#else
20010# include <assert.h>
20011#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020012
20013#undef __fpu_control
20014
Martin v. Löwiseba40652007-08-30 20:10:57 +000020015/* Override any GCC internal prototype to avoid an error.
20016 Use char because int might match the return type of a GCC
20017 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020018#ifdef __cplusplus
20019extern "C"
20020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020021char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020022/* The GNU C library defines this for functions which it implements
20023 to always fail with ENOSYS. Some functions are actually named
20024 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020025#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020026choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020027#endif
20028
Skip Montanaro6dead952003-09-25 14:50:04 +000020029int
20030main ()
20031{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020032return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020033 ;
20034 return 0;
20035}
20036_ACEOF
20037rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020038if { (ac_try="$ac_link"
20039case "(($ac_try" in
20040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20041 *) ac_try_echo=$ac_try;;
20042esac
20043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20044 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020046 grep -v '^ *+' conftest.er1 >conftest.err
20047 rm -f conftest.er1
20048 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020050 (exit $ac_status); } && {
20051 test -z "$ac_c_werror_flag" ||
20052 test ! -s conftest.err
20053 } && test -s conftest$ac_exeext &&
20054 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020055 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020056else
Martin v. Löwis11437992002-04-12 09:54:03 +000020057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020058sed 's/^/| /' conftest.$ac_ext >&5
20059
Martin v. Löwiseba40652007-08-30 20:10:57 +000020060 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020062
20063rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020064 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020066{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20067echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020068if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020069 :
20070else
Martin v. Löwis11437992002-04-12 09:54:03 +000020071
Martin v. Löwiseba40652007-08-30 20:10:57 +000020072{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20073echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020074if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20075 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020076else
Martin v. Löwis11437992002-04-12 09:54:03 +000020077 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020078LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020080/* confdefs.h. */
20081_ACEOF
20082cat confdefs.h >>conftest.$ac_ext
20083cat >>conftest.$ac_ext <<_ACEOF
20084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020085
Martin v. Löwiseba40652007-08-30 20:10:57 +000020086/* Override any GCC internal prototype to avoid an error.
20087 Use char because int might match the return type of a GCC
20088 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020089#ifdef __cplusplus
20090extern "C"
20091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020092char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020093int
20094main ()
20095{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020096return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020097 ;
20098 return 0;
20099}
20100_ACEOF
20101rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020102if { (ac_try="$ac_link"
20103case "(($ac_try" in
20104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20105 *) ac_try_echo=$ac_try;;
20106esac
20107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20108 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020110 grep -v '^ *+' conftest.er1 >conftest.err
20111 rm -f conftest.er1
20112 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020114 (exit $ac_status); } && {
20115 test -z "$ac_c_werror_flag" ||
20116 test ! -s conftest.err
20117 } && test -s conftest$ac_exeext &&
20118 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020119 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020120else
Martin v. Löwis11437992002-04-12 09:54:03 +000020121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020122sed 's/^/| /' conftest.$ac_ext >&5
20123
Martin v. Löwiseba40652007-08-30 20:10:57 +000020124 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020126
20127rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020128 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020129LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020131{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20132echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020133if test $ac_cv_lib_ieee___fpu_control = yes; then
20134 cat >>confdefs.h <<_ACEOF
20135#define HAVE_LIBIEEE 1
20136_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020137
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020138 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020139
Guido van Rossum627b2d71993-12-24 10:39:16 +000020140fi
20141
Michael W. Hudson54241132001-12-07 15:38:26 +000020142
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020143fi
20144
Michael W. Hudson54241132001-12-07 15:38:26 +000020145
Guido van Rossum7f253911997-05-09 02:42:48 +000020146# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020147{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20148echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020149
Martin v. Löwiseba40652007-08-30 20:10:57 +000020150# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020151if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020152 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020153if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020154then
20155
20156cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020157#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020158_ACEOF
20159
Martin v. Löwiseba40652007-08-30 20:10:57 +000020160 { echo "$as_me:$LINENO: result: yes" >&5
20161echo "${ECHO_T}yes" >&6; }
20162else { echo "$as_me:$LINENO: result: no" >&5
20163echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020164fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020165else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020166 { echo "$as_me:$LINENO: result: no" >&5
20167echo "${ECHO_T}no" >&6; }
20168fi
20169
Guido van Rossum7f253911997-05-09 02:42:48 +000020170
Guido van Rossum7f43da71994-08-01 12:15:30 +000020171# check for --with-libm=...
20172
Guido van Rossum563e7081996-09-10 18:20:48 +000020173case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020174Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020175BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020176*) LIBM=-lm
20177esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020178{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20179echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020180
Martin v. Löwiseba40652007-08-30 20:10:57 +000020181# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020182if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020183 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020184if test "$withval" = no
20185then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020186 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20187echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020188elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020189then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020190 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20191echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020192else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20193echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20194 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020195fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020196else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020197 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20198echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20199fi
20200
Guido van Rossum7f43da71994-08-01 12:15:30 +000020201
20202# check for --with-libc=...
20203
Martin v. Löwiseba40652007-08-30 20:10:57 +000020204{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20205echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020206
Martin v. Löwiseba40652007-08-30 20:10:57 +000020207# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020208if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020209 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020210if test "$withval" = no
20211then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020212 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20213echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020214elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020215then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020216 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20217echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020218else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20219echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20220 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020221fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020222else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020223 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20224echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20225fi
20226
Guido van Rossum7f43da71994-08-01 12:15:30 +000020227
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020228# check for hypot() in math library
20229LIBS_SAVE=$LIBS
20230LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000020231
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020232for ac_func in hypot
20233do
Martin v. Löwis11437992002-04-12 09:54:03 +000020234as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020235{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20236echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20237if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020238 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020239else
Martin v. Löwis11437992002-04-12 09:54:03 +000020240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020241/* confdefs.h. */
20242_ACEOF
20243cat confdefs.h >>conftest.$ac_ext
20244cat >>conftest.$ac_ext <<_ACEOF
20245/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020246/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20247 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20248#define $ac_func innocuous_$ac_func
20249
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020250/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020251 which can conflict with char $ac_func (); below.
20252 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020253 <limits.h> exists even on freestanding compilers. */
20254
20255#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020256# include <limits.h>
20257#else
20258# include <assert.h>
20259#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020260
20261#undef $ac_func
20262
Martin v. Löwiseba40652007-08-30 20:10:57 +000020263/* Override any GCC internal prototype to avoid an error.
20264 Use char because int might match the return type of a GCC
20265 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020266#ifdef __cplusplus
20267extern "C"
20268#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020269char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020270/* The GNU C library defines this for functions which it implements
20271 to always fail with ENOSYS. Some functions are actually named
20272 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020273#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020274choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020275#endif
20276
Skip Montanaro6dead952003-09-25 14:50:04 +000020277int
20278main ()
20279{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020280return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020281 ;
20282 return 0;
20283}
20284_ACEOF
20285rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020286if { (ac_try="$ac_link"
20287case "(($ac_try" in
20288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20289 *) ac_try_echo=$ac_try;;
20290esac
20291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20292 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020294 grep -v '^ *+' conftest.er1 >conftest.err
20295 rm -f conftest.er1
20296 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020298 (exit $ac_status); } && {
20299 test -z "$ac_c_werror_flag" ||
20300 test ! -s conftest.err
20301 } && test -s conftest$ac_exeext &&
20302 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020303 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020304else
Martin v. Löwis11437992002-04-12 09:54:03 +000020305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020306sed 's/^/| /' conftest.$ac_ext >&5
20307
Martin v. Löwiseba40652007-08-30 20:10:57 +000020308 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020310
20311rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020312 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020313fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020314ac_res=`eval echo '${'$as_ac_var'}'`
20315 { echo "$as_me:$LINENO: result: $ac_res" >&5
20316echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020317if test `eval echo '${'$as_ac_var'}'` = yes; then
20318 cat >>confdefs.h <<_ACEOF
20319#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20320_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020321
Michael W. Hudson54241132001-12-07 15:38:26 +000020322else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020323 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020324 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020325 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20326 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020327esac
20328
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020329fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020330done
20331
Michael W. Hudson54241132001-12-07 15:38:26 +000020332
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020333LIBS=$LIBS_SAVE
20334
Guido van Rossumef2255b2000-03-10 22:30:29 +000020335# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000020336if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020337 { echo "$as_me:$LINENO: checking for wchar.h" >&5
20338echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020339if test "${ac_cv_header_wchar_h+set}" = set; then
20340 echo $ECHO_N "(cached) $ECHO_C" >&6
20341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020342{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20343echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000020344else
Martin v. Löwis11437992002-04-12 09:54:03 +000020345 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000020346{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
20347echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020348cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020349/* confdefs.h. */
20350_ACEOF
20351cat confdefs.h >>conftest.$ac_ext
20352cat >>conftest.$ac_ext <<_ACEOF
20353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020354$ac_includes_default
20355#include <wchar.h>
20356_ACEOF
20357rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020358if { (ac_try="$ac_compile"
20359case "(($ac_try" in
20360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20361 *) ac_try_echo=$ac_try;;
20362esac
20363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020366 grep -v '^ *+' conftest.er1 >conftest.err
20367 rm -f conftest.er1
20368 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020370 (exit $ac_status); } && {
20371 test -z "$ac_c_werror_flag" ||
20372 test ! -s conftest.err
20373 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020374 ac_header_compiler=yes
20375else
20376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020377sed 's/^/| /' conftest.$ac_ext >&5
20378
Martin v. Löwiseba40652007-08-30 20:10:57 +000020379 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020381
20382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20383{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20384echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020385
20386# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000020387{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
20388echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020389cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020390/* confdefs.h. */
20391_ACEOF
20392cat confdefs.h >>conftest.$ac_ext
20393cat >>conftest.$ac_ext <<_ACEOF
20394/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020395#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020396_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000020397if { (ac_try="$ac_cpp conftest.$ac_ext"
20398case "(($ac_try" in
20399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20400 *) ac_try_echo=$ac_try;;
20401esac
20402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20403 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020404 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000020405 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000020406 rm -f conftest.er1
20407 cat conftest.err >&5
20408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020409 (exit $ac_status); } >/dev/null && {
20410 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20411 test ! -s conftest.err
20412 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020413 ac_header_preproc=yes
20414else
20415 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 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000020419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020420
Martin v. Löwis11437992002-04-12 09:54:03 +000020421rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020422{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20423echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020424
20425# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020426case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20427 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000020428 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
20429echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020430 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
20431echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
20432 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020433 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020434 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020435 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
20436echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020437 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
20438echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
20439 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
20440echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
20441 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
20442echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020443 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
20444echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020445 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
20446echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000020447 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000020448## ------------------------------------------------ ##
20449## Report this to http://www.python.org/python-bugs ##
20450## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000020451_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000020452 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000020453 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020454esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020455{ echo "$as_me:$LINENO: checking for wchar.h" >&5
20456echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020457if test "${ac_cv_header_wchar_h+set}" = set; then
20458 echo $ECHO_N "(cached) $ECHO_C" >&6
20459else
20460 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000020461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020462{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20463echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020464
20465fi
20466if test $ac_cv_header_wchar_h = yes; then
20467
20468
20469cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000020470#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020471_ACEOF
20472
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020473 wchar_h="yes"
20474
Guido van Rossumef2255b2000-03-10 22:30:29 +000020475else
Martin v. Löwis11437992002-04-12 09:54:03 +000020476 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000020477
20478fi
20479
Michael W. Hudson54241132001-12-07 15:38:26 +000020480
Martin v. Löwis11437992002-04-12 09:54:03 +000020481
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020482# determine wchar_t size
20483if test "$wchar_h" = yes
20484then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020485 { echo "$as_me:$LINENO: checking for wchar_t" >&5
20486echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020487if test "${ac_cv_type_wchar_t+set}" = set; then
20488 echo $ECHO_N "(cached) $ECHO_C" >&6
20489else
20490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020491/* confdefs.h. */
20492_ACEOF
20493cat confdefs.h >>conftest.$ac_ext
20494cat >>conftest.$ac_ext <<_ACEOF
20495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020496#include <wchar.h>
20497
Martin v. Löwiseba40652007-08-30 20:10:57 +000020498typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020499int
20500main ()
20501{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020502if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000020503 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020504if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000020505 return 0;
20506 ;
20507 return 0;
20508}
20509_ACEOF
20510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020511if { (ac_try="$ac_compile"
20512case "(($ac_try" in
20513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20514 *) ac_try_echo=$ac_try;;
20515esac
20516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020519 grep -v '^ *+' conftest.er1 >conftest.err
20520 rm -f conftest.er1
20521 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020523 (exit $ac_status); } && {
20524 test -z "$ac_c_werror_flag" ||
20525 test ! -s conftest.err
20526 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020527 ac_cv_type_wchar_t=yes
20528else
20529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020530sed 's/^/| /' conftest.$ac_ext >&5
20531
Martin v. Löwiseba40652007-08-30 20:10:57 +000020532 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020533fi
Brett Cannon19fab762007-06-02 03:02:29 +000020534
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20536fi
20537{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
20538echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
20539
20540# The cast to long int works around a bug in the HP C Compiler
20541# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20542# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20543# This bug is HP SR number 8606223364.
20544{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
20545echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020546if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20547 echo $ECHO_N "(cached) $ECHO_C" >&6
20548else
Martin v. Löwis11437992002-04-12 09:54:03 +000020549 if test "$cross_compiling" = yes; then
20550 # Depending upon the size, compute the lo and hi bounds.
20551cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020552/* confdefs.h. */
20553_ACEOF
20554cat confdefs.h >>conftest.$ac_ext
20555cat >>conftest.$ac_ext <<_ACEOF
20556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020557#include <wchar.h>
20558
Martin v. Löwiseba40652007-08-30 20:10:57 +000020559 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020560int
20561main ()
20562{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020564test_array [0] = 0
20565
20566 ;
20567 return 0;
20568}
20569_ACEOF
20570rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020571if { (ac_try="$ac_compile"
20572case "(($ac_try" in
20573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20574 *) ac_try_echo=$ac_try;;
20575esac
20576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020579 grep -v '^ *+' conftest.er1 >conftest.err
20580 rm -f conftest.er1
20581 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020583 (exit $ac_status); } && {
20584 test -z "$ac_c_werror_flag" ||
20585 test ! -s conftest.err
20586 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020587 ac_lo=0 ac_mid=0
20588 while :; do
20589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020590/* confdefs.h. */
20591_ACEOF
20592cat confdefs.h >>conftest.$ac_ext
20593cat >>conftest.$ac_ext <<_ACEOF
20594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020595#include <wchar.h>
20596
Martin v. Löwiseba40652007-08-30 20:10:57 +000020597 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020598int
20599main ()
20600{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020601static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020602test_array [0] = 0
20603
20604 ;
20605 return 0;
20606}
20607_ACEOF
20608rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020609if { (ac_try="$ac_compile"
20610case "(($ac_try" in
20611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20612 *) ac_try_echo=$ac_try;;
20613esac
20614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20615 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020617 grep -v '^ *+' conftest.er1 >conftest.err
20618 rm -f conftest.er1
20619 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020621 (exit $ac_status); } && {
20622 test -z "$ac_c_werror_flag" ||
20623 test ! -s conftest.err
20624 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020625 ac_hi=$ac_mid; break
20626else
20627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020628sed 's/^/| /' conftest.$ac_ext >&5
20629
Martin v. Löwiseba40652007-08-30 20:10:57 +000020630 ac_lo=`expr $ac_mid + 1`
20631 if test $ac_lo -le $ac_mid; then
20632 ac_lo= ac_hi=
20633 break
20634 fi
20635 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000020636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020637
20638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020639 done
20640else
20641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020642sed 's/^/| /' conftest.$ac_ext >&5
20643
Martin v. Löwiseba40652007-08-30 20:10:57 +000020644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020645/* confdefs.h. */
20646_ACEOF
20647cat confdefs.h >>conftest.$ac_ext
20648cat >>conftest.$ac_ext <<_ACEOF
20649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020650#include <wchar.h>
20651
Martin v. Löwiseba40652007-08-30 20:10:57 +000020652 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020653int
20654main ()
20655{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020657test_array [0] = 0
20658
20659 ;
20660 return 0;
20661}
20662_ACEOF
20663rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020664if { (ac_try="$ac_compile"
20665case "(($ac_try" in
20666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20667 *) ac_try_echo=$ac_try;;
20668esac
20669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020672 grep -v '^ *+' conftest.er1 >conftest.err
20673 rm -f conftest.er1
20674 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020676 (exit $ac_status); } && {
20677 test -z "$ac_c_werror_flag" ||
20678 test ! -s conftest.err
20679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020680 ac_hi=-1 ac_mid=-1
20681 while :; do
20682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020683/* confdefs.h. */
20684_ACEOF
20685cat confdefs.h >>conftest.$ac_ext
20686cat >>conftest.$ac_ext <<_ACEOF
20687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020688#include <wchar.h>
20689
Martin v. Löwiseba40652007-08-30 20:10:57 +000020690 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020691int
20692main ()
20693{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020694static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020695test_array [0] = 0
20696
20697 ;
20698 return 0;
20699}
20700_ACEOF
20701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020702if { (ac_try="$ac_compile"
20703case "(($ac_try" in
20704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20705 *) ac_try_echo=$ac_try;;
20706esac
20707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020710 grep -v '^ *+' conftest.er1 >conftest.err
20711 rm -f conftest.er1
20712 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020714 (exit $ac_status); } && {
20715 test -z "$ac_c_werror_flag" ||
20716 test ! -s conftest.err
20717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020718 ac_lo=$ac_mid; break
20719else
20720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020721sed 's/^/| /' conftest.$ac_ext >&5
20722
Martin v. Löwiseba40652007-08-30 20:10:57 +000020723 ac_hi=`expr '(' $ac_mid ')' - 1`
20724 if test $ac_mid -le $ac_hi; then
20725 ac_lo= ac_hi=
20726 break
20727 fi
20728 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000020729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020730
20731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020732 done
20733else
20734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020735sed 's/^/| /' conftest.$ac_ext >&5
20736
Martin v. Löwiseba40652007-08-30 20:10:57 +000020737 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000020738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020739
20740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020742
20743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020744# Binary search between lo and hi bounds.
20745while test "x$ac_lo" != "x$ac_hi"; do
20746 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020748/* confdefs.h. */
20749_ACEOF
20750cat confdefs.h >>conftest.$ac_ext
20751cat >>conftest.$ac_ext <<_ACEOF
20752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020753#include <wchar.h>
20754
Martin v. Löwiseba40652007-08-30 20:10:57 +000020755 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020756int
20757main ()
20758{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020759static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020760test_array [0] = 0
20761
20762 ;
20763 return 0;
20764}
20765_ACEOF
20766rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020767if { (ac_try="$ac_compile"
20768case "(($ac_try" in
20769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20770 *) ac_try_echo=$ac_try;;
20771esac
20772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20773 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020775 grep -v '^ *+' conftest.er1 >conftest.err
20776 rm -f conftest.er1
20777 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020779 (exit $ac_status); } && {
20780 test -z "$ac_c_werror_flag" ||
20781 test ! -s conftest.err
20782 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020783 ac_hi=$ac_mid
20784else
20785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020786sed 's/^/| /' conftest.$ac_ext >&5
20787
Martin v. Löwiseba40652007-08-30 20:10:57 +000020788 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000020789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020790
20791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020792done
20793case $ac_lo in
20794?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020795'') if test "$ac_cv_type_wchar_t" = yes; then
20796 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000020797See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020798echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000020799See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000020800 { (exit 77); exit 77; }; }
20801 else
20802 ac_cv_sizeof_wchar_t=0
20803 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020804esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020805else
Martin v. Löwis11437992002-04-12 09:54:03 +000020806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020807/* confdefs.h. */
20808_ACEOF
20809cat confdefs.h >>conftest.$ac_ext
20810cat >>conftest.$ac_ext <<_ACEOF
20811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020812#include <wchar.h>
20813
Martin v. Löwiseba40652007-08-30 20:10:57 +000020814 typedef wchar_t ac__type_sizeof_;
20815static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
20816static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000020817#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020818#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020819int
20820main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020821{
Martin v. Löwis11437992002-04-12 09:54:03 +000020822
20823 FILE *f = fopen ("conftest.val", "w");
20824 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000020825 return 1;
20826 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000020827 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000020828 long int i = longval ();
20829 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20830 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000020831 fprintf (f, "%ld\n", i);
20832 }
20833 else
20834 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000020835 unsigned long int i = ulongval ();
20836 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20837 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000020838 fprintf (f, "%lu\n", i);
20839 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020840 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020841
20842 ;
20843 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000020844}
Martin v. Löwis11437992002-04-12 09:54:03 +000020845_ACEOF
20846rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020847if { (ac_try="$ac_link"
20848case "(($ac_try" in
20849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20850 *) ac_try_echo=$ac_try;;
20851esac
20852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20853 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020854 ac_status=$?
20855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20856 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000020857 { (case "(($ac_try" in
20858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20859 *) ac_try_echo=$ac_try;;
20860esac
20861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20862 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020863 ac_status=$?
20864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20865 (exit $ac_status); }; }; then
20866 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000020867else
Martin v. Löwis11437992002-04-12 09:54:03 +000020868 echo "$as_me: program exited with status $ac_status" >&5
20869echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020870sed 's/^/| /' conftest.$ac_ext >&5
20871
Martin v. Löwis11437992002-04-12 09:54:03 +000020872( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000020873if test "$ac_cv_type_wchar_t" = yes; then
20874 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000020875See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020876echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000020877See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000020878 { (exit 77); exit 77; }; }
20879 else
20880 ac_cv_sizeof_wchar_t=0
20881 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020883rm -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 +000020884fi
20885rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000020886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020887{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
20888echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
20889
20890
20891
Martin v. Löwis11437992002-04-12 09:54:03 +000020892cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020893#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000020894_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020895
Michael W. Hudson54241132001-12-07 15:38:26 +000020896
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020897fi
20898
Martin v. Löwiseba40652007-08-30 20:10:57 +000020899{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
20900echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020901have_ucs4_tcl=no
20902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020903/* confdefs.h. */
20904_ACEOF
20905cat confdefs.h >>conftest.$ac_ext
20906cat >>conftest.$ac_ext <<_ACEOF
20907/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020908
20909#include <tcl.h>
20910#if TCL_UTF_MAX != 6
20911# error "NOT UCS4_TCL"
20912#endif
20913int
20914main ()
20915{
20916
20917 ;
20918 return 0;
20919}
20920_ACEOF
20921rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020922if { (ac_try="$ac_compile"
20923case "(($ac_try" in
20924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20925 *) ac_try_echo=$ac_try;;
20926esac
20927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20928 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020930 grep -v '^ *+' conftest.er1 >conftest.err
20931 rm -f conftest.er1
20932 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020934 (exit $ac_status); } && {
20935 test -z "$ac_c_werror_flag" ||
20936 test ! -s conftest.err
20937 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020938
20939
20940cat >>confdefs.h <<\_ACEOF
20941#define HAVE_UCS4_TCL 1
20942_ACEOF
20943
20944 have_ucs4_tcl=yes
20945
20946else
20947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020948sed 's/^/| /' conftest.$ac_ext >&5
20949
Martin v. Löwiseba40652007-08-30 20:10:57 +000020950
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020952
20953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20954{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
20955echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020956
Skip Montanaro6dead952003-09-25 14:50:04 +000020957# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020958if test "$wchar_h" = yes
20959then
20960 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000020961 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
20962echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020963 if test "${ac_cv_wchar_t_signed+set}" = set; then
20964 echo $ECHO_N "(cached) $ECHO_C" >&6
20965else
20966
20967 if test "$cross_compiling" = yes; then
20968 ac_cv_wchar_t_signed=yes
20969else
20970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020971/* confdefs.h. */
20972_ACEOF
20973cat confdefs.h >>conftest.$ac_ext
20974cat >>conftest.$ac_ext <<_ACEOF
20975/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020976
20977 #include <wchar.h>
20978 int main()
20979 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000020980 /* Success: exit code 0 */
20981 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020982 }
20983
20984_ACEOF
20985rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020986if { (ac_try="$ac_link"
20987case "(($ac_try" in
20988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20989 *) ac_try_echo=$ac_try;;
20990esac
20991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20992 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020993 ac_status=$?
20994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000020996 { (case "(($ac_try" in
20997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20998 *) ac_try_echo=$ac_try;;
20999esac
21000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21001 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021002 ac_status=$?
21003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21004 (exit $ac_status); }; }; then
21005 ac_cv_wchar_t_signed=yes
21006else
21007 echo "$as_me: program exited with status $ac_status" >&5
21008echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021009sed 's/^/| /' conftest.$ac_ext >&5
21010
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021011( exit $ac_status )
21012ac_cv_wchar_t_signed=no
21013fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021014rm -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 +000021015fi
21016
Martin v. Löwiseba40652007-08-30 20:10:57 +000021017
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021018fi
21019
Martin v. Löwiseba40652007-08-30 20:10:57 +000021020 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21021echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21022fi
21023
21024{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21025echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21026# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021027if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021028 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021029else
21030 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021031fi
21032
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021033
21034if test $enable_unicode = yes
21035then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021036 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021037 case "$have_ucs4_tcl" in
21038 yes) enable_unicode="ucs4"
21039 ;;
21040 *) enable_unicode="ucs2"
21041 ;;
21042 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021043fi
21044
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021045
21046
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021047case "$enable_unicode" in
21048ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021049 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021050#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021051_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021052
21053 ;;
21054ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021055 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021056#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021057_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021058
21059 ;;
21060esac
21061
Michael W. Hudson54241132001-12-07 15:38:26 +000021062
Martin v. Löwis11437992002-04-12 09:54:03 +000021063
21064
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021065
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021066if test "$enable_unicode" = "no"
21067then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021068 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021069 { echo "$as_me:$LINENO: result: not used" >&5
21070echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021071else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021072 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021073
21074cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021075#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021076_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021077
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021078
21079 # wchar_t is only usable if it maps to an unsigned type
21080 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021081 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021082 then
21083 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021084
Martin v. Löwis11437992002-04-12 09:54:03 +000021085cat >>confdefs.h <<\_ACEOF
21086#define HAVE_USABLE_WCHAR_T 1
21087_ACEOF
21088
21089 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021090#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021091_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021092
21093 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21094 then
21095 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021096 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021097#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021098_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021099
21100 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21101 then
21102 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021103 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021104#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021105_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021106
21107 else
21108 PY_UNICODE_TYPE="no type found"
21109 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021110 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21111echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021112fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021113
21114# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021115{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21116echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021117if test "${ac_cv_c_bigendian+set}" = set; then
21118 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021119else
Martin v. Löwis11437992002-04-12 09:54:03 +000021120 # See if sys/param.h defines the BYTE_ORDER macro.
21121cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021122/* confdefs.h. */
21123_ACEOF
21124cat confdefs.h >>conftest.$ac_ext
21125cat >>conftest.$ac_ext <<_ACEOF
21126/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021127#include <sys/types.h>
21128#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021129
Martin v. Löwis11437992002-04-12 09:54:03 +000021130int
21131main ()
21132{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021133#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21134 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021135 bogus endian macros
21136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021137
21138 ;
21139 return 0;
21140}
21141_ACEOF
21142rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021143if { (ac_try="$ac_compile"
21144case "(($ac_try" in
21145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21146 *) ac_try_echo=$ac_try;;
21147esac
21148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21149 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021151 grep -v '^ *+' conftest.er1 >conftest.err
21152 rm -f conftest.er1
21153 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021155 (exit $ac_status); } && {
21156 test -z "$ac_c_werror_flag" ||
21157 test ! -s conftest.err
21158 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021159 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000021160cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021161/* confdefs.h. */
21162_ACEOF
21163cat confdefs.h >>conftest.$ac_ext
21164cat >>conftest.$ac_ext <<_ACEOF
21165/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021166#include <sys/types.h>
21167#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021168
Martin v. Löwis11437992002-04-12 09:54:03 +000021169int
21170main ()
21171{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021172#if BYTE_ORDER != BIG_ENDIAN
21173 not big endian
21174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021175
21176 ;
21177 return 0;
21178}
21179_ACEOF
21180rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021181if { (ac_try="$ac_compile"
21182case "(($ac_try" in
21183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21184 *) ac_try_echo=$ac_try;;
21185esac
21186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21187 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021189 grep -v '^ *+' conftest.er1 >conftest.err
21190 rm -f conftest.er1
21191 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021193 (exit $ac_status); } && {
21194 test -z "$ac_c_werror_flag" ||
21195 test ! -s conftest.err
21196 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021197 ac_cv_c_bigendian=yes
21198else
Martin v. Löwis11437992002-04-12 09:54:03 +000021199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021200sed 's/^/| /' conftest.$ac_ext >&5
21201
Martin v. Löwiseba40652007-08-30 20:10:57 +000021202 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021204
21205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000021206else
Martin v. Löwis11437992002-04-12 09:54:03 +000021207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021208sed 's/^/| /' conftest.$ac_ext >&5
21209
Martin v. Löwiseba40652007-08-30 20:10:57 +000021210 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000021211if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021212 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000021213 ac_cv_c_bigendian=unknown
21214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021215/* confdefs.h. */
21216_ACEOF
21217cat confdefs.h >>conftest.$ac_ext
21218cat >>conftest.$ac_ext <<_ACEOF
21219/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021220short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
21221short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021222void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021223short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
21224short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021225void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021226int
21227main ()
21228{
21229 _ascii (); _ebcdic ();
21230 ;
21231 return 0;
21232}
21233_ACEOF
21234rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021235if { (ac_try="$ac_compile"
21236case "(($ac_try" in
21237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21238 *) ac_try_echo=$ac_try;;
21239esac
21240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21241 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021243 grep -v '^ *+' conftest.er1 >conftest.err
21244 rm -f conftest.er1
21245 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021247 (exit $ac_status); } && {
21248 test -z "$ac_c_werror_flag" ||
21249 test ! -s conftest.err
21250 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021251 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021252 ac_cv_c_bigendian=yes
21253fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021254if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021255 if test "$ac_cv_c_bigendian" = unknown; then
21256 ac_cv_c_bigendian=no
21257 else
21258 # finding both strings is unlikely to happen, but who knows?
21259 ac_cv_c_bigendian=unknown
21260 fi
21261fi
21262else
21263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021264sed 's/^/| /' conftest.$ac_ext >&5
21265
Martin v. Löwiseba40652007-08-30 20:10:57 +000021266
Martin v. Löwis11437992002-04-12 09:54:03 +000021267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021268
21269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021270else
21271 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021272/* confdefs.h. */
21273_ACEOF
21274cat confdefs.h >>conftest.$ac_ext
21275cat >>conftest.$ac_ext <<_ACEOF
21276/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021277$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021278int
21279main ()
21280{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021281
Guido van Rossumef2255b2000-03-10 22:30:29 +000021282 /* Are we little or big endian? From Harbison&Steele. */
21283 union
21284 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021285 long int l;
21286 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000021287 } u;
21288 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021289 return u.c[sizeof (long int) - 1] == 1;
21290
21291 ;
21292 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021293}
Martin v. Löwis11437992002-04-12 09:54:03 +000021294_ACEOF
21295rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021296if { (ac_try="$ac_link"
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_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021303 ac_status=$?
21304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21305 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021306 { (case "(($ac_try" in
21307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21308 *) ac_try_echo=$ac_try;;
21309esac
21310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21311 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021312 ac_status=$?
21313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21314 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021315 ac_cv_c_bigendian=no
21316else
Martin v. Löwis11437992002-04-12 09:54:03 +000021317 echo "$as_me: program exited with status $ac_status" >&5
21318echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021319sed 's/^/| /' conftest.$ac_ext >&5
21320
Martin v. Löwis11437992002-04-12 09:54:03 +000021321( exit $ac_status )
21322ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000021323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021324rm -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 +000021325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021326
21327
Martin v. Löwis11437992002-04-12 09:54:03 +000021328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021329
21330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021332{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
21333echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021334case $ac_cv_c_bigendian in
21335 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000021336
Martin v. Löwis11437992002-04-12 09:54:03 +000021337cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021338#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021339_ACEOF
21340 ;;
21341 no)
21342 ;;
21343 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000021344 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021345presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021346echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021347presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
21348 { (exit 1); exit 1; }; } ;;
21349esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000021350
Michael W. Hudson54241132001-12-07 15:38:26 +000021351
Ronald Oussoren988117f2006-04-29 11:31:35 +000021352
21353
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021354# Check whether right shifting a negative integer extends the sign bit
21355# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000021356{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
21357echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021358if test "${ac_cv_rshift_extends_sign+set}" = set; then
21359 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000021360else
Martin v. Löwis11437992002-04-12 09:54:03 +000021361
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021362if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021363 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021364else
Martin v. Löwis11437992002-04-12 09:54:03 +000021365 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021366/* confdefs.h. */
21367_ACEOF
21368cat confdefs.h >>conftest.$ac_ext
21369cat >>conftest.$ac_ext <<_ACEOF
21370/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021371
21372int main()
21373{
Vladimir Marangozova6180282000-07-12 05:05:06 +000021374 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021375}
21376
Martin v. Löwis11437992002-04-12 09:54:03 +000021377_ACEOF
21378rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021379if { (ac_try="$ac_link"
21380case "(($ac_try" in
21381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21382 *) ac_try_echo=$ac_try;;
21383esac
21384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21385 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021386 ac_status=$?
21387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21388 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021389 { (case "(($ac_try" in
21390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21391 *) ac_try_echo=$ac_try;;
21392esac
21393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21394 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021395 ac_status=$?
21396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21397 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000021398 ac_cv_rshift_extends_sign=yes
21399else
Martin v. Löwis11437992002-04-12 09:54:03 +000021400 echo "$as_me: program exited with status $ac_status" >&5
21401echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021402sed 's/^/| /' conftest.$ac_ext >&5
21403
Martin v. Löwis11437992002-04-12 09:54:03 +000021404( exit $ac_status )
21405ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000021406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021407rm -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 +000021408fi
21409
Martin v. Löwiseba40652007-08-30 20:10:57 +000021410
21411fi
21412
21413{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
21414echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000021415if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021416then
Martin v. Löwis11437992002-04-12 09:54:03 +000021417
21418cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021419#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021420_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021421
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021422fi
21423
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021424# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000021425{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
21426echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021427if test "${ac_cv_have_getc_unlocked+set}" = set; then
21428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021429else
Martin v. Löwis11437992002-04-12 09:54:03 +000021430
21431cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021432/* confdefs.h. */
21433_ACEOF
21434cat confdefs.h >>conftest.$ac_ext
21435cat >>conftest.$ac_ext <<_ACEOF
21436/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021437#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021438int
21439main ()
21440{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021441
21442 FILE *f = fopen("/dev/null", "r");
21443 flockfile(f);
21444 getc_unlocked(f);
21445 funlockfile(f);
21446
Martin v. Löwis11437992002-04-12 09:54:03 +000021447 ;
21448 return 0;
21449}
21450_ACEOF
21451rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021452if { (ac_try="$ac_link"
21453case "(($ac_try" in
21454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21455 *) ac_try_echo=$ac_try;;
21456esac
21457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21458 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021460 grep -v '^ *+' conftest.er1 >conftest.err
21461 rm -f conftest.er1
21462 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021464 (exit $ac_status); } && {
21465 test -z "$ac_c_werror_flag" ||
21466 test ! -s conftest.err
21467 } && test -s conftest$ac_exeext &&
21468 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021469 ac_cv_have_getc_unlocked=yes
21470else
Martin v. Löwis11437992002-04-12 09:54:03 +000021471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021472sed 's/^/| /' conftest.$ac_ext >&5
21473
Martin v. Löwiseba40652007-08-30 20:10:57 +000021474 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021476
21477rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021478 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021479fi
21480
Martin v. Löwiseba40652007-08-30 20:10:57 +000021481{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
21482echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021483if test "$ac_cv_have_getc_unlocked" = yes
21484then
Martin v. Löwis11437992002-04-12 09:54:03 +000021485
21486cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021487#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021488_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021489
21490fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021491
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021492# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000021493# save the value of LIBS so we don't actually link Python with readline
21494LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021495
Martin v. Löwiseba40652007-08-30 20:10:57 +000021496{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
21497echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021498if test "${ac_cv_lib_readline_readline+set}" = set; then
21499 echo $ECHO_N "(cached) $ECHO_C" >&6
21500else
21501 ac_check_lib_save_LIBS=$LIBS
21502LIBS="-lreadline $LIBS"
21503cat >conftest.$ac_ext <<_ACEOF
21504/* confdefs.h. */
21505_ACEOF
21506cat confdefs.h >>conftest.$ac_ext
21507cat >>conftest.$ac_ext <<_ACEOF
21508/* end confdefs.h. */
21509
Martin v. Löwiseba40652007-08-30 20:10:57 +000021510/* Override any GCC internal prototype to avoid an error.
21511 Use char because int might match the return type of a GCC
21512 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021513#ifdef __cplusplus
21514extern "C"
21515#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021516char readline ();
21517int
21518main ()
21519{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021520return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021521 ;
21522 return 0;
21523}
21524_ACEOF
21525rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021526if { (ac_try="$ac_link"
21527case "(($ac_try" in
21528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21529 *) ac_try_echo=$ac_try;;
21530esac
21531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21532 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021533 ac_status=$?
21534 grep -v '^ *+' conftest.er1 >conftest.err
21535 rm -f conftest.er1
21536 cat conftest.err >&5
21537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021538 (exit $ac_status); } && {
21539 test -z "$ac_c_werror_flag" ||
21540 test ! -s conftest.err
21541 } && test -s conftest$ac_exeext &&
21542 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021543 ac_cv_lib_readline_readline=yes
21544else
21545 echo "$as_me: failed program was:" >&5
21546sed 's/^/| /' conftest.$ac_ext >&5
21547
Martin v. Löwiseba40652007-08-30 20:10:57 +000021548 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021550
21551rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021552 conftest$ac_exeext conftest.$ac_ext
21553LIBS=$ac_check_lib_save_LIBS
21554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021555{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
21556echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021557if test $ac_cv_lib_readline_readline = yes; then
21558 cat >>confdefs.h <<_ACEOF
21559#define HAVE_LIBREADLINE 1
21560_ACEOF
21561
21562 LIBS="-lreadline $LIBS"
21563
21564fi
21565
21566if test "$ac_cv_have_readline_readline" = no
21567then
21568
Martin v. Löwiseba40652007-08-30 20:10:57 +000021569{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
21570echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021571if test "${ac_cv_lib_termcap_readline+set}" = set; then
21572 echo $ECHO_N "(cached) $ECHO_C" >&6
21573else
21574 ac_check_lib_save_LIBS=$LIBS
21575LIBS="-ltermcap $LIBS"
21576cat >conftest.$ac_ext <<_ACEOF
21577/* confdefs.h. */
21578_ACEOF
21579cat confdefs.h >>conftest.$ac_ext
21580cat >>conftest.$ac_ext <<_ACEOF
21581/* end confdefs.h. */
21582
Martin v. Löwiseba40652007-08-30 20:10:57 +000021583/* Override any GCC internal prototype to avoid an error.
21584 Use char because int might match the return type of a GCC
21585 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021586#ifdef __cplusplus
21587extern "C"
21588#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021589char readline ();
21590int
21591main ()
21592{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021593return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021594 ;
21595 return 0;
21596}
21597_ACEOF
21598rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021599if { (ac_try="$ac_link"
21600case "(($ac_try" in
21601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21602 *) ac_try_echo=$ac_try;;
21603esac
21604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21605 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021606 ac_status=$?
21607 grep -v '^ *+' conftest.er1 >conftest.err
21608 rm -f conftest.er1
21609 cat conftest.err >&5
21610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021611 (exit $ac_status); } && {
21612 test -z "$ac_c_werror_flag" ||
21613 test ! -s conftest.err
21614 } && test -s conftest$ac_exeext &&
21615 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021616 ac_cv_lib_termcap_readline=yes
21617else
21618 echo "$as_me: failed program was:" >&5
21619sed 's/^/| /' conftest.$ac_ext >&5
21620
Martin v. Löwiseba40652007-08-30 20:10:57 +000021621 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021623
21624rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021625 conftest$ac_exeext conftest.$ac_ext
21626LIBS=$ac_check_lib_save_LIBS
21627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021628{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
21629echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021630if test $ac_cv_lib_termcap_readline = yes; then
21631 cat >>confdefs.h <<_ACEOF
21632#define HAVE_LIBTERMCAP 1
21633_ACEOF
21634
21635 LIBS="-ltermcap $LIBS"
21636
21637fi
21638
21639fi
21640
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021641# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000021642{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
21643echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021644if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
21645 echo $ECHO_N "(cached) $ECHO_C" >&6
21646else
21647 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021648LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021649cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021650/* confdefs.h. */
21651_ACEOF
21652cat confdefs.h >>conftest.$ac_ext
21653cat >>conftest.$ac_ext <<_ACEOF
21654/* end confdefs.h. */
21655
Martin v. Löwiseba40652007-08-30 20:10:57 +000021656/* Override any GCC internal prototype to avoid an error.
21657 Use char because int might match the return type of a GCC
21658 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021659#ifdef __cplusplus
21660extern "C"
21661#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021662char rl_callback_handler_install ();
21663int
21664main ()
21665{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021666return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021667 ;
21668 return 0;
21669}
21670_ACEOF
21671rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021672if { (ac_try="$ac_link"
21673case "(($ac_try" in
21674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21675 *) ac_try_echo=$ac_try;;
21676esac
21677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21678 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021680 grep -v '^ *+' conftest.er1 >conftest.err
21681 rm -f conftest.er1
21682 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021684 (exit $ac_status); } && {
21685 test -z "$ac_c_werror_flag" ||
21686 test ! -s conftest.err
21687 } && test -s conftest$ac_exeext &&
21688 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021689 ac_cv_lib_readline_rl_callback_handler_install=yes
21690else
21691 echo "$as_me: failed program was:" >&5
21692sed 's/^/| /' conftest.$ac_ext >&5
21693
Martin v. Löwiseba40652007-08-30 20:10:57 +000021694 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021696
21697rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021698 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021699LIBS=$ac_check_lib_save_LIBS
21700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021701{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
21702echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021703if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
21704
21705cat >>confdefs.h <<\_ACEOF
21706#define HAVE_RL_CALLBACK 1
21707_ACEOF
21708
21709fi
21710
21711
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021712# check for readline 2.2
21713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021714/* confdefs.h. */
21715_ACEOF
21716cat confdefs.h >>conftest.$ac_ext
21717cat >>conftest.$ac_ext <<_ACEOF
21718/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021719#include <readline/readline.h>
21720_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021721if { (ac_try="$ac_cpp conftest.$ac_ext"
21722case "(($ac_try" in
21723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21724 *) ac_try_echo=$ac_try;;
21725esac
21726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21727 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021728 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021729 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021730 rm -f conftest.er1
21731 cat conftest.err >&5
21732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021733 (exit $ac_status); } >/dev/null && {
21734 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21735 test ! -s conftest.err
21736 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021737 have_readline=yes
21738else
21739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021740sed 's/^/| /' conftest.$ac_ext >&5
21741
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021742 have_readline=no
21743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021744
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021745rm -f conftest.err conftest.$ac_ext
21746if test $have_readline = yes
21747then
21748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021749/* confdefs.h. */
21750_ACEOF
21751cat confdefs.h >>conftest.$ac_ext
21752cat >>conftest.$ac_ext <<_ACEOF
21753/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021754#include <readline/readline.h>
21755
21756_ACEOF
21757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000021758 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021759
21760cat >>confdefs.h <<\_ACEOF
21761#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
21762_ACEOF
21763
21764fi
21765rm -f conftest*
21766
21767fi
21768
Martin v. Löwis0daad592001-09-30 21:09:59 +000021769# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000021770{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
21771echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021772if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
21773 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000021774else
Martin v. Löwis11437992002-04-12 09:54:03 +000021775 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021776LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021778/* confdefs.h. */
21779_ACEOF
21780cat confdefs.h >>conftest.$ac_ext
21781cat >>conftest.$ac_ext <<_ACEOF
21782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021783
Martin v. Löwiseba40652007-08-30 20:10:57 +000021784/* Override any GCC internal prototype to avoid an error.
21785 Use char because int might match the return type of a GCC
21786 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021787#ifdef __cplusplus
21788extern "C"
21789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021790char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021791int
21792main ()
21793{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021794return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021795 ;
21796 return 0;
21797}
21798_ACEOF
21799rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021800if { (ac_try="$ac_link"
21801case "(($ac_try" in
21802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21803 *) ac_try_echo=$ac_try;;
21804esac
21805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21806 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021808 grep -v '^ *+' conftest.er1 >conftest.err
21809 rm -f conftest.er1
21810 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021812 (exit $ac_status); } && {
21813 test -z "$ac_c_werror_flag" ||
21814 test ! -s conftest.err
21815 } && test -s conftest$ac_exeext &&
21816 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021817 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000021818else
Martin v. Löwis11437992002-04-12 09:54:03 +000021819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021820sed 's/^/| /' conftest.$ac_ext >&5
21821
Martin v. Löwiseba40652007-08-30 20:10:57 +000021822 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000021823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021824
21825rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021827LIBS=$ac_check_lib_save_LIBS
21828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021829{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
21830echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021831if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021832
Martin v. Löwis11437992002-04-12 09:54:03 +000021833cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000021834#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021835_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000021836
Martin v. Löwis0daad592001-09-30 21:09:59 +000021837fi
21838
Michael W. Hudson54241132001-12-07 15:38:26 +000021839
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000021840# also in 4.0
21841{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
21842echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
21843if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
21844 echo $ECHO_N "(cached) $ECHO_C" >&6
21845else
21846 ac_check_lib_save_LIBS=$LIBS
21847LIBS="-lreadline $LIBS"
21848cat >conftest.$ac_ext <<_ACEOF
21849/* confdefs.h. */
21850_ACEOF
21851cat confdefs.h >>conftest.$ac_ext
21852cat >>conftest.$ac_ext <<_ACEOF
21853/* end confdefs.h. */
21854
21855/* Override any GCC internal prototype to avoid an error.
21856 Use char because int might match the return type of a GCC
21857 builtin and then its argument prototype would still apply. */
21858#ifdef __cplusplus
21859extern "C"
21860#endif
21861char rl_completion_display_matches_hook ();
21862int
21863main ()
21864{
21865return rl_completion_display_matches_hook ();
21866 ;
21867 return 0;
21868}
21869_ACEOF
21870rm -f conftest.$ac_objext conftest$ac_exeext
21871if { (ac_try="$ac_link"
21872case "(($ac_try" in
21873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21874 *) ac_try_echo=$ac_try;;
21875esac
21876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21877 (eval "$ac_link") 2>conftest.er1
21878 ac_status=$?
21879 grep -v '^ *+' conftest.er1 >conftest.err
21880 rm -f conftest.er1
21881 cat conftest.err >&5
21882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21883 (exit $ac_status); } && {
21884 test -z "$ac_c_werror_flag" ||
21885 test ! -s conftest.err
21886 } && test -s conftest$ac_exeext &&
21887 $as_test_x conftest$ac_exeext; then
21888 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
21889else
21890 echo "$as_me: failed program was:" >&5
21891sed 's/^/| /' conftest.$ac_ext >&5
21892
21893 ac_cv_lib_readline_rl_completion_display_matches_hook=no
21894fi
21895
21896rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21897 conftest$ac_exeext conftest.$ac_ext
21898LIBS=$ac_check_lib_save_LIBS
21899fi
21900{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
21901echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
21902if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
21903
21904cat >>confdefs.h <<\_ACEOF
21905#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
21906_ACEOF
21907
21908fi
21909
21910
Martin v. Löwis0daad592001-09-30 21:09:59 +000021911# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000021912{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
21913echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021914if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
21915 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000021916else
Martin v. Löwis11437992002-04-12 09:54:03 +000021917 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021918LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021920/* confdefs.h. */
21921_ACEOF
21922cat confdefs.h >>conftest.$ac_ext
21923cat >>conftest.$ac_ext <<_ACEOF
21924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021925
Martin v. Löwiseba40652007-08-30 20:10:57 +000021926/* Override any GCC internal prototype to avoid an error.
21927 Use char because int might match the return type of a GCC
21928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021929#ifdef __cplusplus
21930extern "C"
21931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021932char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021933int
21934main ()
21935{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021936return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021937 ;
21938 return 0;
21939}
21940_ACEOF
21941rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021942if { (ac_try="$ac_link"
21943case "(($ac_try" in
21944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21945 *) ac_try_echo=$ac_try;;
21946esac
21947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21948 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021950 grep -v '^ *+' conftest.er1 >conftest.err
21951 rm -f conftest.er1
21952 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021954 (exit $ac_status); } && {
21955 test -z "$ac_c_werror_flag" ||
21956 test ! -s conftest.err
21957 } && test -s conftest$ac_exeext &&
21958 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021959 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000021960else
Martin v. Löwis11437992002-04-12 09:54:03 +000021961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021962sed 's/^/| /' conftest.$ac_ext >&5
21963
Martin v. Löwiseba40652007-08-30 20:10:57 +000021964 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000021965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021966
21967rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021968 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021969LIBS=$ac_check_lib_save_LIBS
21970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021971{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
21972echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021973if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021974
Martin v. Löwis11437992002-04-12 09:54:03 +000021975cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000021976#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021977_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000021978
Guido van Rossum353ae582001-07-10 16:45:32 +000021979fi
21980
Jack Jansendd19cf82001-12-06 22:36:17 +000021981
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021982# also in readline 4.2
21983cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021984/* confdefs.h. */
21985_ACEOF
21986cat confdefs.h >>conftest.$ac_ext
21987cat >>conftest.$ac_ext <<_ACEOF
21988/* end confdefs.h. */
21989#include <readline/readline.h>
21990_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021991if { (ac_try="$ac_cpp conftest.$ac_ext"
21992case "(($ac_try" in
21993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21994 *) ac_try_echo=$ac_try;;
21995esac
21996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21997 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021998 ac_status=$?
21999 grep -v '^ *+' conftest.er1 >conftest.err
22000 rm -f conftest.er1
22001 cat conftest.err >&5
22002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022003 (exit $ac_status); } >/dev/null && {
22004 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22005 test ! -s conftest.err
22006 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022007 have_readline=yes
22008else
22009 echo "$as_me: failed program was:" >&5
22010sed 's/^/| /' conftest.$ac_ext >&5
22011
22012 have_readline=no
22013fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022014
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022015rm -f conftest.err conftest.$ac_ext
22016if test $have_readline = yes
22017then
22018 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022019/* confdefs.h. */
22020_ACEOF
22021cat confdefs.h >>conftest.$ac_ext
22022cat >>conftest.$ac_ext <<_ACEOF
22023/* end confdefs.h. */
22024#include <readline/readline.h>
22025
22026_ACEOF
22027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22028 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22029
22030cat >>confdefs.h <<\_ACEOF
22031#define HAVE_RL_CATCH_SIGNAL 1
22032_ACEOF
22033
22034fi
22035rm -f conftest*
22036
22037fi
22038
Martin v. Löwis82bca632006-02-10 20:49:30 +000022039# End of readline checks: restore LIBS
22040LIBS=$LIBS_no_readline
22041
Martin v. Löwiseba40652007-08-30 20:10:57 +000022042{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22043echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022044if test "${ac_cv_broken_nice+set}" = set; then
22045 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022046else
Martin v. Löwis11437992002-04-12 09:54:03 +000022047
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022048if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022049 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022050else
Martin v. Löwis11437992002-04-12 09:54:03 +000022051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022052/* confdefs.h. */
22053_ACEOF
22054cat confdefs.h >>conftest.$ac_ext
22055cat >>conftest.$ac_ext <<_ACEOF
22056/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022057
22058int main()
22059{
22060 int val1 = nice(1);
22061 if (val1 != -1 && val1 == nice(2))
22062 exit(0);
22063 exit(1);
22064}
22065
Martin v. Löwis11437992002-04-12 09:54:03 +000022066_ACEOF
22067rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022068if { (ac_try="$ac_link"
22069case "(($ac_try" in
22070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22071 *) ac_try_echo=$ac_try;;
22072esac
22073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22074 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022075 ac_status=$?
22076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22077 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022078 { (case "(($ac_try" in
22079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22080 *) ac_try_echo=$ac_try;;
22081esac
22082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22083 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022084 ac_status=$?
22085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22086 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022087 ac_cv_broken_nice=yes
22088else
Martin v. Löwis11437992002-04-12 09:54:03 +000022089 echo "$as_me: program exited with status $ac_status" >&5
22090echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022091sed 's/^/| /' conftest.$ac_ext >&5
22092
Martin v. Löwis11437992002-04-12 09:54:03 +000022093( exit $ac_status )
22094ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022096rm -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 +000022097fi
22098
Martin v. Löwiseba40652007-08-30 20:10:57 +000022099
22100fi
22101
22102{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22103echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022104if test "$ac_cv_broken_nice" = yes
22105then
Martin v. Löwis11437992002-04-12 09:54:03 +000022106
22107cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022108#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022109_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022110
22111fi
22112
Martin v. Löwiseba40652007-08-30 20:10:57 +000022113{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22114echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022115if test "$cross_compiling" = yes; then
22116 ac_cv_broken_poll=no
22117else
22118 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022119/* confdefs.h. */
22120_ACEOF
22121cat confdefs.h >>conftest.$ac_ext
22122cat >>conftest.$ac_ext <<_ACEOF
22123/* end confdefs.h. */
22124
22125#include <poll.h>
22126
22127int main (void)
22128 {
22129 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22130
22131 close (42);
22132
22133 int poll_test = poll (&poll_struct, 1, 0);
22134
22135 if (poll_test < 0)
22136 {
22137 exit(0);
22138 }
22139 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22140 {
22141 exit(0);
22142 }
22143 else
22144 {
22145 exit(1);
22146 }
22147 }
22148
22149_ACEOF
22150rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022151if { (ac_try="$ac_link"
22152case "(($ac_try" in
22153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22154 *) ac_try_echo=$ac_try;;
22155esac
22156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22157 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022158 ac_status=$?
22159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22160 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022161 { (case "(($ac_try" in
22162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22163 *) ac_try_echo=$ac_try;;
22164esac
22165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22166 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022167 ac_status=$?
22168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22169 (exit $ac_status); }; }; then
22170 ac_cv_broken_poll=yes
22171else
22172 echo "$as_me: program exited with status $ac_status" >&5
22173echo "$as_me: failed program was:" >&5
22174sed 's/^/| /' conftest.$ac_ext >&5
22175
22176( exit $ac_status )
22177ac_cv_broken_poll=no
22178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022179rm -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 +000022180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022181
22182
22183{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
22184echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022185if test "$ac_cv_broken_poll" = yes
22186then
22187
22188cat >>confdefs.h <<\_ACEOF
22189#define HAVE_BROKEN_POLL 1
22190_ACEOF
22191
22192fi
22193
Brett Cannon43802422005-02-10 20:48:03 +000022194# 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 +000022195# (which is not required by ISO C or UNIX spec) and/or if we support
22196# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000022197{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
22198echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022199if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
22200 echo $ECHO_N "(cached) $ECHO_C" >&6
22201else
22202 cat >conftest.$ac_ext <<_ACEOF
22203/* confdefs.h. */
22204_ACEOF
22205cat confdefs.h >>conftest.$ac_ext
22206cat >>conftest.$ac_ext <<_ACEOF
22207/* end confdefs.h. */
22208#include <sys/types.h>
22209#include <$ac_cv_struct_tm>
22210
22211
22212int
22213main ()
22214{
22215static struct tm ac_aggr;
22216if (ac_aggr.tm_zone)
22217return 0;
22218 ;
22219 return 0;
22220}
22221_ACEOF
22222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022223if { (ac_try="$ac_compile"
22224case "(($ac_try" in
22225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22226 *) ac_try_echo=$ac_try;;
22227esac
22228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22229 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022230 ac_status=$?
22231 grep -v '^ *+' conftest.er1 >conftest.err
22232 rm -f conftest.er1
22233 cat conftest.err >&5
22234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022235 (exit $ac_status); } && {
22236 test -z "$ac_c_werror_flag" ||
22237 test ! -s conftest.err
22238 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022239 ac_cv_member_struct_tm_tm_zone=yes
22240else
22241 echo "$as_me: failed program was:" >&5
22242sed 's/^/| /' conftest.$ac_ext >&5
22243
Martin v. Löwiseba40652007-08-30 20:10:57 +000022244 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000022245/* confdefs.h. */
22246_ACEOF
22247cat confdefs.h >>conftest.$ac_ext
22248cat >>conftest.$ac_ext <<_ACEOF
22249/* end confdefs.h. */
22250#include <sys/types.h>
22251#include <$ac_cv_struct_tm>
22252
22253
22254int
22255main ()
22256{
22257static struct tm ac_aggr;
22258if (sizeof ac_aggr.tm_zone)
22259return 0;
22260 ;
22261 return 0;
22262}
22263_ACEOF
22264rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022265if { (ac_try="$ac_compile"
22266case "(($ac_try" in
22267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22268 *) ac_try_echo=$ac_try;;
22269esac
22270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22271 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022272 ac_status=$?
22273 grep -v '^ *+' conftest.er1 >conftest.err
22274 rm -f conftest.er1
22275 cat conftest.err >&5
22276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022277 (exit $ac_status); } && {
22278 test -z "$ac_c_werror_flag" ||
22279 test ! -s conftest.err
22280 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022281 ac_cv_member_struct_tm_tm_zone=yes
22282else
22283 echo "$as_me: failed program was:" >&5
22284sed 's/^/| /' conftest.$ac_ext >&5
22285
Martin v. Löwiseba40652007-08-30 20:10:57 +000022286 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000022287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022288
22289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022291
22292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022294{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
22295echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022296if test $ac_cv_member_struct_tm_tm_zone = yes; then
22297
22298cat >>confdefs.h <<_ACEOF
22299#define HAVE_STRUCT_TM_TM_ZONE 1
22300_ACEOF
22301
22302
22303fi
22304
22305if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
22306
22307cat >>confdefs.h <<\_ACEOF
22308#define HAVE_TM_ZONE 1
22309_ACEOF
22310
22311else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022312 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
22313echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
22314if test "${ac_cv_have_decl_tzname+set}" = set; then
22315 echo $ECHO_N "(cached) $ECHO_C" >&6
22316else
22317 cat >conftest.$ac_ext <<_ACEOF
22318/* confdefs.h. */
22319_ACEOF
22320cat confdefs.h >>conftest.$ac_ext
22321cat >>conftest.$ac_ext <<_ACEOF
22322/* end confdefs.h. */
22323#include <time.h>
22324
22325int
22326main ()
22327{
22328#ifndef tzname
22329 (void) tzname;
22330#endif
22331
22332 ;
22333 return 0;
22334}
22335_ACEOF
22336rm -f conftest.$ac_objext
22337if { (ac_try="$ac_compile"
22338case "(($ac_try" in
22339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22340 *) ac_try_echo=$ac_try;;
22341esac
22342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22343 (eval "$ac_compile") 2>conftest.er1
22344 ac_status=$?
22345 grep -v '^ *+' conftest.er1 >conftest.err
22346 rm -f conftest.er1
22347 cat conftest.err >&5
22348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22349 (exit $ac_status); } && {
22350 test -z "$ac_c_werror_flag" ||
22351 test ! -s conftest.err
22352 } && test -s conftest.$ac_objext; then
22353 ac_cv_have_decl_tzname=yes
22354else
22355 echo "$as_me: failed program was:" >&5
22356sed 's/^/| /' conftest.$ac_ext >&5
22357
22358 ac_cv_have_decl_tzname=no
22359fi
22360
22361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22362fi
22363{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
22364echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
22365if test $ac_cv_have_decl_tzname = yes; then
22366
22367cat >>confdefs.h <<_ACEOF
22368#define HAVE_DECL_TZNAME 1
22369_ACEOF
22370
22371
22372else
22373 cat >>confdefs.h <<_ACEOF
22374#define HAVE_DECL_TZNAME 0
22375_ACEOF
22376
22377
22378fi
22379
22380
22381 { echo "$as_me:$LINENO: checking for tzname" >&5
22382echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022383if test "${ac_cv_var_tzname+set}" = set; then
22384 echo $ECHO_N "(cached) $ECHO_C" >&6
22385else
22386 cat >conftest.$ac_ext <<_ACEOF
22387/* confdefs.h. */
22388_ACEOF
22389cat confdefs.h >>conftest.$ac_ext
22390cat >>conftest.$ac_ext <<_ACEOF
22391/* end confdefs.h. */
22392#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000022393#if !HAVE_DECL_TZNAME
22394extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000022395#endif
22396
22397int
22398main ()
22399{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022400return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000022401 ;
22402 return 0;
22403}
22404_ACEOF
22405rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022406if { (ac_try="$ac_link"
22407case "(($ac_try" in
22408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22409 *) ac_try_echo=$ac_try;;
22410esac
22411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22412 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022413 ac_status=$?
22414 grep -v '^ *+' conftest.er1 >conftest.err
22415 rm -f conftest.er1
22416 cat conftest.err >&5
22417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022418 (exit $ac_status); } && {
22419 test -z "$ac_c_werror_flag" ||
22420 test ! -s conftest.err
22421 } && test -s conftest$ac_exeext &&
22422 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000022423 ac_cv_var_tzname=yes
22424else
22425 echo "$as_me: failed program was:" >&5
22426sed 's/^/| /' conftest.$ac_ext >&5
22427
Martin v. Löwiseba40652007-08-30 20:10:57 +000022428 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000022429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022430
22431rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000022432 conftest$ac_exeext conftest.$ac_ext
22433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022434{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
22435echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022436 if test $ac_cv_var_tzname = yes; then
22437
22438cat >>confdefs.h <<\_ACEOF
22439#define HAVE_TZNAME 1
22440_ACEOF
22441
22442 fi
22443fi
22444
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022445
Martin v. Löwis1d459062005-03-14 21:23:33 +000022446# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000022447{ echo "$as_me:$LINENO: checking for working tzset()" >&5
22448echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022449if test "${ac_cv_working_tzset+set}" = set; then
22450 echo $ECHO_N "(cached) $ECHO_C" >&6
22451else
22452
22453if test "$cross_compiling" = yes; then
22454 ac_cv_working_tzset=no
22455else
22456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022457/* confdefs.h. */
22458_ACEOF
22459cat confdefs.h >>conftest.$ac_ext
22460cat >>conftest.$ac_ext <<_ACEOF
22461/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022462
22463#include <stdlib.h>
22464#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000022465#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000022466
22467#if HAVE_TZNAME
22468extern char *tzname[];
22469#endif
22470
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022471int main()
22472{
Brett Cannon18367812003-09-19 00:59:16 +000022473 /* Note that we need to ensure that not only does tzset(3)
22474 do 'something' with localtime, but it works as documented
22475 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000022476 This includes making sure that tzname is set properly if
22477 tm->tm_zone does not exist since it is the alternative way
22478 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000022479
22480 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000022481 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000022482 */
22483
Martin v. Löwis1d459062005-03-14 21:23:33 +000022484 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000022485 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
22486
Neal Norwitz7f2588c2003-04-11 15:35:53 +000022487 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022488 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000022489 if (localtime(&groundhogday)->tm_hour != 0)
22490 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022491#if HAVE_TZNAME
22492 /* For UTC, tzname[1] is sometimes "", sometimes " " */
22493 if (strcmp(tzname[0], "UTC") ||
22494 (tzname[1][0] != 0 && tzname[1][0] != ' '))
22495 exit(1);
22496#endif
Brett Cannon18367812003-09-19 00:59:16 +000022497
Neal Norwitz7f2588c2003-04-11 15:35:53 +000022498 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022499 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000022500 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022501 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022502#if HAVE_TZNAME
22503 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
22504 exit(1);
22505#endif
Brett Cannon18367812003-09-19 00:59:16 +000022506
22507 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
22508 tzset();
22509 if (localtime(&groundhogday)->tm_hour != 11)
22510 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022511#if HAVE_TZNAME
22512 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
22513 exit(1);
22514#endif
22515
22516#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000022517 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
22518 exit(1);
22519 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
22520 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022521#endif
Brett Cannon18367812003-09-19 00:59:16 +000022522
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022523 exit(0);
22524}
22525
22526_ACEOF
22527rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022528if { (ac_try="$ac_link"
22529case "(($ac_try" in
22530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22531 *) ac_try_echo=$ac_try;;
22532esac
22533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22534 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022535 ac_status=$?
22536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22537 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022538 { (case "(($ac_try" in
22539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22540 *) ac_try_echo=$ac_try;;
22541esac
22542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22543 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022544 ac_status=$?
22545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22546 (exit $ac_status); }; }; then
22547 ac_cv_working_tzset=yes
22548else
22549 echo "$as_me: program exited with status $ac_status" >&5
22550echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022551sed 's/^/| /' conftest.$ac_ext >&5
22552
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022553( exit $ac_status )
22554ac_cv_working_tzset=no
22555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022556rm -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 +000022557fi
22558
Martin v. Löwiseba40652007-08-30 20:10:57 +000022559
22560fi
22561
22562{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
22563echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022564if test "$ac_cv_working_tzset" = yes
22565then
22566
22567cat >>confdefs.h <<\_ACEOF
22568#define HAVE_WORKING_TZSET 1
22569_ACEOF
22570
22571fi
22572
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022573# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000022574{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
22575echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022576if test "${ac_cv_stat_tv_nsec+set}" = set; then
22577 echo $ECHO_N "(cached) $ECHO_C" >&6
22578else
22579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022580/* confdefs.h. */
22581_ACEOF
22582cat confdefs.h >>conftest.$ac_ext
22583cat >>conftest.$ac_ext <<_ACEOF
22584/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022585#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022586int
22587main ()
22588{
22589
22590struct stat st;
22591st.st_mtim.tv_nsec = 1;
22592
22593 ;
22594 return 0;
22595}
22596_ACEOF
22597rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022598if { (ac_try="$ac_compile"
22599case "(($ac_try" in
22600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22601 *) ac_try_echo=$ac_try;;
22602esac
22603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22604 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022606 grep -v '^ *+' conftest.er1 >conftest.err
22607 rm -f conftest.er1
22608 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022610 (exit $ac_status); } && {
22611 test -z "$ac_c_werror_flag" ||
22612 test ! -s conftest.err
22613 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000022614 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022615else
22616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022617sed 's/^/| /' conftest.$ac_ext >&5
22618
Martin v. Löwiseba40652007-08-30 20:10:57 +000022619 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022620fi
22621
Martin v. Löwiseba40652007-08-30 20:10:57 +000022622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22623fi
22624
22625{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
22626echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022627if test "$ac_cv_stat_tv_nsec" = yes
22628then
22629
22630cat >>confdefs.h <<\_ACEOF
22631#define HAVE_STAT_TV_NSEC 1
22632_ACEOF
22633
22634fi
22635
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022636# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000022637{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
22638echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022639if test "${ac_cv_stat_tv_nsec2+set}" = set; then
22640 echo $ECHO_N "(cached) $ECHO_C" >&6
22641else
22642 cat >conftest.$ac_ext <<_ACEOF
22643/* confdefs.h. */
22644_ACEOF
22645cat confdefs.h >>conftest.$ac_ext
22646cat >>conftest.$ac_ext <<_ACEOF
22647/* end confdefs.h. */
22648#include <sys/stat.h>
22649int
22650main ()
22651{
22652
22653struct stat st;
22654st.st_mtimespec.tv_nsec = 1;
22655
22656 ;
22657 return 0;
22658}
22659_ACEOF
22660rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022661if { (ac_try="$ac_compile"
22662case "(($ac_try" in
22663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22664 *) ac_try_echo=$ac_try;;
22665esac
22666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022668 ac_status=$?
22669 grep -v '^ *+' conftest.er1 >conftest.err
22670 rm -f conftest.er1
22671 cat conftest.err >&5
22672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022673 (exit $ac_status); } && {
22674 test -z "$ac_c_werror_flag" ||
22675 test ! -s conftest.err
22676 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022677 ac_cv_stat_tv_nsec2=yes
22678else
22679 echo "$as_me: failed program was:" >&5
22680sed 's/^/| /' conftest.$ac_ext >&5
22681
Martin v. Löwiseba40652007-08-30 20:10:57 +000022682 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022683fi
22684
Martin v. Löwiseba40652007-08-30 20:10:57 +000022685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22686fi
22687
22688{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
22689echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022690if test "$ac_cv_stat_tv_nsec2" = yes
22691then
22692
22693cat >>confdefs.h <<\_ACEOF
22694#define HAVE_STAT_TV_NSEC2 1
22695_ACEOF
22696
22697fi
22698
Jack Jansen666b1e72001-10-31 12:11:48 +000022699# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000022700{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
22701echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022702if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
22703 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022704else
Martin v. Löwis11437992002-04-12 09:54:03 +000022705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022706/* confdefs.h. */
22707_ACEOF
22708cat confdefs.h >>conftest.$ac_ext
22709cat >>conftest.$ac_ext <<_ACEOF
22710/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000022711#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022712int
22713main ()
22714{
Jack Jansen666b1e72001-10-31 12:11:48 +000022715
22716 int rtn;
22717 rtn = mvwdelch(0,0,0);
22718
Martin v. Löwis11437992002-04-12 09:54:03 +000022719 ;
22720 return 0;
22721}
22722_ACEOF
22723rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022724if { (ac_try="$ac_compile"
22725case "(($ac_try" in
22726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22727 *) ac_try_echo=$ac_try;;
22728esac
22729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022732 grep -v '^ *+' conftest.er1 >conftest.err
22733 rm -f conftest.er1
22734 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022736 (exit $ac_status); } && {
22737 test -z "$ac_c_werror_flag" ||
22738 test ! -s conftest.err
22739 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000022740 ac_cv_mvwdelch_is_expression=yes
22741else
Martin v. Löwis11437992002-04-12 09:54:03 +000022742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022743sed 's/^/| /' conftest.$ac_ext >&5
22744
Martin v. Löwiseba40652007-08-30 20:10:57 +000022745 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000022746fi
22747
Martin v. Löwiseba40652007-08-30 20:10:57 +000022748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22749fi
22750
22751{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
22752echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000022753
22754if test "$ac_cv_mvwdelch_is_expression" = yes
22755then
Martin v. Löwis11437992002-04-12 09:54:03 +000022756
22757cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022758#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022759_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022760
22761fi
22762
Martin v. Löwiseba40652007-08-30 20:10:57 +000022763{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
22764echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022765if test "${ac_cv_window_has_flags+set}" = set; then
22766 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022767else
Martin v. Löwis11437992002-04-12 09:54:03 +000022768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022769/* confdefs.h. */
22770_ACEOF
22771cat confdefs.h >>conftest.$ac_ext
22772cat >>conftest.$ac_ext <<_ACEOF
22773/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000022774#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022775int
22776main ()
22777{
Jack Jansen666b1e72001-10-31 12:11:48 +000022778
22779 WINDOW *w;
22780 w->_flags = 0;
22781
Martin v. Löwis11437992002-04-12 09:54:03 +000022782 ;
22783 return 0;
22784}
22785_ACEOF
22786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022787if { (ac_try="$ac_compile"
22788case "(($ac_try" in
22789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22790 *) ac_try_echo=$ac_try;;
22791esac
22792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022795 grep -v '^ *+' conftest.er1 >conftest.err
22796 rm -f conftest.er1
22797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022799 (exit $ac_status); } && {
22800 test -z "$ac_c_werror_flag" ||
22801 test ! -s conftest.err
22802 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000022803 ac_cv_window_has_flags=yes
22804else
Martin v. Löwis11437992002-04-12 09:54:03 +000022805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022806sed 's/^/| /' conftest.$ac_ext >&5
22807
Martin v. Löwiseba40652007-08-30 20:10:57 +000022808 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000022809fi
22810
Martin v. Löwiseba40652007-08-30 20:10:57 +000022811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22812fi
22813
22814{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
22815echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022816
Jack Jansen666b1e72001-10-31 12:11:48 +000022817
22818if test "$ac_cv_window_has_flags" = yes
22819then
Martin v. Löwis11437992002-04-12 09:54:03 +000022820
22821cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022822#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022823_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022824
22825fi
22826
Martin v. Löwiseba40652007-08-30 20:10:57 +000022827{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
22828echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000022829cat >conftest.$ac_ext <<_ACEOF
22830/* confdefs.h. */
22831_ACEOF
22832cat confdefs.h >>conftest.$ac_ext
22833cat >>conftest.$ac_ext <<_ACEOF
22834/* end confdefs.h. */
22835#include <curses.h>
22836int
22837main ()
22838{
22839void *x=is_term_resized
22840 ;
22841 return 0;
22842}
22843_ACEOF
22844rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022845if { (ac_try="$ac_compile"
22846case "(($ac_try" in
22847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22848 *) ac_try_echo=$ac_try;;
22849esac
22850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22851 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000022852 ac_status=$?
22853 grep -v '^ *+' conftest.er1 >conftest.err
22854 rm -f conftest.er1
22855 cat conftest.err >&5
22856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022857 (exit $ac_status); } && {
22858 test -z "$ac_c_werror_flag" ||
22859 test ! -s conftest.err
22860 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000022861
22862cat >>confdefs.h <<\_ACEOF
22863#define HAVE_CURSES_IS_TERM_RESIZED 1
22864_ACEOF
22865
Martin v. Löwiseba40652007-08-30 20:10:57 +000022866 { echo "$as_me:$LINENO: result: yes" >&5
22867echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000022868else
22869 echo "$as_me: failed program was:" >&5
22870sed 's/^/| /' conftest.$ac_ext >&5
22871
Martin v. Löwiseba40652007-08-30 20:10:57 +000022872 { echo "$as_me:$LINENO: result: no" >&5
22873echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000022874
22875fi
Walter Dörwald4994d952006-06-19 08:07:50 +000022876
Martin v. Löwiseba40652007-08-30 20:10:57 +000022877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22878
22879{ echo "$as_me:$LINENO: checking for resize_term" >&5
22880echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000022881cat >conftest.$ac_ext <<_ACEOF
22882/* confdefs.h. */
22883_ACEOF
22884cat confdefs.h >>conftest.$ac_ext
22885cat >>conftest.$ac_ext <<_ACEOF
22886/* end confdefs.h. */
22887#include <curses.h>
22888int
22889main ()
22890{
22891void *x=resize_term
22892 ;
22893 return 0;
22894}
22895_ACEOF
22896rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022897if { (ac_try="$ac_compile"
22898case "(($ac_try" in
22899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22900 *) ac_try_echo=$ac_try;;
22901esac
22902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22903 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000022904 ac_status=$?
22905 grep -v '^ *+' conftest.er1 >conftest.err
22906 rm -f conftest.er1
22907 cat conftest.err >&5
22908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022909 (exit $ac_status); } && {
22910 test -z "$ac_c_werror_flag" ||
22911 test ! -s conftest.err
22912 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000022913
22914cat >>confdefs.h <<\_ACEOF
22915#define HAVE_CURSES_RESIZE_TERM 1
22916_ACEOF
22917
Martin v. Löwiseba40652007-08-30 20:10:57 +000022918 { echo "$as_me:$LINENO: result: yes" >&5
22919echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000022920else
22921 echo "$as_me: failed program was:" >&5
22922sed 's/^/| /' conftest.$ac_ext >&5
22923
Martin v. Löwiseba40652007-08-30 20:10:57 +000022924 { echo "$as_me:$LINENO: result: no" >&5
22925echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000022926
22927fi
Walter Dörwald4994d952006-06-19 08:07:50 +000022928
Martin v. Löwiseba40652007-08-30 20:10:57 +000022929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22930
22931{ echo "$as_me:$LINENO: checking for resizeterm" >&5
22932echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000022933cat >conftest.$ac_ext <<_ACEOF
22934/* confdefs.h. */
22935_ACEOF
22936cat confdefs.h >>conftest.$ac_ext
22937cat >>conftest.$ac_ext <<_ACEOF
22938/* end confdefs.h. */
22939#include <curses.h>
22940int
22941main ()
22942{
22943void *x=resizeterm
22944 ;
22945 return 0;
22946}
22947_ACEOF
22948rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022949if { (ac_try="$ac_compile"
22950case "(($ac_try" in
22951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22952 *) ac_try_echo=$ac_try;;
22953esac
22954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22955 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000022956 ac_status=$?
22957 grep -v '^ *+' conftest.er1 >conftest.err
22958 rm -f conftest.er1
22959 cat conftest.err >&5
22960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022961 (exit $ac_status); } && {
22962 test -z "$ac_c_werror_flag" ||
22963 test ! -s conftest.err
22964 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000022965
22966cat >>confdefs.h <<\_ACEOF
22967#define HAVE_CURSES_RESIZETERM 1
22968_ACEOF
22969
Martin v. Löwiseba40652007-08-30 20:10:57 +000022970 { echo "$as_me:$LINENO: result: yes" >&5
22971echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000022972else
22973 echo "$as_me: failed program was:" >&5
22974sed 's/^/| /' conftest.$ac_ext >&5
22975
Martin v. Löwiseba40652007-08-30 20:10:57 +000022976 { echo "$as_me:$LINENO: result: no" >&5
22977echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000022978
22979fi
Walter Dörwald4994d952006-06-19 08:07:50 +000022980
Martin v. Löwiseba40652007-08-30 20:10:57 +000022981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22982
22983{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
22984echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000022985
22986if test -r /dev/ptmx
22987then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022988 { echo "$as_me:$LINENO: result: yes" >&5
22989echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000022990
22991cat >>confdefs.h <<\_ACEOF
22992#define HAVE_DEV_PTMX 1
22993_ACEOF
22994
Martin v. Löwisfefbc202006-10-17 18:59:23 +000022995else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022996 { echo "$as_me:$LINENO: result: no" >&5
22997echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000022998fi
22999
Martin v. Löwiseba40652007-08-30 20:10:57 +000023000{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23001echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023002
23003if test -r /dev/ptc
23004then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023005 { echo "$as_me:$LINENO: result: yes" >&5
23006echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023007
23008cat >>confdefs.h <<\_ACEOF
23009#define HAVE_DEV_PTC 1
23010_ACEOF
23011
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023012else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023013 { echo "$as_me:$LINENO: result: no" >&5
23014echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023015fi
23016
Martin v. Löwiseba40652007-08-30 20:10:57 +000023017{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23018echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023019if test "$cross_compiling" = yes; then
23020 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23021See \`config.log' for more details." >&5
23022echo "$as_me: error: cannot run test program while cross compiling
23023See \`config.log' for more details." >&2;}
23024 { (exit 1); exit 1; }; }
23025else
23026 cat >conftest.$ac_ext <<_ACEOF
23027/* confdefs.h. */
23028_ACEOF
23029cat confdefs.h >>conftest.$ac_ext
23030cat >>conftest.$ac_ext <<_ACEOF
23031/* end confdefs.h. */
23032#include <stdio.h>
23033#include <stddef.h>
23034#include <string.h>
23035
23036int main()
23037{
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023038 char buffer[256];
23039
23040#ifdef HAVE_SSIZE_T
23041typedef ssize_t Py_ssize_t;
23042#elif SIZEOF_VOID_P == SIZEOF_LONG
23043typedef long Py_ssize_t;
23044#else
23045typedef int Py_ssize_t;
23046#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023047
23048 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23049 return 1;
23050
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023051 if (strcmp(buffer, "123"))
23052 return 1;
23053
23054 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23055 return 1;
23056
23057 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023058 return 1;
23059
23060 return 0;
23061}
23062_ACEOF
23063rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023064if { (ac_try="$ac_link"
23065case "(($ac_try" in
23066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23067 *) ac_try_echo=$ac_try;;
23068esac
23069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23070 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023071 ac_status=$?
23072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23073 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023074 { (case "(($ac_try" in
23075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23076 *) ac_try_echo=$ac_try;;
23077esac
23078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23079 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023080 ac_status=$?
23081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23082 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023083 { echo "$as_me:$LINENO: result: yes" >&5
23084echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023085
23086cat >>confdefs.h <<\_ACEOF
23087#define PY_FORMAT_SIZE_T "z"
23088_ACEOF
23089
23090else
23091 echo "$as_me: program exited with status $ac_status" >&5
23092echo "$as_me: failed program was:" >&5
23093sed 's/^/| /' conftest.$ac_ext >&5
23094
23095( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023096{ echo "$as_me:$LINENO: result: no" >&5
23097echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023099rm -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 +000023100fi
23101
Martin v. Löwiseba40652007-08-30 20:10:57 +000023102
23103
23104{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23105echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023106if test "${ac_cv_type_socklen_t+set}" = set; then
23107 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023108else
Martin v. Löwis11437992002-04-12 09:54:03 +000023109 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023110/* confdefs.h. */
23111_ACEOF
23112cat confdefs.h >>conftest.$ac_ext
23113cat >>conftest.$ac_ext <<_ACEOF
23114/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023115
23116#ifdef HAVE_SYS_TYPES_H
23117#include <sys/types.h>
23118#endif
23119#ifdef HAVE_SYS_SOCKET_H
23120#include <sys/socket.h>
23121#endif
23122
23123
Martin v. Löwiseba40652007-08-30 20:10:57 +000023124typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023125int
23126main ()
23127{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023128if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023129 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023130if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023131 return 0;
23132 ;
23133 return 0;
23134}
23135_ACEOF
23136rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023137if { (ac_try="$ac_compile"
23138case "(($ac_try" in
23139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23140 *) ac_try_echo=$ac_try;;
23141esac
23142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023145 grep -v '^ *+' conftest.er1 >conftest.err
23146 rm -f conftest.er1
23147 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023149 (exit $ac_status); } && {
23150 test -z "$ac_c_werror_flag" ||
23151 test ! -s conftest.err
23152 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000023153 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000023154else
Martin v. Löwis11437992002-04-12 09:54:03 +000023155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023156sed 's/^/| /' conftest.$ac_ext >&5
23157
Martin v. Löwiseba40652007-08-30 20:10:57 +000023158 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000023159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023160
23161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023163{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
23164echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023165if test $ac_cv_type_socklen_t = yes; then
23166 :
23167else
Guido van Rossum95713eb2000-05-18 20:53:31 +000023168
Martin v. Löwis01c04012002-11-11 14:58:44 +000023169cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023170#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000023171_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023172
23173fi
23174
Michael W. Hudson54241132001-12-07 15:38:26 +000023175
Michael W. Hudson54241132001-12-07 15:38:26 +000023176
23177
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000023178for h in `(cd $srcdir;echo Python/thread_*.h)`
23179do
23180 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
23181done
23182
Michael W. Hudson54241132001-12-07 15:38:26 +000023183
Neal Norwitzd24499d2005-12-18 21:36:39 +000023184SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023185{ echo "$as_me:$LINENO: checking for build directories" >&5
23186echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023187for dir in $SRCDIRS; do
23188 if test ! -d $dir; then
23189 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000023190 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023191done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023192{ echo "$as_me:$LINENO: result: done" >&5
23193echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000023194
Guido van Rossum627b2d71993-12-24 10:39:16 +000023195# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000023196ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000023197
Martin v. Löwis11437992002-04-12 09:54:03 +000023198cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023199# This file is a shell script that caches the results of configure
23200# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000023201# scripts and configure runs, see configure's option --config-cache.
23202# It is not useful on other systems. If it contains results you don't
23203# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023204#
Martin v. Löwis11437992002-04-12 09:54:03 +000023205# config.status only pays attention to the cache file if you give it
23206# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023207#
Skip Montanaro6dead952003-09-25 14:50:04 +000023208# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000023209# loading this file, other *unset* `ac_cv_foo' will be assigned the
23210# following values.
23211
23212_ACEOF
23213
Guido van Rossumf78abae1997-01-21 22:02:36 +000023214# The following way of writing the cache mishandles newlines in values,
23215# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023216# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023217# Ultrix sh set writes to stderr and can't be redirected directly,
23218# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023219(
23220 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23221 eval ac_val=\$$ac_var
23222 case $ac_val in #(
23223 *${as_nl}*)
23224 case $ac_var in #(
23225 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23226echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23227 esac
23228 case $ac_var in #(
23229 _ | IFS | as_nl) ;; #(
23230 *) $as_unset $ac_var ;;
23231 esac ;;
23232 esac
23233 done
23234
Martin v. Löwis11437992002-04-12 09:54:03 +000023235 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000023236 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23237 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000023238 # `set' does not quote correctly, so add quotes (double-quote
23239 # substitution turns \\\\ into \\, and sed turns \\ into \).
23240 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023241 "s/'/'\\\\''/g;
23242 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023243 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000023244 *)
23245 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023246 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000023247 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023248 esac |
23249 sort
23250) |
Martin v. Löwis11437992002-04-12 09:54:03 +000023251 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023252 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000023253 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000023254 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000023255 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23256 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000023257 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23258 :end' >>confcache
23259if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23260 if test -w "$cache_file"; then
23261 test "x$cache_file" != "x/dev/null" &&
23262 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23263echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023264 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023265 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023266 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23267echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023268 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023269fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023270rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000023271
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023272test "x$prefix" = xNONE && prefix=$ac_default_prefix
23273# Let make expand exec_prefix.
23274test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000023275
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023276DEFS=-DHAVE_CONFIG_H
23277
Skip Montanaro6dead952003-09-25 14:50:04 +000023278ac_libobjs=
23279ac_ltlibobjs=
23280for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23281 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023282 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23283 ac_i=`echo "$ac_i" | sed "$ac_script"`
23284 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23285 # will be set to the directory where LIBOBJS objects are built.
23286 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23287 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000023288done
23289LIBOBJS=$ac_libobjs
23290
23291LTLIBOBJS=$ac_ltlibobjs
23292
23293
Martin v. Löwis11437992002-04-12 09:54:03 +000023294
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023295: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000023296ac_clean_files_save=$ac_clean_files
23297ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23298{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23299echo "$as_me: creating $CONFIG_STATUS" >&6;}
23300cat >$CONFIG_STATUS <<_ACEOF
23301#! $SHELL
23302# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023303# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023304# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000023305# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023306
Martin v. Löwis11437992002-04-12 09:54:03 +000023307debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000023308ac_cs_recheck=false
23309ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000023310SHELL=\${CONFIG_SHELL-$SHELL}
23311_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000023312
Martin v. Löwis11437992002-04-12 09:54:03 +000023313cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023314## --------------------- ##
23315## M4sh Initialization. ##
23316## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000023317
Martin v. Löwiseba40652007-08-30 20:10:57 +000023318# Be more Bourne compatible
23319DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023320if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23321 emulate sh
23322 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000023323 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23324 # is contrary to our usage. Disable this feature.
23325 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023326 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000023327else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023328 case `(set -o) 2>/dev/null` in
23329 *posix*) set -o posix ;;
23330esac
23331
Martin v. Löwis11437992002-04-12 09:54:03 +000023332fi
Michael W. Hudson54241132001-12-07 15:38:26 +000023333
Skip Montanaro6dead952003-09-25 14:50:04 +000023334
Martin v. Löwis11437992002-04-12 09:54:03 +000023335
23336
Martin v. Löwiseba40652007-08-30 20:10:57 +000023337# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000023338# Avoid depending upon Character Ranges.
23339as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23340as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23341as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23342as_cr_digits='0123456789'
23343as_cr_alnum=$as_cr_Letters$as_cr_digits
23344
23345# The user is always right.
23346if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023347 echo "#! /bin/sh" >conf$$.sh
23348 echo "exit 0" >>conf$$.sh
23349 chmod +x conf$$.sh
23350 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023351 PATH_SEPARATOR=';'
23352 else
23353 PATH_SEPARATOR=:
23354 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023355 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023356fi
23357
Martin v. Löwiseba40652007-08-30 20:10:57 +000023358# Support unset when possible.
23359if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23360 as_unset=unset
23361else
23362 as_unset=false
23363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023364
Martin v. Löwiseba40652007-08-30 20:10:57 +000023365
23366# IFS
23367# We need space, tab and new line, in precisely that order. Quoting is
23368# there to prevent editors from complaining about space-tab.
23369# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23370# splitting by setting IFS to empty value.)
23371as_nl='
23372'
23373IFS=" "" $as_nl"
23374
23375# Find who we are. Look in the path if we contain no directory separator.
23376case $0 in
23377 *[\\/]* ) as_myself=$0 ;;
23378 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000023379for as_dir in $PATH
23380do
23381 IFS=$as_save_IFS
23382 test -z "$as_dir" && as_dir=.
23383 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23384done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023385IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000023386
Martin v. Löwiseba40652007-08-30 20:10:57 +000023387 ;;
23388esac
23389# We did not find ourselves, most probably we were run as `sh COMMAND'
23390# in which case we are not to be found in the path.
23391if test "x$as_myself" = x; then
23392 as_myself=$0
23393fi
23394if test ! -f "$as_myself"; then
23395 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
23396 { (exit 1); exit 1; }
23397fi
23398
23399# Work around bugs in pre-3.0 UWIN ksh.
23400for as_var in ENV MAIL MAILPATH
23401do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23402done
23403PS1='$ '
23404PS2='> '
23405PS4='+ '
23406
23407# NLS nuisances.
23408for as_var in \
23409 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23410 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23411 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000023412do
Martin v. Löwiseba40652007-08-30 20:10:57 +000023413 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23414 eval $as_var=C; export $as_var
23415 else
23416 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23417 fi
23418done
23419
23420# Required to use basename.
23421if expr a : '\(a\)' >/dev/null 2>&1 &&
23422 test "X`expr 00001 : '.*\(...\)'`" = X001; then
23423 as_expr=expr
23424else
23425 as_expr=false
23426fi
23427
23428if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
23429 as_basename=basename
23430else
23431 as_basename=false
23432fi
23433
23434
23435# Name of the executable.
23436as_me=`$as_basename -- "$0" ||
23437$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23438 X"$0" : 'X\(//\)$' \| \
23439 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
23440echo X/"$0" |
23441 sed '/^.*\/\([^/][^/]*\)\/*$/{
23442 s//\1/
23443 q
23444 }
23445 /^X\/\(\/\/\)$/{
23446 s//\1/
23447 q
23448 }
23449 /^X\/\(\/\).*/{
23450 s//\1/
23451 q
23452 }
23453 s/.*/./; q'`
23454
23455# CDPATH.
23456$as_unset CDPATH
23457
23458
23459
Martin v. Löwis11437992002-04-12 09:54:03 +000023460 as_lineno_1=$LINENO
23461 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000023462 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000023463 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000023464
Martin v. Löwis11437992002-04-12 09:54:03 +000023465 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23466 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000023467 # line-number line after each line using $LINENO; the second 'sed'
23468 # does the real work. The second script uses 'N' to pair each
23469 # line-number line with the line containing $LINENO, and appends
23470 # trailing '-' during substitution so that $LINENO is not a special
23471 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000023472 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000023473 # scripts with optimization help from Paolo Bonzini. Blame Lee
23474 # E. McMahon (1931-1989) for sed's syntax. :-)
23475 sed -n '
23476 p
23477 /[$]LINENO/=
23478 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000023479 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023480 s/[$]LINENO.*/&-/
23481 t lineno
23482 b
23483 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000023484 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000023485 :loop
23486 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000023487 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000023488 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000023489 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000023490 chmod +x "$as_me.lineno" ||
23491 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023492 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023493
Martin v. Löwis11437992002-04-12 09:54:03 +000023494 # Don't try to exec as it changes $[0], causing all sort of problems
23495 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000023496 # original and so on. Autoconf is especially sensitive to this).
23497 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000023498 # Exit status is that of the last command.
23499 exit
23500}
23501
23502
Martin v. Löwiseba40652007-08-30 20:10:57 +000023503if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
23504 as_dirname=dirname
23505else
23506 as_dirname=false
23507fi
23508
23509ECHO_C= ECHO_N= ECHO_T=
23510case `echo -n x` in
23511-n*)
23512 case `echo 'x\c'` in
23513 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
23514 *) ECHO_C='\c';;
23515 esac;;
23516*)
23517 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000023518esac
23519
Martin v. Löwiseba40652007-08-30 20:10:57 +000023520if expr a : '\(a\)' >/dev/null 2>&1 &&
23521 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023522 as_expr=expr
23523else
23524 as_expr=false
23525fi
23526
23527rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000023528if test -d conf$$.dir; then
23529 rm -f conf$$.dir/conf$$.file
23530else
23531 rm -f conf$$.dir
23532 mkdir conf$$.dir
23533fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023534echo >conf$$.file
23535if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023536 as_ln_s='ln -s'
23537 # ... but there are two gotchas:
23538 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23539 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23540 # In both cases, we have to default to `cp -p'.
23541 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000023542 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000023543elif ln conf$$.file conf$$ 2>/dev/null; then
23544 as_ln_s=ln
23545else
23546 as_ln_s='cp -p'
23547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023548rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23549rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000023550
Skip Montanaro6dead952003-09-25 14:50:04 +000023551if mkdir -p . 2>/dev/null; then
23552 as_mkdir_p=:
23553else
Skip Montanarof0d5f792004-08-15 14:08:23 +000023554 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000023555 as_mkdir_p=false
23556fi
23557
Martin v. Löwiseba40652007-08-30 20:10:57 +000023558if test -x / >/dev/null 2>&1; then
23559 as_test_x='test -x'
23560else
23561 if ls -dL / >/dev/null 2>&1; then
23562 as_ls_L_option=L
23563 else
23564 as_ls_L_option=
23565 fi
23566 as_test_x='
23567 eval sh -c '\''
23568 if test -d "$1"; then
23569 test -d "$1/.";
23570 else
23571 case $1 in
23572 -*)set "./$1";;
23573 esac;
23574 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
23575 ???[sx]*):;;*)false;;esac;fi
23576 '\'' sh
23577 '
23578fi
23579as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000023580
23581# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000023582as_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 +000023583
23584# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000023585as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000023586
23587
Martin v. Löwis11437992002-04-12 09:54:03 +000023588exec 6>&1
23589
Martin v. Löwiseba40652007-08-30 20:10:57 +000023590# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000023591# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000023592# values after options handling.
23593ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000023594This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000023595generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000023596
23597 CONFIG_FILES = $CONFIG_FILES
23598 CONFIG_HEADERS = $CONFIG_HEADERS
23599 CONFIG_LINKS = $CONFIG_LINKS
23600 CONFIG_COMMANDS = $CONFIG_COMMANDS
23601 $ $0 $@
23602
Martin v. Löwiseba40652007-08-30 20:10:57 +000023603on `(hostname || uname -n) 2>/dev/null | sed 1q`
23604"
23605
Martin v. Löwis11437992002-04-12 09:54:03 +000023606_ACEOF
23607
Martin v. Löwiseba40652007-08-30 20:10:57 +000023608cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023609# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023610config_files="$ac_config_files"
23611config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000023612
Martin v. Löwiseba40652007-08-30 20:10:57 +000023613_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023614
23615cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023616ac_cs_usage="\
23617\`$as_me' instantiates files from templates according to the
23618current configuration.
23619
23620Usage: $0 [OPTIONS] [FILE]...
23621
23622 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000023623 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000023624 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000023625 -d, --debug don't remove temporary files
23626 --recheck update $as_me by reconfiguring in the same conditions
23627 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000023628 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000023629 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000023630 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000023631
23632Configuration files:
23633$config_files
23634
23635Configuration headers:
23636$config_headers
23637
23638Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000023639
Martin v. Löwiseba40652007-08-30 20:10:57 +000023640_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023641cat >>$CONFIG_STATUS <<_ACEOF
23642ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000023643python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000023644configured by $0, generated by GNU Autoconf 2.61,
23645 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000023646
Martin v. Löwiseba40652007-08-30 20:10:57 +000023647Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000023648This config.status script is free software; the Free Software Foundation
23649gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000023650
23651ac_pwd='$ac_pwd'
23652srcdir='$srcdir'
23653INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000023654_ACEOF
23655
23656cat >>$CONFIG_STATUS <<\_ACEOF
23657# If no file are specified by the user, then we need to provide default
23658# value. By we need to know if files were specified by the user.
23659ac_need_defaults=:
23660while test $# != 0
23661do
23662 case $1 in
23663 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000023664 ac_option=`expr "X$1" : 'X\([^=]*\)='`
23665 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000023666 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000023667 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023668 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023669 ac_option=$1
23670 ac_optarg=$2
23671 ac_shift=shift
23672 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023673 esac
23674
Skip Montanaro6dead952003-09-25 14:50:04 +000023675 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000023676 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000023677 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23678 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023679 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
23680 echo "$ac_cs_version"; exit ;;
23681 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000023682 debug=: ;;
23683 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000023684 $ac_shift
23685 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023686 ac_need_defaults=false;;
23687 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000023688 $ac_shift
23689 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023690 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023691 --he | --h)
23692 # Conflict between --help and --header
23693 { echo "$as_me: error: ambiguous option: $1
23694Try \`$0 --help' for more information." >&2
23695 { (exit 1); exit 1; }; };;
23696 --help | --hel | -h )
23697 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000023698 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23699 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23700 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023701
23702 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023703 -*) { echo "$as_me: error: unrecognized option: $1
23704Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023705 { (exit 1); exit 1; }; } ;;
23706
Martin v. Löwiseba40652007-08-30 20:10:57 +000023707 *) ac_config_targets="$ac_config_targets $1"
23708 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023709
23710 esac
23711 shift
23712done
23713
Skip Montanaro6dead952003-09-25 14:50:04 +000023714ac_configure_extra_args=
23715
23716if $ac_cs_silent; then
23717 exec 6>/dev/null
23718 ac_configure_extra_args="$ac_configure_extra_args --silent"
23719fi
23720
23721_ACEOF
23722cat >>$CONFIG_STATUS <<_ACEOF
23723if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023724 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23725 CONFIG_SHELL=$SHELL
23726 export CONFIG_SHELL
23727 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000023728fi
23729
Martin v. Löwis11437992002-04-12 09:54:03 +000023730_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023731cat >>$CONFIG_STATUS <<\_ACEOF
23732exec 5>>config.log
23733{
23734 echo
23735 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23736## Running $as_me. ##
23737_ASBOX
23738 echo "$ac_log"
23739} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023740
Martin v. Löwiseba40652007-08-30 20:10:57 +000023741_ACEOF
23742cat >>$CONFIG_STATUS <<_ACEOF
23743_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023744
23745cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023746
23747# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000023748for ac_config_target in $ac_config_targets
23749do
Martin v. Löwiseba40652007-08-30 20:10:57 +000023750 case $ac_config_target in
23751 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
23752 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
23753 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
23754 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
23755 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
23756 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
23757
Martin v. Löwis11437992002-04-12 09:54:03 +000023758 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23759echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23760 { (exit 1); exit 1; }; };;
23761 esac
23762done
23763
Martin v. Löwiseba40652007-08-30 20:10:57 +000023764
Martin v. Löwis11437992002-04-12 09:54:03 +000023765# If the user did not use the arguments to specify the items to instantiate,
23766# then the envvar interface is used. Set only those that are not.
23767# We use the long form for the default assignment because of an extremely
23768# bizarre bug on SunOS 4.1.3.
23769if $ac_need_defaults; then
23770 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23771 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23772fi
23773
Skip Montanaro6dead952003-09-25 14:50:04 +000023774# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000023775# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000023776# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023777# Hook for its removal unless debugging.
23778# Note that there is a small window in which the directory will not be cleaned:
23779# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000023780$debug ||
23781{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023782 tmp=
23783 trap 'exit_status=$?
23784 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
23785' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000023786 trap '{ (exit 1); exit 1; }' 1 2 13 15
23787}
Martin v. Löwis11437992002-04-12 09:54:03 +000023788# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000023789
Martin v. Löwis11437992002-04-12 09:54:03 +000023790{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023791 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000023792 test -n "$tmp" && test -d "$tmp"
23793} ||
23794{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023795 tmp=./conf$$-$RANDOM
23796 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000023797} ||
23798{
Skip Montanaro6dead952003-09-25 14:50:04 +000023799 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023800 { (exit 1); exit 1; }
23801}
23802
Martin v. Löwis11437992002-04-12 09:54:03 +000023803#
Martin v. Löwiseba40652007-08-30 20:10:57 +000023804# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000023805#
23806
23807# No need to generate the scripts if there are no CONFIG_FILES.
23808# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000023809if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023810
23811_ACEOF
23812
Martin v. Löwiseba40652007-08-30 20:10:57 +000023813
23814
23815ac_delim='%!_!# '
23816for ac_last_try in false false false false false :; do
23817 cat >conf$$subs.sed <<_ACEOF
23818SHELL!$SHELL$ac_delim
23819PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
23820PACKAGE_NAME!$PACKAGE_NAME$ac_delim
23821PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
23822PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
23823PACKAGE_STRING!$PACKAGE_STRING$ac_delim
23824PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
23825exec_prefix!$exec_prefix$ac_delim
23826prefix!$prefix$ac_delim
23827program_transform_name!$program_transform_name$ac_delim
23828bindir!$bindir$ac_delim
23829sbindir!$sbindir$ac_delim
23830libexecdir!$libexecdir$ac_delim
23831datarootdir!$datarootdir$ac_delim
23832datadir!$datadir$ac_delim
23833sysconfdir!$sysconfdir$ac_delim
23834sharedstatedir!$sharedstatedir$ac_delim
23835localstatedir!$localstatedir$ac_delim
23836includedir!$includedir$ac_delim
23837oldincludedir!$oldincludedir$ac_delim
23838docdir!$docdir$ac_delim
23839infodir!$infodir$ac_delim
23840htmldir!$htmldir$ac_delim
23841dvidir!$dvidir$ac_delim
23842pdfdir!$pdfdir$ac_delim
23843psdir!$psdir$ac_delim
23844libdir!$libdir$ac_delim
23845localedir!$localedir$ac_delim
23846mandir!$mandir$ac_delim
23847DEFS!$DEFS$ac_delim
23848ECHO_C!$ECHO_C$ac_delim
23849ECHO_N!$ECHO_N$ac_delim
23850ECHO_T!$ECHO_T$ac_delim
23851LIBS!$LIBS$ac_delim
23852build_alias!$build_alias$ac_delim
23853host_alias!$host_alias$ac_delim
23854target_alias!$target_alias$ac_delim
23855VERSION!$VERSION$ac_delim
23856SOVERSION!$SOVERSION$ac_delim
23857CONFIG_ARGS!$CONFIG_ARGS$ac_delim
23858UNIVERSALSDK!$UNIVERSALSDK$ac_delim
23859PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
23860PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
23861PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
23862PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
23863FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
23864FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
23865FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
23866FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
23867FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
23868MACHDEP!$MACHDEP$ac_delim
23869SGI_ABI!$SGI_ABI$ac_delim
23870EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
23871EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
23872CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
23873EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
23874CC!$CC$ac_delim
23875CFLAGS!$CFLAGS$ac_delim
23876LDFLAGS!$LDFLAGS$ac_delim
23877CPPFLAGS!$CPPFLAGS$ac_delim
23878ac_ct_CC!$ac_ct_CC$ac_delim
23879EXEEXT!$EXEEXT$ac_delim
23880OBJEXT!$OBJEXT$ac_delim
23881CXX!$CXX$ac_delim
23882MAINCC!$MAINCC$ac_delim
23883CPP!$CPP$ac_delim
23884GREP!$GREP$ac_delim
23885EGREP!$EGREP$ac_delim
23886BUILDEXEEXT!$BUILDEXEEXT$ac_delim
23887LIBRARY!$LIBRARY$ac_delim
23888LDLIBRARY!$LDLIBRARY$ac_delim
23889DLLLIBRARY!$DLLLIBRARY$ac_delim
23890BLDLIBRARY!$BLDLIBRARY$ac_delim
23891LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
23892INSTSONAME!$INSTSONAME$ac_delim
23893RUNSHARED!$RUNSHARED$ac_delim
23894LINKCC!$LINKCC$ac_delim
23895RANLIB!$RANLIB$ac_delim
23896AR!$AR$ac_delim
23897SVNVERSION!$SVNVERSION$ac_delim
23898INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
23899INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
23900INSTALL_DATA!$INSTALL_DATA$ac_delim
23901LN!$LN$ac_delim
23902OPT!$OPT$ac_delim
23903BASECFLAGS!$BASECFLAGS$ac_delim
23904OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
23905LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
23906SO!$SO$ac_delim
23907LDSHARED!$LDSHARED$ac_delim
23908BLDSHARED!$BLDSHARED$ac_delim
23909CCSHARED!$CCSHARED$ac_delim
23910LINKFORSHARED!$LINKFORSHARED$ac_delim
23911CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
23912SHLIBS!$SHLIBS$ac_delim
23913USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
23914SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
23915_ACEOF
23916
23917 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
23918 break
23919 elif $ac_last_try; then
23920 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
23921echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
23922 { (exit 1); exit 1; }; }
23923 else
23924 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000023925 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023926done
23927
23928ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
23929if test -n "$ac_eof"; then
23930 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
23931 ac_eof=`expr $ac_eof + 1`
23932fi
23933
23934cat >>$CONFIG_STATUS <<_ACEOF
23935cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
23936/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23937_ACEOF
23938sed '
23939s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
23940s/^/s,@/; s/!/@,|#_!!_#|/
23941:n
23942t n
23943s/'"$ac_delim"'$/,g/; t
23944s/$/\\/; p
23945N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
23946' >>$CONFIG_STATUS <conf$$subs.sed
23947rm -f conf$$subs.sed
23948cat >>$CONFIG_STATUS <<_ACEOF
23949CEOF$ac_eof
23950_ACEOF
23951
23952
23953ac_delim='%!_!# '
23954for ac_last_try in false false false false false :; do
23955 cat >conf$$subs.sed <<_ACEOF
23956USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
23957LDLAST!$LDLAST$ac_delim
23958THREADOBJ!$THREADOBJ$ac_delim
23959DLINCLDIR!$DLINCLDIR$ac_delim
23960DYNLOADFILE!$DYNLOADFILE$ac_delim
23961MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
23962TRUE!$TRUE$ac_delim
23963LIBOBJS!$LIBOBJS$ac_delim
23964HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
23965HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
23966HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
23967HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
23968HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
23969LIBM!$LIBM$ac_delim
23970LIBC!$LIBC$ac_delim
23971UNICODE_OBJS!$UNICODE_OBJS$ac_delim
23972THREADHEADERS!$THREADHEADERS$ac_delim
23973SRCDIRS!$SRCDIRS$ac_delim
23974LTLIBOBJS!$LTLIBOBJS$ac_delim
23975_ACEOF
23976
23977 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
23978 break
23979 elif $ac_last_try; then
23980 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
23981echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
23982 { (exit 1); exit 1; }; }
23983 else
23984 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23985 fi
23986done
23987
23988ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
23989if test -n "$ac_eof"; then
23990 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
23991 ac_eof=`expr $ac_eof + 1`
23992fi
23993
23994cat >>$CONFIG_STATUS <<_ACEOF
23995cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
23996/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
23997_ACEOF
23998sed '
23999s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24000s/^/s,@/; s/!/@,|#_!!_#|/
24001:n
24002t n
24003s/'"$ac_delim"'$/,g/; t
24004s/$/\\/; p
24005N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24006' >>$CONFIG_STATUS <conf$$subs.sed
24007rm -f conf$$subs.sed
24008cat >>$CONFIG_STATUS <<_ACEOF
24009:end
24010s/|#_!!_#|//g
24011CEOF$ac_eof
24012_ACEOF
24013
24014
24015# VPATH may cause trouble with some makes, so we remove $(srcdir),
24016# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24017# trailing colons and then remove the whole line if VPATH becomes empty
24018# (actually we leave an empty line to preserve line numbers).
24019if test "x$srcdir" = x.; then
24020 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24021s/:*\$(srcdir):*/:/
24022s/:*\${srcdir}:*/:/
24023s/:*@srcdir@:*/:/
24024s/^\([^=]*=[ ]*\):*/\1/
24025s/:*$//
24026s/^[^=]*=[ ]*$//
24027}'
24028fi
24029
24030cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024031fi # test -n "$CONFIG_FILES"
24032
Martin v. Löwiseba40652007-08-30 20:10:57 +000024033
24034for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24035do
24036 case $ac_tag in
24037 :[FHLC]) ac_mode=$ac_tag; continue;;
24038 esac
24039 case $ac_mode$ac_tag in
24040 :[FHL]*:*);;
24041 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24042echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24043 { (exit 1); exit 1; }; };;
24044 :[FH]-) ac_tag=-:-;;
24045 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24046 esac
24047 ac_save_IFS=$IFS
24048 IFS=:
24049 set x $ac_tag
24050 IFS=$ac_save_IFS
24051 shift
24052 ac_file=$1
24053 shift
24054
24055 case $ac_mode in
24056 :L) ac_source=$1;;
24057 :[FH])
24058 ac_file_inputs=
24059 for ac_f
24060 do
24061 case $ac_f in
24062 -) ac_f="$tmp/stdin";;
24063 *) # Look for the file first in the build tree, then in the source tree
24064 # (if the path is not absolute). The absolute path cannot be DOS-style,
24065 # because $ac_f cannot contain `:'.
24066 test -f "$ac_f" ||
24067 case $ac_f in
24068 [\\/$]*) false;;
24069 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24070 esac ||
24071 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24072echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24073 { (exit 1); exit 1; }; };;
24074 esac
24075 ac_file_inputs="$ac_file_inputs $ac_f"
24076 done
24077
24078 # Let's still pretend it is `configure' which instantiates (i.e., don't
24079 # use $as_me), people would be surprised to read:
24080 # /* config.h. Generated by config.status. */
24081 configure_input="Generated from "`IFS=:
24082 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24083 if test x"$ac_file" != x-; then
24084 configure_input="$ac_file. $configure_input"
24085 { echo "$as_me:$LINENO: creating $ac_file" >&5
24086echo "$as_me: creating $ac_file" >&6;}
24087 fi
24088
24089 case $ac_tag in
24090 *:-:* | *:-) cat >"$tmp/stdin";;
24091 esac
24092 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024093 esac
24094
Martin v. Löwiseba40652007-08-30 20:10:57 +000024095 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024096$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024097 X"$ac_file" : 'X\(//\)[^/]' \| \
24098 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024099 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024100echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024101 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24102 s//\1/
24103 q
24104 }
24105 /^X\(\/\/\)[^/].*/{
24106 s//\1/
24107 q
24108 }
24109 /^X\(\/\/\)$/{
24110 s//\1/
24111 q
24112 }
24113 /^X\(\/\).*/{
24114 s//\1/
24115 q
24116 }
24117 s/.*/./; q'`
24118 { as_dir="$ac_dir"
24119 case $as_dir in #(
24120 -*) as_dir=./$as_dir;;
24121 esac
24122 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024123 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024124 while :; do
24125 case $as_dir in #(
24126 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24127 *) as_qdir=$as_dir;;
24128 esac
24129 as_dirs="'$as_qdir' $as_dirs"
24130 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024131$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024132 X"$as_dir" : 'X\(//\)[^/]' \| \
24133 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024134 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024135echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024136 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24137 s//\1/
24138 q
24139 }
24140 /^X\(\/\/\)[^/].*/{
24141 s//\1/
24142 q
24143 }
24144 /^X\(\/\/\)$/{
24145 s//\1/
24146 q
24147 }
24148 /^X\(\/\).*/{
24149 s//\1/
24150 q
24151 }
24152 s/.*/./; q'`
24153 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000024154 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024155 test -z "$as_dirs" || eval "mkdir $as_dirs"
24156 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24157echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000024158 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024159 ac_builddir=.
24160
Martin v. Löwiseba40652007-08-30 20:10:57 +000024161case "$ac_dir" in
24162.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24163*)
Martin v. Löwis11437992002-04-12 09:54:03 +000024164 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000024165 # A ".." for each directory in $ac_dir_suffix.
24166 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24167 case $ac_top_builddir_sub in
24168 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24169 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24170 esac ;;
24171esac
24172ac_abs_top_builddir=$ac_pwd
24173ac_abs_builddir=$ac_pwd$ac_dir_suffix
24174# for backward compatibility:
24175ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000024176
24177case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024178 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000024179 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024180 ac_top_srcdir=$ac_top_builddir_sub
24181 ac_abs_top_srcdir=$ac_pwd ;;
24182 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000024183 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024184 ac_top_srcdir=$srcdir
24185 ac_abs_top_srcdir=$srcdir ;;
24186 *) # Relative name.
24187 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24188 ac_top_srcdir=$ac_top_build_prefix$srcdir
24189 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024190esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024191ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000024192
Martin v. Löwis11437992002-04-12 09:54:03 +000024193
Martin v. Löwiseba40652007-08-30 20:10:57 +000024194 case $ac_mode in
24195 :F)
24196 #
24197 # CONFIG_FILE
24198 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024199
24200 case $INSTALL in
24201 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024202 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024203 esac
Brett Cannon19fab762007-06-02 03:02:29 +000024204_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024205
24206cat >>$CONFIG_STATUS <<\_ACEOF
24207# If the template does not know about datarootdir, expand it.
24208# FIXME: This hack should be removed a few years after 2.60.
24209ac_datarootdir_hack=; ac_datarootdir_seen=
24210
24211case `sed -n '/datarootdir/ {
24212 p
24213 q
24214}
24215/@datadir@/p
24216/@docdir@/p
24217/@infodir@/p
24218/@localedir@/p
24219/@mandir@/p
24220' $ac_file_inputs` in
24221*datarootdir*) ac_datarootdir_seen=yes;;
24222*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24223 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24224echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24225_ACEOF
24226cat >>$CONFIG_STATUS <<_ACEOF
24227 ac_datarootdir_hack='
24228 s&@datadir@&$datadir&g
24229 s&@docdir@&$docdir&g
24230 s&@infodir@&$infodir&g
24231 s&@localedir@&$localedir&g
24232 s&@mandir@&$mandir&g
24233 s&\\\${datarootdir}&$datarootdir&g' ;;
24234esac
24235_ACEOF
24236
24237# Neutralize VPATH when `$srcdir' = `.'.
24238# Shell code in configure.ac might set extrasub.
24239# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000024240cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024241 sed "$ac_vpsub
24242$extrasub
24243_ACEOF
24244cat >>$CONFIG_STATUS <<\_ACEOF
24245:t
24246/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000024247s&@configure_input@&$configure_input&;t t
24248s&@top_builddir@&$ac_top_builddir_sub&;t t
24249s&@srcdir@&$ac_srcdir&;t t
24250s&@abs_srcdir@&$ac_abs_srcdir&;t t
24251s&@top_srcdir@&$ac_top_srcdir&;t t
24252s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24253s&@builddir@&$ac_builddir&;t t
24254s&@abs_builddir@&$ac_abs_builddir&;t t
24255s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24256s&@INSTALL@&$ac_INSTALL&;t t
24257$ac_datarootdir_hack
24258" $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 +000024259
Martin v. Löwiseba40652007-08-30 20:10:57 +000024260test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24261 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24262 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24263 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24264which seems to be undefined. Please make sure it is defined." >&5
24265echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24266which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024267
Martin v. Löwiseba40652007-08-30 20:10:57 +000024268 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000024269 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024270 -) cat "$tmp/out"; rm -f "$tmp/out";;
24271 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024272 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024273 ;;
24274 :H)
24275 #
24276 # CONFIG_HEADER
24277 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024278_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024279
Martin v. Löwiseba40652007-08-30 20:10:57 +000024280# Transform confdefs.h into a sed script `conftest.defines', that
24281# substitutes the proper values into config.h.in to produce config.h.
24282rm -f conftest.defines conftest.tail
24283# First, append a space to every undef/define line, to ease matching.
24284echo 's/$/ /' >conftest.defines
24285# Then, protect against being on the right side of a sed subst, or in
24286# an unquoted here document, in config.status. If some macros were
24287# called several times there might be several #defines for the same
24288# symbol, which is useless. But do not sort them, since the last
24289# AC_DEFINE must be honored.
24290ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24291# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24292# NAME is the cpp macro being defined, VALUE is the value it is being given.
24293# PARAMS is the parameter list in the macro definition--in most cases, it's
24294# just an empty string.
24295ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24296ac_dB='\\)[ (].*,\\1define\\2'
24297ac_dC=' '
24298ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024299
Martin v. Löwiseba40652007-08-30 20:10:57 +000024300uniq confdefs.h |
24301 sed -n '
24302 t rset
24303 :rset
24304 s/^[ ]*#[ ]*define[ ][ ]*//
24305 t ok
24306 d
24307 :ok
24308 s/[\\&,]/\\&/g
24309 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24310 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
24311 ' >>conftest.defines
24312
24313# Remove the space that was appended to ease matching.
24314# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024315# example, in the case of _POSIX_SOURCE, which is predefined and required
24316# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024317# (The regexp can be short, since the line contains either #define or #undef.)
24318echo 's/ $//
24319s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000024320
Martin v. Löwiseba40652007-08-30 20:10:57 +000024321# Break up conftest.defines:
24322ac_max_sed_lines=50
24323
24324# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24325# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24326# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24327# et cetera.
24328ac_in='$ac_file_inputs'
24329ac_out='"$tmp/out1"'
24330ac_nxt='"$tmp/out2"'
24331
24332while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000024333do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024334 # Write a here document:
24335 cat >>$CONFIG_STATUS <<_ACEOF
24336 # First, check the format of the line:
24337 cat >"\$tmp/defines.sed" <<\\CEOF
24338/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
24339/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
24340b
24341:def
24342_ACEOF
24343 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000024344 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024345 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
24346 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
24347 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
24348 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000024349 rm -f conftest.defines
24350 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000024351done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024352rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000024353
Martin v. Löwiseba40652007-08-30 20:10:57 +000024354echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000024355cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024356 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024357 echo "/* $configure_input */" >"$tmp/config.h"
24358 cat "$ac_result" >>"$tmp/config.h"
24359 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024360 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24361echo "$as_me: $ac_file is unchanged" >&6;}
24362 else
Martin v. Löwis11437992002-04-12 09:54:03 +000024363 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024364 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000024365 fi
24366 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024367 echo "/* $configure_input */"
24368 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000024369 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024370 rm -f "$tmp/out12"
24371 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000024372
Martin v. Löwiseba40652007-08-30 20:10:57 +000024373
24374 esac
24375
24376done # for ac_tag
24377
Guido van Rossum627b2d71993-12-24 10:39:16 +000024378
Martin v. Löwis11437992002-04-12 09:54:03 +000024379{ (exit 0); exit 0; }
24380_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024381chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000024382ac_clean_files=$ac_clean_files_save
24383
24384
24385# configure is writing to config.log, and then calls config.status.
24386# config.status does its own redirection, appending to config.log.
24387# Unfortunately, on DOS this fails, as config.log is still kept open
24388# by configure, so config.status won't be able to write to it; its
24389# output is simply discarded. So we exec the FD to /dev/null,
24390# effectively closing config.log, so it can be properly (re)opened and
24391# appended to by config.status. When coming back to configure, we
24392# need to make the FD available again.
24393if test "$no_create" != yes; then
24394 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024395 ac_config_status_args=
24396 test "$silent" = yes &&
24397 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000024398 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000024399 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024400 exec 5>>config.log
24401 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24402 # would make configure fail if this is the last instruction.
24403 $ac_cs_success || { (exit 1); exit 1; }
24404fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000024405
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024406
Martin v. Löwisf7afe952006-04-14 15:16:15 +000024407echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024408if test ! -f Modules/Setup
24409then
24410 cp $srcdir/Modules/Setup.dist Modules/Setup
24411fi
24412
Martin v. Löwisf7afe952006-04-14 15:16:15 +000024413echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024414if test ! -f Modules/Setup.local
24415then
24416 echo "# Edit this file for local setup changes" >Modules/Setup.local
24417fi
24418
24419echo "creating Makefile"
24420$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
24421 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000024422 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000024423
24424case $ac_sys_system in
24425BeOS)
24426 { echo "$as_me:$LINENO: WARNING:
24427
24428 Support for BeOS is deprecated as of Python 2.6.
24429 See PEP 11 for the gory details.
24430 " >&5
24431echo "$as_me: WARNING:
24432
24433 Support for BeOS is deprecated as of Python 2.6.
24434 See PEP 11 for the gory details.
24435 " >&2;}
24436 ;;
24437*) ;;
24438esac
24439
Neil Schemenauerc761fc82001-02-19 04:50:49 +000024440mv config.c Modules