blob: 225720245496de74e7e269842ed2a23bfabca70d [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinsond19e1432009-12-31 21:17:29 +00002# From configure.in Revision: 76404 .
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
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +0000660ARCH_RUN_32BIT
Martin v. Löwiseba40652007-08-30 20:10:57 +0000661PYTHONFRAMEWORK
Ronald Oussoren580c7fe2008-05-02 19:45:11 +0000662PYTHONFRAMEWORKIDENTIFIER
Martin v. Löwiseba40652007-08-30 20:10:57 +0000663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698RANLIB
699AR
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
Ronald Oussoren5640ce22008-06-05 12:58:24 +0000707UNIVERSAL_ARCH_FLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +0000708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734UNICODE_OBJS
735THREADHEADERS
736SRCDIRS
737LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000739 ac_precious_vars='build_alias
740host_alias
741target_alias
742CC
743CFLAGS
744LDFLAGS
745LIBS
746CPPFLAGS
747CPP'
748
Guido van Rossum627b2d71993-12-24 10:39:16 +0000749
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000751ac_init_help=
752ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# The variables have the same names as the options, with
754# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000755cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000757no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758no_recursion=
759prefix=NONE
760program_prefix=NONE
761program_suffix=NONE
762program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767x_includes=NONE
768x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000769
770# Installation directory options.
771# These are left unexpanded so users can "make install exec_prefix=/foo"
772# and all the variables that are supposed to be based on exec_prefix
773# by default will actually change.
774# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000775# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000776bindir='${exec_prefix}/bin'
777sbindir='${exec_prefix}/sbin'
778libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000779datarootdir='${prefix}/share'
780datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781sysconfdir='${prefix}/etc'
782sharedstatedir='${prefix}/com'
783localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784includedir='${prefix}/include'
785oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000786docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
787infodir='${datarootdir}/info'
788htmldir='${docdir}'
789dvidir='${docdir}'
790pdfdir='${docdir}'
791psdir='${docdir}'
792libdir='${exec_prefix}/lib'
793localedir='${datarootdir}/locale'
794mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000797ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 # If the previous option needs an argument, assign it.
801 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000802 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 ac_prev=
804 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806
Martin v. Löwiseba40652007-08-30 20:10:57 +0000807 case $ac_option in
808 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
809 *) ac_optarg=yes ;;
810 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812 # Accept the important Cygnus configure options, so we can diagnose typos.
813
Martin v. Löwiseba40652007-08-30 20:10:57 +0000814 case $ac_dashdash$ac_option in
815 --)
816 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818 -bindir | --bindir | --bindi | --bind | --bin | --bi)
819 ac_prev=bindir ;;
820 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822
823 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828 -cache-file | --cache-file | --cache-fil | --cache-fi \
829 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
830 ac_prev=cache_file ;;
831 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
832 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000833 cache_file=$ac_optarg ;;
834
835 --config-cache | -C)
836 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
844 | --dataroo | --dataro | --datar)
845 ac_prev=datarootdir ;;
846 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
847 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
848 datarootdir=$ac_optarg ;;
849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
855 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000856 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
857 eval enable_$ac_feature=no ;;
858
859 -docdir | --docdir | --docdi | --doc | --do)
860 ac_prev=docdir ;;
861 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
862 docdir=$ac_optarg ;;
863
864 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
865 ac_prev=dvidir ;;
866 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
867 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
869 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
874 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
876 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
879 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
880 | --exec | --exe | --ex)
881 ac_prev=exec_prefix ;;
882 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
883 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
884 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
887 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Obsolete; use --with-gas.
889 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 -help | --help | --hel | --he | -h)
892 ac_init_help=long ;;
893 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
894 ac_init_help=recursive ;;
895 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
896 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
898 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Martin v. Löwiseba40652007-08-30 20:10:57 +0000903 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
904 ac_prev=htmldir ;;
905 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
906 | --ht=*)
907 htmldir=$ac_optarg ;;
908
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -includedir | --includedir | --includedi | --included | --include \
910 | --includ | --inclu | --incl | --inc)
911 ac_prev=includedir ;;
912 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
913 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
916 -infodir | --infodir | --infodi | --infod | --info | --inf)
917 ac_prev=infodir ;;
918 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
921 -libdir | --libdir | --libdi | --libd)
922 ac_prev=libdir ;;
923 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
927 | --libexe | --libex | --libe)
928 ac_prev=libexecdir ;;
929 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
930 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
Martin v. Löwiseba40652007-08-30 20:10:57 +0000933 -localedir | --localedir | --localedi | --localed | --locale)
934 ac_prev=localedir ;;
935 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
936 localedir=$ac_optarg ;;
937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 ac_prev=localstatedir ;;
941 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
945 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
946 ac_prev=mandir ;;
947 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Obsolete; use --without-fp.
952 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 no_create=yes ;;
957
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
960 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
963 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
964 | --oldin | --oldi | --old | --ol | --o)
965 ac_prev=oldincludedir ;;
966 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
967 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
968 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
972 ac_prev=prefix ;;
973 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -program-prefix | --program-prefix | --program-prefi | --program-pref \
977 | --program-pre | --program-pr | --program-p)
978 ac_prev=program_prefix ;;
979 -program-prefix=* | --program-prefix=* | --program-prefi=* \
980 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -program-suffix | --program-suffix | --program-suffi | --program-suff \
984 | --program-suf | --program-su | --program-s)
985 ac_prev=program_suffix ;;
986 -program-suffix=* | --program-suffix=* | --program-suffi=* \
987 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -program-transform-name | --program-transform-name \
991 | --program-transform-nam | --program-transform-na \
992 | --program-transform-n | --program-transform- \
993 | --program-transform | --program-transfor \
994 | --program-transfo | --program-transf \
995 | --program-trans | --program-tran \
996 | --progr-tra | --program-tr | --program-t)
997 ac_prev=program_transform_name ;;
998 -program-transform-name=* | --program-transform-name=* \
999 | --program-transform-nam=* | --program-transform-na=* \
1000 | --program-transform-n=* | --program-transform-=* \
1001 | --program-transform=* | --program-transfor=* \
1002 | --program-transfo=* | --program-transf=* \
1003 | --program-trans=* | --program-tran=* \
1004 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Martin v. Löwiseba40652007-08-30 20:10:57 +00001007 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1008 ac_prev=pdfdir ;;
1009 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1010 pdfdir=$ac_optarg ;;
1011
1012 -psdir | --psdir | --psdi | --psd | --ps)
1013 ac_prev=psdir ;;
1014 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1015 psdir=$ac_optarg ;;
1016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1018 | -silent | --silent | --silen | --sile | --sil)
1019 silent=yes ;;
1020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1022 ac_prev=sbindir ;;
1023 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1024 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1028 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1029 | --sharedst | --shareds | --shared | --share | --shar \
1030 | --sha | --sh)
1031 ac_prev=sharedstatedir ;;
1032 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1033 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1034 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1035 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 -site | --site | --sit)
1039 ac_prev=site ;;
1040 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1044 ac_prev=srcdir ;;
1045 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1049 | --syscon | --sysco | --sysc | --sys | --sy)
1050 ac_prev=sysconfdir ;;
1051 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1052 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1061 verbose=yes ;;
1062
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 -version | --version | --versio | --versi | --vers | -V)
1064 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { echo "$as_me: error: invalid package name: $ac_package" >&2
1071 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1073 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { echo "$as_me: error: invalid package name: $ac_package" >&2
1080 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1082 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 --x)
1085 # Obsolete; use --with-x.
1086 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1089 | --x-incl | --x-inc | --x-in | --x-i)
1090 ac_prev=x_includes ;;
1091 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1092 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1096 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1097 ac_prev=x_libraries ;;
1098 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1099 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 -*) { echo "$as_me: error: unrecognized option: $ac_option
1103Try \`$0 --help' for more information." >&2
1104 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 ;;
1106
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 *=*)
1108 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1109 # Reject names that are not valid shell variable names.
1110 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1111 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1112 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001113 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 export $ac_envvar ;;
1115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 # FIXME: should be removed in autoconf 3.0.
1118 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1119 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1120 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1121 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 ;;
1123
1124 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125done
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1129 { echo "$as_me: error: missing argument to $ac_option" >&2
1130 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131fi
1132
Martin v. Löwiseba40652007-08-30 20:10:57 +00001133# Be sure to have absolute directory names.
1134for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1135 datadir sysconfdir sharedstatedir localstatedir includedir \
1136 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1137 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 [\\/$]* | ?:[\\/]* ) continue;;
1142 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001144 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1145 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001146done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001147
Martin v. Löwis11437992002-04-12 09:54:03 +00001148# There might be people who depend on the old broken behavior: `$host'
1149# used to hold the argument of --host etc.
1150# FIXME: To remove some day.
1151build=$build_alias
1152host=$host_alias
1153target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155# FIXME: To remove some day.
1156if test "x$host_alias" != x; then
1157 if test "x$build_alias" = x; then
1158 cross_compiling=maybe
1159 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1160 If a cross compiler is detected then cross compile mode will be used." >&2
1161 elif test "x$build_alias" != "x$host_alias"; then
1162 cross_compiling=yes
1163 fi
1164fi
1165
1166ac_tool_prefix=
1167test -n "$host_alias" && ac_tool_prefix=$host_alias-
1168
1169test "$silent" = yes && exec 6>/dev/null
1170
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171
Martin v. Löwiseba40652007-08-30 20:10:57 +00001172ac_pwd=`pwd` && test -n "$ac_pwd" &&
1173ac_ls_di=`ls -di .` &&
1174ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1175 { echo "$as_me: error: Working directory cannot be determined" >&2
1176 { (exit 1); exit 1; }; }
1177test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1178 { echo "$as_me: error: pwd does not report name of working directory" >&2
1179 { (exit 1); exit 1; }; }
1180
1181
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182# Find the source files, if location was not specified.
1183if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001185 # Try the directory containing this script, then the parent directory.
1186 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001187$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001188 X"$0" : 'X\(//\)[^/]' \| \
1189 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001191echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1193 s//\1/
1194 q
1195 }
1196 /^X\(\/\/\)[^/].*/{
1197 s//\1/
1198 q
1199 }
1200 /^X\(\/\/\)$/{
1201 s//\1/
1202 q
1203 }
1204 /^X\(\/\).*/{
1205 s//\1/
1206 q
1207 }
1208 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001210 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211 srcdir=..
1212 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213else
1214 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216if test ! -r "$srcdir/$ac_unique_file"; then
1217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1218 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001221ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1222ac_abs_confdir=`(
1223 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001224 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001225 pwd)`
1226# When building in place, set srcdir=.
1227if test "$ac_abs_confdir" = "$ac_pwd"; then
1228 srcdir=.
1229fi
1230# Remove unnecessary trailing slashes from srcdir.
1231# Double slashes in file names in object file debugging info
1232# mess up M-x gdb in Emacs.
1233case $srcdir in
1234*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1235esac
1236for ac_var in $ac_precious_vars; do
1237 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_env_${ac_var}_value=\$${ac_var}
1239 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1241done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242
Martin v. Löwis11437992002-04-12 09:54:03 +00001243#
1244# Report the --help message.
1245#
1246if test "$ac_init_help" = "long"; then
1247 # Omit some internal or obsolete options to make the list less imposing.
1248 # This message is too long to be a string in the A/UX 3.1 sh.
1249 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001250\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001251
1252Usage: $0 [OPTION]... [VAR=VALUE]...
1253
1254To assign environment variables (e.g., CC, CFLAGS...), specify them as
1255VAR=VALUE. See below for descriptions of some of the useful variables.
1256
1257Defaults for the options are specified in brackets.
1258
1259Configuration:
1260 -h, --help display this help and exit
1261 --help=short display options specific to this package
1262 --help=recursive display the short help of all the included packages
1263 -V, --version display version information and exit
1264 -q, --quiet, --silent do not print \`checking...' messages
1265 --cache-file=FILE cache test results in FILE [disabled]
1266 -C, --config-cache alias for \`--cache-file=config.cache'
1267 -n, --no-create do not create output files
1268 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270Installation directories:
1271 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001272 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001274 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
1276By default, \`make install' will install all the files in
1277\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1278an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1279for instance \`--prefix=\$HOME'.
1280
1281For better control, use the options below.
1282
1283Fine tuning of the installation directories:
1284 --bindir=DIR user executables [EPREFIX/bin]
1285 --sbindir=DIR system admin executables [EPREFIX/sbin]
1286 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1288 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1289 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1290 --libdir=DIR object code libraries [EPREFIX/lib]
1291 --includedir=DIR C header files [PREFIX/include]
1292 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001293 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1294 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1295 --infodir=DIR info documentation [DATAROOTDIR/info]
1296 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1297 --mandir=DIR man documentation [DATAROOTDIR/man]
1298 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1299 --htmldir=DIR html documentation [DOCDIR]
1300 --dvidir=DIR dvi documentation [DOCDIR]
1301 --pdfdir=DIR pdf documentation [DOCDIR]
1302 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001303_ACEOF
1304
1305 cat <<\_ACEOF
1306_ACEOF
1307fi
1308
1309if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001311 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 cat <<\_ACEOF
1314
1315Optional Features:
1316 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1317 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001318 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001319 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320 --enable-framework[=INSTALLDIR]
1321 Build (MacOSX|Darwin) framework
1322 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001323 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001324 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1325 --enable-ipv6 Enable ipv6 (with ipv4) support
1326 --disable-ipv6 Disable ipv6 support
1327 --enable-unicode[=ucs[24]]
1328 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001329
1330Optional Packages:
1331 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1332 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001333 --with-universal-archs=ARCH
1334 select architectures for universal build ("32-bit",
Ronald Oussoren7ab74352009-09-08 07:10:07 +00001335 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001336 --with-framework-name=FRAMEWORK
1337 specify an alternate name of the framework built
1338 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001339 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001340 --with-cxx-main=<compiler>
1341 compile main() and link python executable with C++
1342 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --with-suffix=.exe set executable suffix
1344 --with-pydebug build with Py_DEBUG defined
1345 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001346 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-signal-module disable/enable signal module
1348 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1349 --with(out)-threads[=DIRECTORY]
1350 disable/enable thread support
1351 --with(out)-thread[=DIRECTORY]
1352 deprecated; use --with(out)-threads
1353 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001355 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-pymalloc disable/enable specialized mallocs
1357 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with-fpectl enable SIGFPE catching
1359 --with-libm=STRING math library
1360 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
1362Some influential environment variables:
1363 CC C compiler command
1364 CFLAGS C compiler flags
1365 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1366 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001367 LIBS libraries to pass to the linker, e.g. -l<library>
1368 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1369 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001370 CPP C preprocessor
1371
1372Use these variables to override the choices made by `configure' or to help
1373it to find libraries and programs with nonstandard names/locations.
1374
Martin v. Löwis1d459062005-03-14 21:23:33 +00001375Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001376_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001377ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001378fi
1379
1380if test "$ac_init_help" = "recursive"; then
1381 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001383 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 ac_builddir=.
1385
Martin v. Löwiseba40652007-08-30 20:10:57 +00001386case "$ac_dir" in
1387.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1388*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001390 # A ".." for each directory in $ac_dir_suffix.
1391 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1392 case $ac_top_builddir_sub in
1393 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1394 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1395 esac ;;
1396esac
1397ac_abs_top_builddir=$ac_pwd
1398ac_abs_builddir=$ac_pwd$ac_dir_suffix
1399# for backward compatibility:
1400ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001403 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001405 ac_top_srcdir=$ac_top_builddir_sub
1406 ac_abs_top_srcdir=$ac_pwd ;;
1407 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001409 ac_top_srcdir=$srcdir
1410 ac_abs_top_srcdir=$srcdir ;;
1411 *) # Relative name.
1412 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1413 ac_top_srcdir=$ac_top_build_prefix$srcdir
1414 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001415esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001416ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001417
Martin v. Löwiseba40652007-08-30 20:10:57 +00001418 cd "$ac_dir" || { ac_status=$?; continue; }
1419 # Check for guested configure.
1420 if test -f "$ac_srcdir/configure.gnu"; then
1421 echo &&
1422 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1423 elif test -f "$ac_srcdir/configure"; then
1424 echo &&
1425 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 else
1427 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428 fi || ac_status=$?
1429 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 done
1431fi
1432
Martin v. Löwiseba40652007-08-30 20:10:57 +00001433test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001434if $ac_init_version; then
1435 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001436python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001438
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14402002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001441This configure script is free software; the Free Software Foundation
1442gives unlimited permission to copy, distribute and modify it.
1443_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001444 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001447This file contains any messages produced by compilers while
1448running configure, to aid debugging if configure makes a mistake.
1449
Neal Norwitz9be57322006-08-18 05:39:20 +00001450It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
1453 $ $0 $@
1454
1455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001456exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001457{
1458cat <<_ASUNAME
1459## --------- ##
1460## Platform. ##
1461## --------- ##
1462
1463hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1464uname -m = `(uname -m) 2>/dev/null || echo unknown`
1465uname -r = `(uname -r) 2>/dev/null || echo unknown`
1466uname -s = `(uname -s) 2>/dev/null || echo unknown`
1467uname -v = `(uname -v) 2>/dev/null || echo unknown`
1468
1469/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1470/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1471
1472/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1473/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1474/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001475/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001476/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1477/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1478/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1479
1480_ASUNAME
1481
1482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1483for as_dir in $PATH
1484do
1485 IFS=$as_save_IFS
1486 test -z "$as_dir" && as_dir=.
1487 echo "PATH: $as_dir"
1488done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001489IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001490
1491} >&5
1492
1493cat >&5 <<_ACEOF
1494
1495
1496## ----------- ##
1497## Core tests. ##
1498## ----------- ##
1499
1500_ACEOF
1501
1502
1503# Keep a trace of the command line.
1504# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001505# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001507# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001509ac_configure_args0=
1510ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001511ac_must_keep_next=false
1512for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001513do
Skip Montanaro6dead952003-09-25 14:50:04 +00001514 for ac_arg
1515 do
1516 case $ac_arg in
1517 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1519 | -silent | --silent | --silen | --sile | --sil)
1520 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001521 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1523 esac
1524 case $ac_pass in
1525 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1526 2)
1527 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1528 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001529 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001530 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001531 case $ac_arg in
1532 *=* | --config-cache | -C | -disable-* | --disable-* \
1533 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1534 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1535 | -with-* | --with-* | -without-* | --without-* | --x)
1536 case "$ac_configure_args0 " in
1537 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1538 esac
1539 ;;
1540 -* ) ac_must_keep_next=true ;;
1541 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001542 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001543 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001544 ;;
1545 esac
1546 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001547done
Skip Montanaro6dead952003-09-25 14:50:04 +00001548$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1549$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 +00001550
1551# When interrupted or exit'd, cleanup temporary files, and complete
1552# config.log. We remove comments because anyway the quotes in there
1553# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001554# WARNING: Use '\'' to represent an apostrophe within the trap.
1555# 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 +00001556trap 'exit_status=$?
1557 # Save into config.log some information that might help in debugging.
1558 {
1559 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001560
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 cat <<\_ASBOX
1562## ---------------- ##
1563## Cache variables. ##
1564## ---------------- ##
1565_ASBOX
1566 echo
1567 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001568(
1569 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1570 eval ac_val=\$$ac_var
1571 case $ac_val in #(
1572 *${as_nl}*)
1573 case $ac_var in #(
1574 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1575echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1576 esac
1577 case $ac_var in #(
1578 _ | IFS | as_nl) ;; #(
1579 *) $as_unset $ac_var ;;
1580 esac ;;
1581 esac
1582 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1585 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001586 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001587 "s/'\''/'\''\\\\'\'''\''/g;
1588 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1589 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001590 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001592 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001593 esac |
1594 sort
1595)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001597
1598 cat <<\_ASBOX
1599## ----------------- ##
1600## Output variables. ##
1601## ----------------- ##
1602_ASBOX
1603 echo
1604 for ac_var in $ac_subst_vars
1605 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001606 eval ac_val=\$$ac_var
1607 case $ac_val in
1608 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1609 esac
1610 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001611 done | sort
1612 echo
1613
1614 if test -n "$ac_subst_files"; then
1615 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001616## ------------------- ##
1617## File substitutions. ##
1618## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001619_ASBOX
1620 echo
1621 for ac_var in $ac_subst_files
1622 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001623 eval ac_val=\$$ac_var
1624 case $ac_val in
1625 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1626 esac
1627 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001628 done | sort
1629 echo
1630 fi
1631
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 if test -s confdefs.h; then
1633 cat <<\_ASBOX
1634## ----------- ##
1635## confdefs.h. ##
1636## ----------- ##
1637_ASBOX
1638 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001639 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 echo
1641 fi
1642 test "$ac_signal" != 0 &&
1643 echo "$as_me: caught signal $ac_signal"
1644 echo "$as_me: exit $exit_status"
1645 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001646 rm -f core *.core core.conftest.* &&
1647 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001649' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001650for ac_signal in 1 2 13 15; do
1651 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1652done
1653ac_signal=0
1654
1655# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001656rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001657
1658# Predefined preprocessor variables.
1659
1660cat >>confdefs.h <<_ACEOF
1661#define PACKAGE_NAME "$PACKAGE_NAME"
1662_ACEOF
1663
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_VERSION "$PACKAGE_VERSION"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_STRING "$PACKAGE_STRING"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1682_ACEOF
1683
1684
1685# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001686# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001687if test -n "$CONFIG_SITE"; then
1688 set x "$CONFIG_SITE"
1689elif test "x$prefix" != xNONE; then
1690 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1691else
1692 set x "$ac_default_prefix/share/config.site" \
1693 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695shift
1696for ac_site_file
1697do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1700echo "$as_me: loading site script $ac_site_file" >&6;}
1701 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702 . "$ac_site_file"
1703 fi
1704done
1705
1706if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001707 # Some versions of bash will fail to source /dev/null (special
1708 # files actually), so we avoid doing that.
1709 if test -f "$cache_file"; then
1710 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1711echo "$as_me: loading cache $cache_file" >&6;}
1712 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001713 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1714 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 esac
1716 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717else
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1719echo "$as_me: creating cache $cache_file" >&6;}
1720 >$cache_file
1721fi
1722
1723# Check that the precious variables saved in the cache have kept the same
1724# value.
1725ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001726for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1728 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001729 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1730 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 case $ac_old_set,$ac_new_set in
1732 set,)
1733 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1734echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1735 ac_cache_corrupted=: ;;
1736 ,set)
1737 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1738echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1739 ac_cache_corrupted=: ;;
1740 ,);;
1741 *)
1742 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001744echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001745 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001746echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001747 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001748echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001749 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001750 fi;;
1751 esac
1752 # Pass precious variables to config.status.
1753 if test "$ac_new_set" = set; then
1754 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001755 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001756 *) ac_arg=$ac_var=$ac_new_val ;;
1757 esac
1758 case " $ac_configure_args " in
1759 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1760 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1761 esac
1762 fi
1763done
1764if $ac_cache_corrupted; then
1765 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1766echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1767 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1768echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1769 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001770fi
1771
Martin v. Löwiseba40652007-08-30 20:10:57 +00001772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
Guido van Rossum7f43da71994-08-01 12:15:30 +00001796ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001797ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1800ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801
Guido van Rossum627b2d71993-12-24 10:39:16 +00001802
Michael W. Hudson54241132001-12-07 15:38:26 +00001803
Martin v. Löwiseba40652007-08-30 20:10:57 +00001804ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001805
1806
Martin v. Löwis11437992002-04-12 09:54:03 +00001807
1808
1809
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001810
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001811
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001812# We don't use PACKAGE_ variables, and they cause conflicts
1813# with other autoconf-based packages that include Python.h
1814grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1815rm confdefs.h
1816mv confdefs.h.new confdefs.h
1817
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001818
Neal Norwitz9be57322006-08-18 05:39:20 +00001819VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwis1142de32002-03-29 16:28:31 +00001821
1822SOVERSION=1.0
1823
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001824# The later defininition of _XOPEN_SOURCE disables certain features
1825# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _GNU_SOURCE 1
1829_ACEOF
1830
1831
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001832# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1833# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1834# them.
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define _NETBSD_SOURCE 1
1838_ACEOF
1839
1840
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1843# them.
1844
1845cat >>confdefs.h <<\_ACEOF
1846#define __BSD_VISIBLE 1
1847_ACEOF
1848
1849
Martin v. Löwisd6320502004-08-12 13:45:08 +00001850# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1851# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1852
1853cat >>confdefs.h <<\_ACEOF
1854#define _BSD_TYPES 1
1855_ACEOF
1856
1857
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001858# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1859# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1860# them.
1861
1862cat >>confdefs.h <<\_ACEOF
1863#define _DARWIN_C_SOURCE 1
1864_ACEOF
1865
1866
1867
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001868define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001869
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001870# Arguments passed to configure.
1871
1872CONFIG_ARGS="$ac_configure_args"
1873
Martin v. Löwiseba40652007-08-30 20:10:57 +00001874# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001875if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001876 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001877 case $enableval in
1878 yes)
1879 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1880 ;;
1881 esac
1882 case $enableval in
1883 no)
1884 UNIVERSALSDK=
1885 enable_universalsdk=
1886 ;;
1887 *)
1888 UNIVERSALSDK=$enableval
1889 ;;
1890 esac
1891
1892else
1893
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896
Martin v. Löwiseba40652007-08-30 20:10:57 +00001897fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001898
1899
Martin v. Löwiseba40652007-08-30 20:10:57 +00001900
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001901
1902
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001903UNIVERSAL_ARCHS="32-bit"
1904{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1905echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
1906
1907# Check whether --with-universal-archs was given.
1908if test "${with_universal_archs+set}" = set; then
1909 withval=$with_universal_archs;
1910 { echo "$as_me:$LINENO: result: $withval" >&5
1911echo "${ECHO_T}$withval" >&6; }
1912 UNIVERSAL_ARCHS="$withval"
Ronald Oussorend0841712009-09-29 13:01:59 +00001913 if test "${enable_universalsdk}" ; then
1914 :
1915 else
1916 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1917echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1918 { (exit 1); exit 1; }; }
1919 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001920
1921else
1922
1923 { echo "$as_me:$LINENO: result: 32-bit" >&5
1924echo "${ECHO_T}32-bit" >&6; }
1925
1926fi
1927
1928
1929
1930
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001931
1932# Check whether --with-framework-name was given.
1933if test "${with_framework_name+set}" = set; then
1934 withval=$with_framework_name;
Ronald Oussorend0841712009-09-29 13:01:59 +00001935 if test "${enable_framework}"; then
1936 :
1937 else
1938 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1939echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1940 { (exit 1); exit 1; }; }
1941 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001942 PYTHONFRAMEWORK=${withval}
1943 PYTHONFRAMEWORKDIR=${withval}.framework
1944 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1945
1946else
1947
1948 PYTHONFRAMEWORK=Python
1949 PYTHONFRAMEWORKDIR=Python.framework
1950 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1951
1952fi
1953
Martin v. Löwiseba40652007-08-30 20:10:57 +00001954# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001955if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001956 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001957 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001958 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001959 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001960 esac
1961 case $enableval in
1962 no)
1963 PYTHONFRAMEWORK=
1964 PYTHONFRAMEWORKDIR=no-framework
1965 PYTHONFRAMEWORKPREFIX=
1966 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001967 FRAMEWORKINSTALLFIRST=
1968 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001969 FRAMEWORKALTINSTALLFIRST=
1970 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001971 if test "x${prefix}" = "xNONE"; then
1972 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1973 else
1974 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1975 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001977 ;;
1978 *)
1979 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001980 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001981 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001982 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1983 if test "$UNIVERSAL_ARCHS" = "all"
1984 then
1985 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussoren75d83852009-03-30 17:56:14 +00001986 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001987 else
Ronald Oussoren75d83852009-03-30 17:56:14 +00001988 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001989 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1990 fi
1991
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001992 if test "x${prefix}" = "xNONE" ; then
1993 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1994 else
1995 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1996 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001997 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001998
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001999 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002000 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002001 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002002
Martin v. Löwiseba40652007-08-30 20:10:57 +00002003 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002004
Martin v. Löwiseba40652007-08-30 20:10:57 +00002005 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002006
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002007 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2008
2009 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2010
Jack Jansene578a632001-08-15 01:27:14 +00002011 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002012
Guido van Rossum563e7081996-09-10 18:20:48 +00002013else
Martin v. Löwis11437992002-04-12 09:54:03 +00002014
Jack Jansene578a632001-08-15 01:27:14 +00002015 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002016 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002017 PYTHONFRAMEWORKPREFIX=
2018 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002019 FRAMEWORKINSTALLFIRST=
2020 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002021 FRAMEWORKALTINSTALLFIRST=
2022 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002023 if test "x${prefix}" = "xNONE" ; then
2024 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2025 else
2026 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2027 fi
Jack Jansene578a632001-08-15 01:27:14 +00002028 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002029
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002030 if test "$UNIVERSAL_ARCHS" = "all"
2031 then
2032 FRAMEWORKINSTALLLAST=update4wayuniversal
2033 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2034 fi
2035
Martin v. Löwiseba40652007-08-30 20:10:57 +00002036fi
2037
Michael W. Hudson54241132001-12-07 15:38:26 +00002038
2039
2040
2041
Jack Jansene578a632001-08-15 01:27:14 +00002042
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002043
2044
Ronald Oussoren5b787322006-06-06 19:50:24 +00002045
2046
2047
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002048
Jack Jansene578a632001-08-15 01:27:14 +00002049##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002050## AC_HELP_STRING(--with-dyld,
2051## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002052##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002053# Set name for machine-dependent library files
2054
Martin v. Löwiseba40652007-08-30 20:10:57 +00002055{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2056echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002057if test -z "$MACHDEP"
2058then
Guido van Rossum563e7081996-09-10 18:20:48 +00002059 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002060 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2061 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002062 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002064 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002065 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002066 ac_md_system=`echo $ac_sys_system |
2067 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2068 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002069 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002070 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002071
Guido van Rossum07397971997-04-29 21:49:50 +00002072 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002073 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002074 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002075 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002076 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002077 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078 esac
2079fi
Guido van Rossum91922671997-10-09 20:24:13 +00002080
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002081# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2082# disable features if it is defined, without any means to access these
2083# features as extensions. For these systems, we skip the definition of
2084# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2085# some feature, make sure there is no alternative way to access this
2086# feature. Also, when using wildcards, make sure you have verified the
2087# need for not defining _XOPEN_SOURCE on all systems matching the
2088# wildcard, and that the wildcard does not include future systems
2089# (which may remove their limitations).
2090case $ac_sys_system/$ac_sys_release in
2091 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2092 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002093 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002094 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002095 define_xopen_source=no
2096 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2097 # also defined. This can be overridden by defining _BSD_SOURCE
2098 # As this has a different meaning on Linux, only define it on OpenBSD
2099
2100cat >>confdefs.h <<\_ACEOF
2101#define _BSD_SOURCE 1
2102_ACEOF
2103
2104 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002105 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2106 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2107 # Marc Recht
Benjamin Petersonf9c08882008-11-16 17:57:10 +00002108 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002109 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002110 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2111 # of union __?sigval. Reported by Stuart Bishop.
2112 SunOS/5.6)
2113 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002114 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2115 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002116 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002117 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002118 define_xopen_source=no;;
2119 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002120 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002121 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002122 define_xopen_source=no;;
Martin v. Löwis7f08c1f2008-11-04 20:43:31 +00002123 # On FreeBSD 4, the math functions C89 does not cover are never defined
2124 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2125 FreeBSD/4.*)
2126 define_xopen_source=no;;
2127 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2128 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2129 # identifies itself as Darwin/7.*
2130 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2131 # disables platform specific features beyond repair.
2132 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2133 # has no effect, don't bother defining them
2134 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002135 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002136 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2137 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2138 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002139 AIX/4)
2140 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002141 AIX/5)
2142 if test `uname -r` -eq 1; then
2143 define_xopen_source=no
2144 fi
2145 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002146 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2147 # defining NI_NUMERICHOST.
2148 QNX/6.3.2)
2149 define_xopen_source=no
2150 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002151
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002152esac
2153
2154if test $define_xopen_source = yes
2155then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002156 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2157 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002158 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2159 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002160 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002161 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002162
2163cat >>confdefs.h <<\_ACEOF
2164#define _XOPEN_SOURCE 500
2165_ACEOF
2166
2167 ;;
2168 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002169
2170cat >>confdefs.h <<\_ACEOF
2171#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002172_ACEOF
2173
Skip Montanarof0d5f792004-08-15 14:08:23 +00002174 ;;
2175 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002176
2177 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2178 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2179 # several APIs are not declared. Since this is also needed in some
2180 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002181 # except for Solaris 10, where it must not be defined,
2182 # as it implies XPG4.2
2183 case $ac_sys_system/$ac_sys_release in
2184 SunOS/5.10)
2185 ;;
2186 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002187
2188cat >>confdefs.h <<\_ACEOF
2189#define _XOPEN_SOURCE_EXTENDED 1
2190_ACEOF
2191
Martin v. Löwis7dece662005-11-26 11:38:24 +00002192 ;;
2193 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002194
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002195
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002196cat >>confdefs.h <<\_ACEOF
2197#define _POSIX_C_SOURCE 200112L
2198_ACEOF
2199
2200
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002201fi
2202
Guido van Rossum91922671997-10-09 20:24:13 +00002203#
2204# SGI compilers allow the specification of the both the ABI and the
2205# ISA on the command line. Depending on the values of these switches,
2206# different and often incompatable code will be generated.
2207#
2208# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2209# thus supply support for various ABI/ISA combinations. The MACHDEP
2210# variable is also adjusted.
2211#
2212
2213if test ! -z "$SGI_ABI"
2214then
2215 CC="cc $SGI_ABI"
2216 LDFLAGS="$SGI_ABI $LDFLAGS"
2217 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002219{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2220echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002221
Jack Jansen83f898c2002-12-30 22:23:40 +00002222# And add extra plat-mac for darwin
2223
Jack Jansen7b59b422003-03-17 15:44:10 +00002224
Martin v. Löwiseba40652007-08-30 20:10:57 +00002225{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2226echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002227if test -z "$EXTRAPLATDIR"
2228then
2229 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002230 darwin)
2231 EXTRAPLATDIR="\$(PLATMACDIRS)"
2232 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2233 ;;
2234 *)
2235 EXTRAPLATDIR=""
2236 EXTRAMACHDEPPATH=""
2237 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002238 esac
2239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002240{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2241echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002242
Jack Jansen6b08a402004-06-03 12:41:45 +00002243# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2244# it may influence the way we can build extensions, so distutils
2245# needs to check it
2246
Ronald Oussoren988117f2006-04-29 11:31:35 +00002247
Jack Jansen6b08a402004-06-03 12:41:45 +00002248CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002249EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002250
Mark Dickinson65134662008-04-25 16:11:04 +00002251{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2252echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2253ac_sys_machine=`uname -m`
2254{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2255echo "${ECHO_T}$ac_sys_machine" >&6; }
2256
Guido van Rossum627b2d71993-12-24 10:39:16 +00002257# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002258
2259# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2260# for debug/optimization stuff. BASECFLAGS is for flags that are required
2261# just to get things to compile and link. Users are free to override OPT
2262# when running configure or make. The build should not break if they do.
2263# BASECFLAGS should generally not be messed with, however.
2264
2265# XXX shouldn't some/most/all of this code be merged with the stuff later
2266# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002267{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2268echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002269
Martin v. Löwiseba40652007-08-30 20:10:57 +00002270# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002271if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002272 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002273 case $withval in
Ronald Oussoren75d83852009-03-30 17:56:14 +00002274 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002275 without_gcc=yes;;
2276 yes) CC=gcc
2277 without_gcc=no;;
2278 *) CC=$withval
2279 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002280 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002281else
Martin v. Löwis11437992002-04-12 09:54:03 +00002282
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002283 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002284 AIX*) CC=cc_r
2285 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002286 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002287 case $BE_HOST_CPU in
2288 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002289 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002290 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002291 BASECFLAGS="$BASECFLAGS -export pragma"
2292 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002294 ;;
2295 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002296 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002297 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002298 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002299 ;;
2300 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002301 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2302echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2303 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002304 ;;
2305 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002306 AR="\$(srcdir)/Modules/ar_beos"
2307 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002308 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002309 Monterey*)
2310 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002311 without_gcc=;;
2312 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002313 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002314fi
2315
2316{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2317echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002318
Guido van Rossum8b131c51995-03-09 14:10:13 +00002319# If the user switches compilers, we can't believe the cache
2320if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2321then
Martin v. Löwis11437992002-04-12 09:54:03 +00002322 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2323(it is also a good idea to do 'make clean' before compiling)" >&5
2324echo "$as_me: error: cached CC is different -- throw away $cache_file
2325(it is also a good idea to do 'make clean' before compiling)" >&2;}
2326 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002327fi
2328
Martin v. Löwis11437992002-04-12 09:54:03 +00002329ac_ext=c
2330ac_cpp='$CPP $CPPFLAGS'
2331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2333ac_compiler_gnu=$ac_cv_c_compiler_gnu
2334if test -n "$ac_tool_prefix"; then
2335 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2336set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002337{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002339if test "${ac_cv_prog_CC+set}" = set; then
2340 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002341else
2342 if test -n "$CC"; then
2343 ac_cv_prog_CC="$CC" # Let the user override the test.
2344else
Martin v. Löwis11437992002-04-12 09:54:03 +00002345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2346for as_dir in $PATH
2347do
2348 IFS=$as_save_IFS
2349 test -z "$as_dir" && as_dir=.
2350 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002351 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 +00002352 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2353 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2354 break 2
2355 fi
2356done
2357done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002358IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002359
Jack Jansendd19cf82001-12-06 22:36:17 +00002360fi
2361fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002362CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002363if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002364 { echo "$as_me:$LINENO: result: $CC" >&5
2365echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002366else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002367 { echo "$as_me:$LINENO: result: no" >&5
2368echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002369fi
2370
Martin v. Löwiseba40652007-08-30 20:10:57 +00002371
Martin v. Löwis11437992002-04-12 09:54:03 +00002372fi
2373if test -z "$ac_cv_prog_CC"; then
2374 ac_ct_CC=$CC
2375 # Extract the first word of "gcc", so it can be a program name with args.
2376set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002377{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2378echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002379if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2380 echo $ECHO_N "(cached) $ECHO_C" >&6
2381else
2382 if test -n "$ac_ct_CC"; then
2383 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2384else
2385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2386for as_dir in $PATH
2387do
2388 IFS=$as_save_IFS
2389 test -z "$as_dir" && as_dir=.
2390 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002391 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 +00002392 ac_cv_prog_ac_ct_CC="gcc"
2393 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2394 break 2
2395 fi
2396done
2397done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002398IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002399
2400fi
2401fi
2402ac_ct_CC=$ac_cv_prog_ac_ct_CC
2403if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002404 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2405echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002406else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002407 { echo "$as_me:$LINENO: result: no" >&5
2408echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002409fi
2410
Martin v. Löwiseba40652007-08-30 20:10:57 +00002411 if test "x$ac_ct_CC" = x; then
2412 CC=""
2413 else
2414 case $cross_compiling:$ac_tool_warned in
2415yes:)
2416{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2417whose name does not start with the host triplet. If you think this
2418configuration is useful to you, please write to autoconf@gnu.org." >&5
2419echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2420whose name does not start with the host triplet. If you think this
2421configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2422ac_tool_warned=yes ;;
2423esac
2424 CC=$ac_ct_CC
2425 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002426else
2427 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002428fi
2429
Jack Jansendd19cf82001-12-06 22:36:17 +00002430if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002431 if test -n "$ac_tool_prefix"; then
2432 # 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 +00002433set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002434{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2435echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002436if test "${ac_cv_prog_CC+set}" = set; then
2437 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002438else
2439 if test -n "$CC"; then
2440 ac_cv_prog_CC="$CC" # Let the user override the test.
2441else
Martin v. Löwis11437992002-04-12 09:54:03 +00002442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443for as_dir in $PATH
2444do
2445 IFS=$as_save_IFS
2446 test -z "$as_dir" && as_dir=.
2447 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 ac_cv_prog_CC="${ac_tool_prefix}cc"
2450 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2451 break 2
2452 fi
2453done
2454done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002456
2457fi
2458fi
2459CC=$ac_cv_prog_CC
2460if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461 { echo "$as_me:$LINENO: result: $CC" >&5
2462echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002463else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464 { echo "$as_me:$LINENO: result: no" >&5
2465echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002466fi
2467
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002470fi
2471if test -z "$CC"; then
2472 # Extract the first word of "cc", so it can be a program name with args.
2473set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2475echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002476if test "${ac_cv_prog_CC+set}" = set; then
2477 echo $ECHO_N "(cached) $ECHO_C" >&6
2478else
2479 if test -n "$CC"; then
2480 ac_cv_prog_CC="$CC" # Let the user override the test.
2481else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002482 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2484for as_dir in $PATH
2485do
2486 IFS=$as_save_IFS
2487 test -z "$as_dir" && as_dir=.
2488 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002489 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 +00002490 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2491 ac_prog_rejected=yes
2492 continue
2493 fi
2494 ac_cv_prog_CC="cc"
2495 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2496 break 2
2497 fi
2498done
2499done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002500IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002501
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002502if test $ac_prog_rejected = yes; then
2503 # We found a bogon in the path, so make sure we never use it.
2504 set dummy $ac_cv_prog_CC
2505 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002506 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002507 # We chose a different compiler from the bogus one.
2508 # However, it has the same basename, so the bogon will be chosen
2509 # first if we set CC to just the basename; use the full file name.
2510 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002512 fi
2513fi
2514fi
2515fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002516CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002517if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002518 { echo "$as_me:$LINENO: result: $CC" >&5
2519echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002520else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521 { echo "$as_me:$LINENO: result: no" >&5
2522echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002523fi
2524
Martin v. Löwiseba40652007-08-30 20:10:57 +00002525
Martin v. Löwis11437992002-04-12 09:54:03 +00002526fi
2527if test -z "$CC"; then
2528 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002529 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 do
2531 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2532set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002533{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2534echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002535if test "${ac_cv_prog_CC+set}" = set; then
2536 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002537else
2538 if test -n "$CC"; then
2539 ac_cv_prog_CC="$CC" # Let the user override the test.
2540else
Martin v. Löwis11437992002-04-12 09:54:03 +00002541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2542for as_dir in $PATH
2543do
2544 IFS=$as_save_IFS
2545 test -z "$as_dir" && as_dir=.
2546 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002547 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 +00002548 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2549 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2550 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002551 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002552done
2553done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002555
2556fi
2557fi
2558CC=$ac_cv_prog_CC
2559if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002560 { echo "$as_me:$LINENO: result: $CC" >&5
2561echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002562else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002563 { echo "$as_me:$LINENO: result: no" >&5
2564echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002565fi
2566
Martin v. Löwiseba40652007-08-30 20:10:57 +00002567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 test -n "$CC" && break
2569 done
2570fi
2571if test -z "$CC"; then
2572 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002573 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002574do
2575 # Extract the first word of "$ac_prog", so it can be a program name with args.
2576set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2578echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002579if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2580 echo $ECHO_N "(cached) $ECHO_C" >&6
2581else
2582 if test -n "$ac_ct_CC"; then
2583 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2584else
2585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2586for as_dir in $PATH
2587do
2588 IFS=$as_save_IFS
2589 test -z "$as_dir" && as_dir=.
2590 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002591 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 +00002592 ac_cv_prog_ac_ct_CC="$ac_prog"
2593 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2594 break 2
2595 fi
2596done
2597done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002598IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600fi
2601fi
2602ac_ct_CC=$ac_cv_prog_ac_ct_CC
2603if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002604 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2605echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002606else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002607 { echo "$as_me:$LINENO: result: no" >&5
2608echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002609fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002610
Martin v. Löwiseba40652007-08-30 20:10:57 +00002611
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 test -n "$ac_ct_CC" && break
2613done
Michael W. Hudson54241132001-12-07 15:38:26 +00002614
Martin v. Löwiseba40652007-08-30 20:10:57 +00002615 if test "x$ac_ct_CC" = x; then
2616 CC=""
2617 else
2618 case $cross_compiling:$ac_tool_warned in
2619yes:)
2620{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2621whose name does not start with the host triplet. If you think this
2622configuration is useful to you, please write to autoconf@gnu.org." >&5
2623echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2624whose name does not start with the host triplet. If you think this
2625configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2626ac_tool_warned=yes ;;
2627esac
2628 CC=$ac_ct_CC
2629 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002630fi
2631
2632fi
2633
2634
Skip Montanaro6dead952003-09-25 14:50:04 +00002635test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2636See \`config.log' for more details." >&5
2637echo "$as_me: error: no acceptable C compiler found in \$PATH
2638See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 { (exit 1); exit 1; }; }
2640
2641# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002642echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002643ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002644{ (ac_try="$ac_compiler --version >&5"
2645case "(($ac_try" in
2646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2647 *) ac_try_echo=$ac_try;;
2648esac
2649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2650 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 ac_status=$?
2652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2653 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654{ (ac_try="$ac_compiler -v >&5"
2655case "(($ac_try" in
2656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2657 *) ac_try_echo=$ac_try;;
2658esac
2659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2660 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 ac_status=$?
2662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2663 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002664{ (ac_try="$ac_compiler -V >&5"
2665case "(($ac_try" in
2666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2667 *) ac_try_echo=$ac_try;;
2668esac
2669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2670 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 ac_status=$?
2672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2673 (exit $ac_status); }
2674
2675cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002676/* confdefs.h. */
2677_ACEOF
2678cat confdefs.h >>conftest.$ac_ext
2679cat >>conftest.$ac_ext <<_ACEOF
2680/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682int
2683main ()
2684{
2685
2686 ;
2687 return 0;
2688}
2689_ACEOF
2690ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002691ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002692# Try to create an executable without -o first, disregard a.out.
2693# It will help us diagnose broken compilers, and finding out an intuition
2694# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002695{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2696echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002697ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002698#
2699# List of possible output files, starting from the most likely.
2700# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2701# only as a last resort. b.out is created by i960 compilers.
2702ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2703#
2704# The IRIX 6 linker writes into existing files which may not be
2705# executable, retaining their permissions. Remove them first so a
2706# subsequent execution test works.
2707ac_rmfiles=
2708for ac_file in $ac_files
2709do
2710 case $ac_file in
2711 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2712 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2713 esac
2714done
2715rm -f $ac_rmfiles
2716
2717if { (ac_try="$ac_link_default"
2718case "(($ac_try" in
2719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2720 *) ac_try_echo=$ac_try;;
2721esac
2722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2723 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 ac_status=$?
2725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2726 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002727 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2728# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2729# in a Makefile. We should not override ac_cv_exeext if it was cached,
2730# so that the user can short-circuit this test for compilers unknown to
2731# Autoconf.
2732for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002733do
2734 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002736 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002737 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002738 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002739 # We found the default executable, but exeext='' is most
2740 # certainly right.
2741 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002742 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002743 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2744 then :; else
2745 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2746 fi
2747 # We set ac_cv_exeext here because the later test for it is not
2748 # safe: cross compilers may not add the suffix if given an `-o'
2749 # argument, so we may need to know it at that point already.
2750 # Even if this section looks crufty: it has the advantage of
2751 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002752 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002753 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002754 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 esac
2756done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002757test "$ac_cv_exeext" = no && ac_cv_exeext=
2758
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002759else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002760 ac_file=''
2761fi
2762
2763{ echo "$as_me:$LINENO: result: $ac_file" >&5
2764echo "${ECHO_T}$ac_file" >&6; }
2765if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002767sed 's/^/| /' conftest.$ac_ext >&5
2768
2769{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2770See \`config.log' for more details." >&5
2771echo "$as_me: error: C compiler cannot create executables
2772See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002773 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002774fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002775
Martin v. Löwis11437992002-04-12 09:54:03 +00002776ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002777
Martin v. Löwiseba40652007-08-30 20:10:57 +00002778# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002779# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002780{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2781echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002782# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2783# If not cross compiling, check that we can run a simple program.
2784if test "$cross_compiling" != yes; then
2785 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002786 { (case "(($ac_try" in
2787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2788 *) ac_try_echo=$ac_try;;
2789esac
2790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2791 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002792 ac_status=$?
2793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794 (exit $ac_status); }; }; then
2795 cross_compiling=no
2796 else
2797 if test "$cross_compiling" = maybe; then
2798 cross_compiling=yes
2799 else
2800 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002801If you meant to cross compile, use \`--host'.
2802See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002803echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002804If you meant to cross compile, use \`--host'.
2805See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002806 { (exit 1); exit 1; }; }
2807 fi
2808 fi
2809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002810{ echo "$as_me:$LINENO: result: yes" >&5
2811echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002812
Skip Montanaro6dead952003-09-25 14:50:04 +00002813rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002814ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002815# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002816# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002817{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2818echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2819{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2820echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002821
Martin v. Löwiseba40652007-08-30 20:10:57 +00002822{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2823echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2824if { (ac_try="$ac_link"
2825case "(($ac_try" in
2826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2827 *) ac_try_echo=$ac_try;;
2828esac
2829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2830 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 ac_status=$?
2832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2833 (exit $ac_status); }; then
2834 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2835# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2836# work properly (i.e., refer to `conftest.exe'), while it won't with
2837# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002838for ac_file in conftest.exe conftest conftest.*; do
2839 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002841 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002843 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 * ) break;;
2845 esac
2846done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002847else
Skip Montanaro6dead952003-09-25 14:50:04 +00002848 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2849See \`config.log' for more details." >&5
2850echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2851See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002852 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002853fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002854
Martin v. Löwis11437992002-04-12 09:54:03 +00002855rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002856{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2857echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002858
2859rm -f conftest.$ac_ext
2860EXEEXT=$ac_cv_exeext
2861ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002862{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2863echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002864if test "${ac_cv_objext+set}" = set; then
2865 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002866else
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002868/* confdefs.h. */
2869_ACEOF
2870cat confdefs.h >>conftest.$ac_ext
2871cat >>conftest.$ac_ext <<_ACEOF
2872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002873
Martin v. Löwis11437992002-04-12 09:54:03 +00002874int
2875main ()
2876{
2877
2878 ;
2879 return 0;
2880}
2881_ACEOF
2882rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002883if { (ac_try="$ac_compile"
2884case "(($ac_try" in
2885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2886 *) ac_try_echo=$ac_try;;
2887esac
2888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2889 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 ac_status=$?
2891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2892 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002893 for ac_file in conftest.o conftest.obj conftest.*; do
2894 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002895 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002896 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002897 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2898 break;;
2899 esac
2900done
2901else
2902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002903sed 's/^/| /' conftest.$ac_ext >&5
2904
2905{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2906See \`config.log' for more details." >&5
2907echo "$as_me: error: cannot compute suffix of object files: cannot compile
2908See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002909 { (exit 1); exit 1; }; }
2910fi
2911
2912rm -f conftest.$ac_cv_objext conftest.$ac_ext
2913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002914{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2915echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002916OBJEXT=$ac_cv_objext
2917ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002918{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2919echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002920if test "${ac_cv_c_compiler_gnu+set}" = set; then
2921 echo $ECHO_N "(cached) $ECHO_C" >&6
2922else
2923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002924/* confdefs.h. */
2925_ACEOF
2926cat confdefs.h >>conftest.$ac_ext
2927cat >>conftest.$ac_ext <<_ACEOF
2928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002929
Martin v. Löwis11437992002-04-12 09:54:03 +00002930int
2931main ()
2932{
2933#ifndef __GNUC__
2934 choke me
2935#endif
2936
2937 ;
2938 return 0;
2939}
2940_ACEOF
2941rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002942if { (ac_try="$ac_compile"
2943case "(($ac_try" in
2944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2945 *) ac_try_echo=$ac_try;;
2946esac
2947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002950 grep -v '^ *+' conftest.er1 >conftest.err
2951 rm -f conftest.er1
2952 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002954 (exit $ac_status); } && {
2955 test -z "$ac_c_werror_flag" ||
2956 test ! -s conftest.err
2957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002958 ac_compiler_gnu=yes
2959else
2960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002961sed 's/^/| /' conftest.$ac_ext >&5
2962
Martin v. Löwiseba40652007-08-30 20:10:57 +00002963 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002965
2966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002967ac_cv_c_compiler_gnu=$ac_compiler_gnu
2968
2969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002970{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2971echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002972GCC=`test $ac_compiler_gnu = yes && echo yes`
2973ac_test_CFLAGS=${CFLAGS+set}
2974ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002975{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2976echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002977if test "${ac_cv_prog_cc_g+set}" = set; then
2978 echo $ECHO_N "(cached) $ECHO_C" >&6
2979else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002980 ac_save_c_werror_flag=$ac_c_werror_flag
2981 ac_c_werror_flag=yes
2982 ac_cv_prog_cc_g=no
2983 CFLAGS="-g"
2984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002985/* confdefs.h. */
2986_ACEOF
2987cat confdefs.h >>conftest.$ac_ext
2988cat >>conftest.$ac_ext <<_ACEOF
2989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991int
2992main ()
2993{
2994
2995 ;
2996 return 0;
2997}
2998_ACEOF
2999rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003000if { (ac_try="$ac_compile"
3001case "(($ac_try" in
3002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3003 *) ac_try_echo=$ac_try;;
3004esac
3005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003008 grep -v '^ *+' conftest.er1 >conftest.err
3009 rm -f conftest.er1
3010 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003012 (exit $ac_status); } && {
3013 test -z "$ac_c_werror_flag" ||
3014 test ! -s conftest.err
3015 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003016 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003017else
Martin v. Löwis11437992002-04-12 09:54:03 +00003018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003019sed 's/^/| /' conftest.$ac_ext >&5
3020
Martin v. Löwiseba40652007-08-30 20:10:57 +00003021 CFLAGS=""
3022 cat >conftest.$ac_ext <<_ACEOF
3023/* confdefs.h. */
3024_ACEOF
3025cat confdefs.h >>conftest.$ac_ext
3026cat >>conftest.$ac_ext <<_ACEOF
3027/* end confdefs.h. */
3028
3029int
3030main ()
3031{
3032
3033 ;
3034 return 0;
3035}
3036_ACEOF
3037rm -f conftest.$ac_objext
3038if { (ac_try="$ac_compile"
3039case "(($ac_try" in
3040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3041 *) ac_try_echo=$ac_try;;
3042esac
3043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3044 (eval "$ac_compile") 2>conftest.er1
3045 ac_status=$?
3046 grep -v '^ *+' conftest.er1 >conftest.err
3047 rm -f conftest.er1
3048 cat conftest.err >&5
3049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3050 (exit $ac_status); } && {
3051 test -z "$ac_c_werror_flag" ||
3052 test ! -s conftest.err
3053 } && test -s conftest.$ac_objext; then
3054 :
3055else
3056 echo "$as_me: failed program was:" >&5
3057sed 's/^/| /' conftest.$ac_ext >&5
3058
3059 ac_c_werror_flag=$ac_save_c_werror_flag
3060 CFLAGS="-g"
3061 cat >conftest.$ac_ext <<_ACEOF
3062/* confdefs.h. */
3063_ACEOF
3064cat confdefs.h >>conftest.$ac_ext
3065cat >>conftest.$ac_ext <<_ACEOF
3066/* end confdefs.h. */
3067
3068int
3069main ()
3070{
3071
3072 ;
3073 return 0;
3074}
3075_ACEOF
3076rm -f conftest.$ac_objext
3077if { (ac_try="$ac_compile"
3078case "(($ac_try" in
3079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3080 *) ac_try_echo=$ac_try;;
3081esac
3082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3083 (eval "$ac_compile") 2>conftest.er1
3084 ac_status=$?
3085 grep -v '^ *+' conftest.er1 >conftest.err
3086 rm -f conftest.er1
3087 cat conftest.err >&5
3088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3089 (exit $ac_status); } && {
3090 test -z "$ac_c_werror_flag" ||
3091 test ! -s conftest.err
3092 } && test -s conftest.$ac_objext; then
3093 ac_cv_prog_cc_g=yes
3094else
3095 echo "$as_me: failed program was:" >&5
3096sed 's/^/| /' conftest.$ac_ext >&5
3097
3098
Guido van Rossum627b2d71993-12-24 10:39:16 +00003099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003100
3101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003103
3104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3105fi
3106
3107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3108 ac_c_werror_flag=$ac_save_c_werror_flag
3109fi
3110{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3111echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003112if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003113 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003114elif test $ac_cv_prog_cc_g = yes; then
3115 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003116 CFLAGS="-g -O2"
3117 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003118 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003119 fi
3120else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003121 if test "$GCC" = yes; then
3122 CFLAGS="-O2"
3123 else
3124 CFLAGS=
3125 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003127{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3128echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3129if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003130 echo $ECHO_N "(cached) $ECHO_C" >&6
3131else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003132 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003133ac_save_CC=$CC
3134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003135/* confdefs.h. */
3136_ACEOF
3137cat confdefs.h >>conftest.$ac_ext
3138cat >>conftest.$ac_ext <<_ACEOF
3139/* end confdefs.h. */
3140#include <stdarg.h>
3141#include <stdio.h>
3142#include <sys/types.h>
3143#include <sys/stat.h>
3144/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3145struct buf { int x; };
3146FILE * (*rcsopen) (struct buf *, struct stat *, int);
3147static char *e (p, i)
3148 char **p;
3149 int i;
3150{
3151 return p[i];
3152}
3153static char *f (char * (*g) (char **, int), char **p, ...)
3154{
3155 char *s;
3156 va_list v;
3157 va_start (v,p);
3158 s = g (p, va_arg (v,int));
3159 va_end (v);
3160 return s;
3161}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003162
3163/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3164 function prototypes and stuff, but not '\xHH' hex character constants.
3165 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003166 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003167 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3168 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003169 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003170int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3171
Martin v. Löwiseba40652007-08-30 20:10:57 +00003172/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3173 inside strings and character constants. */
3174#define FOO(x) 'x'
3175int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3176
Skip Montanaro6dead952003-09-25 14:50:04 +00003177int test (int i, double x);
3178struct s1 {int (*f) (int a);};
3179struct s2 {int (*f) (double a);};
3180int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3181int argc;
3182char **argv;
3183int
3184main ()
3185{
3186return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3187 ;
3188 return 0;
3189}
3190_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003191for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3192 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003193do
3194 CC="$ac_save_CC $ac_arg"
3195 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003196if { (ac_try="$ac_compile"
3197case "(($ac_try" in
3198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3199 *) ac_try_echo=$ac_try;;
3200esac
3201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3202 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003204 grep -v '^ *+' conftest.er1 >conftest.err
3205 rm -f conftest.er1
3206 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003208 (exit $ac_status); } && {
3209 test -z "$ac_c_werror_flag" ||
3210 test ! -s conftest.err
3211 } && test -s conftest.$ac_objext; then
3212 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003213else
3214 echo "$as_me: failed program was:" >&5
3215sed 's/^/| /' conftest.$ac_ext >&5
3216
Martin v. Löwiseba40652007-08-30 20:10:57 +00003217
Skip Montanaro6dead952003-09-25 14:50:04 +00003218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003219
3220rm -f core conftest.err conftest.$ac_objext
3221 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003222done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003223rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003224CC=$ac_save_CC
3225
3226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227# AC_CACHE_VAL
3228case "x$ac_cv_prog_cc_c89" in
3229 x)
3230 { echo "$as_me:$LINENO: result: none needed" >&5
3231echo "${ECHO_T}none needed" >&6; } ;;
3232 xno)
3233 { echo "$as_me:$LINENO: result: unsupported" >&5
3234echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003235 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003236 CC="$CC $ac_cv_prog_cc_c89"
3237 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3238echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003239esac
3240
Skip Montanaro6dead952003-09-25 14:50:04 +00003241
Martin v. Löwis11437992002-04-12 09:54:03 +00003242ac_ext=c
3243ac_cpp='$CPP $CPPFLAGS'
3244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3246ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003247
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003248
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003249
3250
Martin v. Löwiseba40652007-08-30 20:10:57 +00003251{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3252echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003253
Martin v. Löwiseba40652007-08-30 20:10:57 +00003254# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003255if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003256 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003257
3258 case $withval in
3259 no) with_cxx_main=no
3260 MAINCC='$(CC)';;
3261 yes) with_cxx_main=yes
3262 MAINCC='$(CXX)';;
3263 *) with_cxx_main=yes
3264 MAINCC=$withval
3265 if test -z "$CXX"
3266 then
3267 CXX=$withval
3268 fi;;
3269 esac
3270else
3271
3272 with_cxx_main=no
3273 MAINCC='$(CC)'
3274
Martin v. Löwiseba40652007-08-30 20:10:57 +00003275fi
3276
3277{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3278echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003279
3280preset_cxx="$CXX"
3281if test -z "$CXX"
3282then
3283 case "$CC" in
3284 gcc) # Extract the first word of "g++", so it can be a program name with args.
3285set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003286{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3287echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003288if test "${ac_cv_path_CXX+set}" = set; then
3289 echo $ECHO_N "(cached) $ECHO_C" >&6
3290else
3291 case $CXX in
3292 [\\/]* | ?:[\\/]*)
3293 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3294 ;;
3295 *)
3296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3297for as_dir in notfound
3298do
3299 IFS=$as_save_IFS
3300 test -z "$as_dir" && as_dir=.
3301 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003302 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 +00003303 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3304 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3305 break 2
3306 fi
3307done
3308done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003309IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003310
3311 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3312 ;;
3313esac
3314fi
3315CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003316if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003317 { echo "$as_me:$LINENO: result: $CXX" >&5
3318echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003319else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003320 { echo "$as_me:$LINENO: result: no" >&5
3321echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003323
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003324 ;;
3325 cc) # Extract the first word of "c++", so it can be a program name with args.
3326set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003327{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3328echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003329if test "${ac_cv_path_CXX+set}" = set; then
3330 echo $ECHO_N "(cached) $ECHO_C" >&6
3331else
3332 case $CXX in
3333 [\\/]* | ?:[\\/]*)
3334 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3335 ;;
3336 *)
3337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3338for as_dir in notfound
3339do
3340 IFS=$as_save_IFS
3341 test -z "$as_dir" && as_dir=.
3342 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003343 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 +00003344 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3345 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3346 break 2
3347 fi
3348done
3349done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003350IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003351
3352 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3353 ;;
3354esac
3355fi
3356CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003357if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003358 { echo "$as_me:$LINENO: result: $CXX" >&5
3359echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003360else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003361 { echo "$as_me:$LINENO: result: no" >&5
3362echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003364
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003365 ;;
3366 esac
3367 if test "$CXX" = "notfound"
3368 then
3369 CXX=""
3370 fi
3371fi
3372if test -z "$CXX"
3373then
3374 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3375do
3376 # Extract the first word of "$ac_prog", so it can be a program name with args.
3377set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003378{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3379echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003380if test "${ac_cv_prog_CXX+set}" = set; then
3381 echo $ECHO_N "(cached) $ECHO_C" >&6
3382else
3383 if test -n "$CXX"; then
3384 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3385else
3386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3387for as_dir in $PATH
3388do
3389 IFS=$as_save_IFS
3390 test -z "$as_dir" && as_dir=.
3391 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392 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 +00003393 ac_cv_prog_CXX="$ac_prog"
3394 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3395 break 2
3396 fi
3397done
3398done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003399IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003400
3401fi
3402fi
3403CXX=$ac_cv_prog_CXX
3404if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003405 { echo "$as_me:$LINENO: result: $CXX" >&5
3406echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003407else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003408 { echo "$as_me:$LINENO: result: no" >&5
3409echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003410fi
3411
Martin v. Löwiseba40652007-08-30 20:10:57 +00003412
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003413 test -n "$CXX" && break
3414done
3415test -n "$CXX" || CXX="notfound"
3416
3417 if test "$CXX" = "notfound"
3418 then
3419 CXX=""
3420 fi
3421fi
3422if test "$preset_cxx" != "$CXX"
3423then
3424 { echo "$as_me:$LINENO: WARNING:
3425
3426 By default, distutils will build C++ extension modules with \"$CXX\".
3427 If this is not intended, then set CXX on the configure command line.
3428 " >&5
3429echo "$as_me: WARNING:
3430
3431 By default, distutils will build C++ extension modules with \"$CXX\".
3432 If this is not intended, then set CXX on the configure command line.
3433 " >&2;}
3434fi
3435
3436
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003437# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003438
3439ac_ext=c
3440ac_cpp='$CPP $CPPFLAGS'
3441ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3442ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3443ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003444{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3445echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003446# On Suns, sometimes $CPP names a directory.
3447if test -n "$CPP" && test -d "$CPP"; then
3448 CPP=
3449fi
3450if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003451 if test "${ac_cv_prog_CPP+set}" = set; then
3452 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003453else
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 # Double quotes because CPP needs to be expanded
3455 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3456 do
3457 ac_preproc_ok=false
3458for ac_c_preproc_warn_flag in '' yes
3459do
3460 # Use a header file that comes with gcc, so configuring glibc
3461 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003462 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3463 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003464 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003465 # not just through cpp. "Syntax error" is here to catch this case.
3466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003467/* confdefs.h. */
3468_ACEOF
3469cat confdefs.h >>conftest.$ac_ext
3470cat >>conftest.$ac_ext <<_ACEOF
3471/* end confdefs.h. */
3472#ifdef __STDC__
3473# include <limits.h>
3474#else
3475# include <assert.h>
3476#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003477 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003478_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003479if { (ac_try="$ac_cpp conftest.$ac_ext"
3480case "(($ac_try" in
3481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3482 *) ac_try_echo=$ac_try;;
3483esac
3484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3485 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003486 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003487 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 rm -f conftest.er1
3489 cat conftest.err >&5
3490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003491 (exit $ac_status); } >/dev/null && {
3492 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3493 test ! -s conftest.err
3494 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003495 :
3496else
Martin v. Löwis11437992002-04-12 09:54:03 +00003497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003498sed 's/^/| /' conftest.$ac_ext >&5
3499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 # Broken: fails on valid input.
3501continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003503
Martin v. Löwis11437992002-04-12 09:54:03 +00003504rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003505
Martin v. Löwiseba40652007-08-30 20:10:57 +00003506 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003507 # can be detected and how.
3508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003509/* confdefs.h. */
3510_ACEOF
3511cat confdefs.h >>conftest.$ac_ext
3512cat >>conftest.$ac_ext <<_ACEOF
3513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003514#include <ac_nonexistent.h>
3515_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003516if { (ac_try="$ac_cpp conftest.$ac_ext"
3517case "(($ac_try" in
3518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3519 *) ac_try_echo=$ac_try;;
3520esac
3521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3522 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003523 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003524 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003525 rm -f conftest.er1
3526 cat conftest.err >&5
3527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003528 (exit $ac_status); } >/dev/null && {
3529 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3530 test ! -s conftest.err
3531 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 # Broken: success on invalid input.
3533continue
3534else
3535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003536sed 's/^/| /' conftest.$ac_ext >&5
3537
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 # Passes both tests.
3539ac_preproc_ok=:
3540break
3541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003542
Martin v. Löwis11437992002-04-12 09:54:03 +00003543rm -f conftest.err conftest.$ac_ext
3544
3545done
3546# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3547rm -f conftest.err conftest.$ac_ext
3548if $ac_preproc_ok; then
3549 break
3550fi
3551
3552 done
3553 ac_cv_prog_CPP=$CPP
3554
3555fi
3556 CPP=$ac_cv_prog_CPP
3557else
3558 ac_cv_prog_CPP=$CPP
3559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003560{ echo "$as_me:$LINENO: result: $CPP" >&5
3561echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003562ac_preproc_ok=false
3563for ac_c_preproc_warn_flag in '' yes
3564do
3565 # Use a header file that comes with gcc, so configuring glibc
3566 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003567 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3568 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 # On the NeXT, cc -E runs the code through the compiler's parser,
3570 # not just through cpp. "Syntax error" is here to catch this case.
3571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003572/* confdefs.h. */
3573_ACEOF
3574cat confdefs.h >>conftest.$ac_ext
3575cat >>conftest.$ac_ext <<_ACEOF
3576/* end confdefs.h. */
3577#ifdef __STDC__
3578# include <limits.h>
3579#else
3580# include <assert.h>
3581#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003582 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003583_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003584if { (ac_try="$ac_cpp conftest.$ac_ext"
3585case "(($ac_try" in
3586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3587 *) ac_try_echo=$ac_try;;
3588esac
3589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3590 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003592 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 rm -f conftest.er1
3594 cat conftest.err >&5
3595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003596 (exit $ac_status); } >/dev/null && {
3597 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3598 test ! -s conftest.err
3599 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003600 :
3601else
3602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003603sed 's/^/| /' conftest.$ac_ext >&5
3604
Martin v. Löwis11437992002-04-12 09:54:03 +00003605 # Broken: fails on valid input.
3606continue
3607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003608
Martin v. Löwis11437992002-04-12 09:54:03 +00003609rm -f conftest.err conftest.$ac_ext
3610
Martin v. Löwiseba40652007-08-30 20:10:57 +00003611 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 # can be detected and how.
3613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003614/* confdefs.h. */
3615_ACEOF
3616cat confdefs.h >>conftest.$ac_ext
3617cat >>conftest.$ac_ext <<_ACEOF
3618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003619#include <ac_nonexistent.h>
3620_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003621if { (ac_try="$ac_cpp conftest.$ac_ext"
3622case "(($ac_try" in
3623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3624 *) ac_try_echo=$ac_try;;
3625esac
3626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3627 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003629 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 rm -f conftest.er1
3631 cat conftest.err >&5
3632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003633 (exit $ac_status); } >/dev/null && {
3634 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3635 test ! -s conftest.err
3636 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 # Broken: success on invalid input.
3638continue
3639else
3640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003641sed 's/^/| /' conftest.$ac_ext >&5
3642
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 # Passes both tests.
3644ac_preproc_ok=:
3645break
3646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003647
Martin v. Löwis11437992002-04-12 09:54:03 +00003648rm -f conftest.err conftest.$ac_ext
3649
3650done
3651# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3652rm -f conftest.err conftest.$ac_ext
3653if $ac_preproc_ok; then
3654 :
3655else
Skip Montanaro6dead952003-09-25 14:50:04 +00003656 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3657See \`config.log' for more details." >&5
3658echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3659See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003660 { (exit 1); exit 1; }; }
3661fi
3662
3663ac_ext=c
3664ac_cpp='$CPP $CPPFLAGS'
3665ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3666ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3667ac_compiler_gnu=$ac_cv_c_compiler_gnu
3668
3669
Martin v. Löwiseba40652007-08-30 20:10:57 +00003670{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3671echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3672if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003673 echo $ECHO_N "(cached) $ECHO_C" >&6
3674else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003675 # Extract the first word of "grep ggrep" to use in msg output
3676if test -z "$GREP"; then
3677set dummy grep ggrep; ac_prog_name=$2
3678if test "${ac_cv_path_GREP+set}" = set; then
3679 echo $ECHO_N "(cached) $ECHO_C" >&6
3680else
3681 ac_path_GREP_found=false
3682# Loop through the user's path and test for each of PROGNAME-LIST
3683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3684for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3685do
3686 IFS=$as_save_IFS
3687 test -z "$as_dir" && as_dir=.
3688 for ac_prog in grep ggrep; do
3689 for ac_exec_ext in '' $ac_executable_extensions; do
3690 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3691 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3692 # Check for GNU ac_path_GREP and select it if it is found.
3693 # Check for GNU $ac_path_GREP
3694case `"$ac_path_GREP" --version 2>&1` in
3695*GNU*)
3696 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3697*)
3698 ac_count=0
3699 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3700 while :
3701 do
3702 cat "conftest.in" "conftest.in" >"conftest.tmp"
3703 mv "conftest.tmp" "conftest.in"
3704 cp "conftest.in" "conftest.nl"
3705 echo 'GREP' >> "conftest.nl"
3706 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3707 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3708 ac_count=`expr $ac_count + 1`
3709 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3710 # Best one so far, save it but keep looking for a better one
3711 ac_cv_path_GREP="$ac_path_GREP"
3712 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003713 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003714 # 10*(2^10) chars as input seems more than enough
3715 test $ac_count -gt 10 && break
3716 done
3717 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3718esac
3719
3720
3721 $ac_path_GREP_found && break 3
3722 done
3723done
3724
3725done
3726IFS=$as_save_IFS
3727
3728
Skip Montanaro6dead952003-09-25 14:50:04 +00003729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003730
3731GREP="$ac_cv_path_GREP"
3732if test -z "$GREP"; then
3733 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3734echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3735 { (exit 1); exit 1; }; }
3736fi
3737
3738else
3739 ac_cv_path_GREP=$GREP
3740fi
3741
3742
3743fi
3744{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3745echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3746 GREP="$ac_cv_path_GREP"
3747
3748
3749{ echo "$as_me:$LINENO: checking for egrep" >&5
3750echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3751if test "${ac_cv_path_EGREP+set}" = set; then
3752 echo $ECHO_N "(cached) $ECHO_C" >&6
3753else
3754 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3755 then ac_cv_path_EGREP="$GREP -E"
3756 else
3757 # Extract the first word of "egrep" to use in msg output
3758if test -z "$EGREP"; then
3759set dummy egrep; ac_prog_name=$2
3760if test "${ac_cv_path_EGREP+set}" = set; then
3761 echo $ECHO_N "(cached) $ECHO_C" >&6
3762else
3763 ac_path_EGREP_found=false
3764# Loop through the user's path and test for each of PROGNAME-LIST
3765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3766for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3767do
3768 IFS=$as_save_IFS
3769 test -z "$as_dir" && as_dir=.
3770 for ac_prog in egrep; do
3771 for ac_exec_ext in '' $ac_executable_extensions; do
3772 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3773 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3774 # Check for GNU ac_path_EGREP and select it if it is found.
3775 # Check for GNU $ac_path_EGREP
3776case `"$ac_path_EGREP" --version 2>&1` in
3777*GNU*)
3778 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3779*)
3780 ac_count=0
3781 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3782 while :
3783 do
3784 cat "conftest.in" "conftest.in" >"conftest.tmp"
3785 mv "conftest.tmp" "conftest.in"
3786 cp "conftest.in" "conftest.nl"
3787 echo 'EGREP' >> "conftest.nl"
3788 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3789 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3790 ac_count=`expr $ac_count + 1`
3791 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3792 # Best one so far, save it but keep looking for a better one
3793 ac_cv_path_EGREP="$ac_path_EGREP"
3794 ac_path_EGREP_max=$ac_count
3795 fi
3796 # 10*(2^10) chars as input seems more than enough
3797 test $ac_count -gt 10 && break
3798 done
3799 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3800esac
3801
3802
3803 $ac_path_EGREP_found && break 3
3804 done
3805done
3806
3807done
3808IFS=$as_save_IFS
3809
3810
3811fi
3812
3813EGREP="$ac_cv_path_EGREP"
3814if test -z "$EGREP"; then
3815 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3816echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3817 { (exit 1); exit 1; }; }
3818fi
3819
3820else
3821 ac_cv_path_EGREP=$EGREP
3822fi
3823
3824
3825 fi
3826fi
3827{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3828echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3829 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003830
3831
Martin v. Löwis11437992002-04-12 09:54:03 +00003832
Martin v. Löwiseba40652007-08-30 20:10:57 +00003833{ echo "$as_me:$LINENO: checking for AIX" >&5
3834echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003835cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003836/* confdefs.h. */
3837_ACEOF
3838cat confdefs.h >>conftest.$ac_ext
3839cat >>conftest.$ac_ext <<_ACEOF
3840/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003841#ifdef _AIX
3842 yes
3843#endif
3844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003847 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003848 { echo "$as_me:$LINENO: result: yes" >&5
3849echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003851#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003852_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003853
3854else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003855 { echo "$as_me:$LINENO: result: no" >&5
3856echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003857fi
Mark Dickinsond19e1432009-12-31 21:17:29 +00003858rm -f conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003859
Michael W. Hudson54241132001-12-07 15:38:26 +00003860
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003861
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003862# Check for unsupported systems
3863case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003864atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003865 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3866 echo See README for details.
3867 exit 1;;
3868esac
3869
Michael W. Hudson54241132001-12-07 15:38:26 +00003870
Martin v. Löwiseba40652007-08-30 20:10:57 +00003871{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3872echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003873
Martin v. Löwiseba40652007-08-30 20:10:57 +00003874# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003875if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003876 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003877 case $withval in
3878 no) EXEEXT=;;
3879 yes) EXEEXT=.exe;;
3880 *) EXEEXT=$withval;;
3881 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003882fi
3883
3884{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3885echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003886
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003887# Test whether we're running on a non-case-sensitive system, in which
3888# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003889
Martin v. Löwiseba40652007-08-30 20:10:57 +00003890{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3891echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003892if test ! -d CaseSensitiveTestDir; then
3893mkdir CaseSensitiveTestDir
3894fi
3895
3896if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003897then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003898 { echo "$as_me:$LINENO: result: yes" >&5
3899echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003900 BUILDEXEEXT=.exe
3901else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003902 { echo "$as_me:$LINENO: result: no" >&5
3903echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003904 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003905fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003906rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003907
Guido van Rossumdd997f71998-10-07 19:58:26 +00003908case $MACHDEP in
3909bsdos*)
3910 case $CC in
3911 gcc) CC="$CC -D_HAVE_BSDI";;
3912 esac;;
3913esac
3914
Guido van Rossum24b1e751997-08-21 02:29:16 +00003915case $ac_sys_system in
3916hp*|HP*)
3917 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003918 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003919 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003920Monterey*)
3921 case $CC in
3922 cc) CC="$CC -Wl,-Bexport";;
3923 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003924SunOS*)
3925 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003926
3927cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003928#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003929_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003930
3931 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003932esac
3933
Michael W. Hudson54241132001-12-07 15:38:26 +00003934
3935
Martin v. Löwiseba40652007-08-30 20:10:57 +00003936{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3937echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003938if test -z "$LIBRARY"
3939then
3940 LIBRARY='libpython$(VERSION).a'
3941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003942{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3943echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003944
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003945# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003946# name of the library into which to insert object files). BLDLIBRARY is also
3947# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3948# is blank as the main program is not linked directly against LDLIBRARY.
3949# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3950# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3951# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3952# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003953#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003954# RUNSHARED is used to run shared python without installed libraries
3955#
3956# INSTSONAME is the name of the shared library that will be use to install
3957# on the system - some systems like version suffix, others don't
3958
3959
Michael W. Hudson54241132001-12-07 15:38:26 +00003960
3961
3962
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003963
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003964LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003965BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003966INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003967DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003968LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003969RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003970
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003971# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003972# If CXX is set, and if it is needed to link a main function that was
3973# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3974# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003975# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003976# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003977
Martin v. Löwiseba40652007-08-30 20:10:57 +00003978{ echo "$as_me:$LINENO: checking LINKCC" >&5
3979echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003980if test -z "$LINKCC"
3981then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003982 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003983 case $ac_sys_system in
3984 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003985 exp_extra="\"\""
3986 if test $ac_sys_release -ge 5 -o \
3987 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3988 exp_extra="."
3989 fi
3990 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003991 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003992 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003993 QNX*)
3994 # qcc must be used because the other compilers do not
3995 # support -N.
3996 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003997 esac
3998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003999{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4000echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004001
Martin v. Löwiseba40652007-08-30 20:10:57 +00004002{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4003echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
4004# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00004005if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004006 enableval=$enable_shared;
4007fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004008
Martin v. Löwis1142de32002-03-29 16:28:31 +00004009
4010if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00004011then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004012 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004013 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004014 enable_shared="yes";;
4015 *)
4016 enable_shared="no";;
4017 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004019{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4020echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004021
Martin v. Löwiseba40652007-08-30 20:10:57 +00004022{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4023echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4024# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004025if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004026 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004027 CC="$CC -pg"
4028 if test "$cross_compiling" = yes; then
4029 ac_enable_profiling="no"
4030else
4031 cat >conftest.$ac_ext <<_ACEOF
4032/* confdefs.h. */
4033_ACEOF
4034cat confdefs.h >>conftest.$ac_ext
4035cat >>conftest.$ac_ext <<_ACEOF
4036/* end confdefs.h. */
4037int main() { return 0; }
4038_ACEOF
4039rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004040if { (ac_try="$ac_link"
4041case "(($ac_try" in
4042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4043 *) ac_try_echo=$ac_try;;
4044esac
4045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4046 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004047 ac_status=$?
4048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4049 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004050 { (case "(($ac_try" in
4051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4052 *) ac_try_echo=$ac_try;;
4053esac
4054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4055 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004056 ac_status=$?
4057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4058 (exit $ac_status); }; }; then
4059 ac_enable_profiling="yes"
4060else
4061 echo "$as_me: program exited with status $ac_status" >&5
4062echo "$as_me: failed program was:" >&5
4063sed 's/^/| /' conftest.$ac_ext >&5
4064
4065( exit $ac_status )
4066ac_enable_profiling="no"
4067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004068rm -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 +00004069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004070
4071
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004072 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004073fi
4074
4075{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4076echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004077
4078case "$ac_enable_profiling" in
4079 "yes")
4080 BASECFLAGS="-pg $BASECFLAGS"
4081 LDFLAGS="-pg $LDFLAGS"
4082 ;;
4083esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004084
Martin v. Löwiseba40652007-08-30 20:10:57 +00004085{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4086echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004087
Guido van Rossumb8552162001-09-05 14:58:11 +00004088# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4089# library that we build, but we do not want to link against it (we
4090# will find it with a -framework option). For this reason there is an
4091# extra variable BLDLIBRARY against which Python and the extension
4092# modules are linked, BLDLIBRARY. This is normally the same as
4093# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004094if test "$enable_framework"
4095then
4096 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004097 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004098 BLDLIBRARY=''
4099else
4100 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004101fi
Jack Jansene578a632001-08-15 01:27:14 +00004102
Martin v. Löwis1142de32002-03-29 16:28:31 +00004103# Other platforms follow
4104if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004105
4106cat >>confdefs.h <<\_ACEOF
4107#define Py_ENABLE_SHARED 1
4108_ACEOF
4109
Martin v. Löwis1142de32002-03-29 16:28:31 +00004110 case $ac_sys_system in
4111 BeOS*)
4112 LDLIBRARY='libpython$(VERSION).so'
4113 ;;
4114 CYGWIN*)
4115 LDLIBRARY='libpython$(VERSION).dll.a'
4116 DLLLIBRARY='libpython$(VERSION).dll'
4117 ;;
4118 SunOS*)
4119 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004120 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004121 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004122 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004123 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004124 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004125 LDLIBRARY='libpython$(VERSION).so'
4126 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004127 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004128 case $ac_sys_system in
4129 FreeBSD*)
4130 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4131 ;;
4132 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004133 INSTSONAME="$LDLIBRARY".$SOVERSION
4134 ;;
4135 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004136 case `uname -m` in
4137 ia64)
4138 LDLIBRARY='libpython$(VERSION).so'
4139 ;;
4140 *)
4141 LDLIBRARY='libpython$(VERSION).sl'
4142 ;;
4143 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004144 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004145 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004146 ;;
4147 OSF*)
4148 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004149 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004150 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004151 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004152 atheos*)
4153 LDLIBRARY='libpython$(VERSION).so'
4154 BLDLIBRARY='-L. -lpython$(VERSION)'
4155 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4156 ;;
Ronald Oussorene9cce8e2009-01-02 10:46:42 +00004157 Darwin*)
4158 LDLIBRARY='libpython$(VERSION).dylib'
4159 BLDLIBRARY='-L. -lpython$(VERSION)'
4160 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4161 ;;
4162
Martin v. Löwis1142de32002-03-29 16:28:31 +00004163 esac
Jason Tishler30765592003-09-04 11:04:06 +00004164else # shared is disabled
4165 case $ac_sys_system in
4166 CYGWIN*)
4167 BLDLIBRARY='$(LIBRARY)'
4168 LDLIBRARY='libpython$(VERSION).dll.a'
4169 ;;
4170 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004171fi
4172
Martin v. Löwiseba40652007-08-30 20:10:57 +00004173{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4174echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004175
Martin v. Löwis11437992002-04-12 09:54:03 +00004176if test -n "$ac_tool_prefix"; then
4177 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4178set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004179{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4180echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004181if test "${ac_cv_prog_RANLIB+set}" = set; then
4182 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183else
4184 if test -n "$RANLIB"; then
4185 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4186else
Martin v. Löwis11437992002-04-12 09:54:03 +00004187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4188for as_dir in $PATH
4189do
4190 IFS=$as_save_IFS
4191 test -z "$as_dir" && as_dir=.
4192 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004193 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 +00004194 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4195 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4196 break 2
4197 fi
4198done
4199done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004200IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004201
Guido van Rossum627b2d71993-12-24 10:39:16 +00004202fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004204RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004205if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004206 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4207echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004209 { echo "$as_me:$LINENO: result: no" >&5
4210echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004211fi
4212
Martin v. Löwiseba40652007-08-30 20:10:57 +00004213
Martin v. Löwis11437992002-04-12 09:54:03 +00004214fi
4215if test -z "$ac_cv_prog_RANLIB"; then
4216 ac_ct_RANLIB=$RANLIB
4217 # Extract the first word of "ranlib", so it can be a program name with args.
4218set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004219{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4220echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004221if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4222 echo $ECHO_N "(cached) $ECHO_C" >&6
4223else
4224 if test -n "$ac_ct_RANLIB"; then
4225 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4226else
4227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4228for as_dir in $PATH
4229do
4230 IFS=$as_save_IFS
4231 test -z "$as_dir" && as_dir=.
4232 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004233 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 +00004234 ac_cv_prog_ac_ct_RANLIB="ranlib"
4235 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4236 break 2
4237 fi
4238done
4239done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004240IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004241
Martin v. Löwis11437992002-04-12 09:54:03 +00004242fi
4243fi
4244ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4245if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004246 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4247echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004248else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004249 { echo "$as_me:$LINENO: result: no" >&5
4250echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004251fi
4252
Martin v. Löwiseba40652007-08-30 20:10:57 +00004253 if test "x$ac_ct_RANLIB" = x; then
4254 RANLIB=":"
4255 else
4256 case $cross_compiling:$ac_tool_warned in
4257yes:)
4258{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4259whose name does not start with the host triplet. If you think this
4260configuration is useful to you, please write to autoconf@gnu.org." >&5
4261echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4262whose name does not start with the host triplet. If you think this
4263configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4264ac_tool_warned=yes ;;
4265esac
4266 RANLIB=$ac_ct_RANLIB
4267 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004268else
4269 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271
4272
Guido van Rossum7f43da71994-08-01 12:15:30 +00004273for ac_prog in ar aal
4274do
Martin v. Löwis11437992002-04-12 09:54:03 +00004275 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004276set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004277{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004279if test "${ac_cv_prog_AR+set}" = set; then
4280 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281else
4282 if test -n "$AR"; then
4283 ac_cv_prog_AR="$AR" # Let the user override the test.
4284else
Martin v. Löwis11437992002-04-12 09:54:03 +00004285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4286for as_dir in $PATH
4287do
4288 IFS=$as_save_IFS
4289 test -z "$as_dir" && as_dir=.
4290 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004291 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 +00004292 ac_cv_prog_AR="$ac_prog"
4293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4294 break 2
4295 fi
4296done
4297done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004298IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004299
Guido van Rossum7f43da71994-08-01 12:15:30 +00004300fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004301fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004302AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004303if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004304 { echo "$as_me:$LINENO: result: $AR" >&5
4305echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004306else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004307 { echo "$as_me:$LINENO: result: no" >&5
4308echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004310
Martin v. Löwiseba40652007-08-30 20:10:57 +00004311
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004313done
4314test -n "$AR" || AR="ar"
4315
Michael W. Hudson54241132001-12-07 15:38:26 +00004316
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004317
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004318# Extract the first word of "svnversion", so it can be a program name with args.
4319set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004320{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4321echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004322if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4323 echo $ECHO_N "(cached) $ECHO_C" >&6
4324else
4325 if test -n "$SVNVERSION"; then
4326 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4327else
4328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4329for as_dir in $PATH
4330do
4331 IFS=$as_save_IFS
4332 test -z "$as_dir" && as_dir=.
4333 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004334 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 +00004335 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004336 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4337 break 2
4338 fi
4339done
4340done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004341IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004342
Martin v. Löwisff600232006-04-03 19:12:32 +00004343 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004344fi
4345fi
4346SVNVERSION=$ac_cv_prog_SVNVERSION
4347if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004348 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4349echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004350else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004351 { echo "$as_me:$LINENO: result: no" >&5
4352echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004353fi
4354
Martin v. Löwiseba40652007-08-30 20:10:57 +00004355
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004356if test $SVNVERSION = found
4357then
4358 SVNVERSION="svnversion \$(srcdir)"
4359else
Benjamin Peterson2eb65452009-05-23 19:35:33 +00004360 SVNVERSION="echo Unversioned directory"
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004361fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004362
Neil Schemenauera42c8272001-03-31 00:01:55 +00004363case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004364bsdos*|hp*|HP*)
4365 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004366 if test -z "$INSTALL"
4367 then
4368 INSTALL="${srcdir}/install-sh -c"
4369 fi
4370esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004371ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004372for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4373 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004374 ac_aux_dir=$ac_dir
4375 ac_install_sh="$ac_aux_dir/install-sh -c"
4376 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004377 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004378 ac_aux_dir=$ac_dir
4379 ac_install_sh="$ac_aux_dir/install.sh -c"
4380 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004381 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004382 ac_aux_dir=$ac_dir
4383 ac_install_sh="$ac_aux_dir/shtool install -c"
4384 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004385 fi
4386done
4387if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004388 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4389echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004390 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004392
4393# These three variables are undocumented and unsupported,
4394# and are intended to be withdrawn in a future Autoconf release.
4395# They can cause serious problems if a builder's source tree is in a directory
4396# whose full name contains unusual characters.
4397ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4398ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4399ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4400
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004401
4402# Find a good install program. We prefer a C program (faster),
4403# so one script is as good as another. But avoid the broken or
4404# incompatible versions:
4405# SysV /etc/install, /usr/sbin/install
4406# SunOS /usr/etc/install
4407# IRIX /sbin/install
4408# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004409# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004410# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4411# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4412# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004413# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004414# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004415{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4416echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004417if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004418if test "${ac_cv_path_install+set}" = set; then
4419 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004420else
Martin v. Löwis11437992002-04-12 09:54:03 +00004421 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4422for as_dir in $PATH
4423do
4424 IFS=$as_save_IFS
4425 test -z "$as_dir" && as_dir=.
4426 # Account for people who put trailing slashes in PATH elements.
4427case $as_dir/ in
4428 ./ | .// | /cC/* | \
4429 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004430 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004431 /usr/ucb/* ) ;;
4432 *)
4433 # OSF1 and SCO ODT 3.0 have their own names for install.
4434 # Don't use installbsd from OSF since it installs stuff as root
4435 # by default.
4436 for ac_prog in ginstall scoinst install; do
4437 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004438 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 +00004439 if test $ac_prog = install &&
4440 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4441 # AIX install. It has an incompatible calling convention.
4442 :
4443 elif test $ac_prog = install &&
4444 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4445 # program-specific install script used by HP pwplus--don't use.
4446 :
4447 else
4448 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4449 break 3
4450 fi
4451 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004452 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004453 done
4454 ;;
4455esac
4456done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004457IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004458
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004459
4460fi
4461 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004462 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004463 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004464 # As a last resort, use the slow shell script. Don't cache a
4465 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004466 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004467 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004468 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004469 fi
4470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004471{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4472echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004473
4474# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4475# It thinks the first close brace ends the variable substitution.
4476test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4477
Martin v. Löwis11437992002-04-12 09:54:03 +00004478test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004479
4480test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4481
Michael W. Hudson54241132001-12-07 15:38:26 +00004482
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004483# Not every filesystem supports hard links
4484
4485if test -z "$LN" ; then
4486 case $ac_sys_system in
4487 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004488 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004489 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004490 *) LN=ln;;
4491 esac
4492fi
4493
Fred Drake109d9862001-07-11 06:27:56 +00004494# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004495{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4496echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004497
Martin v. Löwiseba40652007-08-30 20:10:57 +00004498# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004499if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004500 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004501if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004502then
4503
4504cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004505#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004506_ACEOF
4507
Martin v. Löwiseba40652007-08-30 20:10:57 +00004508 { echo "$as_me:$LINENO: result: yes" >&5
4509echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004510 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004511else { echo "$as_me:$LINENO: result: no" >&5
4512echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004513fi
4514else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004515 { echo "$as_me:$LINENO: result: no" >&5
4516echo "${ECHO_T}no" >&6; }
4517fi
4518
Fred Drake109d9862001-07-11 06:27:56 +00004519
Skip Montanarodecc6a42003-01-01 20:07:49 +00004520# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4521# merged with this chunk of code?
4522
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004523# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004524# ------------------------
4525# (The following bit of code is complicated enough - please keep things
4526# indented properly. Just pretend you're editing Python code. ;-)
4527
4528# There are two parallel sets of case statements below, one that checks to
4529# see if OPT was set and one that does BASECFLAGS setting based upon
4530# compiler and platform. BASECFLAGS tweaks need to be made even if the
4531# user set OPT.
4532
4533# tweak OPT based on compiler and platform, only if the user didn't set
4534# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004535
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004536if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004537then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004538 case $GCC in
4539 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004540 if test "$CC" != 'g++' ; then
4541 STRICT_PROTO="-Wstrict-prototypes"
4542 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004543 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4544 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4545 WRAP="-fwrapv"
4546 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004547 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004548 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004549 if test "$Py_DEBUG" = 'true' ; then
4550 # Optimization messes up debuggers, so turn it off for
4551 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004552 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004553 else
Thomas Hellere5529592007-12-13 21:20:29 +00004554 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004555 fi
4556 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004557 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004558 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004559 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004560 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004561 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004562 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4563 ;;
4564 esac
Fred Drake109d9862001-07-11 06:27:56 +00004565 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004566
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004567 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004568 OPT="-O"
4569 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004570 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004571
4572 # The current (beta) Monterey compiler dies with optimizations
4573 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004574 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004575 Monterey*)
4576 OPT=""
4577 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004578 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004579
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004580fi
4581
Skip Montanarodecc6a42003-01-01 20:07:49 +00004582
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004583
4584# The -arch flags for universal builds on OSX
4585UNIVERSAL_ARCH_FLAGS=
4586
4587
Skip Montanarodecc6a42003-01-01 20:07:49 +00004588# tweak BASECFLAGS based on compiler and platform
4589case $GCC in
4590yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004591 # Python violates C99 rules, by casting between incompatible
4592 # pointer types. GCC may generate bad code as a result of that,
4593 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004594 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4595echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004596 ac_save_cc="$CC"
4597 CC="$CC -fno-strict-aliasing"
4598 if test "$cross_compiling" = yes; then
4599 ac_cv_no_strict_aliasing_ok=no
4600else
4601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004602/* confdefs.h. */
4603_ACEOF
4604cat confdefs.h >>conftest.$ac_ext
4605cat >>conftest.$ac_ext <<_ACEOF
4606/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004607int main() { return 0; }
4608_ACEOF
4609rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004610if { (ac_try="$ac_link"
4611case "(($ac_try" in
4612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4613 *) ac_try_echo=$ac_try;;
4614esac
4615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4616 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004617 ac_status=$?
4618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4619 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004620 { (case "(($ac_try" in
4621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4622 *) ac_try_echo=$ac_try;;
4623esac
4624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4625 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004626 ac_status=$?
4627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4628 (exit $ac_status); }; }; then
4629 ac_cv_no_strict_aliasing_ok=yes
4630else
4631 echo "$as_me: program exited with status $ac_status" >&5
4632echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004633sed 's/^/| /' conftest.$ac_ext >&5
4634
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004635( exit $ac_status )
4636ac_cv_no_strict_aliasing_ok=no
4637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004638rm -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 +00004639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004640
4641
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004642 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004643 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4644echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004645 if test $ac_cv_no_strict_aliasing_ok = yes
4646 then
4647 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4648 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004649
4650 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4651 # support. Without this, treatment of subnormals doesn't follow
4652 # the standard.
4653 case $ac_sys_machine in
4654 alpha*)
4655 BASECFLAGS="$BASECFLAGS -mieee"
4656 ;;
4657 esac
4658
Skip Montanarodecc6a42003-01-01 20:07:49 +00004659 case $ac_sys_system in
4660 SCO_SV*)
4661 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4662 ;;
4663 # is there any other compiler on Darwin besides gcc?
4664 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004665 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4666 # used to be here, but non-Apple gcc doesn't accept them.
Benjamin Peterson4347c442008-07-17 15:59:24 +00004667
4668
Ronald Oussoren988117f2006-04-29 11:31:35 +00004669 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004670 UNIVERSAL_ARCH_FLAGS=""
4671 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4672 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004673 ARCH_RUN_32BIT=""
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004674
4675 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4676 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren7ab74352009-09-08 07:10:07 +00004677 ARCH_RUN_32BIT="true"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004678
4679 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4680 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorena4cb4722008-08-12 12:29:13 +00004681 ARCH_RUN_32BIT="arch -i386 -ppc"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004682
Ronald Oussoren7ab74352009-09-08 07:10:07 +00004683 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4684 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4685 ARCH_RUN_32BIT="arch -i386"
4686
4687 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4688 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4689 ARCH_RUN_32BIT="arch -i386 -ppc"
4690
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004691 else
Ronald Oussorenba0aa6b2009-09-20 20:16:38 +00004692 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4693echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004694 { (exit 1); exit 1; }; }
4695
4696 fi
4697
4698
4699 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren5a849d42008-07-22 07:06:00 +00004700 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Benjamin Peterson4347c442008-07-17 15:59:24 +00004701 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4702 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4703 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00004704 fi
4705
Benjamin Peterson4347c442008-07-17 15:59:24 +00004706 # Calculate the right deployment target for this build.
4707 #
4708 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4709 if test ${cur_target} '>' 10.2; then
4710 cur_target=10.3
Ronald Oussoren7ab74352009-09-08 07:10:07 +00004711 if test ${enable_universalsdk}; then
4712 if test "${UNIVERSAL_ARCHS}" = "all"; then
4713 # Ensure that the default platform for a
4714 # 4-way universal build is OSX 10.5,
4715 # that's the first OS release where
4716 # 4-way builds make sense.
4717 cur_target='10.5'
4718
4719 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4720 cur_target='10.5'
4721
4722 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4723 cur_target='10.5'
4724
4725 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4726 cur_target='10.5'
4727 fi
4728 else
4729 if test `arch` = "i386"; then
4730 # On Intel macs default to a deployment
4731 # target of 10.4, that's the first OSX
4732 # release with Intel support.
4733 cur_target="10.4"
4734 fi
4735 fi
Benjamin Peterson4347c442008-07-17 15:59:24 +00004736 fi
4737 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4738
4739 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4740 # environment with a value that is the same as what we'll use
4741 # in the Makefile to ensure that we'll get the same compiler
4742 # environment during configure and build time.
4743 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4744 export MACOSX_DEPLOYMENT_TARGET
4745 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4746
Skip Montanarodecc6a42003-01-01 20:07:49 +00004747 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004748 OSF*)
4749 BASECFLAGS="$BASECFLAGS -mieee"
4750 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004751 esac
4752 ;;
4753
4754*)
4755 case $ac_sys_system in
4756 OpenUNIX*|UnixWare*)
4757 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4758 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004759 OSF*)
4760 BASECFLAGS="$BASECFLAGS -ieee -std"
4761 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004762 SCO_SV*)
4763 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4764 ;;
4765 esac
4766 ;;
4767esac
4768
Fred Drakee1ceaa02001-12-04 20:55:47 +00004769if test "$Py_DEBUG" = 'true'; then
4770 :
4771else
4772 OPT="-DNDEBUG $OPT"
4773fi
4774
Guido van Rossum563e7081996-09-10 18:20:48 +00004775if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004776then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004777 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004778fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004779
Neal Norwitz020c46a2006-01-07 21:39:28 +00004780# disable check for icc since it seems to pass, but generates a warning
4781if test "$CC" = icc
4782then
4783 ac_cv_opt_olimit_ok=no
4784fi
4785
Martin v. Löwiseba40652007-08-30 20:10:57 +00004786{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4787echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004788if test "${ac_cv_opt_olimit_ok+set}" = set; then
4789 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004790else
4791 ac_save_cc="$CC"
4792CC="$CC -OPT:Olimit=0"
4793if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004794 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004795else
Martin v. Löwis11437992002-04-12 09:54:03 +00004796 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004797/* confdefs.h. */
4798_ACEOF
4799cat confdefs.h >>conftest.$ac_ext
4800cat >>conftest.$ac_ext <<_ACEOF
4801/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004802int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004803_ACEOF
4804rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004805if { (ac_try="$ac_link"
4806case "(($ac_try" in
4807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4808 *) ac_try_echo=$ac_try;;
4809esac
4810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4811 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004812 ac_status=$?
4813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4814 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004815 { (case "(($ac_try" in
4816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4817 *) ac_try_echo=$ac_try;;
4818esac
4819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4820 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004821 ac_status=$?
4822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004824 ac_cv_opt_olimit_ok=yes
4825else
Martin v. Löwis11437992002-04-12 09:54:03 +00004826 echo "$as_me: program exited with status $ac_status" >&5
4827echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004828sed 's/^/| /' conftest.$ac_ext >&5
4829
Martin v. Löwis11437992002-04-12 09:54:03 +00004830( exit $ac_status )
4831ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004833rm -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 +00004834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004835
4836
Guido van Rossum91922671997-10-09 20:24:13 +00004837CC="$ac_save_cc"
4838fi
4839
Martin v. Löwiseba40652007-08-30 20:10:57 +00004840{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4841echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004842if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004843 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004844 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4845 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4846 # environment?
4847 Darwin*)
4848 ;;
4849 *)
4850 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4851 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004852 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004853else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004854 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4855echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004856 if test "${ac_cv_olimit_ok+set}" = set; then
4857 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004858else
4859 ac_save_cc="$CC"
4860 CC="$CC -Olimit 1500"
4861 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004862 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004863else
Martin v. Löwis11437992002-04-12 09:54:03 +00004864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004865/* confdefs.h. */
4866_ACEOF
4867cat confdefs.h >>conftest.$ac_ext
4868cat >>conftest.$ac_ext <<_ACEOF
4869/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004870int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004871_ACEOF
4872rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004873if { (ac_try="$ac_link"
4874case "(($ac_try" in
4875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4876 *) ac_try_echo=$ac_try;;
4877esac
4878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4879 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004880 ac_status=$?
4881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4882 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004883 { (case "(($ac_try" in
4884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4885 *) ac_try_echo=$ac_try;;
4886esac
4887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4888 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004889 ac_status=$?
4890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4891 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004892 ac_cv_olimit_ok=yes
4893else
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 echo "$as_me: program exited with status $ac_status" >&5
4895echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004896sed 's/^/| /' conftest.$ac_ext >&5
4897
Martin v. Löwis11437992002-04-12 09:54:03 +00004898( exit $ac_status )
4899ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004901rm -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 +00004902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004903
4904
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004905 CC="$ac_save_cc"
4906fi
4907
Martin v. Löwiseba40652007-08-30 20:10:57 +00004908 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4909echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004910 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004911 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004912 fi
4913fi
4914
Martin v. Löwisaac13162006-10-19 10:58:46 +00004915# Check whether GCC supports PyArg_ParseTuple format
4916if test "$GCC" = "yes"
4917then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004918 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4919echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004920 save_CFLAGS=$CFLAGS
4921 CFLAGS="$CFLAGS -Werror"
4922 cat >conftest.$ac_ext <<_ACEOF
4923/* confdefs.h. */
4924_ACEOF
4925cat confdefs.h >>conftest.$ac_ext
4926cat >>conftest.$ac_ext <<_ACEOF
4927/* end confdefs.h. */
4928
4929 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4930
4931int
4932main ()
4933{
4934
4935 ;
4936 return 0;
4937}
4938_ACEOF
4939rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004940if { (ac_try="$ac_compile"
4941case "(($ac_try" in
4942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4943 *) ac_try_echo=$ac_try;;
4944esac
4945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004947 ac_status=$?
4948 grep -v '^ *+' conftest.er1 >conftest.err
4949 rm -f conftest.er1
4950 cat conftest.err >&5
4951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004952 (exit $ac_status); } && {
4953 test -z "$ac_c_werror_flag" ||
4954 test ! -s conftest.err
4955 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004956
4957cat >>confdefs.h <<\_ACEOF
4958#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4959_ACEOF
4960
Martin v. Löwiseba40652007-08-30 20:10:57 +00004961 { echo "$as_me:$LINENO: result: yes" >&5
4962echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004963else
4964 echo "$as_me: failed program was:" >&5
4965sed 's/^/| /' conftest.$ac_ext >&5
4966
Martin v. Löwiseba40652007-08-30 20:10:57 +00004967 { echo "$as_me:$LINENO: result: no" >&5
4968echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004969
4970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004971
4972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004973 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004974fi
4975
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004976# On some compilers, pthreads are available without further options
4977# (e.g. MacOS X). On some of these systems, the compiler will not
4978# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4979# So we have to see first whether pthreads are available without
4980# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004981{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4982echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004983if test "${ac_cv_pthread_is_default+set}" = set; then
4984 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004985else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004986 if test "$cross_compiling" = yes; then
4987 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004988else
Martin v. Löwis11437992002-04-12 09:54:03 +00004989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004990/* confdefs.h. */
4991_ACEOF
4992cat confdefs.h >>conftest.$ac_ext
4993cat >>conftest.$ac_ext <<_ACEOF
4994/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004995
Martin v. Löwis130fb172001-07-19 11:00:41 +00004996#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004997
4998void* routine(void* p){return NULL;}
4999
5000int main(){
5001 pthread_t p;
5002 if(pthread_create(&p,NULL,routine,NULL)!=0)
5003 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005004 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005005 return 0;
5006}
5007
Martin v. Löwis11437992002-04-12 09:54:03 +00005008_ACEOF
5009rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005010if { (ac_try="$ac_link"
5011case "(($ac_try" in
5012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5013 *) ac_try_echo=$ac_try;;
5014esac
5015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5016 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005017 ac_status=$?
5018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5019 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005020 { (case "(($ac_try" in
5021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5022 *) ac_try_echo=$ac_try;;
5023esac
5024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5025 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005026 ac_status=$?
5027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5028 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00005029
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005030 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00005031 ac_cv_kthread=no
5032 ac_cv_pthread=no
5033
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005034else
Martin v. Löwis11437992002-04-12 09:54:03 +00005035 echo "$as_me: program exited with status $ac_status" >&5
5036echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005037sed 's/^/| /' conftest.$ac_ext >&5
5038
Martin v. Löwis11437992002-04-12 09:54:03 +00005039( exit $ac_status )
5040ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005042rm -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 +00005043fi
5044
Martin v. Löwiseba40652007-08-30 20:10:57 +00005045
5046
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005047fi
5048
Martin v. Löwiseba40652007-08-30 20:10:57 +00005049{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5050echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005051
Michael W. Hudson54241132001-12-07 15:38:26 +00005052
Martin v. Löwis11437992002-04-12 09:54:03 +00005053if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005054then
5055 ac_cv_kpthread=no
5056else
5057# -Kpthread, if available, provides the right #defines
5058# and linker options to make pthread_create available
5059# Some compilers won't report that they do not support -Kpthread,
5060# so we need to run a program to see whether it really made the
5061# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005062{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5063echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005064if test "${ac_cv_kpthread+set}" = set; then
5065 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005066else
5067 ac_save_cc="$CC"
5068CC="$CC -Kpthread"
5069if test "$cross_compiling" = yes; then
5070 ac_cv_kpthread=no
5071else
Martin v. Löwis11437992002-04-12 09:54:03 +00005072 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005073/* confdefs.h. */
5074_ACEOF
5075cat confdefs.h >>conftest.$ac_ext
5076cat >>conftest.$ac_ext <<_ACEOF
5077/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005078
5079#include <pthread.h>
5080
5081void* routine(void* p){return NULL;}
5082
5083int main(){
5084 pthread_t p;
5085 if(pthread_create(&p,NULL,routine,NULL)!=0)
5086 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005087 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005088 return 0;
5089}
5090
Martin v. Löwis11437992002-04-12 09:54:03 +00005091_ACEOF
5092rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005093if { (ac_try="$ac_link"
5094case "(($ac_try" in
5095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5096 *) ac_try_echo=$ac_try;;
5097esac
5098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5099 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005100 ac_status=$?
5101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5102 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005103 { (case "(($ac_try" in
5104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5105 *) ac_try_echo=$ac_try;;
5106esac
5107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5108 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005109 ac_status=$?
5110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5111 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005112 ac_cv_kpthread=yes
5113else
Martin v. Löwis11437992002-04-12 09:54:03 +00005114 echo "$as_me: program exited with status $ac_status" >&5
5115echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005116sed 's/^/| /' conftest.$ac_ext >&5
5117
Martin v. Löwis11437992002-04-12 09:54:03 +00005118( exit $ac_status )
5119ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005121rm -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 +00005122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005123
5124
Martin v. Löwis130fb172001-07-19 11:00:41 +00005125CC="$ac_save_cc"
5126fi
5127
Martin v. Löwiseba40652007-08-30 20:10:57 +00005128{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5129echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005130fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005131
Skip Montanarod8d39a02003-07-10 20:44:10 +00005132if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005133then
5134# -Kthread, if available, provides the right #defines
5135# and linker options to make pthread_create available
5136# Some compilers won't report that they do not support -Kthread,
5137# so we need to run a program to see whether it really made the
5138# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005139{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5140echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005141if test "${ac_cv_kthread+set}" = set; then
5142 echo $ECHO_N "(cached) $ECHO_C" >&6
5143else
5144 ac_save_cc="$CC"
5145CC="$CC -Kthread"
5146if test "$cross_compiling" = yes; then
5147 ac_cv_kthread=no
5148else
5149 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005150/* confdefs.h. */
5151_ACEOF
5152cat confdefs.h >>conftest.$ac_ext
5153cat >>conftest.$ac_ext <<_ACEOF
5154/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005155
5156#include <pthread.h>
5157
5158void* routine(void* p){return NULL;}
5159
5160int main(){
5161 pthread_t p;
5162 if(pthread_create(&p,NULL,routine,NULL)!=0)
5163 return 1;
5164 (void)pthread_detach(p);
5165 return 0;
5166}
5167
5168_ACEOF
5169rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005170if { (ac_try="$ac_link"
5171case "(($ac_try" in
5172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5173 *) ac_try_echo=$ac_try;;
5174esac
5175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5176 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005177 ac_status=$?
5178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005180 { (case "(($ac_try" in
5181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5182 *) ac_try_echo=$ac_try;;
5183esac
5184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5185 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005186 ac_status=$?
5187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5188 (exit $ac_status); }; }; then
5189 ac_cv_kthread=yes
5190else
5191 echo "$as_me: program exited with status $ac_status" >&5
5192echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005193sed 's/^/| /' conftest.$ac_ext >&5
5194
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005195( exit $ac_status )
5196ac_cv_kthread=no
5197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005198rm -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 +00005199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005200
5201
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005202CC="$ac_save_cc"
5203fi
5204
Martin v. Löwiseba40652007-08-30 20:10:57 +00005205{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5206echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005207fi
5208
Skip Montanarod8d39a02003-07-10 20:44:10 +00005209if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005210then
5211# -pthread, if available, provides the right #defines
5212# and linker options to make pthread_create available
5213# Some compilers won't report that they do not support -pthread,
5214# so we need to run a program to see whether it really made the
5215# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005216{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5217echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005218if test "${ac_cv_thread+set}" = set; then
5219 echo $ECHO_N "(cached) $ECHO_C" >&6
5220else
5221 ac_save_cc="$CC"
5222CC="$CC -pthread"
5223if test "$cross_compiling" = yes; then
5224 ac_cv_pthread=no
5225else
5226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005227/* confdefs.h. */
5228_ACEOF
5229cat confdefs.h >>conftest.$ac_ext
5230cat >>conftest.$ac_ext <<_ACEOF
5231/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005232
5233#include <pthread.h>
5234
5235void* routine(void* p){return NULL;}
5236
5237int main(){
5238 pthread_t p;
5239 if(pthread_create(&p,NULL,routine,NULL)!=0)
5240 return 1;
5241 (void)pthread_detach(p);
5242 return 0;
5243}
5244
5245_ACEOF
5246rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005247if { (ac_try="$ac_link"
5248case "(($ac_try" in
5249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5250 *) ac_try_echo=$ac_try;;
5251esac
5252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5253 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005254 ac_status=$?
5255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5256 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005257 { (case "(($ac_try" in
5258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5259 *) ac_try_echo=$ac_try;;
5260esac
5261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5262 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005263 ac_status=$?
5264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5265 (exit $ac_status); }; }; then
5266 ac_cv_pthread=yes
5267else
5268 echo "$as_me: program exited with status $ac_status" >&5
5269echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005270sed 's/^/| /' conftest.$ac_ext >&5
5271
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005272( exit $ac_status )
5273ac_cv_pthread=no
5274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005275rm -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 +00005276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005277
5278
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005279CC="$ac_save_cc"
5280fi
5281
Martin v. Löwiseba40652007-08-30 20:10:57 +00005282{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5283echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005284fi
5285
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005286# If we have set a CC compiler flag for thread support then
5287# check if it works for CXX, too.
5288ac_cv_cxx_thread=no
5289if test ! -z "$CXX"
5290then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005291{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5292echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005293ac_save_cxx="$CXX"
5294
5295if test "$ac_cv_kpthread" = "yes"
5296then
5297 CXX="$CXX -Kpthread"
5298 ac_cv_cxx_thread=yes
5299elif test "$ac_cv_kthread" = "yes"
5300then
5301 CXX="$CXX -Kthread"
5302 ac_cv_cxx_thread=yes
5303elif test "$ac_cv_pthread" = "yes"
5304then
5305 CXX="$CXX -pthread"
5306 ac_cv_cxx_thread=yes
5307fi
5308
5309if test $ac_cv_cxx_thread = yes
5310then
5311 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5312 $CXX -c conftest.$ac_ext 2>&5
5313 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5314 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5315 then
5316 ac_cv_cxx_thread=yes
5317 else
5318 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005319 fi
5320 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005322{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5323echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005324fi
5325CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005326
Michael W. Hudson54241132001-12-07 15:38:26 +00005327
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005328# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005329{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5330echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005331if test "${ac_cv_header_stdc+set}" = set; then
5332 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005333else
Martin v. Löwis11437992002-04-12 09:54:03 +00005334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005335/* confdefs.h. */
5336_ACEOF
5337cat confdefs.h >>conftest.$ac_ext
5338cat >>conftest.$ac_ext <<_ACEOF
5339/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005340#include <stdlib.h>
5341#include <stdarg.h>
5342#include <string.h>
5343#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005344
Skip Montanaro6dead952003-09-25 14:50:04 +00005345int
5346main ()
5347{
5348
5349 ;
5350 return 0;
5351}
Martin v. Löwis11437992002-04-12 09:54:03 +00005352_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005353rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005354if { (ac_try="$ac_compile"
5355case "(($ac_try" in
5356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5357 *) ac_try_echo=$ac_try;;
5358esac
5359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005362 grep -v '^ *+' conftest.er1 >conftest.err
5363 rm -f conftest.er1
5364 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005366 (exit $ac_status); } && {
5367 test -z "$ac_c_werror_flag" ||
5368 test ! -s conftest.err
5369 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005370 ac_cv_header_stdc=yes
5371else
Martin v. Löwis11437992002-04-12 09:54:03 +00005372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005373sed 's/^/| /' conftest.$ac_ext >&5
5374
Martin v. Löwiseba40652007-08-30 20:10:57 +00005375 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005377
5378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005379
5380if test $ac_cv_header_stdc = yes; then
5381 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005382 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005383/* confdefs.h. */
5384_ACEOF
5385cat confdefs.h >>conftest.$ac_ext
5386cat >>conftest.$ac_ext <<_ACEOF
5387/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005388#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005389
5390_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005392 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005393 :
5394else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005395 ac_cv_header_stdc=no
5396fi
Mark Dickinsond19e1432009-12-31 21:17:29 +00005397rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005398
5399fi
5400
5401if test $ac_cv_header_stdc = yes; then
5402 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005404/* confdefs.h. */
5405_ACEOF
5406cat confdefs.h >>conftest.$ac_ext
5407cat >>conftest.$ac_ext <<_ACEOF
5408/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005409#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005410
5411_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005413 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005414 :
5415else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005416 ac_cv_header_stdc=no
5417fi
Mark Dickinsond19e1432009-12-31 21:17:29 +00005418rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005419
5420fi
5421
5422if test $ac_cv_header_stdc = yes; then
5423 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005424 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005425 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005426else
Martin v. Löwis11437992002-04-12 09:54:03 +00005427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005428/* confdefs.h. */
5429_ACEOF
5430cat confdefs.h >>conftest.$ac_ext
5431cat >>conftest.$ac_ext <<_ACEOF
5432/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005433#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005434#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005435#if ((' ' & 0x0FF) == 0x020)
5436# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5437# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5438#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005439# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005440 (('a' <= (c) && (c) <= 'i') \
5441 || ('j' <= (c) && (c) <= 'r') \
5442 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005443# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5444#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005445
Martin v. Löwis11437992002-04-12 09:54:03 +00005446#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5447int
5448main ()
5449{
5450 int i;
5451 for (i = 0; i < 256; i++)
5452 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005453 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005454 return 2;
5455 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005456}
5457_ACEOF
5458rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005459if { (ac_try="$ac_link"
5460case "(($ac_try" in
5461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5462 *) ac_try_echo=$ac_try;;
5463esac
5464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5465 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005466 ac_status=$?
5467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5468 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005469 { (case "(($ac_try" in
5470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5471 *) ac_try_echo=$ac_try;;
5472esac
5473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5474 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005475 ac_status=$?
5476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5477 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005478 :
5479else
Martin v. Löwis11437992002-04-12 09:54:03 +00005480 echo "$as_me: program exited with status $ac_status" >&5
5481echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005482sed 's/^/| /' conftest.$ac_ext >&5
5483
Martin v. Löwis11437992002-04-12 09:54:03 +00005484( exit $ac_status )
5485ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005487rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5488fi
5489
5490
Michael W. Hudson54241132001-12-07 15:38:26 +00005491fi
5492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005493{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5494echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005495if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005496
5497cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005498#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005499_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005500
5501fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005502
Skip Montanarob9820a32004-01-17 00:16:12 +00005503# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005514 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005515do
5516as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005517{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5518echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5519if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005520 echo $ECHO_N "(cached) $ECHO_C" >&6
5521else
5522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005523/* confdefs.h. */
5524_ACEOF
5525cat confdefs.h >>conftest.$ac_ext
5526cat >>conftest.$ac_ext <<_ACEOF
5527/* end confdefs.h. */
5528$ac_includes_default
5529
5530#include <$ac_header>
5531_ACEOF
5532rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005533if { (ac_try="$ac_compile"
5534case "(($ac_try" in
5535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5536 *) ac_try_echo=$ac_try;;
5537esac
5538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5539 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005540 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005541 grep -v '^ *+' conftest.er1 >conftest.err
5542 rm -f conftest.er1
5543 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005545 (exit $ac_status); } && {
5546 test -z "$ac_c_werror_flag" ||
5547 test ! -s conftest.err
5548 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005549 eval "$as_ac_Header=yes"
5550else
5551 echo "$as_me: failed program was:" >&5
5552sed 's/^/| /' conftest.$ac_ext >&5
5553
Martin v. Löwiseba40652007-08-30 20:10:57 +00005554 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005556
5557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005559ac_res=`eval echo '${'$as_ac_Header'}'`
5560 { echo "$as_me:$LINENO: result: $ac_res" >&5
5561echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005562if test `eval echo '${'$as_ac_Header'}'` = yes; then
5563 cat >>confdefs.h <<_ACEOF
5564#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5565_ACEOF
5566
5567fi
5568
5569done
5570
5571
Martin v. Löwis11437992002-04-12 09:54:03 +00005572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
Anthony Baxter8a560de2004-10-13 15:30:56 +00005608
Martin v. Löwisc3001752005-01-23 09:27:24 +00005609
Martin v. Löwis11017b12006-01-14 18:12:57 +00005610
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005611
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005612
5613
5614
5615
5616
5617
5618
5619
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005620
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005621
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005622
5623
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005624
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005625
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005626for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5627fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005628ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005629shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005630unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005631sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5632sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005633sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005634sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005635sys/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 +00005636sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005637bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005638do
Martin v. Löwis11437992002-04-12 09:54:03 +00005639as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005640if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5641 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5642echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5643if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005644 echo $ECHO_N "(cached) $ECHO_C" >&6
5645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005646ac_res=`eval echo '${'$as_ac_Header'}'`
5647 { echo "$as_me:$LINENO: result: $ac_res" >&5
5648echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005649else
Martin v. Löwis11437992002-04-12 09:54:03 +00005650 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005651{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5652echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005654/* confdefs.h. */
5655_ACEOF
5656cat confdefs.h >>conftest.$ac_ext
5657cat >>conftest.$ac_ext <<_ACEOF
5658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005659$ac_includes_default
5660#include <$ac_header>
5661_ACEOF
5662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005663if { (ac_try="$ac_compile"
5664case "(($ac_try" in
5665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5666 *) ac_try_echo=$ac_try;;
5667esac
5668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005671 grep -v '^ *+' conftest.er1 >conftest.err
5672 rm -f conftest.er1
5673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005675 (exit $ac_status); } && {
5676 test -z "$ac_c_werror_flag" ||
5677 test ! -s conftest.err
5678 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005679 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005680else
Martin v. Löwis11437992002-04-12 09:54:03 +00005681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005682sed 's/^/| /' conftest.$ac_ext >&5
5683
Martin v. Löwiseba40652007-08-30 20:10:57 +00005684 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005686
5687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5688{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5689echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005690
5691# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005692{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5693echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005694cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005695/* confdefs.h. */
5696_ACEOF
5697cat confdefs.h >>conftest.$ac_ext
5698cat >>conftest.$ac_ext <<_ACEOF
5699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005700#include <$ac_header>
5701_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005702if { (ac_try="$ac_cpp conftest.$ac_ext"
5703case "(($ac_try" in
5704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5705 *) ac_try_echo=$ac_try;;
5706esac
5707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5708 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005709 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005710 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005711 rm -f conftest.er1
5712 cat conftest.err >&5
5713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005714 (exit $ac_status); } >/dev/null && {
5715 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5716 test ! -s conftest.err
5717 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005718 ac_header_preproc=yes
5719else
5720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005721sed 's/^/| /' conftest.$ac_ext >&5
5722
Martin v. Löwis11437992002-04-12 09:54:03 +00005723 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005725
Martin v. Löwis11437992002-04-12 09:54:03 +00005726rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005727{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5728echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005729
5730# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005731case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5732 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005733 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5734echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005735 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5736echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5737 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005738 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005739 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005740 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5741echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005742 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5743echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5744 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5745echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5746 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5747echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005748 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5749echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005750 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5751echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005752 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005753## ------------------------------------------------ ##
5754## Report this to http://www.python.org/python-bugs ##
5755## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005756_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005757 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005758 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005759esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005760{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5761echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5762if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005763 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005764else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005765 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005767ac_res=`eval echo '${'$as_ac_Header'}'`
5768 { echo "$as_me:$LINENO: result: $ac_res" >&5
5769echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005770
5771fi
5772if test `eval echo '${'$as_ac_Header'}'` = yes; then
5773 cat >>confdefs.h <<_ACEOF
5774#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5775_ACEOF
5776
5777fi
5778
Guido van Rossum627b2d71993-12-24 10:39:16 +00005779done
5780
Martin v. Löwis11437992002-04-12 09:54:03 +00005781
5782
5783
5784
5785
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005786ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005787for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5788 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005789{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5790echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5791if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005792 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005793else
Martin v. Löwis11437992002-04-12 09:54:03 +00005794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005795/* confdefs.h. */
5796_ACEOF
5797cat confdefs.h >>conftest.$ac_ext
5798cat >>conftest.$ac_ext <<_ACEOF
5799/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005800#include <sys/types.h>
5801#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005802
Martin v. Löwis11437992002-04-12 09:54:03 +00005803int
5804main ()
5805{
5806if ((DIR *) 0)
5807return 0;
5808 ;
5809 return 0;
5810}
5811_ACEOF
5812rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005813if { (ac_try="$ac_compile"
5814case "(($ac_try" in
5815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5816 *) ac_try_echo=$ac_try;;
5817esac
5818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5819 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005821 grep -v '^ *+' conftest.er1 >conftest.err
5822 rm -f conftest.er1
5823 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005825 (exit $ac_status); } && {
5826 test -z "$ac_c_werror_flag" ||
5827 test ! -s conftest.err
5828 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005829 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005830else
Martin v. Löwis11437992002-04-12 09:54:03 +00005831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005832sed 's/^/| /' conftest.$ac_ext >&5
5833
Martin v. Löwiseba40652007-08-30 20:10:57 +00005834 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005836
5837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005838fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005839ac_res=`eval echo '${'$as_ac_Header'}'`
5840 { echo "$as_me:$LINENO: result: $ac_res" >&5
5841echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005842if test `eval echo '${'$as_ac_Header'}'` = yes; then
5843 cat >>confdefs.h <<_ACEOF
5844#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5845_ACEOF
5846
5847ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005848fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005849
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005850done
5851# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5852if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005853 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5854echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005855if test "${ac_cv_search_opendir+set}" = set; then
5856 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005857else
Martin v. Löwis11437992002-04-12 09:54:03 +00005858 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005859cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005860/* confdefs.h. */
5861_ACEOF
5862cat confdefs.h >>conftest.$ac_ext
5863cat >>conftest.$ac_ext <<_ACEOF
5864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005865
Martin v. Löwiseba40652007-08-30 20:10:57 +00005866/* Override any GCC internal prototype to avoid an error.
5867 Use char because int might match the return type of a GCC
5868 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005869#ifdef __cplusplus
5870extern "C"
5871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005872char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005873int
5874main ()
5875{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005876return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005877 ;
5878 return 0;
5879}
5880_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005881for ac_lib in '' dir; do
5882 if test -z "$ac_lib"; then
5883 ac_res="none required"
5884 else
5885 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005886 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005887 fi
5888 rm -f conftest.$ac_objext conftest$ac_exeext
5889if { (ac_try="$ac_link"
5890case "(($ac_try" in
5891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5892 *) ac_try_echo=$ac_try;;
5893esac
5894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5895 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005896 ac_status=$?
5897 grep -v '^ *+' conftest.er1 >conftest.err
5898 rm -f conftest.er1
5899 cat conftest.err >&5
5900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005901 (exit $ac_status); } && {
5902 test -z "$ac_c_werror_flag" ||
5903 test ! -s conftest.err
5904 } && test -s conftest$ac_exeext &&
5905 $as_test_x conftest$ac_exeext; then
5906 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005907else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005908 echo "$as_me: failed program was:" >&5
5909sed 's/^/| /' conftest.$ac_ext >&5
5910
Martin v. Löwiseba40652007-08-30 20:10:57 +00005911
Brett Cannon19fab762007-06-02 03:02:29 +00005912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005913
5914rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5915 conftest$ac_exeext
5916 if test "${ac_cv_search_opendir+set}" = set; then
5917 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005919done
5920if test "${ac_cv_search_opendir+set}" = set; then
5921 :
5922else
5923 ac_cv_search_opendir=no
5924fi
5925rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005926LIBS=$ac_func_search_save_LIBS
5927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005928{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5929echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5930ac_res=$ac_cv_search_opendir
5931if test "$ac_res" != no; then
5932 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005933
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005934fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005935
Michael W. Hudson54241132001-12-07 15:38:26 +00005936else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005937 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5938echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005939if test "${ac_cv_search_opendir+set}" = set; then
5940 echo $ECHO_N "(cached) $ECHO_C" >&6
5941else
5942 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005943cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005944/* confdefs.h. */
5945_ACEOF
5946cat confdefs.h >>conftest.$ac_ext
5947cat >>conftest.$ac_ext <<_ACEOF
5948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005949
Martin v. Löwiseba40652007-08-30 20:10:57 +00005950/* Override any GCC internal prototype to avoid an error.
5951 Use char because int might match the return type of a GCC
5952 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005953#ifdef __cplusplus
5954extern "C"
5955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005956char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005957int
5958main ()
5959{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005960return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005961 ;
5962 return 0;
5963}
5964_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005965for ac_lib in '' x; do
5966 if test -z "$ac_lib"; then
5967 ac_res="none required"
5968 else
5969 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005970 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005971 fi
5972 rm -f conftest.$ac_objext conftest$ac_exeext
5973if { (ac_try="$ac_link"
5974case "(($ac_try" in
5975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5976 *) ac_try_echo=$ac_try;;
5977esac
5978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5979 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005980 ac_status=$?
5981 grep -v '^ *+' conftest.er1 >conftest.err
5982 rm -f conftest.er1
5983 cat conftest.err >&5
5984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005985 (exit $ac_status); } && {
5986 test -z "$ac_c_werror_flag" ||
5987 test ! -s conftest.err
5988 } && test -s conftest$ac_exeext &&
5989 $as_test_x conftest$ac_exeext; then
5990 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005991else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005992 echo "$as_me: failed program was:" >&5
5993sed 's/^/| /' conftest.$ac_ext >&5
5994
Martin v. Löwiseba40652007-08-30 20:10:57 +00005995
Brett Cannon19fab762007-06-02 03:02:29 +00005996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005997
5998rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5999 conftest$ac_exeext
6000 if test "${ac_cv_search_opendir+set}" = set; then
6001 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006003done
6004if test "${ac_cv_search_opendir+set}" = set; then
6005 :
6006else
6007 ac_cv_search_opendir=no
6008fi
6009rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006010LIBS=$ac_func_search_save_LIBS
6011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006012{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6013echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
6014ac_res=$ac_cv_search_opendir
6015if test "$ac_res" != no; then
6016 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006017
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006018fi
6019
6020fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006021
Martin v. Löwiseba40652007-08-30 20:10:57 +00006022{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6023echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
6025 echo $ECHO_N "(cached) $ECHO_C" >&6
6026else
6027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006028/* confdefs.h. */
6029_ACEOF
6030cat confdefs.h >>conftest.$ac_ext
6031cat >>conftest.$ac_ext <<_ACEOF
6032/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006034int
6035main ()
6036{
6037return makedev(0, 0);
6038 ;
6039 return 0;
6040}
6041_ACEOF
6042rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006043if { (ac_try="$ac_link"
6044case "(($ac_try" in
6045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6046 *) ac_try_echo=$ac_try;;
6047esac
6048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6049 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006051 grep -v '^ *+' conftest.er1 >conftest.err
6052 rm -f conftest.er1
6053 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006055 (exit $ac_status); } && {
6056 test -z "$ac_c_werror_flag" ||
6057 test ! -s conftest.err
6058 } && test -s conftest$ac_exeext &&
6059 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006060 ac_cv_header_sys_types_h_makedev=yes
6061else
6062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006063sed 's/^/| /' conftest.$ac_ext >&5
6064
Martin v. Löwiseba40652007-08-30 20:10:57 +00006065 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006067
6068rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006069 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070
6071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006072{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6073echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074
6075if test $ac_cv_header_sys_types_h_makedev = no; then
6076if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006077 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6078echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6080 echo $ECHO_N "(cached) $ECHO_C" >&6
6081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006082{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6083echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084else
6085 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006086{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6087echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006089/* confdefs.h. */
6090_ACEOF
6091cat confdefs.h >>conftest.$ac_ext
6092cat >>conftest.$ac_ext <<_ACEOF
6093/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094$ac_includes_default
6095#include <sys/mkdev.h>
6096_ACEOF
6097rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006098if { (ac_try="$ac_compile"
6099case "(($ac_try" in
6100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6101 *) ac_try_echo=$ac_try;;
6102esac
6103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006106 grep -v '^ *+' conftest.er1 >conftest.err
6107 rm -f conftest.er1
6108 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006110 (exit $ac_status); } && {
6111 test -z "$ac_c_werror_flag" ||
6112 test ! -s conftest.err
6113 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114 ac_header_compiler=yes
6115else
6116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006117sed 's/^/| /' conftest.$ac_ext >&5
6118
Martin v. Löwiseba40652007-08-30 20:10:57 +00006119 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006121
6122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6123{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6124echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006125
6126# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006127{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6128echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006129cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006130/* confdefs.h. */
6131_ACEOF
6132cat confdefs.h >>conftest.$ac_ext
6133cat >>conftest.$ac_ext <<_ACEOF
6134/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006135#include <sys/mkdev.h>
6136_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006137if { (ac_try="$ac_cpp conftest.$ac_ext"
6138case "(($ac_try" in
6139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6140 *) ac_try_echo=$ac_try;;
6141esac
6142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6143 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006145 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146 rm -f conftest.er1
6147 cat conftest.err >&5
6148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006149 (exit $ac_status); } >/dev/null && {
6150 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6151 test ! -s conftest.err
6152 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153 ac_header_preproc=yes
6154else
6155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006156sed 's/^/| /' conftest.$ac_ext >&5
6157
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158 ac_header_preproc=no
6159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006160
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006161rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006162{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6163echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006164
6165# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006166case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6167 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006168 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6169echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006170 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6171echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6172 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006173 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006174 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006175 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6176echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006177 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6178echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6179 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6180echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6181 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6182echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006183 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6184echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006185 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6186echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006187 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006188## ------------------------------------------------ ##
6189## Report this to http://www.python.org/python-bugs ##
6190## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006191_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006192 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006193 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006195{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6196echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6198 echo $ECHO_N "(cached) $ECHO_C" >&6
6199else
6200 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6201fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006202{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6203echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204
6205fi
6206if test $ac_cv_header_sys_mkdev_h = yes; then
6207
6208cat >>confdefs.h <<\_ACEOF
6209#define MAJOR_IN_MKDEV 1
6210_ACEOF
6211
6212fi
6213
6214
6215
6216 if test $ac_cv_header_sys_mkdev_h = no; then
6217 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006218 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6219echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6221 echo $ECHO_N "(cached) $ECHO_C" >&6
6222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006223{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6224echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225else
6226 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006227{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6228echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006230/* confdefs.h. */
6231_ACEOF
6232cat confdefs.h >>conftest.$ac_ext
6233cat >>conftest.$ac_ext <<_ACEOF
6234/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235$ac_includes_default
6236#include <sys/sysmacros.h>
6237_ACEOF
6238rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006239if { (ac_try="$ac_compile"
6240case "(($ac_try" in
6241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6242 *) ac_try_echo=$ac_try;;
6243esac
6244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6245 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006247 grep -v '^ *+' conftest.er1 >conftest.err
6248 rm -f conftest.er1
6249 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006251 (exit $ac_status); } && {
6252 test -z "$ac_c_werror_flag" ||
6253 test ! -s conftest.err
6254 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255 ac_header_compiler=yes
6256else
6257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006258sed 's/^/| /' conftest.$ac_ext >&5
6259
Martin v. Löwiseba40652007-08-30 20:10:57 +00006260 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006262
6263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6264{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6265echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266
6267# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006268{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6269echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006270cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006271/* confdefs.h. */
6272_ACEOF
6273cat confdefs.h >>conftest.$ac_ext
6274cat >>conftest.$ac_ext <<_ACEOF
6275/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276#include <sys/sysmacros.h>
6277_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006278if { (ac_try="$ac_cpp conftest.$ac_ext"
6279case "(($ac_try" in
6280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6281 *) ac_try_echo=$ac_try;;
6282esac
6283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6284 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006286 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006287 rm -f conftest.er1
6288 cat conftest.err >&5
6289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006290 (exit $ac_status); } >/dev/null && {
6291 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6292 test ! -s conftest.err
6293 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294 ac_header_preproc=yes
6295else
6296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006297sed 's/^/| /' conftest.$ac_ext >&5
6298
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299 ac_header_preproc=no
6300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006301
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006303{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6304echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305
6306# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006307case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6308 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006309 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6310echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006311 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6312echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6313 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006314 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006315 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006316 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6317echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006318 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6319echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6320 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6321echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6322 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6323echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006324 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6325echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006326 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6327echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006328 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006329## ------------------------------------------------ ##
6330## Report this to http://www.python.org/python-bugs ##
6331## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006332_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006333 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006334 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006335esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006336{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6337echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006338if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6339 echo $ECHO_N "(cached) $ECHO_C" >&6
6340else
6341 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006343{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6344echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006345
6346fi
6347if test $ac_cv_header_sys_sysmacros_h = yes; then
6348
6349cat >>confdefs.h <<\_ACEOF
6350#define MAJOR_IN_SYSMACROS 1
6351_ACEOF
6352
6353fi
6354
6355
6356 fi
6357fi
6358
Michael W. Hudson54241132001-12-07 15:38:26 +00006359
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006360# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006361
6362for ac_header in term.h
6363do
6364as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006365{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6366echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6367if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006368 echo $ECHO_N "(cached) $ECHO_C" >&6
6369else
6370 cat >conftest.$ac_ext <<_ACEOF
6371/* confdefs.h. */
6372_ACEOF
6373cat confdefs.h >>conftest.$ac_ext
6374cat >>conftest.$ac_ext <<_ACEOF
6375/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006376
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006377#ifdef HAVE_CURSES_H
6378#include <curses.h>
6379#endif
6380
6381
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006382#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006383_ACEOF
6384rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006385if { (ac_try="$ac_compile"
6386case "(($ac_try" in
6387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6388 *) ac_try_echo=$ac_try;;
6389esac
6390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6391 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006392 ac_status=$?
6393 grep -v '^ *+' conftest.er1 >conftest.err
6394 rm -f conftest.er1
6395 cat conftest.err >&5
6396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006397 (exit $ac_status); } && {
6398 test -z "$ac_c_werror_flag" ||
6399 test ! -s conftest.err
6400 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006401 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006402else
6403 echo "$as_me: failed program was:" >&5
6404sed 's/^/| /' conftest.$ac_ext >&5
6405
Martin v. Löwiseba40652007-08-30 20:10:57 +00006406 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006408
6409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411ac_res=`eval echo '${'$as_ac_Header'}'`
6412 { echo "$as_me:$LINENO: result: $ac_res" >&5
6413echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006414if test `eval echo '${'$as_ac_Header'}'` = yes; then
6415 cat >>confdefs.h <<_ACEOF
6416#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6417_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006418
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006419fi
6420
6421done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006422
6423
Martin v. Löwis11017b12006-01-14 18:12:57 +00006424# On Linux, netlink.h requires asm/types.h
6425
6426for ac_header in linux/netlink.h
6427do
6428as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006429{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6430echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6431if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006432 echo $ECHO_N "(cached) $ECHO_C" >&6
6433else
6434 cat >conftest.$ac_ext <<_ACEOF
6435/* confdefs.h. */
6436_ACEOF
6437cat confdefs.h >>conftest.$ac_ext
6438cat >>conftest.$ac_ext <<_ACEOF
6439/* end confdefs.h. */
6440
6441#ifdef HAVE_ASM_TYPES_H
6442#include <asm/types.h>
6443#endif
6444#ifdef HAVE_SYS_SOCKET_H
6445#include <sys/socket.h>
6446#endif
6447
6448
6449#include <$ac_header>
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öwis11017b12006-01-14 18:12:57 +00006459 ac_status=$?
6460 grep -v '^ *+' conftest.er1 >conftest.err
6461 rm -f conftest.er1
6462 cat conftest.err >&5
6463 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öwis11017b12006-01-14 18:12:57 +00006468 eval "$as_ac_Header=yes"
6469else
6470 echo "$as_me: failed program was:" >&5
6471sed 's/^/| /' conftest.$ac_ext >&5
6472
Martin v. Löwiseba40652007-08-30 20:10:57 +00006473 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006475
6476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006478ac_res=`eval echo '${'$as_ac_Header'}'`
6479 { echo "$as_me:$LINENO: result: $ac_res" >&5
6480echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006481if test `eval echo '${'$as_ac_Header'}'` = yes; then
6482 cat >>confdefs.h <<_ACEOF
6483#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6484_ACEOF
6485
6486fi
6487
6488done
6489
6490
Guido van Rossum627b2d71993-12-24 10:39:16 +00006491# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006492was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006493{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6494echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006496/* confdefs.h. */
6497_ACEOF
6498cat confdefs.h >>conftest.$ac_ext
6499cat >>conftest.$ac_ext <<_ACEOF
6500/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006501#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006502
6503_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006505 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006506 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006507else
Martin v. Löwis11437992002-04-12 09:54:03 +00006508
6509
6510cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006511#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006512_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006513
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006514
Guido van Rossum627b2d71993-12-24 10:39:16 +00006515fi
Mark Dickinsond19e1432009-12-31 21:17:29 +00006516rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006517
Martin v. Löwiseba40652007-08-30 20:10:57 +00006518{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6519echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006520
Neal Norwitz11690112002-07-30 01:08:28 +00006521# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006522{ echo "$as_me:$LINENO: checking for makedev" >&5
6523echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006524cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006525/* confdefs.h. */
6526_ACEOF
6527cat confdefs.h >>conftest.$ac_ext
6528cat >>conftest.$ac_ext <<_ACEOF
6529/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006530#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006531int
6532main ()
6533{
6534 makedev(0, 0)
6535 ;
6536 return 0;
6537}
6538_ACEOF
6539rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006540if { (ac_try="$ac_link"
6541case "(($ac_try" in
6542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6543 *) ac_try_echo=$ac_try;;
6544esac
6545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6546 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006548 grep -v '^ *+' conftest.er1 >conftest.err
6549 rm -f conftest.er1
6550 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006552 (exit $ac_status); } && {
6553 test -z "$ac_c_werror_flag" ||
6554 test ! -s conftest.err
6555 } && test -s conftest$ac_exeext &&
6556 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006557 ac_cv_has_makedev=yes
6558else
6559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006560sed 's/^/| /' conftest.$ac_ext >&5
6561
Martin v. Löwiseba40652007-08-30 20:10:57 +00006562 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006564
6565rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006566 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006567if test "$ac_cv_has_makedev" = "no"; then
6568 # we didn't link, try if _OSF_SOURCE will allow us to link
6569 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006570/* confdefs.h. */
6571_ACEOF
6572cat confdefs.h >>conftest.$ac_ext
6573cat >>conftest.$ac_ext <<_ACEOF
6574/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006575
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006576#define _OSF_SOURCE 1
6577#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006578
Neal Norwitz11690112002-07-30 01:08:28 +00006579int
6580main ()
6581{
6582 makedev(0, 0)
6583 ;
6584 return 0;
6585}
6586_ACEOF
6587rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006588if { (ac_try="$ac_link"
6589case "(($ac_try" in
6590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6591 *) ac_try_echo=$ac_try;;
6592esac
6593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6594 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006596 grep -v '^ *+' conftest.er1 >conftest.err
6597 rm -f conftest.er1
6598 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006600 (exit $ac_status); } && {
6601 test -z "$ac_c_werror_flag" ||
6602 test ! -s conftest.err
6603 } && test -s conftest$ac_exeext &&
6604 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006605 ac_cv_has_makedev=yes
6606else
6607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006608sed 's/^/| /' conftest.$ac_ext >&5
6609
Martin v. Löwiseba40652007-08-30 20:10:57 +00006610 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006612
6613rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006614 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006615 if test "$ac_cv_has_makedev" = "yes"; then
6616
6617cat >>confdefs.h <<\_ACEOF
6618#define _OSF_SOURCE 1
6619_ACEOF
6620
6621 fi
6622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006623{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6624echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006625if test "$ac_cv_has_makedev" = "yes"; then
6626
6627cat >>confdefs.h <<\_ACEOF
6628#define HAVE_MAKEDEV 1
6629_ACEOF
6630
6631fi
6632
Martin v. Löwis399a6892002-10-04 10:22:02 +00006633# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6634# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6635# defined, but the compiler does not support pragma redefine_extname,
6636# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6637# structures (such as rlimit64) without declaring them. As a
6638# work-around, disable LFS on such configurations
6639
6640use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006641{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6642echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006643cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006644/* confdefs.h. */
6645_ACEOF
6646cat confdefs.h >>conftest.$ac_ext
6647cat >>conftest.$ac_ext <<_ACEOF
6648/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006649
6650#define _LARGEFILE_SOURCE 1
6651#define _FILE_OFFSET_BITS 64
6652#include <sys/resource.h>
6653
Martin v. Löwis399a6892002-10-04 10:22:02 +00006654int
6655main ()
6656{
6657struct rlimit foo;
6658 ;
6659 return 0;
6660}
6661_ACEOF
6662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006663if { (ac_try="$ac_compile"
6664case "(($ac_try" in
6665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6666 *) ac_try_echo=$ac_try;;
6667esac
6668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006671 grep -v '^ *+' conftest.er1 >conftest.err
6672 rm -f conftest.er1
6673 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006675 (exit $ac_status); } && {
6676 test -z "$ac_c_werror_flag" ||
6677 test ! -s conftest.err
6678 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006679 sol_lfs_bug=no
6680else
6681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006682sed 's/^/| /' conftest.$ac_ext >&5
6683
Martin v. Löwiseba40652007-08-30 20:10:57 +00006684 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006686
6687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6688{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6689echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006690if test "$sol_lfs_bug" = "yes"; then
6691 use_lfs=no
6692fi
6693
6694if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006695# Two defines needed to enable largefile support on various platforms
6696# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006697
Martin v. Löwis11437992002-04-12 09:54:03 +00006698cat >>confdefs.h <<\_ACEOF
6699#define _LARGEFILE_SOURCE 1
6700_ACEOF
6701
6702
6703cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006704#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006705_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006706
Martin v. Löwis399a6892002-10-04 10:22:02 +00006707fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006708
Guido van Rossum84e7b241996-08-19 21:59:00 +00006709# Add some code to confdefs.h so that the test for off_t works on SCO
6710cat >> confdefs.h <<\EOF
6711#if defined(SCO_DS)
6712#undef _OFF_T
6713#endif
6714EOF
6715
Guido van Rossumef2255b2000-03-10 22:30:29 +00006716# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006717{ echo "$as_me:$LINENO: checking for mode_t" >&5
6718echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006719if test "${ac_cv_type_mode_t+set}" = set; then
6720 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006721else
Martin v. Löwis11437992002-04-12 09:54:03 +00006722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006723/* confdefs.h. */
6724_ACEOF
6725cat confdefs.h >>conftest.$ac_ext
6726cat >>conftest.$ac_ext <<_ACEOF
6727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006728$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006729typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006730int
6731main ()
6732{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006733if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006734 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006735if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006736 return 0;
6737 ;
6738 return 0;
6739}
6740_ACEOF
6741rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006742if { (ac_try="$ac_compile"
6743case "(($ac_try" in
6744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6745 *) ac_try_echo=$ac_try;;
6746esac
6747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006750 grep -v '^ *+' conftest.er1 >conftest.err
6751 rm -f conftest.er1
6752 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006754 (exit $ac_status); } && {
6755 test -z "$ac_c_werror_flag" ||
6756 test ! -s conftest.err
6757 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006758 ac_cv_type_mode_t=yes
6759else
Martin v. Löwis11437992002-04-12 09:54:03 +00006760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006761sed 's/^/| /' conftest.$ac_ext >&5
6762
Martin v. Löwiseba40652007-08-30 20:10:57 +00006763 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006765
6766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006768{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6769echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006770if test $ac_cv_type_mode_t = yes; then
6771 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006772else
Martin v. Löwis11437992002-04-12 09:54:03 +00006773
6774cat >>confdefs.h <<_ACEOF
6775#define mode_t int
6776_ACEOF
6777
6778fi
6779
Martin v. Löwiseba40652007-08-30 20:10:57 +00006780{ echo "$as_me:$LINENO: checking for off_t" >&5
6781echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006782if test "${ac_cv_type_off_t+set}" = set; then
6783 echo $ECHO_N "(cached) $ECHO_C" >&6
6784else
6785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006786/* confdefs.h. */
6787_ACEOF
6788cat confdefs.h >>conftest.$ac_ext
6789cat >>conftest.$ac_ext <<_ACEOF
6790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006791$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006792typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006793int
6794main ()
6795{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006796if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006797 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006798if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006799 return 0;
6800 ;
6801 return 0;
6802}
6803_ACEOF
6804rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006805if { (ac_try="$ac_compile"
6806case "(($ac_try" in
6807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6808 *) ac_try_echo=$ac_try;;
6809esac
6810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006813 grep -v '^ *+' conftest.er1 >conftest.err
6814 rm -f conftest.er1
6815 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006817 (exit $ac_status); } && {
6818 test -z "$ac_c_werror_flag" ||
6819 test ! -s conftest.err
6820 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006821 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006822else
Martin v. Löwis11437992002-04-12 09:54:03 +00006823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006824sed 's/^/| /' conftest.$ac_ext >&5
6825
Martin v. Löwiseba40652007-08-30 20:10:57 +00006826 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006828
6829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006831{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6832echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006833if test $ac_cv_type_off_t = yes; then
6834 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006835else
Martin v. Löwis11437992002-04-12 09:54:03 +00006836
6837cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006838#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006839_ACEOF
6840
6841fi
6842
Martin v. Löwiseba40652007-08-30 20:10:57 +00006843{ echo "$as_me:$LINENO: checking for pid_t" >&5
6844echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006845if test "${ac_cv_type_pid_t+set}" = set; then
6846 echo $ECHO_N "(cached) $ECHO_C" >&6
6847else
6848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006849/* confdefs.h. */
6850_ACEOF
6851cat confdefs.h >>conftest.$ac_ext
6852cat >>conftest.$ac_ext <<_ACEOF
6853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006854$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006855typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006856int
6857main ()
6858{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006860 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006861if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006862 return 0;
6863 ;
6864 return 0;
6865}
6866_ACEOF
6867rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006868if { (ac_try="$ac_compile"
6869case "(($ac_try" in
6870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6871 *) ac_try_echo=$ac_try;;
6872esac
6873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006876 grep -v '^ *+' conftest.er1 >conftest.err
6877 rm -f conftest.er1
6878 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006880 (exit $ac_status); } && {
6881 test -z "$ac_c_werror_flag" ||
6882 test ! -s conftest.err
6883 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006884 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006885else
Martin v. Löwis11437992002-04-12 09:54:03 +00006886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006887sed 's/^/| /' conftest.$ac_ext >&5
6888
Martin v. Löwiseba40652007-08-30 20:10:57 +00006889 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006891
6892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006894{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6895echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006896if test $ac_cv_type_pid_t = yes; then
6897 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006898else
Martin v. Löwis11437992002-04-12 09:54:03 +00006899
6900cat >>confdefs.h <<_ACEOF
6901#define pid_t int
6902_ACEOF
6903
6904fi
6905
Martin v. Löwiseba40652007-08-30 20:10:57 +00006906{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6907echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006908if test "${ac_cv_type_signal+set}" = set; then
6909 echo $ECHO_N "(cached) $ECHO_C" >&6
6910else
6911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006912/* confdefs.h. */
6913_ACEOF
6914cat confdefs.h >>conftest.$ac_ext
6915cat >>conftest.$ac_ext <<_ACEOF
6916/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006917#include <sys/types.h>
6918#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006919
Martin v. Löwis11437992002-04-12 09:54:03 +00006920int
6921main ()
6922{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006923return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006924 ;
6925 return 0;
6926}
6927_ACEOF
6928rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006929if { (ac_try="$ac_compile"
6930case "(($ac_try" in
6931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6932 *) ac_try_echo=$ac_try;;
6933esac
6934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6935 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006937 grep -v '^ *+' conftest.er1 >conftest.err
6938 rm -f conftest.er1
6939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006941 (exit $ac_status); } && {
6942 test -z "$ac_c_werror_flag" ||
6943 test ! -s conftest.err
6944 } && test -s conftest.$ac_objext; then
6945 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006946else
Martin v. Löwis11437992002-04-12 09:54:03 +00006947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006948sed 's/^/| /' conftest.$ac_ext >&5
6949
Martin v. Löwiseba40652007-08-30 20:10:57 +00006950 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006952
6953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006955{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6956echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006957
Martin v. Löwis11437992002-04-12 09:54:03 +00006958cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006959#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006960_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006961
Michael W. Hudson54241132001-12-07 15:38:26 +00006962
Martin v. Löwiseba40652007-08-30 20:10:57 +00006963{ echo "$as_me:$LINENO: checking for size_t" >&5
6964echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006965if test "${ac_cv_type_size_t+set}" = set; then
6966 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006967else
Martin v. Löwis11437992002-04-12 09:54:03 +00006968 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006969/* confdefs.h. */
6970_ACEOF
6971cat confdefs.h >>conftest.$ac_ext
6972cat >>conftest.$ac_ext <<_ACEOF
6973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006974$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006975typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006976int
6977main ()
6978{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006979if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006980 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006981if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006982 return 0;
6983 ;
6984 return 0;
6985}
6986_ACEOF
6987rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006988if { (ac_try="$ac_compile"
6989case "(($ac_try" in
6990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6991 *) ac_try_echo=$ac_try;;
6992esac
6993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006996 grep -v '^ *+' conftest.er1 >conftest.err
6997 rm -f conftest.er1
6998 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007000 (exit $ac_status); } && {
7001 test -z "$ac_c_werror_flag" ||
7002 test ! -s conftest.err
7003 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007004 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007005else
Martin v. Löwis11437992002-04-12 09:54:03 +00007006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007007sed 's/^/| /' conftest.$ac_ext >&5
7008
Martin v. Löwiseba40652007-08-30 20:10:57 +00007009 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007011
7012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007013fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007014{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7015echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007016if test $ac_cv_type_size_t = yes; then
7017 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007018else
Martin v. Löwis11437992002-04-12 09:54:03 +00007019
7020cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007021#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007022_ACEOF
7023
7024fi
7025
Martin v. Löwiseba40652007-08-30 20:10:57 +00007026{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7027echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007028if test "${ac_cv_type_uid_t+set}" = set; then
7029 echo $ECHO_N "(cached) $ECHO_C" >&6
7030else
7031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007032/* confdefs.h. */
7033_ACEOF
7034cat confdefs.h >>conftest.$ac_ext
7035cat >>conftest.$ac_ext <<_ACEOF
7036/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007037#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007038
7039_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007041 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007042 ac_cv_type_uid_t=yes
7043else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007044 ac_cv_type_uid_t=no
7045fi
Mark Dickinsond19e1432009-12-31 21:17:29 +00007046rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007047
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007049{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7050echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007051if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007052
Martin v. Löwis11437992002-04-12 09:54:03 +00007053cat >>confdefs.h <<\_ACEOF
7054#define uid_t int
7055_ACEOF
7056
7057
7058cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007059#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007060_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007061
7062fi
7063
Martin v. Löwiseba40652007-08-30 20:10:57 +00007064{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7065echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007066if test "${ac_cv_type_ssize_t+set}" = set; then
7067 echo $ECHO_N "(cached) $ECHO_C" >&6
7068else
7069 cat >conftest.$ac_ext <<_ACEOF
7070/* confdefs.h. */
7071_ACEOF
7072cat confdefs.h >>conftest.$ac_ext
7073cat >>conftest.$ac_ext <<_ACEOF
7074/* end confdefs.h. */
7075$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007076typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007077int
7078main ()
7079{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007080if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007081 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007082if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007083 return 0;
7084 ;
7085 return 0;
7086}
7087_ACEOF
7088rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007089if { (ac_try="$ac_compile"
7090case "(($ac_try" in
7091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7092 *) ac_try_echo=$ac_try;;
7093esac
7094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7095 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007096 ac_status=$?
7097 grep -v '^ *+' conftest.er1 >conftest.err
7098 rm -f conftest.er1
7099 cat conftest.err >&5
7100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007101 (exit $ac_status); } && {
7102 test -z "$ac_c_werror_flag" ||
7103 test ! -s conftest.err
7104 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007105 ac_cv_type_ssize_t=yes
7106else
7107 echo "$as_me: failed program was:" >&5
7108sed 's/^/| /' conftest.$ac_ext >&5
7109
Martin v. Löwiseba40652007-08-30 20:10:57 +00007110 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007112
7113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007115{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7116echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007117if test $ac_cv_type_ssize_t = yes; then
7118
7119cat >>confdefs.h <<\_ACEOF
7120#define HAVE_SSIZE_T 1
7121_ACEOF
7122
7123fi
7124
Jack Jansendd19cf82001-12-06 22:36:17 +00007125
Michael W. Hudson54241132001-12-07 15:38:26 +00007126# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007127# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007128{ echo "$as_me:$LINENO: checking for int" >&5
7129echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007130if test "${ac_cv_type_int+set}" = set; then
7131 echo $ECHO_N "(cached) $ECHO_C" >&6
7132else
7133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007134/* confdefs.h. */
7135_ACEOF
7136cat confdefs.h >>conftest.$ac_ext
7137cat >>conftest.$ac_ext <<_ACEOF
7138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007139$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007140typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007141int
7142main ()
7143{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007144if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007145 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007146if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007147 return 0;
7148 ;
7149 return 0;
7150}
7151_ACEOF
7152rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007153if { (ac_try="$ac_compile"
7154case "(($ac_try" in
7155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7156 *) ac_try_echo=$ac_try;;
7157esac
7158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007161 grep -v '^ *+' conftest.er1 >conftest.err
7162 rm -f conftest.er1
7163 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007165 (exit $ac_status); } && {
7166 test -z "$ac_c_werror_flag" ||
7167 test ! -s conftest.err
7168 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007169 ac_cv_type_int=yes
7170else
7171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007172sed 's/^/| /' conftest.$ac_ext >&5
7173
Martin v. Löwiseba40652007-08-30 20:10:57 +00007174 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007175fi
Brett Cannon19fab762007-06-02 03:02:29 +00007176
Martin v. Löwiseba40652007-08-30 20:10:57 +00007177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7178fi
7179{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7180echo "${ECHO_T}$ac_cv_type_int" >&6; }
7181
7182# The cast to long int works around a bug in the HP C Compiler
7183# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7184# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7185# This bug is HP SR number 8606223364.
7186{ echo "$as_me:$LINENO: checking size of int" >&5
7187echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007188if test "${ac_cv_sizeof_int+set}" = set; then
7189 echo $ECHO_N "(cached) $ECHO_C" >&6
7190else
Martin v. Löwis11437992002-04-12 09:54:03 +00007191 if test "$cross_compiling" = yes; then
7192 # Depending upon the size, compute the lo and hi bounds.
7193cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007194/* confdefs.h. */
7195_ACEOF
7196cat confdefs.h >>conftest.$ac_ext
7197cat >>conftest.$ac_ext <<_ACEOF
7198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007199$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007200 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007201int
7202main ()
7203{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007204static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007205test_array [0] = 0
7206
7207 ;
7208 return 0;
7209}
7210_ACEOF
7211rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007212if { (ac_try="$ac_compile"
7213case "(($ac_try" in
7214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7215 *) ac_try_echo=$ac_try;;
7216esac
7217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7218 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007220 grep -v '^ *+' conftest.er1 >conftest.err
7221 rm -f conftest.er1
7222 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007224 (exit $ac_status); } && {
7225 test -z "$ac_c_werror_flag" ||
7226 test ! -s conftest.err
7227 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007228 ac_lo=0 ac_mid=0
7229 while :; do
7230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007231/* confdefs.h. */
7232_ACEOF
7233cat confdefs.h >>conftest.$ac_ext
7234cat >>conftest.$ac_ext <<_ACEOF
7235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007236$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007237 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007238int
7239main ()
7240{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007241static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007242test_array [0] = 0
7243
7244 ;
7245 return 0;
7246}
7247_ACEOF
7248rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007249if { (ac_try="$ac_compile"
7250case "(($ac_try" in
7251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7252 *) ac_try_echo=$ac_try;;
7253esac
7254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7255 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007256 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007257 grep -v '^ *+' conftest.er1 >conftest.err
7258 rm -f conftest.er1
7259 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007261 (exit $ac_status); } && {
7262 test -z "$ac_c_werror_flag" ||
7263 test ! -s conftest.err
7264 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007265 ac_hi=$ac_mid; break
7266else
7267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007268sed 's/^/| /' conftest.$ac_ext >&5
7269
Martin v. Löwiseba40652007-08-30 20:10:57 +00007270 ac_lo=`expr $ac_mid + 1`
7271 if test $ac_lo -le $ac_mid; then
7272 ac_lo= ac_hi=
7273 break
7274 fi
7275 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007277
7278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007279 done
7280else
7281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007282sed 's/^/| /' conftest.$ac_ext >&5
7283
Martin v. Löwiseba40652007-08-30 20:10:57 +00007284 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007285/* confdefs.h. */
7286_ACEOF
7287cat confdefs.h >>conftest.$ac_ext
7288cat >>conftest.$ac_ext <<_ACEOF
7289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007290$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007291 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007292int
7293main ()
7294{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007295static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007296test_array [0] = 0
7297
7298 ;
7299 return 0;
7300}
7301_ACEOF
7302rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007303if { (ac_try="$ac_compile"
7304case "(($ac_try" in
7305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7306 *) ac_try_echo=$ac_try;;
7307esac
7308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7309 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007310 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007311 grep -v '^ *+' conftest.er1 >conftest.err
7312 rm -f conftest.er1
7313 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007315 (exit $ac_status); } && {
7316 test -z "$ac_c_werror_flag" ||
7317 test ! -s conftest.err
7318 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007319 ac_hi=-1 ac_mid=-1
7320 while :; do
7321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007322/* confdefs.h. */
7323_ACEOF
7324cat confdefs.h >>conftest.$ac_ext
7325cat >>conftest.$ac_ext <<_ACEOF
7326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007327$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007328 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007329int
7330main ()
7331{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007332static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007333test_array [0] = 0
7334
7335 ;
7336 return 0;
7337}
7338_ACEOF
7339rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007340if { (ac_try="$ac_compile"
7341case "(($ac_try" in
7342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7343 *) ac_try_echo=$ac_try;;
7344esac
7345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7346 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007348 grep -v '^ *+' conftest.er1 >conftest.err
7349 rm -f conftest.er1
7350 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007352 (exit $ac_status); } && {
7353 test -z "$ac_c_werror_flag" ||
7354 test ! -s conftest.err
7355 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007356 ac_lo=$ac_mid; break
7357else
7358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007359sed 's/^/| /' conftest.$ac_ext >&5
7360
Martin v. Löwiseba40652007-08-30 20:10:57 +00007361 ac_hi=`expr '(' $ac_mid ')' - 1`
7362 if test $ac_mid -le $ac_hi; then
7363 ac_lo= ac_hi=
7364 break
7365 fi
7366 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007368
7369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007370 done
7371else
7372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007373sed 's/^/| /' conftest.$ac_ext >&5
7374
Martin v. Löwiseba40652007-08-30 20:10:57 +00007375 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007377
7378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007380
7381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007382# Binary search between lo and hi bounds.
7383while test "x$ac_lo" != "x$ac_hi"; do
7384 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7385 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007386/* confdefs.h. */
7387_ACEOF
7388cat confdefs.h >>conftest.$ac_ext
7389cat >>conftest.$ac_ext <<_ACEOF
7390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007391$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007392 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007393int
7394main ()
7395{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007396static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007397test_array [0] = 0
7398
7399 ;
7400 return 0;
7401}
7402_ACEOF
7403rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007404if { (ac_try="$ac_compile"
7405case "(($ac_try" in
7406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7407 *) ac_try_echo=$ac_try;;
7408esac
7409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007412 grep -v '^ *+' conftest.er1 >conftest.err
7413 rm -f conftest.er1
7414 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007416 (exit $ac_status); } && {
7417 test -z "$ac_c_werror_flag" ||
7418 test ! -s conftest.err
7419 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007420 ac_hi=$ac_mid
7421else
7422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007423sed 's/^/| /' conftest.$ac_ext >&5
7424
Martin v. Löwiseba40652007-08-30 20:10:57 +00007425 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007427
7428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007429done
7430case $ac_lo in
7431?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007432'') if test "$ac_cv_type_int" = yes; then
7433 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007434See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007435echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007436See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007437 { (exit 77); exit 77; }; }
7438 else
7439 ac_cv_sizeof_int=0
7440 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007441esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007442else
Martin v. Löwis11437992002-04-12 09:54:03 +00007443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007444/* confdefs.h. */
7445_ACEOF
7446cat confdefs.h >>conftest.$ac_ext
7447cat >>conftest.$ac_ext <<_ACEOF
7448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007449$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007450 typedef int ac__type_sizeof_;
7451static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7452static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007453#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007454#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007455int
7456main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007457{
Martin v. Löwis11437992002-04-12 09:54:03 +00007458
7459 FILE *f = fopen ("conftest.val", "w");
7460 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007461 return 1;
7462 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007463 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007464 long int i = longval ();
7465 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7466 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007467 fprintf (f, "%ld\n", i);
7468 }
7469 else
7470 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007471 unsigned long int i = ulongval ();
7472 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7473 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007474 fprintf (f, "%lu\n", i);
7475 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007476 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007477
7478 ;
7479 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007480}
Martin v. Löwis11437992002-04-12 09:54:03 +00007481_ACEOF
7482rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007483if { (ac_try="$ac_link"
7484case "(($ac_try" in
7485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7486 *) ac_try_echo=$ac_try;;
7487esac
7488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7489 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007490 ac_status=$?
7491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7492 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007493 { (case "(($ac_try" in
7494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7495 *) ac_try_echo=$ac_try;;
7496esac
7497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7498 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007499 ac_status=$?
7500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7501 (exit $ac_status); }; }; then
7502 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007503else
Martin v. Löwis11437992002-04-12 09:54:03 +00007504 echo "$as_me: program exited with status $ac_status" >&5
7505echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007506sed 's/^/| /' conftest.$ac_ext >&5
7507
Martin v. Löwis11437992002-04-12 09:54:03 +00007508( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007509if test "$ac_cv_type_int" = yes; then
7510 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007511See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007512echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007513See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007514 { (exit 77); exit 77; }; }
7515 else
7516 ac_cv_sizeof_int=0
7517 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007519rm -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 +00007520fi
7521rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007523{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7524echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7525
7526
7527
Martin v. Löwis11437992002-04-12 09:54:03 +00007528cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007529#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007530_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007531
7532
Martin v. Löwiseba40652007-08-30 20:10:57 +00007533{ echo "$as_me:$LINENO: checking for long" >&5
7534echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007535if test "${ac_cv_type_long+set}" = set; then
7536 echo $ECHO_N "(cached) $ECHO_C" >&6
7537else
7538 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007539/* confdefs.h. */
7540_ACEOF
7541cat confdefs.h >>conftest.$ac_ext
7542cat >>conftest.$ac_ext <<_ACEOF
7543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007544$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007545typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007546int
7547main ()
7548{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007549if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007550 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007551if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007552 return 0;
7553 ;
7554 return 0;
7555}
7556_ACEOF
7557rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007558if { (ac_try="$ac_compile"
7559case "(($ac_try" in
7560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7561 *) ac_try_echo=$ac_try;;
7562esac
7563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007566 grep -v '^ *+' conftest.er1 >conftest.err
7567 rm -f conftest.er1
7568 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007570 (exit $ac_status); } && {
7571 test -z "$ac_c_werror_flag" ||
7572 test ! -s conftest.err
7573 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007574 ac_cv_type_long=yes
7575else
7576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007577sed 's/^/| /' conftest.$ac_ext >&5
7578
Martin v. Löwiseba40652007-08-30 20:10:57 +00007579 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007580fi
Brett Cannon19fab762007-06-02 03:02:29 +00007581
Martin v. Löwiseba40652007-08-30 20:10:57 +00007582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7583fi
7584{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7585echo "${ECHO_T}$ac_cv_type_long" >&6; }
7586
7587# The cast to long int works around a bug in the HP C Compiler
7588# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7589# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7590# This bug is HP SR number 8606223364.
7591{ echo "$as_me:$LINENO: checking size of long" >&5
7592echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007593if test "${ac_cv_sizeof_long+set}" = set; then
7594 echo $ECHO_N "(cached) $ECHO_C" >&6
7595else
Martin v. Löwis11437992002-04-12 09:54:03 +00007596 if test "$cross_compiling" = yes; then
7597 # Depending upon the size, compute the lo and hi bounds.
7598cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007599/* confdefs.h. */
7600_ACEOF
7601cat confdefs.h >>conftest.$ac_ext
7602cat >>conftest.$ac_ext <<_ACEOF
7603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007604$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007605 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007606int
7607main ()
7608{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007609static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007610test_array [0] = 0
7611
7612 ;
7613 return 0;
7614}
7615_ACEOF
7616rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007617if { (ac_try="$ac_compile"
7618case "(($ac_try" in
7619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7620 *) ac_try_echo=$ac_try;;
7621esac
7622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7623 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007625 grep -v '^ *+' conftest.er1 >conftest.err
7626 rm -f conftest.er1
7627 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007629 (exit $ac_status); } && {
7630 test -z "$ac_c_werror_flag" ||
7631 test ! -s conftest.err
7632 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007633 ac_lo=0 ac_mid=0
7634 while :; do
7635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007636/* confdefs.h. */
7637_ACEOF
7638cat confdefs.h >>conftest.$ac_ext
7639cat >>conftest.$ac_ext <<_ACEOF
7640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007641$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007642 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007643int
7644main ()
7645{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007646static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007647test_array [0] = 0
7648
7649 ;
7650 return 0;
7651}
7652_ACEOF
7653rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007654if { (ac_try="$ac_compile"
7655case "(($ac_try" in
7656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7657 *) ac_try_echo=$ac_try;;
7658esac
7659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7660 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007662 grep -v '^ *+' conftest.er1 >conftest.err
7663 rm -f conftest.er1
7664 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007666 (exit $ac_status); } && {
7667 test -z "$ac_c_werror_flag" ||
7668 test ! -s conftest.err
7669 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 ac_hi=$ac_mid; break
7671else
7672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007673sed 's/^/| /' conftest.$ac_ext >&5
7674
Martin v. Löwiseba40652007-08-30 20:10:57 +00007675 ac_lo=`expr $ac_mid + 1`
7676 if test $ac_lo -le $ac_mid; then
7677 ac_lo= ac_hi=
7678 break
7679 fi
7680 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682
7683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007684 done
7685else
7686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007687sed 's/^/| /' conftest.$ac_ext >&5
7688
Martin v. Löwiseba40652007-08-30 20:10:57 +00007689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007690/* confdefs.h. */
7691_ACEOF
7692cat confdefs.h >>conftest.$ac_ext
7693cat >>conftest.$ac_ext <<_ACEOF
7694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007695$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007696 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007697int
7698main ()
7699{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007700static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007701test_array [0] = 0
7702
7703 ;
7704 return 0;
7705}
7706_ACEOF
7707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007708if { (ac_try="$ac_compile"
7709case "(($ac_try" in
7710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7711 *) ac_try_echo=$ac_try;;
7712esac
7713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007716 grep -v '^ *+' conftest.er1 >conftest.err
7717 rm -f conftest.er1
7718 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007720 (exit $ac_status); } && {
7721 test -z "$ac_c_werror_flag" ||
7722 test ! -s conftest.err
7723 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007724 ac_hi=-1 ac_mid=-1
7725 while :; do
7726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007727/* confdefs.h. */
7728_ACEOF
7729cat confdefs.h >>conftest.$ac_ext
7730cat >>conftest.$ac_ext <<_ACEOF
7731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007732$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007733 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007734int
7735main ()
7736{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007737static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007738test_array [0] = 0
7739
7740 ;
7741 return 0;
7742}
7743_ACEOF
7744rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745if { (ac_try="$ac_compile"
7746case "(($ac_try" in
7747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7748 *) ac_try_echo=$ac_try;;
7749esac
7750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7751 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007753 grep -v '^ *+' conftest.er1 >conftest.err
7754 rm -f conftest.er1
7755 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007757 (exit $ac_status); } && {
7758 test -z "$ac_c_werror_flag" ||
7759 test ! -s conftest.err
7760 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 ac_lo=$ac_mid; break
7762else
7763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007764sed 's/^/| /' conftest.$ac_ext >&5
7765
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766 ac_hi=`expr '(' $ac_mid ')' - 1`
7767 if test $ac_mid -le $ac_hi; then
7768 ac_lo= ac_hi=
7769 break
7770 fi
7771 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773
7774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 done
7776else
7777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007778sed 's/^/| /' conftest.$ac_ext >&5
7779
Martin v. Löwiseba40652007-08-30 20:10:57 +00007780 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007782
7783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007785
7786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007787# Binary search between lo and hi bounds.
7788while test "x$ac_lo" != "x$ac_hi"; do
7789 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7790 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007791/* confdefs.h. */
7792_ACEOF
7793cat confdefs.h >>conftest.$ac_ext
7794cat >>conftest.$ac_ext <<_ACEOF
7795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007796$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007797 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007798int
7799main ()
7800{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007801static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007802test_array [0] = 0
7803
7804 ;
7805 return 0;
7806}
7807_ACEOF
7808rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007809if { (ac_try="$ac_compile"
7810case "(($ac_try" in
7811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7812 *) ac_try_echo=$ac_try;;
7813esac
7814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7815 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007817 grep -v '^ *+' conftest.er1 >conftest.err
7818 rm -f conftest.er1
7819 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007821 (exit $ac_status); } && {
7822 test -z "$ac_c_werror_flag" ||
7823 test ! -s conftest.err
7824 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007825 ac_hi=$ac_mid
7826else
7827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007828sed 's/^/| /' conftest.$ac_ext >&5
7829
Martin v. Löwiseba40652007-08-30 20:10:57 +00007830 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007831fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832
7833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007834done
7835case $ac_lo in
7836?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007837'') if test "$ac_cv_type_long" = yes; then
7838 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007839See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007840echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007841See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007842 { (exit 77); exit 77; }; }
7843 else
7844 ac_cv_sizeof_long=0
7845 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007846esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007847else
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007849/* confdefs.h. */
7850_ACEOF
7851cat confdefs.h >>conftest.$ac_ext
7852cat >>conftest.$ac_ext <<_ACEOF
7853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007854$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007855 typedef long ac__type_sizeof_;
7856static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7857static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007858#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007859#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007860int
7861main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007862{
Martin v. Löwis11437992002-04-12 09:54:03 +00007863
7864 FILE *f = fopen ("conftest.val", "w");
7865 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007866 return 1;
7867 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869 long int i = longval ();
7870 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7871 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 fprintf (f, "%ld\n", i);
7873 }
7874 else
7875 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007876 unsigned long int i = ulongval ();
7877 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7878 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007879 fprintf (f, "%lu\n", i);
7880 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007881 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007882
7883 ;
7884 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007885}
Martin v. Löwis11437992002-04-12 09:54:03 +00007886_ACEOF
7887rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007888if { (ac_try="$ac_link"
7889case "(($ac_try" in
7890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7891 *) ac_try_echo=$ac_try;;
7892esac
7893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7894 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007895 ac_status=$?
7896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7897 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007898 { (case "(($ac_try" in
7899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7900 *) ac_try_echo=$ac_try;;
7901esac
7902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7903 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 ac_status=$?
7905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7906 (exit $ac_status); }; }; then
7907 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007908else
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 echo "$as_me: program exited with status $ac_status" >&5
7910echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007911sed 's/^/| /' conftest.$ac_ext >&5
7912
Martin v. Löwis11437992002-04-12 09:54:03 +00007913( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007914if test "$ac_cv_type_long" = yes; then
7915 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007916See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007917echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007918See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007919 { (exit 77); exit 77; }; }
7920 else
7921 ac_cv_sizeof_long=0
7922 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007924rm -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 +00007925fi
7926rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007928{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7929echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7930
7931
7932
Martin v. Löwis11437992002-04-12 09:54:03 +00007933cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007934#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007935_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007936
7937
Martin v. Löwiseba40652007-08-30 20:10:57 +00007938{ echo "$as_me:$LINENO: checking for void *" >&5
7939echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007940if test "${ac_cv_type_void_p+set}" = set; then
7941 echo $ECHO_N "(cached) $ECHO_C" >&6
7942else
7943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007944/* confdefs.h. */
7945_ACEOF
7946cat confdefs.h >>conftest.$ac_ext
7947cat >>conftest.$ac_ext <<_ACEOF
7948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007949$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007950typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007951int
7952main ()
7953{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007954if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007956if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 return 0;
7958 ;
7959 return 0;
7960}
7961_ACEOF
7962rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007963if { (ac_try="$ac_compile"
7964case "(($ac_try" in
7965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7966 *) ac_try_echo=$ac_try;;
7967esac
7968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007971 grep -v '^ *+' conftest.er1 >conftest.err
7972 rm -f conftest.er1
7973 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007975 (exit $ac_status); } && {
7976 test -z "$ac_c_werror_flag" ||
7977 test ! -s conftest.err
7978 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 ac_cv_type_void_p=yes
7980else
7981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007982sed 's/^/| /' conftest.$ac_ext >&5
7983
Martin v. Löwiseba40652007-08-30 20:10:57 +00007984 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007985fi
Brett Cannon19fab762007-06-02 03:02:29 +00007986
Martin v. Löwiseba40652007-08-30 20:10:57 +00007987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7988fi
7989{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7990echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7991
7992# The cast to long int works around a bug in the HP C Compiler
7993# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7994# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7995# This bug is HP SR number 8606223364.
7996{ echo "$as_me:$LINENO: checking size of void *" >&5
7997echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007998if test "${ac_cv_sizeof_void_p+set}" = set; then
7999 echo $ECHO_N "(cached) $ECHO_C" >&6
8000else
Martin v. Löwis11437992002-04-12 09:54:03 +00008001 if test "$cross_compiling" = yes; then
8002 # Depending upon the size, compute the lo and hi bounds.
8003cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008004/* confdefs.h. */
8005_ACEOF
8006cat confdefs.h >>conftest.$ac_ext
8007cat >>conftest.$ac_ext <<_ACEOF
8008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008009$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008010 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008011int
8012main ()
8013{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008014static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008015test_array [0] = 0
8016
8017 ;
8018 return 0;
8019}
8020_ACEOF
8021rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008022if { (ac_try="$ac_compile"
8023case "(($ac_try" in
8024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8025 *) ac_try_echo=$ac_try;;
8026esac
8027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8028 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008030 grep -v '^ *+' conftest.er1 >conftest.err
8031 rm -f conftest.er1
8032 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008034 (exit $ac_status); } && {
8035 test -z "$ac_c_werror_flag" ||
8036 test ! -s conftest.err
8037 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008038 ac_lo=0 ac_mid=0
8039 while :; do
8040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008041/* confdefs.h. */
8042_ACEOF
8043cat confdefs.h >>conftest.$ac_ext
8044cat >>conftest.$ac_ext <<_ACEOF
8045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008046$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008047 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008048int
8049main ()
8050{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008051static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008052test_array [0] = 0
8053
8054 ;
8055 return 0;
8056}
8057_ACEOF
8058rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008059if { (ac_try="$ac_compile"
8060case "(($ac_try" in
8061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8062 *) ac_try_echo=$ac_try;;
8063esac
8064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8065 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008067 grep -v '^ *+' conftest.er1 >conftest.err
8068 rm -f conftest.er1
8069 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008071 (exit $ac_status); } && {
8072 test -z "$ac_c_werror_flag" ||
8073 test ! -s conftest.err
8074 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 ac_hi=$ac_mid; break
8076else
8077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008078sed 's/^/| /' conftest.$ac_ext >&5
8079
Martin v. Löwiseba40652007-08-30 20:10:57 +00008080 ac_lo=`expr $ac_mid + 1`
8081 if test $ac_lo -le $ac_mid; then
8082 ac_lo= ac_hi=
8083 break
8084 fi
8085 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008087
8088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008089 done
8090else
8091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008092sed 's/^/| /' conftest.$ac_ext >&5
8093
Martin v. Löwiseba40652007-08-30 20:10:57 +00008094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008095/* confdefs.h. */
8096_ACEOF
8097cat confdefs.h >>conftest.$ac_ext
8098cat >>conftest.$ac_ext <<_ACEOF
8099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008100$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008101 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008102int
8103main ()
8104{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008105static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008106test_array [0] = 0
8107
8108 ;
8109 return 0;
8110}
8111_ACEOF
8112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008113if { (ac_try="$ac_compile"
8114case "(($ac_try" in
8115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8116 *) ac_try_echo=$ac_try;;
8117esac
8118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008121 grep -v '^ *+' conftest.er1 >conftest.err
8122 rm -f conftest.er1
8123 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008125 (exit $ac_status); } && {
8126 test -z "$ac_c_werror_flag" ||
8127 test ! -s conftest.err
8128 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008129 ac_hi=-1 ac_mid=-1
8130 while :; do
8131 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008132/* confdefs.h. */
8133_ACEOF
8134cat confdefs.h >>conftest.$ac_ext
8135cat >>conftest.$ac_ext <<_ACEOF
8136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008137$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008138 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008139int
8140main ()
8141{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008142static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008143test_array [0] = 0
8144
8145 ;
8146 return 0;
8147}
8148_ACEOF
8149rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150if { (ac_try="$ac_compile"
8151case "(($ac_try" in
8152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8153 *) ac_try_echo=$ac_try;;
8154esac
8155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8156 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008158 grep -v '^ *+' conftest.er1 >conftest.err
8159 rm -f conftest.er1
8160 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008162 (exit $ac_status); } && {
8163 test -z "$ac_c_werror_flag" ||
8164 test ! -s conftest.err
8165 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008166 ac_lo=$ac_mid; break
8167else
8168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008169sed 's/^/| /' conftest.$ac_ext >&5
8170
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171 ac_hi=`expr '(' $ac_mid ')' - 1`
8172 if test $ac_mid -le $ac_hi; then
8173 ac_lo= ac_hi=
8174 break
8175 fi
8176 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178
8179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008180 done
8181else
8182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008183sed 's/^/| /' conftest.$ac_ext >&5
8184
Martin v. Löwiseba40652007-08-30 20:10:57 +00008185 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008186fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008187
8188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008189fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008190
8191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008192# Binary search between lo and hi bounds.
8193while test "x$ac_lo" != "x$ac_hi"; do
8194 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008196/* confdefs.h. */
8197_ACEOF
8198cat confdefs.h >>conftest.$ac_ext
8199cat >>conftest.$ac_ext <<_ACEOF
8200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008201$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008202 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008203int
8204main ()
8205{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008206static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008207test_array [0] = 0
8208
8209 ;
8210 return 0;
8211}
8212_ACEOF
8213rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214if { (ac_try="$ac_compile"
8215case "(($ac_try" in
8216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8217 *) ac_try_echo=$ac_try;;
8218esac
8219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8220 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008222 grep -v '^ *+' conftest.er1 >conftest.err
8223 rm -f conftest.er1
8224 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008226 (exit $ac_status); } && {
8227 test -z "$ac_c_werror_flag" ||
8228 test ! -s conftest.err
8229 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 ac_hi=$ac_mid
8231else
8232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008233sed 's/^/| /' conftest.$ac_ext >&5
8234
Martin v. Löwiseba40652007-08-30 20:10:57 +00008235 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237
8238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008239done
8240case $ac_lo in
8241?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008242'') if test "$ac_cv_type_void_p" = yes; then
8243 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008244See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008245echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008246See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008247 { (exit 77); exit 77; }; }
8248 else
8249 ac_cv_sizeof_void_p=0
8250 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008251esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008252else
Martin v. Löwis11437992002-04-12 09:54:03 +00008253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008254/* confdefs.h. */
8255_ACEOF
8256cat confdefs.h >>conftest.$ac_ext
8257cat >>conftest.$ac_ext <<_ACEOF
8258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008259$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008260 typedef void * ac__type_sizeof_;
8261static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8262static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008263#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008264#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008265int
8266main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008267{
Martin v. Löwis11437992002-04-12 09:54:03 +00008268
8269 FILE *f = fopen ("conftest.val", "w");
8270 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008271 return 1;
8272 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008273 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274 long int i = longval ();
8275 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8276 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008277 fprintf (f, "%ld\n", i);
8278 }
8279 else
8280 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008281 unsigned long int i = ulongval ();
8282 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8283 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008284 fprintf (f, "%lu\n", i);
8285 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008286 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008287
8288 ;
8289 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008290}
Martin v. Löwis11437992002-04-12 09:54:03 +00008291_ACEOF
8292rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008293if { (ac_try="$ac_link"
8294case "(($ac_try" in
8295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8296 *) ac_try_echo=$ac_try;;
8297esac
8298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8299 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 ac_status=$?
8301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8302 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008303 { (case "(($ac_try" in
8304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8305 *) ac_try_echo=$ac_try;;
8306esac
8307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8308 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008309 ac_status=$?
8310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311 (exit $ac_status); }; }; then
8312 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008313else
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 echo "$as_me: program exited with status $ac_status" >&5
8315echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008316sed 's/^/| /' conftest.$ac_ext >&5
8317
Martin v. Löwis11437992002-04-12 09:54:03 +00008318( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008319if test "$ac_cv_type_void_p" = yes; then
8320 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008321See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008322echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008323See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008324 { (exit 77); exit 77; }; }
8325 else
8326 ac_cv_sizeof_void_p=0
8327 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008329rm -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 +00008330fi
8331rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008333{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8334echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8335
8336
8337
Martin v. Löwis11437992002-04-12 09:54:03 +00008338cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008339#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008340_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008341
8342
Martin v. Löwiseba40652007-08-30 20:10:57 +00008343{ echo "$as_me:$LINENO: checking for short" >&5
8344echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008345if test "${ac_cv_type_short+set}" = set; then
8346 echo $ECHO_N "(cached) $ECHO_C" >&6
8347else
8348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008349/* confdefs.h. */
8350_ACEOF
8351cat confdefs.h >>conftest.$ac_ext
8352cat >>conftest.$ac_ext <<_ACEOF
8353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008354$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008355typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008356int
8357main ()
8358{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008359if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008360 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008361if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008362 return 0;
8363 ;
8364 return 0;
8365}
8366_ACEOF
8367rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008368if { (ac_try="$ac_compile"
8369case "(($ac_try" in
8370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8371 *) ac_try_echo=$ac_try;;
8372esac
8373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8374 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008376 grep -v '^ *+' conftest.er1 >conftest.err
8377 rm -f conftest.er1
8378 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008380 (exit $ac_status); } && {
8381 test -z "$ac_c_werror_flag" ||
8382 test ! -s conftest.err
8383 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 ac_cv_type_short=yes
8385else
8386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008387sed 's/^/| /' conftest.$ac_ext >&5
8388
Martin v. Löwiseba40652007-08-30 20:10:57 +00008389 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008390fi
Brett Cannon19fab762007-06-02 03:02:29 +00008391
Martin v. Löwiseba40652007-08-30 20:10:57 +00008392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8393fi
8394{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8395echo "${ECHO_T}$ac_cv_type_short" >&6; }
8396
8397# The cast to long int works around a bug in the HP C Compiler
8398# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8399# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8400# This bug is HP SR number 8606223364.
8401{ echo "$as_me:$LINENO: checking size of short" >&5
8402echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008403if test "${ac_cv_sizeof_short+set}" = set; then
8404 echo $ECHO_N "(cached) $ECHO_C" >&6
8405else
Martin v. Löwis11437992002-04-12 09:54:03 +00008406 if test "$cross_compiling" = yes; then
8407 # Depending upon the size, compute the lo and hi bounds.
8408cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008409/* confdefs.h. */
8410_ACEOF
8411cat confdefs.h >>conftest.$ac_ext
8412cat >>conftest.$ac_ext <<_ACEOF
8413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008414$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008415 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008416int
8417main ()
8418{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008419static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008420test_array [0] = 0
8421
8422 ;
8423 return 0;
8424}
8425_ACEOF
8426rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008427if { (ac_try="$ac_compile"
8428case "(($ac_try" in
8429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8430 *) ac_try_echo=$ac_try;;
8431esac
8432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8433 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008435 grep -v '^ *+' conftest.er1 >conftest.err
8436 rm -f conftest.er1
8437 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008439 (exit $ac_status); } && {
8440 test -z "$ac_c_werror_flag" ||
8441 test ! -s conftest.err
8442 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008443 ac_lo=0 ac_mid=0
8444 while :; do
8445 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008446/* confdefs.h. */
8447_ACEOF
8448cat confdefs.h >>conftest.$ac_ext
8449cat >>conftest.$ac_ext <<_ACEOF
8450/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008451$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008452 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008453int
8454main ()
8455{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008456static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008457test_array [0] = 0
8458
8459 ;
8460 return 0;
8461}
8462_ACEOF
8463rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008464if { (ac_try="$ac_compile"
8465case "(($ac_try" in
8466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8467 *) ac_try_echo=$ac_try;;
8468esac
8469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008472 grep -v '^ *+' conftest.er1 >conftest.err
8473 rm -f conftest.er1
8474 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008476 (exit $ac_status); } && {
8477 test -z "$ac_c_werror_flag" ||
8478 test ! -s conftest.err
8479 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 ac_hi=$ac_mid; break
8481else
8482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008483sed 's/^/| /' conftest.$ac_ext >&5
8484
Martin v. Löwiseba40652007-08-30 20:10:57 +00008485 ac_lo=`expr $ac_mid + 1`
8486 if test $ac_lo -le $ac_mid; then
8487 ac_lo= ac_hi=
8488 break
8489 fi
8490 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008492
8493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008494 done
8495else
8496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008497sed 's/^/| /' conftest.$ac_ext >&5
8498
Martin v. Löwiseba40652007-08-30 20:10:57 +00008499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008500/* confdefs.h. */
8501_ACEOF
8502cat confdefs.h >>conftest.$ac_ext
8503cat >>conftest.$ac_ext <<_ACEOF
8504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008505$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008506 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008507int
8508main ()
8509{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008510static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008511test_array [0] = 0
8512
8513 ;
8514 return 0;
8515}
8516_ACEOF
8517rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008518if { (ac_try="$ac_compile"
8519case "(($ac_try" in
8520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8521 *) ac_try_echo=$ac_try;;
8522esac
8523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008526 grep -v '^ *+' conftest.er1 >conftest.err
8527 rm -f conftest.er1
8528 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008530 (exit $ac_status); } && {
8531 test -z "$ac_c_werror_flag" ||
8532 test ! -s conftest.err
8533 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 ac_hi=-1 ac_mid=-1
8535 while :; do
8536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008537/* confdefs.h. */
8538_ACEOF
8539cat confdefs.h >>conftest.$ac_ext
8540cat >>conftest.$ac_ext <<_ACEOF
8541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008542$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008543 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008544int
8545main ()
8546{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008547static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008548test_array [0] = 0
8549
8550 ;
8551 return 0;
8552}
8553_ACEOF
8554rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008555if { (ac_try="$ac_compile"
8556case "(($ac_try" in
8557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8558 *) ac_try_echo=$ac_try;;
8559esac
8560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8561 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008563 grep -v '^ *+' conftest.er1 >conftest.err
8564 rm -f conftest.er1
8565 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008567 (exit $ac_status); } && {
8568 test -z "$ac_c_werror_flag" ||
8569 test ! -s conftest.err
8570 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 ac_lo=$ac_mid; break
8572else
8573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008574sed 's/^/| /' conftest.$ac_ext >&5
8575
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576 ac_hi=`expr '(' $ac_mid ')' - 1`
8577 if test $ac_mid -le $ac_hi; then
8578 ac_lo= ac_hi=
8579 break
8580 fi
8581 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583
8584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008585 done
8586else
8587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008588sed 's/^/| /' conftest.$ac_ext >&5
8589
Martin v. Löwiseba40652007-08-30 20:10:57 +00008590 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008592
8593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008595
8596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008597# Binary search between lo and hi bounds.
8598while test "x$ac_lo" != "x$ac_hi"; do
8599 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008601/* confdefs.h. */
8602_ACEOF
8603cat confdefs.h >>conftest.$ac_ext
8604cat >>conftest.$ac_ext <<_ACEOF
8605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008606$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008607 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008608int
8609main ()
8610{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008611static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008612test_array [0] = 0
8613
8614 ;
8615 return 0;
8616}
8617_ACEOF
8618rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008619if { (ac_try="$ac_compile"
8620case "(($ac_try" in
8621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8622 *) ac_try_echo=$ac_try;;
8623esac
8624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008627 grep -v '^ *+' conftest.er1 >conftest.err
8628 rm -f conftest.er1
8629 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008631 (exit $ac_status); } && {
8632 test -z "$ac_c_werror_flag" ||
8633 test ! -s conftest.err
8634 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 ac_hi=$ac_mid
8636else
8637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008638sed 's/^/| /' conftest.$ac_ext >&5
8639
Martin v. Löwiseba40652007-08-30 20:10:57 +00008640 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642
8643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008644done
8645case $ac_lo in
8646?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008647'') if test "$ac_cv_type_short" = yes; then
8648 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008649See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008650echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008651See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008652 { (exit 77); exit 77; }; }
8653 else
8654 ac_cv_sizeof_short=0
8655 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008656esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008657else
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008659/* confdefs.h. */
8660_ACEOF
8661cat confdefs.h >>conftest.$ac_ext
8662cat >>conftest.$ac_ext <<_ACEOF
8663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008664$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008665 typedef short ac__type_sizeof_;
8666static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8667static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008668#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008669#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008670int
8671main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008672{
Martin v. Löwis11437992002-04-12 09:54:03 +00008673
8674 FILE *f = fopen ("conftest.val", "w");
8675 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008676 return 1;
8677 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679 long int i = longval ();
8680 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8681 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 fprintf (f, "%ld\n", i);
8683 }
8684 else
8685 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008686 unsigned long int i = ulongval ();
8687 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8688 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 fprintf (f, "%lu\n", i);
8690 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008691 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008692
8693 ;
8694 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008695}
Martin v. Löwis11437992002-04-12 09:54:03 +00008696_ACEOF
8697rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008698if { (ac_try="$ac_link"
8699case "(($ac_try" in
8700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8701 *) ac_try_echo=$ac_try;;
8702esac
8703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8704 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_status=$?
8706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8707 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008708 { (case "(($ac_try" in
8709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8710 *) ac_try_echo=$ac_try;;
8711esac
8712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8713 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 ac_status=$?
8715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8716 (exit $ac_status); }; }; then
8717 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008718else
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 echo "$as_me: program exited with status $ac_status" >&5
8720echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008721sed 's/^/| /' conftest.$ac_ext >&5
8722
Martin v. Löwis11437992002-04-12 09:54:03 +00008723( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008724if test "$ac_cv_type_short" = yes; then
8725 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008726See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008727echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008728See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008729 { (exit 77); exit 77; }; }
8730 else
8731 ac_cv_sizeof_short=0
8732 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008734rm -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 +00008735fi
8736rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008738{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8739echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8740
8741
8742
Martin v. Löwis11437992002-04-12 09:54:03 +00008743cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008744#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008745_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008746
8747
Martin v. Löwiseba40652007-08-30 20:10:57 +00008748{ echo "$as_me:$LINENO: checking for float" >&5
8749echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008750if test "${ac_cv_type_float+set}" = set; then
8751 echo $ECHO_N "(cached) $ECHO_C" >&6
8752else
8753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008754/* confdefs.h. */
8755_ACEOF
8756cat confdefs.h >>conftest.$ac_ext
8757cat >>conftest.$ac_ext <<_ACEOF
8758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008759$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008760typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008761int
8762main ()
8763{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008764if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008766if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 return 0;
8768 ;
8769 return 0;
8770}
8771_ACEOF
8772rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008773if { (ac_try="$ac_compile"
8774case "(($ac_try" in
8775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8776 *) ac_try_echo=$ac_try;;
8777esac
8778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008781 grep -v '^ *+' conftest.er1 >conftest.err
8782 rm -f conftest.er1
8783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008785 (exit $ac_status); } && {
8786 test -z "$ac_c_werror_flag" ||
8787 test ! -s conftest.err
8788 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 ac_cv_type_float=yes
8790else
8791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008792sed 's/^/| /' conftest.$ac_ext >&5
8793
Martin v. Löwiseba40652007-08-30 20:10:57 +00008794 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008795fi
Brett Cannon19fab762007-06-02 03:02:29 +00008796
Martin v. Löwiseba40652007-08-30 20:10:57 +00008797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8798fi
8799{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8800echo "${ECHO_T}$ac_cv_type_float" >&6; }
8801
8802# The cast to long int works around a bug in the HP C Compiler
8803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8805# This bug is HP SR number 8606223364.
8806{ echo "$as_me:$LINENO: checking size of float" >&5
8807echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008808if test "${ac_cv_sizeof_float+set}" = set; then
8809 echo $ECHO_N "(cached) $ECHO_C" >&6
8810else
Martin v. Löwis11437992002-04-12 09:54:03 +00008811 if test "$cross_compiling" = yes; then
8812 # Depending upon the size, compute the lo and hi bounds.
8813cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008814/* confdefs.h. */
8815_ACEOF
8816cat confdefs.h >>conftest.$ac_ext
8817cat >>conftest.$ac_ext <<_ACEOF
8818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008819$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008820 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008821int
8822main ()
8823{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008824static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008825test_array [0] = 0
8826
8827 ;
8828 return 0;
8829}
8830_ACEOF
8831rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008832if { (ac_try="$ac_compile"
8833case "(($ac_try" in
8834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8835 *) ac_try_echo=$ac_try;;
8836esac
8837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008840 grep -v '^ *+' conftest.er1 >conftest.err
8841 rm -f conftest.er1
8842 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008844 (exit $ac_status); } && {
8845 test -z "$ac_c_werror_flag" ||
8846 test ! -s conftest.err
8847 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008848 ac_lo=0 ac_mid=0
8849 while :; do
8850 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008851/* confdefs.h. */
8852_ACEOF
8853cat confdefs.h >>conftest.$ac_ext
8854cat >>conftest.$ac_ext <<_ACEOF
8855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008856$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008857 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008858int
8859main ()
8860{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008861static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008862test_array [0] = 0
8863
8864 ;
8865 return 0;
8866}
8867_ACEOF
8868rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008869if { (ac_try="$ac_compile"
8870case "(($ac_try" in
8871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8872 *) ac_try_echo=$ac_try;;
8873esac
8874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8875 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008877 grep -v '^ *+' conftest.er1 >conftest.err
8878 rm -f conftest.er1
8879 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008881 (exit $ac_status); } && {
8882 test -z "$ac_c_werror_flag" ||
8883 test ! -s conftest.err
8884 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 ac_hi=$ac_mid; break
8886else
8887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008888sed 's/^/| /' conftest.$ac_ext >&5
8889
Martin v. Löwiseba40652007-08-30 20:10:57 +00008890 ac_lo=`expr $ac_mid + 1`
8891 if test $ac_lo -le $ac_mid; then
8892 ac_lo= ac_hi=
8893 break
8894 fi
8895 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008896fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008897
8898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 done
8900else
8901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008902sed 's/^/| /' conftest.$ac_ext >&5
8903
Martin v. Löwiseba40652007-08-30 20:10:57 +00008904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008905/* confdefs.h. */
8906_ACEOF
8907cat confdefs.h >>conftest.$ac_ext
8908cat >>conftest.$ac_ext <<_ACEOF
8909/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008910$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008911 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008912int
8913main ()
8914{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008915static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008916test_array [0] = 0
8917
8918 ;
8919 return 0;
8920}
8921_ACEOF
8922rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008923if { (ac_try="$ac_compile"
8924case "(($ac_try" in
8925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8926 *) ac_try_echo=$ac_try;;
8927esac
8928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8929 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008931 grep -v '^ *+' conftest.er1 >conftest.err
8932 rm -f conftest.er1
8933 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008935 (exit $ac_status); } && {
8936 test -z "$ac_c_werror_flag" ||
8937 test ! -s conftest.err
8938 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 ac_hi=-1 ac_mid=-1
8940 while :; do
8941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008942/* confdefs.h. */
8943_ACEOF
8944cat confdefs.h >>conftest.$ac_ext
8945cat >>conftest.$ac_ext <<_ACEOF
8946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008947$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008948 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008949int
8950main ()
8951{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008952static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008953test_array [0] = 0
8954
8955 ;
8956 return 0;
8957}
8958_ACEOF
8959rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960if { (ac_try="$ac_compile"
8961case "(($ac_try" in
8962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8963 *) ac_try_echo=$ac_try;;
8964esac
8965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008968 grep -v '^ *+' conftest.er1 >conftest.err
8969 rm -f conftest.er1
8970 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008972 (exit $ac_status); } && {
8973 test -z "$ac_c_werror_flag" ||
8974 test ! -s conftest.err
8975 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 ac_lo=$ac_mid; break
8977else
8978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008979sed 's/^/| /' conftest.$ac_ext >&5
8980
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981 ac_hi=`expr '(' $ac_mid ')' - 1`
8982 if test $ac_mid -le $ac_hi; then
8983 ac_lo= ac_hi=
8984 break
8985 fi
8986 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988
8989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 done
8991else
8992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008993sed 's/^/| /' conftest.$ac_ext >&5
8994
Martin v. Löwiseba40652007-08-30 20:10:57 +00008995 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008997
8998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009000
9001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009002# Binary search between lo and hi bounds.
9003while test "x$ac_lo" != "x$ac_hi"; do
9004 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009006/* confdefs.h. */
9007_ACEOF
9008cat confdefs.h >>conftest.$ac_ext
9009cat >>conftest.$ac_ext <<_ACEOF
9010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009011$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009012 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009013int
9014main ()
9015{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009016static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009017test_array [0] = 0
9018
9019 ;
9020 return 0;
9021}
9022_ACEOF
9023rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009024if { (ac_try="$ac_compile"
9025case "(($ac_try" in
9026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9027 *) ac_try_echo=$ac_try;;
9028esac
9029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9030 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009031 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009032 grep -v '^ *+' conftest.er1 >conftest.err
9033 rm -f conftest.er1
9034 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036 (exit $ac_status); } && {
9037 test -z "$ac_c_werror_flag" ||
9038 test ! -s conftest.err
9039 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 ac_hi=$ac_mid
9041else
9042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009043sed 's/^/| /' conftest.$ac_ext >&5
9044
Martin v. Löwiseba40652007-08-30 20:10:57 +00009045 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047
9048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009049done
9050case $ac_lo in
9051?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009052'') if test "$ac_cv_type_float" = yes; then
9053 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009054See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009055echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009056See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009057 { (exit 77); exit 77; }; }
9058 else
9059 ac_cv_sizeof_float=0
9060 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009061esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009062else
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009064/* confdefs.h. */
9065_ACEOF
9066cat confdefs.h >>conftest.$ac_ext
9067cat >>conftest.$ac_ext <<_ACEOF
9068/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009069$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009070 typedef float ac__type_sizeof_;
9071static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9072static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009073#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009074#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009075int
9076main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009077{
Martin v. Löwis11437992002-04-12 09:54:03 +00009078
9079 FILE *f = fopen ("conftest.val", "w");
9080 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009081 return 1;
9082 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084 long int i = longval ();
9085 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9086 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 fprintf (f, "%ld\n", i);
9088 }
9089 else
9090 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009091 unsigned long int i = ulongval ();
9092 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9093 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009094 fprintf (f, "%lu\n", i);
9095 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009097
9098 ;
9099 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009100}
Martin v. Löwis11437992002-04-12 09:54:03 +00009101_ACEOF
9102rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009103if { (ac_try="$ac_link"
9104case "(($ac_try" in
9105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9106 *) ac_try_echo=$ac_try;;
9107esac
9108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9109 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 ac_status=$?
9111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9112 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009113 { (case "(($ac_try" in
9114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9115 *) ac_try_echo=$ac_try;;
9116esac
9117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9118 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 ac_status=$?
9120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9121 (exit $ac_status); }; }; then
9122 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009123else
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 echo "$as_me: program exited with status $ac_status" >&5
9125echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009126sed 's/^/| /' conftest.$ac_ext >&5
9127
Martin v. Löwis11437992002-04-12 09:54:03 +00009128( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009129if test "$ac_cv_type_float" = yes; then
9130 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009131See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009132echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009133See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009134 { (exit 77); exit 77; }; }
9135 else
9136 ac_cv_sizeof_float=0
9137 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009139rm -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 +00009140fi
9141rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009143{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9144echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9145
9146
9147
Martin v. Löwis11437992002-04-12 09:54:03 +00009148cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009149#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009150_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009151
9152
Martin v. Löwiseba40652007-08-30 20:10:57 +00009153{ echo "$as_me:$LINENO: checking for double" >&5
9154echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009155if test "${ac_cv_type_double+set}" = set; then
9156 echo $ECHO_N "(cached) $ECHO_C" >&6
9157else
9158 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009159/* confdefs.h. */
9160_ACEOF
9161cat confdefs.h >>conftest.$ac_ext
9162cat >>conftest.$ac_ext <<_ACEOF
9163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009164$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009165typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009166int
9167main ()
9168{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009169if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009171if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 return 0;
9173 ;
9174 return 0;
9175}
9176_ACEOF
9177rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009178if { (ac_try="$ac_compile"
9179case "(($ac_try" in
9180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9181 *) ac_try_echo=$ac_try;;
9182esac
9183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009186 grep -v '^ *+' conftest.er1 >conftest.err
9187 rm -f conftest.er1
9188 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009190 (exit $ac_status); } && {
9191 test -z "$ac_c_werror_flag" ||
9192 test ! -s conftest.err
9193 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009194 ac_cv_type_double=yes
9195else
9196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009197sed 's/^/| /' conftest.$ac_ext >&5
9198
Martin v. Löwiseba40652007-08-30 20:10:57 +00009199 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009200fi
Brett Cannon19fab762007-06-02 03:02:29 +00009201
Martin v. Löwiseba40652007-08-30 20:10:57 +00009202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9203fi
9204{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9205echo "${ECHO_T}$ac_cv_type_double" >&6; }
9206
9207# The cast to long int works around a bug in the HP C Compiler
9208# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9209# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9210# This bug is HP SR number 8606223364.
9211{ echo "$as_me:$LINENO: checking size of double" >&5
9212echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009213if test "${ac_cv_sizeof_double+set}" = set; then
9214 echo $ECHO_N "(cached) $ECHO_C" >&6
9215else
Martin v. Löwis11437992002-04-12 09:54:03 +00009216 if test "$cross_compiling" = yes; then
9217 # Depending upon the size, compute the lo and hi bounds.
9218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009219/* confdefs.h. */
9220_ACEOF
9221cat confdefs.h >>conftest.$ac_ext
9222cat >>conftest.$ac_ext <<_ACEOF
9223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009224$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009225 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009226int
9227main ()
9228{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009229static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009230test_array [0] = 0
9231
9232 ;
9233 return 0;
9234}
9235_ACEOF
9236rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009237if { (ac_try="$ac_compile"
9238case "(($ac_try" in
9239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9240 *) ac_try_echo=$ac_try;;
9241esac
9242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9243 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009245 grep -v '^ *+' conftest.er1 >conftest.err
9246 rm -f conftest.er1
9247 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009249 (exit $ac_status); } && {
9250 test -z "$ac_c_werror_flag" ||
9251 test ! -s conftest.err
9252 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 ac_lo=0 ac_mid=0
9254 while :; do
9255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009256/* confdefs.h. */
9257_ACEOF
9258cat confdefs.h >>conftest.$ac_ext
9259cat >>conftest.$ac_ext <<_ACEOF
9260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009261$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009262 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009263int
9264main ()
9265{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009266static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009267test_array [0] = 0
9268
9269 ;
9270 return 0;
9271}
9272_ACEOF
9273rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009274if { (ac_try="$ac_compile"
9275case "(($ac_try" in
9276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9277 *) ac_try_echo=$ac_try;;
9278esac
9279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9280 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009282 grep -v '^ *+' conftest.er1 >conftest.err
9283 rm -f conftest.er1
9284 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009286 (exit $ac_status); } && {
9287 test -z "$ac_c_werror_flag" ||
9288 test ! -s conftest.err
9289 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 ac_hi=$ac_mid; break
9291else
9292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009293sed 's/^/| /' conftest.$ac_ext >&5
9294
Martin v. Löwiseba40652007-08-30 20:10:57 +00009295 ac_lo=`expr $ac_mid + 1`
9296 if test $ac_lo -le $ac_mid; then
9297 ac_lo= ac_hi=
9298 break
9299 fi
9300 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009302
9303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 done
9305else
9306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009307sed 's/^/| /' conftest.$ac_ext >&5
9308
Martin v. Löwiseba40652007-08-30 20:10:57 +00009309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009310/* confdefs.h. */
9311_ACEOF
9312cat confdefs.h >>conftest.$ac_ext
9313cat >>conftest.$ac_ext <<_ACEOF
9314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009315$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009316 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009317int
9318main ()
9319{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009320static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009321test_array [0] = 0
9322
9323 ;
9324 return 0;
9325}
9326_ACEOF
9327rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009328if { (ac_try="$ac_compile"
9329case "(($ac_try" in
9330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9331 *) ac_try_echo=$ac_try;;
9332esac
9333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009336 grep -v '^ *+' conftest.er1 >conftest.err
9337 rm -f conftest.er1
9338 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009340 (exit $ac_status); } && {
9341 test -z "$ac_c_werror_flag" ||
9342 test ! -s conftest.err
9343 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 ac_hi=-1 ac_mid=-1
9345 while :; do
9346 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009347/* confdefs.h. */
9348_ACEOF
9349cat confdefs.h >>conftest.$ac_ext
9350cat >>conftest.$ac_ext <<_ACEOF
9351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009352$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009353 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009354int
9355main ()
9356{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009357static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009358test_array [0] = 0
9359
9360 ;
9361 return 0;
9362}
9363_ACEOF
9364rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009365if { (ac_try="$ac_compile"
9366case "(($ac_try" in
9367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9368 *) ac_try_echo=$ac_try;;
9369esac
9370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9371 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009373 grep -v '^ *+' conftest.er1 >conftest.err
9374 rm -f conftest.er1
9375 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009377 (exit $ac_status); } && {
9378 test -z "$ac_c_werror_flag" ||
9379 test ! -s conftest.err
9380 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_lo=$ac_mid; break
9382else
9383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009384sed 's/^/| /' conftest.$ac_ext >&5
9385
Martin v. Löwiseba40652007-08-30 20:10:57 +00009386 ac_hi=`expr '(' $ac_mid ')' - 1`
9387 if test $ac_mid -le $ac_hi; then
9388 ac_lo= ac_hi=
9389 break
9390 fi
9391 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393
9394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 done
9396else
9397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009398sed 's/^/| /' conftest.$ac_ext >&5
9399
Martin v. Löwiseba40652007-08-30 20:10:57 +00009400 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009402
9403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009405
9406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009407# Binary search between lo and hi bounds.
9408while test "x$ac_lo" != "x$ac_hi"; do
9409 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009411/* confdefs.h. */
9412_ACEOF
9413cat confdefs.h >>conftest.$ac_ext
9414cat >>conftest.$ac_ext <<_ACEOF
9415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009416$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009417 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009418int
9419main ()
9420{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009421static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009422test_array [0] = 0
9423
9424 ;
9425 return 0;
9426}
9427_ACEOF
9428rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009429if { (ac_try="$ac_compile"
9430case "(($ac_try" in
9431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9432 *) ac_try_echo=$ac_try;;
9433esac
9434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9435 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009437 grep -v '^ *+' conftest.er1 >conftest.err
9438 rm -f conftest.er1
9439 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009441 (exit $ac_status); } && {
9442 test -z "$ac_c_werror_flag" ||
9443 test ! -s conftest.err
9444 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009445 ac_hi=$ac_mid
9446else
9447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009448sed 's/^/| /' conftest.$ac_ext >&5
9449
Martin v. Löwiseba40652007-08-30 20:10:57 +00009450 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452
9453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009454done
9455case $ac_lo in
9456?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457'') if test "$ac_cv_type_double" = yes; then
9458 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009459See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009460echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009461See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009462 { (exit 77); exit 77; }; }
9463 else
9464 ac_cv_sizeof_double=0
9465 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009466esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009467else
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009469/* confdefs.h. */
9470_ACEOF
9471cat confdefs.h >>conftest.$ac_ext
9472cat >>conftest.$ac_ext <<_ACEOF
9473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009474$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475 typedef double ac__type_sizeof_;
9476static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9477static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009478#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009479#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009480int
9481main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009482{
Martin v. Löwis11437992002-04-12 09:54:03 +00009483
9484 FILE *f = fopen ("conftest.val", "w");
9485 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486 return 1;
9487 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489 long int i = longval ();
9490 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9491 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 fprintf (f, "%ld\n", i);
9493 }
9494 else
9495 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009496 unsigned long int i = ulongval ();
9497 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9498 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 fprintf (f, "%lu\n", i);
9500 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009501 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009502
9503 ;
9504 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009505}
Martin v. Löwis11437992002-04-12 09:54:03 +00009506_ACEOF
9507rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009508if { (ac_try="$ac_link"
9509case "(($ac_try" in
9510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9511 *) ac_try_echo=$ac_try;;
9512esac
9513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9514 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 ac_status=$?
9516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9517 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009518 { (case "(($ac_try" in
9519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9520 *) ac_try_echo=$ac_try;;
9521esac
9522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9523 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 ac_status=$?
9525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9526 (exit $ac_status); }; }; then
9527 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009528else
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 echo "$as_me: program exited with status $ac_status" >&5
9530echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009531sed 's/^/| /' conftest.$ac_ext >&5
9532
Martin v. Löwis11437992002-04-12 09:54:03 +00009533( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009534if test "$ac_cv_type_double" = yes; then
9535 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009536See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009537echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009538See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009539 { (exit 77); exit 77; }; }
9540 else
9541 ac_cv_sizeof_double=0
9542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009544rm -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 +00009545fi
9546rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009548{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9549echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9550
9551
9552
Martin v. Löwis11437992002-04-12 09:54:03 +00009553cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009554#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009555_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009556
9557
Martin v. Löwiseba40652007-08-30 20:10:57 +00009558{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9559echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009560if test "${ac_cv_type_fpos_t+set}" = set; then
9561 echo $ECHO_N "(cached) $ECHO_C" >&6
9562else
9563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009564/* confdefs.h. */
9565_ACEOF
9566cat confdefs.h >>conftest.$ac_ext
9567cat >>conftest.$ac_ext <<_ACEOF
9568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009569$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009570typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009571int
9572main ()
9573{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009574if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009576if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009577 return 0;
9578 ;
9579 return 0;
9580}
9581_ACEOF
9582rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009583if { (ac_try="$ac_compile"
9584case "(($ac_try" in
9585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9586 *) ac_try_echo=$ac_try;;
9587esac
9588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009591 grep -v '^ *+' conftest.er1 >conftest.err
9592 rm -f conftest.er1
9593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009595 (exit $ac_status); } && {
9596 test -z "$ac_c_werror_flag" ||
9597 test ! -s conftest.err
9598 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009599 ac_cv_type_fpos_t=yes
9600else
9601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009602sed 's/^/| /' conftest.$ac_ext >&5
9603
Martin v. Löwiseba40652007-08-30 20:10:57 +00009604 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009605fi
Brett Cannon19fab762007-06-02 03:02:29 +00009606
Martin v. Löwiseba40652007-08-30 20:10:57 +00009607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9608fi
9609{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9610echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9611
9612# The cast to long int works around a bug in the HP C Compiler
9613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9615# This bug is HP SR number 8606223364.
9616{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9617echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009618if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9619 echo $ECHO_N "(cached) $ECHO_C" >&6
9620else
Martin v. Löwis11437992002-04-12 09:54:03 +00009621 if test "$cross_compiling" = yes; then
9622 # Depending upon the size, compute the lo and hi bounds.
9623cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009624/* confdefs.h. */
9625_ACEOF
9626cat confdefs.h >>conftest.$ac_ext
9627cat >>conftest.$ac_ext <<_ACEOF
9628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009629$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009630 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009631int
9632main ()
9633{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009634static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009635test_array [0] = 0
9636
9637 ;
9638 return 0;
9639}
9640_ACEOF
9641rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009642if { (ac_try="$ac_compile"
9643case "(($ac_try" in
9644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9645 *) ac_try_echo=$ac_try;;
9646esac
9647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009650 grep -v '^ *+' conftest.er1 >conftest.err
9651 rm -f conftest.er1
9652 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009654 (exit $ac_status); } && {
9655 test -z "$ac_c_werror_flag" ||
9656 test ! -s conftest.err
9657 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_lo=0 ac_mid=0
9659 while :; do
9660 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009661/* confdefs.h. */
9662_ACEOF
9663cat confdefs.h >>conftest.$ac_ext
9664cat >>conftest.$ac_ext <<_ACEOF
9665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009666$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009667 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009668int
9669main ()
9670{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009671static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009672test_array [0] = 0
9673
9674 ;
9675 return 0;
9676}
9677_ACEOF
9678rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009679if { (ac_try="$ac_compile"
9680case "(($ac_try" in
9681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9682 *) ac_try_echo=$ac_try;;
9683esac
9684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9685 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009687 grep -v '^ *+' conftest.er1 >conftest.err
9688 rm -f conftest.er1
9689 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009691 (exit $ac_status); } && {
9692 test -z "$ac_c_werror_flag" ||
9693 test ! -s conftest.err
9694 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 ac_hi=$ac_mid; break
9696else
9697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009698sed 's/^/| /' conftest.$ac_ext >&5
9699
Martin v. Löwiseba40652007-08-30 20:10:57 +00009700 ac_lo=`expr $ac_mid + 1`
9701 if test $ac_lo -le $ac_mid; then
9702 ac_lo= ac_hi=
9703 break
9704 fi
9705 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009706fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009707
9708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 done
9710else
9711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009712sed 's/^/| /' conftest.$ac_ext >&5
9713
Martin v. Löwiseba40652007-08-30 20:10:57 +00009714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009715/* confdefs.h. */
9716_ACEOF
9717cat confdefs.h >>conftest.$ac_ext
9718cat >>conftest.$ac_ext <<_ACEOF
9719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009720$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009721 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009722int
9723main ()
9724{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009725static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009726test_array [0] = 0
9727
9728 ;
9729 return 0;
9730}
9731_ACEOF
9732rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009733if { (ac_try="$ac_compile"
9734case "(($ac_try" in
9735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9736 *) ac_try_echo=$ac_try;;
9737esac
9738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9739 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009741 grep -v '^ *+' conftest.er1 >conftest.err
9742 rm -f conftest.er1
9743 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009745 (exit $ac_status); } && {
9746 test -z "$ac_c_werror_flag" ||
9747 test ! -s conftest.err
9748 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 ac_hi=-1 ac_mid=-1
9750 while :; do
9751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009752/* confdefs.h. */
9753_ACEOF
9754cat confdefs.h >>conftest.$ac_ext
9755cat >>conftest.$ac_ext <<_ACEOF
9756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009757$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009758 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009759int
9760main ()
9761{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009762static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009763test_array [0] = 0
9764
9765 ;
9766 return 0;
9767}
9768_ACEOF
9769rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009770if { (ac_try="$ac_compile"
9771case "(($ac_try" in
9772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9773 *) ac_try_echo=$ac_try;;
9774esac
9775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9776 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009778 grep -v '^ *+' conftest.er1 >conftest.err
9779 rm -f conftest.er1
9780 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009782 (exit $ac_status); } && {
9783 test -z "$ac_c_werror_flag" ||
9784 test ! -s conftest.err
9785 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 ac_lo=$ac_mid; break
9787else
9788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009789sed 's/^/| /' conftest.$ac_ext >&5
9790
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791 ac_hi=`expr '(' $ac_mid ')' - 1`
9792 if test $ac_mid -le $ac_hi; then
9793 ac_lo= ac_hi=
9794 break
9795 fi
9796 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798
9799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 done
9801else
9802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009803sed 's/^/| /' conftest.$ac_ext >&5
9804
Martin v. Löwiseba40652007-08-30 20:10:57 +00009805 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009806fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009807
9808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009810
9811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009812# Binary search between lo and hi bounds.
9813while test "x$ac_lo" != "x$ac_hi"; do
9814 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9815 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009816/* confdefs.h. */
9817_ACEOF
9818cat confdefs.h >>conftest.$ac_ext
9819cat >>conftest.$ac_ext <<_ACEOF
9820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009821$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009822 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009823int
9824main ()
9825{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009826static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009827test_array [0] = 0
9828
9829 ;
9830 return 0;
9831}
9832_ACEOF
9833rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009834if { (ac_try="$ac_compile"
9835case "(($ac_try" in
9836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9837 *) ac_try_echo=$ac_try;;
9838esac
9839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009842 grep -v '^ *+' conftest.er1 >conftest.err
9843 rm -f conftest.er1
9844 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009846 (exit $ac_status); } && {
9847 test -z "$ac_c_werror_flag" ||
9848 test ! -s conftest.err
9849 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 ac_hi=$ac_mid
9851else
9852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009853sed 's/^/| /' conftest.$ac_ext >&5
9854
Martin v. Löwiseba40652007-08-30 20:10:57 +00009855 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857
9858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009859done
9860case $ac_lo in
9861?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009862'') if test "$ac_cv_type_fpos_t" = yes; then
9863 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009864See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009865echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009866See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009867 { (exit 77); exit 77; }; }
9868 else
9869 ac_cv_sizeof_fpos_t=0
9870 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009871esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009872else
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009874/* confdefs.h. */
9875_ACEOF
9876cat confdefs.h >>conftest.$ac_ext
9877cat >>conftest.$ac_ext <<_ACEOF
9878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009879$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009880 typedef fpos_t ac__type_sizeof_;
9881static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9882static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009883#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009884#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009885int
9886main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009887{
Martin v. Löwis11437992002-04-12 09:54:03 +00009888
9889 FILE *f = fopen ("conftest.val", "w");
9890 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009891 return 1;
9892 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894 long int i = longval ();
9895 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9896 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009897 fprintf (f, "%ld\n", i);
9898 }
9899 else
9900 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009901 unsigned long int i = ulongval ();
9902 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9903 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009904 fprintf (f, "%lu\n", i);
9905 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009906 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009907
9908 ;
9909 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009910}
Martin v. Löwis11437992002-04-12 09:54:03 +00009911_ACEOF
9912rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009913if { (ac_try="$ac_link"
9914case "(($ac_try" in
9915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9916 *) ac_try_echo=$ac_try;;
9917esac
9918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9919 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 ac_status=$?
9921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9922 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009923 { (case "(($ac_try" in
9924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9925 *) ac_try_echo=$ac_try;;
9926esac
9927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9928 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009929 ac_status=$?
9930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9931 (exit $ac_status); }; }; then
9932 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009933else
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 echo "$as_me: program exited with status $ac_status" >&5
9935echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009936sed 's/^/| /' conftest.$ac_ext >&5
9937
Martin v. Löwis11437992002-04-12 09:54:03 +00009938( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009939if test "$ac_cv_type_fpos_t" = yes; then
9940 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009941See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009942echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009943See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009944 { (exit 77); exit 77; }; }
9945 else
9946 ac_cv_sizeof_fpos_t=0
9947 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009949rm -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 +00009950fi
9951rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009953{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9954echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9955
9956
9957
Martin v. Löwis11437992002-04-12 09:54:03 +00009958cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009959#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009960_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009961
Michael W. Hudson54241132001-12-07 15:38:26 +00009962
Martin v. Löwiseba40652007-08-30 20:10:57 +00009963{ echo "$as_me:$LINENO: checking for size_t" >&5
9964echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009965if test "${ac_cv_type_size_t+set}" = set; then
9966 echo $ECHO_N "(cached) $ECHO_C" >&6
9967else
9968 cat >conftest.$ac_ext <<_ACEOF
9969/* confdefs.h. */
9970_ACEOF
9971cat confdefs.h >>conftest.$ac_ext
9972cat >>conftest.$ac_ext <<_ACEOF
9973/* end confdefs.h. */
9974$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009975typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009976int
9977main ()
9978{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009979if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009980 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009981if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009982 return 0;
9983 ;
9984 return 0;
9985}
9986_ACEOF
9987rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009988if { (ac_try="$ac_compile"
9989case "(($ac_try" in
9990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9991 *) ac_try_echo=$ac_try;;
9992esac
9993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009995 ac_status=$?
9996 grep -v '^ *+' conftest.er1 >conftest.err
9997 rm -f conftest.er1
9998 cat conftest.err >&5
9999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010000 (exit $ac_status); } && {
10001 test -z "$ac_c_werror_flag" ||
10002 test ! -s conftest.err
10003 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010004 ac_cv_type_size_t=yes
10005else
10006 echo "$as_me: failed program was:" >&5
10007sed 's/^/| /' conftest.$ac_ext >&5
10008
Martin v. Löwiseba40652007-08-30 20:10:57 +000010009 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +000010010fi
Brett Cannon19fab762007-06-02 03:02:29 +000010011
Martin v. Löwiseba40652007-08-30 20:10:57 +000010012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10013fi
10014{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10015echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10016
10017# The cast to long int works around a bug in the HP C Compiler
10018# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10019# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10020# This bug is HP SR number 8606223364.
10021{ echo "$as_me:$LINENO: checking size of size_t" >&5
10022echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010023if test "${ac_cv_sizeof_size_t+set}" = set; then
10024 echo $ECHO_N "(cached) $ECHO_C" >&6
10025else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010026 if test "$cross_compiling" = yes; then
10027 # Depending upon the size, compute the lo and hi bounds.
10028cat >conftest.$ac_ext <<_ACEOF
10029/* confdefs.h. */
10030_ACEOF
10031cat confdefs.h >>conftest.$ac_ext
10032cat >>conftest.$ac_ext <<_ACEOF
10033/* end confdefs.h. */
10034$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010035 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010036int
10037main ()
10038{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010039static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010040test_array [0] = 0
10041
10042 ;
10043 return 0;
10044}
10045_ACEOF
10046rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010047if { (ac_try="$ac_compile"
10048case "(($ac_try" in
10049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10050 *) ac_try_echo=$ac_try;;
10051esac
10052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10053 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010054 ac_status=$?
10055 grep -v '^ *+' conftest.er1 >conftest.err
10056 rm -f conftest.er1
10057 cat conftest.err >&5
10058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010059 (exit $ac_status); } && {
10060 test -z "$ac_c_werror_flag" ||
10061 test ! -s conftest.err
10062 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010063 ac_lo=0 ac_mid=0
10064 while :; do
10065 cat >conftest.$ac_ext <<_ACEOF
10066/* confdefs.h. */
10067_ACEOF
10068cat confdefs.h >>conftest.$ac_ext
10069cat >>conftest.$ac_ext <<_ACEOF
10070/* end confdefs.h. */
10071$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010072 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010073int
10074main ()
10075{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010076static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010077test_array [0] = 0
10078
10079 ;
10080 return 0;
10081}
10082_ACEOF
10083rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010084if { (ac_try="$ac_compile"
10085case "(($ac_try" in
10086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10087 *) ac_try_echo=$ac_try;;
10088esac
10089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10090 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010091 ac_status=$?
10092 grep -v '^ *+' conftest.er1 >conftest.err
10093 rm -f conftest.er1
10094 cat conftest.err >&5
10095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010096 (exit $ac_status); } && {
10097 test -z "$ac_c_werror_flag" ||
10098 test ! -s conftest.err
10099 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010100 ac_hi=$ac_mid; break
10101else
10102 echo "$as_me: failed program was:" >&5
10103sed 's/^/| /' conftest.$ac_ext >&5
10104
Martin v. Löwiseba40652007-08-30 20:10:57 +000010105 ac_lo=`expr $ac_mid + 1`
10106 if test $ac_lo -le $ac_mid; then
10107 ac_lo= ac_hi=
10108 break
10109 fi
10110 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010112
10113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010114 done
10115else
10116 echo "$as_me: failed program was:" >&5
10117sed 's/^/| /' conftest.$ac_ext >&5
10118
Martin v. Löwiseba40652007-08-30 20:10:57 +000010119 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010120/* confdefs.h. */
10121_ACEOF
10122cat confdefs.h >>conftest.$ac_ext
10123cat >>conftest.$ac_ext <<_ACEOF
10124/* end confdefs.h. */
10125$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010126 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010127int
10128main ()
10129{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010130static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010131test_array [0] = 0
10132
10133 ;
10134 return 0;
10135}
10136_ACEOF
10137rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010138if { (ac_try="$ac_compile"
10139case "(($ac_try" in
10140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10141 *) ac_try_echo=$ac_try;;
10142esac
10143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10144 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010145 ac_status=$?
10146 grep -v '^ *+' conftest.er1 >conftest.err
10147 rm -f conftest.er1
10148 cat conftest.err >&5
10149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010150 (exit $ac_status); } && {
10151 test -z "$ac_c_werror_flag" ||
10152 test ! -s conftest.err
10153 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010154 ac_hi=-1 ac_mid=-1
10155 while :; do
10156 cat >conftest.$ac_ext <<_ACEOF
10157/* confdefs.h. */
10158_ACEOF
10159cat confdefs.h >>conftest.$ac_ext
10160cat >>conftest.$ac_ext <<_ACEOF
10161/* end confdefs.h. */
10162$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010163 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010164int
10165main ()
10166{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010167static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010168test_array [0] = 0
10169
10170 ;
10171 return 0;
10172}
10173_ACEOF
10174rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010175if { (ac_try="$ac_compile"
10176case "(($ac_try" in
10177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10178 *) ac_try_echo=$ac_try;;
10179esac
10180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10181 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010182 ac_status=$?
10183 grep -v '^ *+' conftest.er1 >conftest.err
10184 rm -f conftest.er1
10185 cat conftest.err >&5
10186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010187 (exit $ac_status); } && {
10188 test -z "$ac_c_werror_flag" ||
10189 test ! -s conftest.err
10190 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010191 ac_lo=$ac_mid; break
10192else
10193 echo "$as_me: failed program was:" >&5
10194sed 's/^/| /' conftest.$ac_ext >&5
10195
Martin v. Löwiseba40652007-08-30 20:10:57 +000010196 ac_hi=`expr '(' $ac_mid ')' - 1`
10197 if test $ac_mid -le $ac_hi; then
10198 ac_lo= ac_hi=
10199 break
10200 fi
10201 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010203
10204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010205 done
10206else
10207 echo "$as_me: failed program was:" >&5
10208sed 's/^/| /' conftest.$ac_ext >&5
10209
Martin v. Löwiseba40652007-08-30 20:10:57 +000010210 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010212
10213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010215
10216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010217# Binary search between lo and hi bounds.
10218while test "x$ac_lo" != "x$ac_hi"; do
10219 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10220 cat >conftest.$ac_ext <<_ACEOF
10221/* confdefs.h. */
10222_ACEOF
10223cat confdefs.h >>conftest.$ac_ext
10224cat >>conftest.$ac_ext <<_ACEOF
10225/* end confdefs.h. */
10226$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010227 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010228int
10229main ()
10230{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010231static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010232test_array [0] = 0
10233
10234 ;
10235 return 0;
10236}
10237_ACEOF
10238rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010239if { (ac_try="$ac_compile"
10240case "(($ac_try" in
10241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10242 *) ac_try_echo=$ac_try;;
10243esac
10244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10245 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010246 ac_status=$?
10247 grep -v '^ *+' conftest.er1 >conftest.err
10248 rm -f conftest.er1
10249 cat conftest.err >&5
10250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010251 (exit $ac_status); } && {
10252 test -z "$ac_c_werror_flag" ||
10253 test ! -s conftest.err
10254 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010255 ac_hi=$ac_mid
10256else
10257 echo "$as_me: failed program was:" >&5
10258sed 's/^/| /' conftest.$ac_ext >&5
10259
Martin v. Löwiseba40652007-08-30 20:10:57 +000010260 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010262
10263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010264done
10265case $ac_lo in
10266?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010267'') if test "$ac_cv_type_size_t" = yes; then
10268 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010269See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010270echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010271See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010272 { (exit 77); exit 77; }; }
10273 else
10274 ac_cv_sizeof_size_t=0
10275 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010276esac
10277else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010278 cat >conftest.$ac_ext <<_ACEOF
10279/* confdefs.h. */
10280_ACEOF
10281cat confdefs.h >>conftest.$ac_ext
10282cat >>conftest.$ac_ext <<_ACEOF
10283/* end confdefs.h. */
10284$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010285 typedef size_t ac__type_sizeof_;
10286static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10287static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010288#include <stdio.h>
10289#include <stdlib.h>
10290int
10291main ()
10292{
10293
10294 FILE *f = fopen ("conftest.val", "w");
10295 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010296 return 1;
10297 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010298 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010299 long int i = longval ();
10300 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10301 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010302 fprintf (f, "%ld\n", i);
10303 }
10304 else
10305 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010306 unsigned long int i = ulongval ();
10307 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10308 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010309 fprintf (f, "%lu\n", i);
10310 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010311 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010312
10313 ;
10314 return 0;
10315}
10316_ACEOF
10317rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010318if { (ac_try="$ac_link"
10319case "(($ac_try" in
10320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10321 *) ac_try_echo=$ac_try;;
10322esac
10323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10324 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010325 ac_status=$?
10326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10327 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010328 { (case "(($ac_try" in
10329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10330 *) ac_try_echo=$ac_try;;
10331esac
10332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10333 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010334 ac_status=$?
10335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10336 (exit $ac_status); }; }; then
10337 ac_cv_sizeof_size_t=`cat conftest.val`
10338else
10339 echo "$as_me: program exited with status $ac_status" >&5
10340echo "$as_me: failed program was:" >&5
10341sed 's/^/| /' conftest.$ac_ext >&5
10342
10343( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010344if test "$ac_cv_type_size_t" = yes; then
10345 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010346See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010347echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010348See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010349 { (exit 77); exit 77; }; }
10350 else
10351 ac_cv_sizeof_size_t=0
10352 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010354rm -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 +000010355fi
10356rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010358{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10359echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10360
10361
10362
Martin v. Löwis18e16552006-02-15 17:27:45 +000010363cat >>confdefs.h <<_ACEOF
10364#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10365_ACEOF
10366
10367
Christian Heimes951cc0f2008-01-31 23:08:23 +000010368{ echo "$as_me:$LINENO: checking for pid_t" >&5
10369echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10370if test "${ac_cv_type_pid_t+set}" = set; then
10371 echo $ECHO_N "(cached) $ECHO_C" >&6
10372else
10373 cat >conftest.$ac_ext <<_ACEOF
10374/* confdefs.h. */
10375_ACEOF
10376cat confdefs.h >>conftest.$ac_ext
10377cat >>conftest.$ac_ext <<_ACEOF
10378/* end confdefs.h. */
10379$ac_includes_default
10380typedef pid_t ac__type_new_;
10381int
10382main ()
10383{
10384if ((ac__type_new_ *) 0)
10385 return 0;
10386if (sizeof (ac__type_new_))
10387 return 0;
10388 ;
10389 return 0;
10390}
10391_ACEOF
10392rm -f conftest.$ac_objext
10393if { (ac_try="$ac_compile"
10394case "(($ac_try" in
10395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10396 *) ac_try_echo=$ac_try;;
10397esac
10398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10399 (eval "$ac_compile") 2>conftest.er1
10400 ac_status=$?
10401 grep -v '^ *+' conftest.er1 >conftest.err
10402 rm -f conftest.er1
10403 cat conftest.err >&5
10404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10405 (exit $ac_status); } && {
10406 test -z "$ac_c_werror_flag" ||
10407 test ! -s conftest.err
10408 } && test -s conftest.$ac_objext; then
10409 ac_cv_type_pid_t=yes
10410else
10411 echo "$as_me: failed program was:" >&5
10412sed 's/^/| /' conftest.$ac_ext >&5
10413
10414 ac_cv_type_pid_t=no
10415fi
10416
10417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10418fi
10419{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10420echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10421
10422# The cast to long int works around a bug in the HP C Compiler
10423# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10424# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10425# This bug is HP SR number 8606223364.
10426{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10427echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10428if test "${ac_cv_sizeof_pid_t+set}" = set; then
10429 echo $ECHO_N "(cached) $ECHO_C" >&6
10430else
10431 if test "$cross_compiling" = yes; then
10432 # Depending upon the size, compute the lo and hi bounds.
10433cat >conftest.$ac_ext <<_ACEOF
10434/* confdefs.h. */
10435_ACEOF
10436cat confdefs.h >>conftest.$ac_ext
10437cat >>conftest.$ac_ext <<_ACEOF
10438/* end confdefs.h. */
10439$ac_includes_default
10440 typedef pid_t ac__type_sizeof_;
10441int
10442main ()
10443{
10444static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10445test_array [0] = 0
10446
10447 ;
10448 return 0;
10449}
10450_ACEOF
10451rm -f conftest.$ac_objext
10452if { (ac_try="$ac_compile"
10453case "(($ac_try" in
10454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10455 *) ac_try_echo=$ac_try;;
10456esac
10457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10458 (eval "$ac_compile") 2>conftest.er1
10459 ac_status=$?
10460 grep -v '^ *+' conftest.er1 >conftest.err
10461 rm -f conftest.er1
10462 cat conftest.err >&5
10463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10464 (exit $ac_status); } && {
10465 test -z "$ac_c_werror_flag" ||
10466 test ! -s conftest.err
10467 } && test -s conftest.$ac_objext; then
10468 ac_lo=0 ac_mid=0
10469 while :; do
10470 cat >conftest.$ac_ext <<_ACEOF
10471/* confdefs.h. */
10472_ACEOF
10473cat confdefs.h >>conftest.$ac_ext
10474cat >>conftest.$ac_ext <<_ACEOF
10475/* end confdefs.h. */
10476$ac_includes_default
10477 typedef pid_t ac__type_sizeof_;
10478int
10479main ()
10480{
10481static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10482test_array [0] = 0
10483
10484 ;
10485 return 0;
10486}
10487_ACEOF
10488rm -f conftest.$ac_objext
10489if { (ac_try="$ac_compile"
10490case "(($ac_try" in
10491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10492 *) ac_try_echo=$ac_try;;
10493esac
10494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10495 (eval "$ac_compile") 2>conftest.er1
10496 ac_status=$?
10497 grep -v '^ *+' conftest.er1 >conftest.err
10498 rm -f conftest.er1
10499 cat conftest.err >&5
10500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10501 (exit $ac_status); } && {
10502 test -z "$ac_c_werror_flag" ||
10503 test ! -s conftest.err
10504 } && test -s conftest.$ac_objext; then
10505 ac_hi=$ac_mid; break
10506else
10507 echo "$as_me: failed program was:" >&5
10508sed 's/^/| /' conftest.$ac_ext >&5
10509
10510 ac_lo=`expr $ac_mid + 1`
10511 if test $ac_lo -le $ac_mid; then
10512 ac_lo= ac_hi=
10513 break
10514 fi
10515 ac_mid=`expr 2 '*' $ac_mid + 1`
10516fi
10517
10518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10519 done
10520else
10521 echo "$as_me: failed program was:" >&5
10522sed 's/^/| /' conftest.$ac_ext >&5
10523
10524 cat >conftest.$ac_ext <<_ACEOF
10525/* confdefs.h. */
10526_ACEOF
10527cat confdefs.h >>conftest.$ac_ext
10528cat >>conftest.$ac_ext <<_ACEOF
10529/* end confdefs.h. */
10530$ac_includes_default
10531 typedef pid_t ac__type_sizeof_;
10532int
10533main ()
10534{
10535static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10536test_array [0] = 0
10537
10538 ;
10539 return 0;
10540}
10541_ACEOF
10542rm -f conftest.$ac_objext
10543if { (ac_try="$ac_compile"
10544case "(($ac_try" in
10545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10546 *) ac_try_echo=$ac_try;;
10547esac
10548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10549 (eval "$ac_compile") 2>conftest.er1
10550 ac_status=$?
10551 grep -v '^ *+' conftest.er1 >conftest.err
10552 rm -f conftest.er1
10553 cat conftest.err >&5
10554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10555 (exit $ac_status); } && {
10556 test -z "$ac_c_werror_flag" ||
10557 test ! -s conftest.err
10558 } && test -s conftest.$ac_objext; then
10559 ac_hi=-1 ac_mid=-1
10560 while :; do
10561 cat >conftest.$ac_ext <<_ACEOF
10562/* confdefs.h. */
10563_ACEOF
10564cat confdefs.h >>conftest.$ac_ext
10565cat >>conftest.$ac_ext <<_ACEOF
10566/* end confdefs.h. */
10567$ac_includes_default
10568 typedef pid_t ac__type_sizeof_;
10569int
10570main ()
10571{
10572static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10573test_array [0] = 0
10574
10575 ;
10576 return 0;
10577}
10578_ACEOF
10579rm -f conftest.$ac_objext
10580if { (ac_try="$ac_compile"
10581case "(($ac_try" in
10582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10583 *) ac_try_echo=$ac_try;;
10584esac
10585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10586 (eval "$ac_compile") 2>conftest.er1
10587 ac_status=$?
10588 grep -v '^ *+' conftest.er1 >conftest.err
10589 rm -f conftest.er1
10590 cat conftest.err >&5
10591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10592 (exit $ac_status); } && {
10593 test -z "$ac_c_werror_flag" ||
10594 test ! -s conftest.err
10595 } && test -s conftest.$ac_objext; then
10596 ac_lo=$ac_mid; break
10597else
10598 echo "$as_me: failed program was:" >&5
10599sed 's/^/| /' conftest.$ac_ext >&5
10600
10601 ac_hi=`expr '(' $ac_mid ')' - 1`
10602 if test $ac_mid -le $ac_hi; then
10603 ac_lo= ac_hi=
10604 break
10605 fi
10606 ac_mid=`expr 2 '*' $ac_mid`
10607fi
10608
10609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10610 done
10611else
10612 echo "$as_me: failed program was:" >&5
10613sed 's/^/| /' conftest.$ac_ext >&5
10614
10615 ac_lo= ac_hi=
10616fi
10617
10618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10619fi
10620
10621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10622# Binary search between lo and hi bounds.
10623while test "x$ac_lo" != "x$ac_hi"; do
10624 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10625 cat >conftest.$ac_ext <<_ACEOF
10626/* confdefs.h. */
10627_ACEOF
10628cat confdefs.h >>conftest.$ac_ext
10629cat >>conftest.$ac_ext <<_ACEOF
10630/* end confdefs.h. */
10631$ac_includes_default
10632 typedef pid_t ac__type_sizeof_;
10633int
10634main ()
10635{
10636static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10637test_array [0] = 0
10638
10639 ;
10640 return 0;
10641}
10642_ACEOF
10643rm -f conftest.$ac_objext
10644if { (ac_try="$ac_compile"
10645case "(($ac_try" in
10646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10647 *) ac_try_echo=$ac_try;;
10648esac
10649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10650 (eval "$ac_compile") 2>conftest.er1
10651 ac_status=$?
10652 grep -v '^ *+' conftest.er1 >conftest.err
10653 rm -f conftest.er1
10654 cat conftest.err >&5
10655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10656 (exit $ac_status); } && {
10657 test -z "$ac_c_werror_flag" ||
10658 test ! -s conftest.err
10659 } && test -s conftest.$ac_objext; then
10660 ac_hi=$ac_mid
10661else
10662 echo "$as_me: failed program was:" >&5
10663sed 's/^/| /' conftest.$ac_ext >&5
10664
10665 ac_lo=`expr '(' $ac_mid ')' + 1`
10666fi
10667
10668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10669done
10670case $ac_lo in
10671?*) ac_cv_sizeof_pid_t=$ac_lo;;
10672'') if test "$ac_cv_type_pid_t" = yes; then
10673 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10674See \`config.log' for more details." >&5
10675echo "$as_me: error: cannot compute sizeof (pid_t)
10676See \`config.log' for more details." >&2;}
10677 { (exit 77); exit 77; }; }
10678 else
10679 ac_cv_sizeof_pid_t=0
10680 fi ;;
10681esac
10682else
10683 cat >conftest.$ac_ext <<_ACEOF
10684/* confdefs.h. */
10685_ACEOF
10686cat confdefs.h >>conftest.$ac_ext
10687cat >>conftest.$ac_ext <<_ACEOF
10688/* end confdefs.h. */
10689$ac_includes_default
10690 typedef pid_t ac__type_sizeof_;
10691static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10692static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10693#include <stdio.h>
10694#include <stdlib.h>
10695int
10696main ()
10697{
10698
10699 FILE *f = fopen ("conftest.val", "w");
10700 if (! f)
10701 return 1;
10702 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10703 {
10704 long int i = longval ();
10705 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10706 return 1;
10707 fprintf (f, "%ld\n", i);
10708 }
10709 else
10710 {
10711 unsigned long int i = ulongval ();
10712 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10713 return 1;
10714 fprintf (f, "%lu\n", i);
10715 }
10716 return ferror (f) || fclose (f) != 0;
10717
10718 ;
10719 return 0;
10720}
10721_ACEOF
10722rm -f conftest$ac_exeext
10723if { (ac_try="$ac_link"
10724case "(($ac_try" in
10725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10726 *) ac_try_echo=$ac_try;;
10727esac
10728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10729 (eval "$ac_link") 2>&5
10730 ac_status=$?
10731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10732 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10733 { (case "(($ac_try" in
10734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10735 *) ac_try_echo=$ac_try;;
10736esac
10737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10738 (eval "$ac_try") 2>&5
10739 ac_status=$?
10740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10741 (exit $ac_status); }; }; then
10742 ac_cv_sizeof_pid_t=`cat conftest.val`
10743else
10744 echo "$as_me: program exited with status $ac_status" >&5
10745echo "$as_me: failed program was:" >&5
10746sed 's/^/| /' conftest.$ac_ext >&5
10747
10748( exit $ac_status )
10749if test "$ac_cv_type_pid_t" = yes; then
10750 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10751See \`config.log' for more details." >&5
10752echo "$as_me: error: cannot compute sizeof (pid_t)
10753See \`config.log' for more details." >&2;}
10754 { (exit 77); exit 77; }; }
10755 else
10756 ac_cv_sizeof_pid_t=0
10757 fi
10758fi
10759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10760fi
10761rm -f conftest.val
10762fi
10763{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10764echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10765
10766
10767
10768cat >>confdefs.h <<_ACEOF
10769#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10770_ACEOF
10771
10772
Michael W. Hudson54241132001-12-07 15:38:26 +000010773
Martin v. Löwiseba40652007-08-30 20:10:57 +000010774{ echo "$as_me:$LINENO: checking for long long support" >&5
10775echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010776have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010778/* confdefs.h. */
10779_ACEOF
10780cat confdefs.h >>conftest.$ac_ext
10781cat >>conftest.$ac_ext <<_ACEOF
10782/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010783
Martin v. Löwis11437992002-04-12 09:54:03 +000010784int
10785main ()
10786{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010787long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010788 ;
10789 return 0;
10790}
10791_ACEOF
10792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010793if { (ac_try="$ac_compile"
10794case "(($ac_try" in
10795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10796 *) ac_try_echo=$ac_try;;
10797esac
10798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010801 grep -v '^ *+' conftest.er1 >conftest.err
10802 rm -f conftest.er1
10803 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010805 (exit $ac_status); } && {
10806 test -z "$ac_c_werror_flag" ||
10807 test ! -s conftest.err
10808 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010809
10810
10811cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010812#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010813_ACEOF
10814
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010815 have_long_long=yes
10816
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010817else
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010819sed 's/^/| /' conftest.$ac_ext >&5
10820
Martin v. Löwiseba40652007-08-30 20:10:57 +000010821
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010823
10824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10825{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10826echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010827if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010828{ echo "$as_me:$LINENO: checking for long long" >&5
10829echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010830if test "${ac_cv_type_long_long+set}" = set; then
10831 echo $ECHO_N "(cached) $ECHO_C" >&6
10832else
10833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010834/* confdefs.h. */
10835_ACEOF
10836cat confdefs.h >>conftest.$ac_ext
10837cat >>conftest.$ac_ext <<_ACEOF
10838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010839$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010840typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010841int
10842main ()
10843{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010844if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010846if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010847 return 0;
10848 ;
10849 return 0;
10850}
10851_ACEOF
10852rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010853if { (ac_try="$ac_compile"
10854case "(($ac_try" in
10855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10856 *) ac_try_echo=$ac_try;;
10857esac
10858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010861 grep -v '^ *+' conftest.er1 >conftest.err
10862 rm -f conftest.er1
10863 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010865 (exit $ac_status); } && {
10866 test -z "$ac_c_werror_flag" ||
10867 test ! -s conftest.err
10868 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010869 ac_cv_type_long_long=yes
10870else
10871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010872sed 's/^/| /' conftest.$ac_ext >&5
10873
Martin v. Löwiseba40652007-08-30 20:10:57 +000010874 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010875fi
Brett Cannon19fab762007-06-02 03:02:29 +000010876
Martin v. Löwiseba40652007-08-30 20:10:57 +000010877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10878fi
10879{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10880echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10881
10882# The cast to long int works around a bug in the HP C Compiler
10883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10885# This bug is HP SR number 8606223364.
10886{ echo "$as_me:$LINENO: checking size of long long" >&5
10887echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010888if test "${ac_cv_sizeof_long_long+set}" = set; then
10889 echo $ECHO_N "(cached) $ECHO_C" >&6
10890else
Martin v. Löwis11437992002-04-12 09:54:03 +000010891 if test "$cross_compiling" = yes; then
10892 # Depending upon the size, compute the lo and hi bounds.
10893cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010894/* confdefs.h. */
10895_ACEOF
10896cat confdefs.h >>conftest.$ac_ext
10897cat >>conftest.$ac_ext <<_ACEOF
10898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010899$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010900 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010901int
10902main ()
10903{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010904static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010905test_array [0] = 0
10906
10907 ;
10908 return 0;
10909}
10910_ACEOF
10911rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010912if { (ac_try="$ac_compile"
10913case "(($ac_try" in
10914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10915 *) ac_try_echo=$ac_try;;
10916esac
10917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010920 grep -v '^ *+' conftest.er1 >conftest.err
10921 rm -f conftest.er1
10922 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010924 (exit $ac_status); } && {
10925 test -z "$ac_c_werror_flag" ||
10926 test ! -s conftest.err
10927 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010928 ac_lo=0 ac_mid=0
10929 while :; do
10930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010931/* confdefs.h. */
10932_ACEOF
10933cat confdefs.h >>conftest.$ac_ext
10934cat >>conftest.$ac_ext <<_ACEOF
10935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010936$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010937 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000010956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010957 grep -v '^ *+' conftest.er1 >conftest.err
10958 rm -f conftest.er1
10959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 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öwis11437992002-04-12 09:54:03 +000010965 ac_hi=$ac_mid; break
10966else
10967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010968sed 's/^/| /' conftest.$ac_ext >&5
10969
Martin v. Löwiseba40652007-08-30 20:10:57 +000010970 ac_lo=`expr $ac_mid + 1`
10971 if test $ac_lo -le $ac_mid; then
10972 ac_lo= ac_hi=
10973 break
10974 fi
10975 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010977
10978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010979 done
10980else
10981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010982sed 's/^/| /' conftest.$ac_ext >&5
10983
Martin v. Löwiseba40652007-08-30 20:10:57 +000010984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010985/* confdefs.h. */
10986_ACEOF
10987cat confdefs.h >>conftest.$ac_ext
10988cat >>conftest.$ac_ext <<_ACEOF
10989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010990$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010991 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010992int
10993main ()
10994{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010995static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010996test_array [0] = 0
10997
10998 ;
10999 return 0;
11000}
11001_ACEOF
11002rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011003if { (ac_try="$ac_compile"
11004case "(($ac_try" in
11005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11006 *) ac_try_echo=$ac_try;;
11007esac
11008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11009 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011011 grep -v '^ *+' conftest.er1 >conftest.err
11012 rm -f conftest.er1
11013 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011015 (exit $ac_status); } && {
11016 test -z "$ac_c_werror_flag" ||
11017 test ! -s conftest.err
11018 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011019 ac_hi=-1 ac_mid=-1
11020 while :; do
11021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011022/* confdefs.h. */
11023_ACEOF
11024cat confdefs.h >>conftest.$ac_ext
11025cat >>conftest.$ac_ext <<_ACEOF
11026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011027$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011028 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011029int
11030main ()
11031{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011032static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011033test_array [0] = 0
11034
11035 ;
11036 return 0;
11037}
11038_ACEOF
11039rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011040if { (ac_try="$ac_compile"
11041case "(($ac_try" in
11042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11043 *) ac_try_echo=$ac_try;;
11044esac
11045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011048 grep -v '^ *+' conftest.er1 >conftest.err
11049 rm -f conftest.er1
11050 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011052 (exit $ac_status); } && {
11053 test -z "$ac_c_werror_flag" ||
11054 test ! -s conftest.err
11055 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011056 ac_lo=$ac_mid; break
11057else
11058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011059sed 's/^/| /' conftest.$ac_ext >&5
11060
Martin v. Löwiseba40652007-08-30 20:10:57 +000011061 ac_hi=`expr '(' $ac_mid ')' - 1`
11062 if test $ac_mid -le $ac_hi; then
11063 ac_lo= ac_hi=
11064 break
11065 fi
11066 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011068
11069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011070 done
11071else
11072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011073sed 's/^/| /' conftest.$ac_ext >&5
11074
Martin v. Löwiseba40652007-08-30 20:10:57 +000011075 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011077
11078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011080
11081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011082# Binary search between lo and hi bounds.
11083while test "x$ac_lo" != "x$ac_hi"; do
11084 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
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öwis11437992002-04-12 09:54:03 +000011091$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011092 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011093int
11094main ()
11095{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011096static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011097test_array [0] = 0
11098
11099 ;
11100 return 0;
11101}
11102_ACEOF
11103rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011104if { (ac_try="$ac_compile"
11105case "(($ac_try" in
11106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11107 *) ac_try_echo=$ac_try;;
11108esac
11109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11110 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011112 grep -v '^ *+' conftest.er1 >conftest.err
11113 rm -f conftest.er1
11114 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011116 (exit $ac_status); } && {
11117 test -z "$ac_c_werror_flag" ||
11118 test ! -s conftest.err
11119 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 ac_hi=$ac_mid
11121else
11122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011123sed 's/^/| /' conftest.$ac_ext >&5
11124
Martin v. Löwiseba40652007-08-30 20:10:57 +000011125 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011127
11128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011129done
11130case $ac_lo in
11131?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011132'') if test "$ac_cv_type_long_long" = yes; then
11133 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011134See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011135echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011136See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011137 { (exit 77); exit 77; }; }
11138 else
11139 ac_cv_sizeof_long_long=0
11140 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011141esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011142else
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011144/* confdefs.h. */
11145_ACEOF
11146cat confdefs.h >>conftest.$ac_ext
11147cat >>conftest.$ac_ext <<_ACEOF
11148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011149$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011150 typedef long long ac__type_sizeof_;
11151static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11152static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011153#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011154#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011155int
11156main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011157{
Martin v. Löwis11437992002-04-12 09:54:03 +000011158
11159 FILE *f = fopen ("conftest.val", "w");
11160 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011161 return 1;
11162 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011163 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011164 long int i = longval ();
11165 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11166 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 fprintf (f, "%ld\n", i);
11168 }
11169 else
11170 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011171 unsigned long int i = ulongval ();
11172 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11173 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011174 fprintf (f, "%lu\n", i);
11175 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011176 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011177
11178 ;
11179 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011180}
Martin v. Löwis11437992002-04-12 09:54:03 +000011181_ACEOF
11182rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011183if { (ac_try="$ac_link"
11184case "(($ac_try" in
11185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11186 *) ac_try_echo=$ac_try;;
11187esac
11188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11189 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011190 ac_status=$?
11191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11192 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011193 { (case "(($ac_try" in
11194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11195 *) ac_try_echo=$ac_try;;
11196esac
11197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11198 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 ac_status=$?
11200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11201 (exit $ac_status); }; }; then
11202 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011203else
Martin v. Löwis11437992002-04-12 09:54:03 +000011204 echo "$as_me: program exited with status $ac_status" >&5
11205echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011206sed 's/^/| /' conftest.$ac_ext >&5
11207
Martin v. Löwis11437992002-04-12 09:54:03 +000011208( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011209if test "$ac_cv_type_long_long" = yes; then
11210 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011211See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011212echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011213See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011214 { (exit 77); exit 77; }; }
11215 else
11216 ac_cv_sizeof_long_long=0
11217 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011219rm -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 +000011220fi
11221rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011223{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11224echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11225
11226
11227
Martin v. Löwis11437992002-04-12 09:54:03 +000011228cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011229#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011230_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011231
Michael W. Hudson54241132001-12-07 15:38:26 +000011232
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011233fi
11234
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011235{ echo "$as_me:$LINENO: checking for long double support" >&5
11236echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11237have_long_double=no
11238cat >conftest.$ac_ext <<_ACEOF
11239/* confdefs.h. */
11240_ACEOF
11241cat confdefs.h >>conftest.$ac_ext
11242cat >>conftest.$ac_ext <<_ACEOF
11243/* end confdefs.h. */
11244
11245int
11246main ()
11247{
11248long double x; x = (long double)0.;
11249 ;
11250 return 0;
11251}
11252_ACEOF
11253rm -f conftest.$ac_objext
11254if { (ac_try="$ac_compile"
11255case "(($ac_try" in
11256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11257 *) ac_try_echo=$ac_try;;
11258esac
11259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11260 (eval "$ac_compile") 2>conftest.er1
11261 ac_status=$?
11262 grep -v '^ *+' conftest.er1 >conftest.err
11263 rm -f conftest.er1
11264 cat conftest.err >&5
11265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11266 (exit $ac_status); } && {
11267 test -z "$ac_c_werror_flag" ||
11268 test ! -s conftest.err
11269 } && test -s conftest.$ac_objext; then
11270
11271
11272cat >>confdefs.h <<\_ACEOF
11273#define HAVE_LONG_DOUBLE 1
11274_ACEOF
11275
11276 have_long_double=yes
11277
11278else
11279 echo "$as_me: failed program was:" >&5
11280sed 's/^/| /' conftest.$ac_ext >&5
11281
11282
11283fi
11284
11285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11286{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11287echo "${ECHO_T}$have_long_double" >&6; }
11288if test "$have_long_double" = yes ; then
11289{ echo "$as_me:$LINENO: checking for long double" >&5
11290echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11291if test "${ac_cv_type_long_double+set}" = set; then
11292 echo $ECHO_N "(cached) $ECHO_C" >&6
11293else
11294 cat >conftest.$ac_ext <<_ACEOF
11295/* confdefs.h. */
11296_ACEOF
11297cat confdefs.h >>conftest.$ac_ext
11298cat >>conftest.$ac_ext <<_ACEOF
11299/* end confdefs.h. */
11300$ac_includes_default
11301typedef long double ac__type_new_;
11302int
11303main ()
11304{
11305if ((ac__type_new_ *) 0)
11306 return 0;
11307if (sizeof (ac__type_new_))
11308 return 0;
11309 ;
11310 return 0;
11311}
11312_ACEOF
11313rm -f conftest.$ac_objext
11314if { (ac_try="$ac_compile"
11315case "(($ac_try" in
11316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11317 *) ac_try_echo=$ac_try;;
11318esac
11319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11320 (eval "$ac_compile") 2>conftest.er1
11321 ac_status=$?
11322 grep -v '^ *+' conftest.er1 >conftest.err
11323 rm -f conftest.er1
11324 cat conftest.err >&5
11325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11326 (exit $ac_status); } && {
11327 test -z "$ac_c_werror_flag" ||
11328 test ! -s conftest.err
11329 } && test -s conftest.$ac_objext; then
11330 ac_cv_type_long_double=yes
11331else
11332 echo "$as_me: failed program was:" >&5
11333sed 's/^/| /' conftest.$ac_ext >&5
11334
11335 ac_cv_type_long_double=no
11336fi
11337
11338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11339fi
11340{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11341echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11342
11343# The cast to long int works around a bug in the HP C Compiler
11344# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11345# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11346# This bug is HP SR number 8606223364.
11347{ echo "$as_me:$LINENO: checking size of long double" >&5
11348echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11349if test "${ac_cv_sizeof_long_double+set}" = set; then
11350 echo $ECHO_N "(cached) $ECHO_C" >&6
11351else
11352 if test "$cross_compiling" = yes; then
11353 # Depending upon the size, compute the lo and hi bounds.
11354cat >conftest.$ac_ext <<_ACEOF
11355/* confdefs.h. */
11356_ACEOF
11357cat confdefs.h >>conftest.$ac_ext
11358cat >>conftest.$ac_ext <<_ACEOF
11359/* end confdefs.h. */
11360$ac_includes_default
11361 typedef long double ac__type_sizeof_;
11362int
11363main ()
11364{
11365static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11366test_array [0] = 0
11367
11368 ;
11369 return 0;
11370}
11371_ACEOF
11372rm -f conftest.$ac_objext
11373if { (ac_try="$ac_compile"
11374case "(($ac_try" in
11375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11376 *) ac_try_echo=$ac_try;;
11377esac
11378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11379 (eval "$ac_compile") 2>conftest.er1
11380 ac_status=$?
11381 grep -v '^ *+' conftest.er1 >conftest.err
11382 rm -f conftest.er1
11383 cat conftest.err >&5
11384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11385 (exit $ac_status); } && {
11386 test -z "$ac_c_werror_flag" ||
11387 test ! -s conftest.err
11388 } && test -s conftest.$ac_objext; then
11389 ac_lo=0 ac_mid=0
11390 while :; do
11391 cat >conftest.$ac_ext <<_ACEOF
11392/* confdefs.h. */
11393_ACEOF
11394cat confdefs.h >>conftest.$ac_ext
11395cat >>conftest.$ac_ext <<_ACEOF
11396/* end confdefs.h. */
11397$ac_includes_default
11398 typedef long double ac__type_sizeof_;
11399int
11400main ()
11401{
11402static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11403test_array [0] = 0
11404
11405 ;
11406 return 0;
11407}
11408_ACEOF
11409rm -f conftest.$ac_objext
11410if { (ac_try="$ac_compile"
11411case "(($ac_try" in
11412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11413 *) ac_try_echo=$ac_try;;
11414esac
11415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11416 (eval "$ac_compile") 2>conftest.er1
11417 ac_status=$?
11418 grep -v '^ *+' conftest.er1 >conftest.err
11419 rm -f conftest.er1
11420 cat conftest.err >&5
11421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11422 (exit $ac_status); } && {
11423 test -z "$ac_c_werror_flag" ||
11424 test ! -s conftest.err
11425 } && test -s conftest.$ac_objext; then
11426 ac_hi=$ac_mid; break
11427else
11428 echo "$as_me: failed program was:" >&5
11429sed 's/^/| /' conftest.$ac_ext >&5
11430
11431 ac_lo=`expr $ac_mid + 1`
11432 if test $ac_lo -le $ac_mid; then
11433 ac_lo= ac_hi=
11434 break
11435 fi
11436 ac_mid=`expr 2 '*' $ac_mid + 1`
11437fi
11438
11439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11440 done
11441else
11442 echo "$as_me: failed program was:" >&5
11443sed 's/^/| /' conftest.$ac_ext >&5
11444
11445 cat >conftest.$ac_ext <<_ACEOF
11446/* confdefs.h. */
11447_ACEOF
11448cat confdefs.h >>conftest.$ac_ext
11449cat >>conftest.$ac_ext <<_ACEOF
11450/* end confdefs.h. */
11451$ac_includes_default
11452 typedef long double ac__type_sizeof_;
11453int
11454main ()
11455{
11456static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11457test_array [0] = 0
11458
11459 ;
11460 return 0;
11461}
11462_ACEOF
11463rm -f conftest.$ac_objext
11464if { (ac_try="$ac_compile"
11465case "(($ac_try" in
11466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11467 *) ac_try_echo=$ac_try;;
11468esac
11469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11470 (eval "$ac_compile") 2>conftest.er1
11471 ac_status=$?
11472 grep -v '^ *+' conftest.er1 >conftest.err
11473 rm -f conftest.er1
11474 cat conftest.err >&5
11475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11476 (exit $ac_status); } && {
11477 test -z "$ac_c_werror_flag" ||
11478 test ! -s conftest.err
11479 } && test -s conftest.$ac_objext; then
11480 ac_hi=-1 ac_mid=-1
11481 while :; do
11482 cat >conftest.$ac_ext <<_ACEOF
11483/* confdefs.h. */
11484_ACEOF
11485cat confdefs.h >>conftest.$ac_ext
11486cat >>conftest.$ac_ext <<_ACEOF
11487/* end confdefs.h. */
11488$ac_includes_default
11489 typedef long double ac__type_sizeof_;
11490int
11491main ()
11492{
11493static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11494test_array [0] = 0
11495
11496 ;
11497 return 0;
11498}
11499_ACEOF
11500rm -f conftest.$ac_objext
11501if { (ac_try="$ac_compile"
11502case "(($ac_try" in
11503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11504 *) ac_try_echo=$ac_try;;
11505esac
11506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11507 (eval "$ac_compile") 2>conftest.er1
11508 ac_status=$?
11509 grep -v '^ *+' conftest.er1 >conftest.err
11510 rm -f conftest.er1
11511 cat conftest.err >&5
11512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11513 (exit $ac_status); } && {
11514 test -z "$ac_c_werror_flag" ||
11515 test ! -s conftest.err
11516 } && test -s conftest.$ac_objext; then
11517 ac_lo=$ac_mid; break
11518else
11519 echo "$as_me: failed program was:" >&5
11520sed 's/^/| /' conftest.$ac_ext >&5
11521
11522 ac_hi=`expr '(' $ac_mid ')' - 1`
11523 if test $ac_mid -le $ac_hi; then
11524 ac_lo= ac_hi=
11525 break
11526 fi
11527 ac_mid=`expr 2 '*' $ac_mid`
11528fi
11529
11530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11531 done
11532else
11533 echo "$as_me: failed program was:" >&5
11534sed 's/^/| /' conftest.$ac_ext >&5
11535
11536 ac_lo= ac_hi=
11537fi
11538
11539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11540fi
11541
11542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11543# Binary search between lo and hi bounds.
11544while test "x$ac_lo" != "x$ac_hi"; do
11545 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11546 cat >conftest.$ac_ext <<_ACEOF
11547/* confdefs.h. */
11548_ACEOF
11549cat confdefs.h >>conftest.$ac_ext
11550cat >>conftest.$ac_ext <<_ACEOF
11551/* end confdefs.h. */
11552$ac_includes_default
11553 typedef long double ac__type_sizeof_;
11554int
11555main ()
11556{
11557static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11558test_array [0] = 0
11559
11560 ;
11561 return 0;
11562}
11563_ACEOF
11564rm -f conftest.$ac_objext
11565if { (ac_try="$ac_compile"
11566case "(($ac_try" in
11567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11568 *) ac_try_echo=$ac_try;;
11569esac
11570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11571 (eval "$ac_compile") 2>conftest.er1
11572 ac_status=$?
11573 grep -v '^ *+' conftest.er1 >conftest.err
11574 rm -f conftest.er1
11575 cat conftest.err >&5
11576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11577 (exit $ac_status); } && {
11578 test -z "$ac_c_werror_flag" ||
11579 test ! -s conftest.err
11580 } && test -s conftest.$ac_objext; then
11581 ac_hi=$ac_mid
11582else
11583 echo "$as_me: failed program was:" >&5
11584sed 's/^/| /' conftest.$ac_ext >&5
11585
11586 ac_lo=`expr '(' $ac_mid ')' + 1`
11587fi
11588
11589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11590done
11591case $ac_lo in
11592?*) ac_cv_sizeof_long_double=$ac_lo;;
11593'') if test "$ac_cv_type_long_double" = yes; then
11594 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11595See \`config.log' for more details." >&5
11596echo "$as_me: error: cannot compute sizeof (long double)
11597See \`config.log' for more details." >&2;}
11598 { (exit 77); exit 77; }; }
11599 else
11600 ac_cv_sizeof_long_double=0
11601 fi ;;
11602esac
11603else
11604 cat >conftest.$ac_ext <<_ACEOF
11605/* confdefs.h. */
11606_ACEOF
11607cat confdefs.h >>conftest.$ac_ext
11608cat >>conftest.$ac_ext <<_ACEOF
11609/* end confdefs.h. */
11610$ac_includes_default
11611 typedef long double ac__type_sizeof_;
11612static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11613static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11614#include <stdio.h>
11615#include <stdlib.h>
11616int
11617main ()
11618{
11619
11620 FILE *f = fopen ("conftest.val", "w");
11621 if (! f)
11622 return 1;
11623 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11624 {
11625 long int i = longval ();
11626 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11627 return 1;
11628 fprintf (f, "%ld\n", i);
11629 }
11630 else
11631 {
11632 unsigned long int i = ulongval ();
11633 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11634 return 1;
11635 fprintf (f, "%lu\n", i);
11636 }
11637 return ferror (f) || fclose (f) != 0;
11638
11639 ;
11640 return 0;
11641}
11642_ACEOF
11643rm -f conftest$ac_exeext
11644if { (ac_try="$ac_link"
11645case "(($ac_try" in
11646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11647 *) ac_try_echo=$ac_try;;
11648esac
11649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11650 (eval "$ac_link") 2>&5
11651 ac_status=$?
11652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11653 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11654 { (case "(($ac_try" in
11655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11656 *) ac_try_echo=$ac_try;;
11657esac
11658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11659 (eval "$ac_try") 2>&5
11660 ac_status=$?
11661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11662 (exit $ac_status); }; }; then
11663 ac_cv_sizeof_long_double=`cat conftest.val`
11664else
11665 echo "$as_me: program exited with status $ac_status" >&5
11666echo "$as_me: failed program was:" >&5
11667sed 's/^/| /' conftest.$ac_ext >&5
11668
11669( exit $ac_status )
11670if test "$ac_cv_type_long_double" = yes; then
11671 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11672See \`config.log' for more details." >&5
11673echo "$as_me: error: cannot compute sizeof (long double)
11674See \`config.log' for more details." >&2;}
11675 { (exit 77); exit 77; }; }
11676 else
11677 ac_cv_sizeof_long_double=0
11678 fi
11679fi
11680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11681fi
11682rm -f conftest.val
11683fi
11684{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
11685echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
11686
11687
11688
11689cat >>confdefs.h <<_ACEOF
11690#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
11691_ACEOF
11692
11693
11694fi
11695
Martin v. Löwiseba40652007-08-30 20:10:57 +000011696{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11697echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011698have_c99_bool=no
11699cat >conftest.$ac_ext <<_ACEOF
11700/* confdefs.h. */
11701_ACEOF
11702cat confdefs.h >>conftest.$ac_ext
11703cat >>conftest.$ac_ext <<_ACEOF
11704/* end confdefs.h. */
11705
11706int
11707main ()
11708{
11709_Bool x; x = (_Bool)0;
11710 ;
11711 return 0;
11712}
11713_ACEOF
11714rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011715if { (ac_try="$ac_compile"
11716case "(($ac_try" in
11717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11718 *) ac_try_echo=$ac_try;;
11719esac
11720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011722 ac_status=$?
11723 grep -v '^ *+' conftest.er1 >conftest.err
11724 rm -f conftest.er1
11725 cat conftest.err >&5
11726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011727 (exit $ac_status); } && {
11728 test -z "$ac_c_werror_flag" ||
11729 test ! -s conftest.err
11730 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011731
11732
11733cat >>confdefs.h <<\_ACEOF
11734#define HAVE_C99_BOOL 1
11735_ACEOF
11736
11737 have_c99_bool=yes
11738
11739else
11740 echo "$as_me: failed program was:" >&5
11741sed 's/^/| /' conftest.$ac_ext >&5
11742
Martin v. Löwiseba40652007-08-30 20:10:57 +000011743
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011745
11746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11747{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11748echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011749if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011750{ echo "$as_me:$LINENO: checking for _Bool" >&5
11751echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011752if test "${ac_cv_type__Bool+set}" = set; then
11753 echo $ECHO_N "(cached) $ECHO_C" >&6
11754else
11755 cat >conftest.$ac_ext <<_ACEOF
11756/* confdefs.h. */
11757_ACEOF
11758cat confdefs.h >>conftest.$ac_ext
11759cat >>conftest.$ac_ext <<_ACEOF
11760/* end confdefs.h. */
11761$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011762typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011763int
11764main ()
11765{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011766if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011767 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011768if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011769 return 0;
11770 ;
11771 return 0;
11772}
11773_ACEOF
11774rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011775if { (ac_try="$ac_compile"
11776case "(($ac_try" in
11777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11778 *) ac_try_echo=$ac_try;;
11779esac
11780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011782 ac_status=$?
11783 grep -v '^ *+' conftest.er1 >conftest.err
11784 rm -f conftest.er1
11785 cat conftest.err >&5
11786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011787 (exit $ac_status); } && {
11788 test -z "$ac_c_werror_flag" ||
11789 test ! -s conftest.err
11790 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011791 ac_cv_type__Bool=yes
11792else
11793 echo "$as_me: failed program was:" >&5
11794sed 's/^/| /' conftest.$ac_ext >&5
11795
Martin v. Löwiseba40652007-08-30 20:10:57 +000011796 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011797fi
Brett Cannon19fab762007-06-02 03:02:29 +000011798
Martin v. Löwiseba40652007-08-30 20:10:57 +000011799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11800fi
11801{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11802echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11803
11804# The cast to long int works around a bug in the HP C Compiler
11805# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11806# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11807# This bug is HP SR number 8606223364.
11808{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11809echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011810if test "${ac_cv_sizeof__Bool+set}" = set; then
11811 echo $ECHO_N "(cached) $ECHO_C" >&6
11812else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011813 if test "$cross_compiling" = yes; then
11814 # Depending upon the size, compute the lo and hi bounds.
11815cat >conftest.$ac_ext <<_ACEOF
11816/* confdefs.h. */
11817_ACEOF
11818cat confdefs.h >>conftest.$ac_ext
11819cat >>conftest.$ac_ext <<_ACEOF
11820/* end confdefs.h. */
11821$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011822 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011823int
11824main ()
11825{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011826static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011827test_array [0] = 0
11828
11829 ;
11830 return 0;
11831}
11832_ACEOF
11833rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011834if { (ac_try="$ac_compile"
11835case "(($ac_try" in
11836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11837 *) ac_try_echo=$ac_try;;
11838esac
11839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011841 ac_status=$?
11842 grep -v '^ *+' conftest.er1 >conftest.err
11843 rm -f conftest.er1
11844 cat conftest.err >&5
11845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011846 (exit $ac_status); } && {
11847 test -z "$ac_c_werror_flag" ||
11848 test ! -s conftest.err
11849 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011850 ac_lo=0 ac_mid=0
11851 while :; do
11852 cat >conftest.$ac_ext <<_ACEOF
11853/* confdefs.h. */
11854_ACEOF
11855cat confdefs.h >>conftest.$ac_ext
11856cat >>conftest.$ac_ext <<_ACEOF
11857/* end confdefs.h. */
11858$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011859 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011860int
11861main ()
11862{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011863static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011864test_array [0] = 0
11865
11866 ;
11867 return 0;
11868}
11869_ACEOF
11870rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011871if { (ac_try="$ac_compile"
11872case "(($ac_try" in
11873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11874 *) ac_try_echo=$ac_try;;
11875esac
11876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11877 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011878 ac_status=$?
11879 grep -v '^ *+' conftest.er1 >conftest.err
11880 rm -f conftest.er1
11881 cat conftest.err >&5
11882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011883 (exit $ac_status); } && {
11884 test -z "$ac_c_werror_flag" ||
11885 test ! -s conftest.err
11886 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011887 ac_hi=$ac_mid; break
11888else
11889 echo "$as_me: failed program was:" >&5
11890sed 's/^/| /' conftest.$ac_ext >&5
11891
Martin v. Löwiseba40652007-08-30 20:10:57 +000011892 ac_lo=`expr $ac_mid + 1`
11893 if test $ac_lo -le $ac_mid; then
11894 ac_lo= ac_hi=
11895 break
11896 fi
11897 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011899
11900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011901 done
11902else
11903 echo "$as_me: failed program was:" >&5
11904sed 's/^/| /' conftest.$ac_ext >&5
11905
Martin v. Löwiseba40652007-08-30 20:10:57 +000011906 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011907/* confdefs.h. */
11908_ACEOF
11909cat confdefs.h >>conftest.$ac_ext
11910cat >>conftest.$ac_ext <<_ACEOF
11911/* end confdefs.h. */
11912$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011913 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011914int
11915main ()
11916{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011917static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011918test_array [0] = 0
11919
11920 ;
11921 return 0;
11922}
11923_ACEOF
11924rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011925if { (ac_try="$ac_compile"
11926case "(($ac_try" in
11927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11928 *) ac_try_echo=$ac_try;;
11929esac
11930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11931 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011932 ac_status=$?
11933 grep -v '^ *+' conftest.er1 >conftest.err
11934 rm -f conftest.er1
11935 cat conftest.err >&5
11936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011937 (exit $ac_status); } && {
11938 test -z "$ac_c_werror_flag" ||
11939 test ! -s conftest.err
11940 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011941 ac_hi=-1 ac_mid=-1
11942 while :; do
11943 cat >conftest.$ac_ext <<_ACEOF
11944/* confdefs.h. */
11945_ACEOF
11946cat confdefs.h >>conftest.$ac_ext
11947cat >>conftest.$ac_ext <<_ACEOF
11948/* end confdefs.h. */
11949$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011950 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011951int
11952main ()
11953{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011954static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011955test_array [0] = 0
11956
11957 ;
11958 return 0;
11959}
11960_ACEOF
11961rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011962if { (ac_try="$ac_compile"
11963case "(($ac_try" in
11964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11965 *) ac_try_echo=$ac_try;;
11966esac
11967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11968 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011969 ac_status=$?
11970 grep -v '^ *+' conftest.er1 >conftest.err
11971 rm -f conftest.er1
11972 cat conftest.err >&5
11973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011974 (exit $ac_status); } && {
11975 test -z "$ac_c_werror_flag" ||
11976 test ! -s conftest.err
11977 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011978 ac_lo=$ac_mid; break
11979else
11980 echo "$as_me: failed program was:" >&5
11981sed 's/^/| /' conftest.$ac_ext >&5
11982
Martin v. Löwiseba40652007-08-30 20:10:57 +000011983 ac_hi=`expr '(' $ac_mid ')' - 1`
11984 if test $ac_mid -le $ac_hi; then
11985 ac_lo= ac_hi=
11986 break
11987 fi
11988 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011990
11991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011992 done
11993else
11994 echo "$as_me: failed program was:" >&5
11995sed 's/^/| /' conftest.$ac_ext >&5
11996
Martin v. Löwiseba40652007-08-30 20:10:57 +000011997 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011999
12000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012002
12003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012004# Binary search between lo and hi bounds.
12005while test "x$ac_lo" != "x$ac_hi"; do
12006 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12007 cat >conftest.$ac_ext <<_ACEOF
12008/* confdefs.h. */
12009_ACEOF
12010cat confdefs.h >>conftest.$ac_ext
12011cat >>conftest.$ac_ext <<_ACEOF
12012/* end confdefs.h. */
12013$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012014 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012015int
12016main ()
12017{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012018static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012019test_array [0] = 0
12020
12021 ;
12022 return 0;
12023}
12024_ACEOF
12025rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012026if { (ac_try="$ac_compile"
12027case "(($ac_try" in
12028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12029 *) ac_try_echo=$ac_try;;
12030esac
12031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12032 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012033 ac_status=$?
12034 grep -v '^ *+' conftest.er1 >conftest.err
12035 rm -f conftest.er1
12036 cat conftest.err >&5
12037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012038 (exit $ac_status); } && {
12039 test -z "$ac_c_werror_flag" ||
12040 test ! -s conftest.err
12041 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012042 ac_hi=$ac_mid
12043else
12044 echo "$as_me: failed program was:" >&5
12045sed 's/^/| /' conftest.$ac_ext >&5
12046
Martin v. Löwiseba40652007-08-30 20:10:57 +000012047 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012049
12050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012051done
12052case $ac_lo in
12053?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012054'') if test "$ac_cv_type__Bool" = yes; then
12055 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012056See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012057echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012058See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012059 { (exit 77); exit 77; }; }
12060 else
12061 ac_cv_sizeof__Bool=0
12062 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012063esac
12064else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012065 cat >conftest.$ac_ext <<_ACEOF
12066/* confdefs.h. */
12067_ACEOF
12068cat confdefs.h >>conftest.$ac_ext
12069cat >>conftest.$ac_ext <<_ACEOF
12070/* end confdefs.h. */
12071$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012072 typedef _Bool ac__type_sizeof_;
12073static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12074static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012075#include <stdio.h>
12076#include <stdlib.h>
12077int
12078main ()
12079{
12080
12081 FILE *f = fopen ("conftest.val", "w");
12082 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012083 return 1;
12084 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012085 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012086 long int i = longval ();
12087 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12088 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012089 fprintf (f, "%ld\n", i);
12090 }
12091 else
12092 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012093 unsigned long int i = ulongval ();
12094 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12095 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012096 fprintf (f, "%lu\n", i);
12097 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012098 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012099
12100 ;
12101 return 0;
12102}
12103_ACEOF
12104rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012105if { (ac_try="$ac_link"
12106case "(($ac_try" in
12107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12108 *) ac_try_echo=$ac_try;;
12109esac
12110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12111 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012112 ac_status=$?
12113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12114 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012115 { (case "(($ac_try" in
12116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12117 *) ac_try_echo=$ac_try;;
12118esac
12119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12120 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012121 ac_status=$?
12122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12123 (exit $ac_status); }; }; then
12124 ac_cv_sizeof__Bool=`cat conftest.val`
12125else
12126 echo "$as_me: program exited with status $ac_status" >&5
12127echo "$as_me: failed program was:" >&5
12128sed 's/^/| /' conftest.$ac_ext >&5
12129
12130( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012131if test "$ac_cv_type__Bool" = yes; then
12132 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012133See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012134echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012135See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012136 { (exit 77); exit 77; }; }
12137 else
12138 ac_cv_sizeof__Bool=0
12139 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012141rm -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 +000012142fi
12143rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012145{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12146echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12147
12148
12149
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012150cat >>confdefs.h <<_ACEOF
12151#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12152_ACEOF
12153
12154
12155fi
12156
Martin v. Löwiseba40652007-08-30 20:10:57 +000012157{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12158echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012159if test "${ac_cv_type_uintptr_t+set}" = set; then
12160 echo $ECHO_N "(cached) $ECHO_C" >&6
12161else
12162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012163/* confdefs.h. */
12164_ACEOF
12165cat confdefs.h >>conftest.$ac_ext
12166cat >>conftest.$ac_ext <<_ACEOF
12167/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012168#ifdef HAVE_STDINT_H
12169 #include <stdint.h>
12170 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012171
Martin v. Löwiseba40652007-08-30 20:10:57 +000012172typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012173int
12174main ()
12175{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012176if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012177 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012178if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012179 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 ;
12181 return 0;
12182}
12183_ACEOF
12184rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012185if { (ac_try="$ac_compile"
12186case "(($ac_try" in
12187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12188 *) ac_try_echo=$ac_try;;
12189esac
12190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12191 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012193 grep -v '^ *+' conftest.er1 >conftest.err
12194 rm -f conftest.er1
12195 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012197 (exit $ac_status); } && {
12198 test -z "$ac_c_werror_flag" ||
12199 test ! -s conftest.err
12200 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012201 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012202else
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012204sed 's/^/| /' conftest.$ac_ext >&5
12205
Martin v. Löwiseba40652007-08-30 20:10:57 +000012206 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012208
12209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012210fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012211{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12212echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012213if test $ac_cv_type_uintptr_t = yes; then
12214
12215cat >>confdefs.h <<_ACEOF
12216#define HAVE_UINTPTR_T 1
12217_ACEOF
12218
Martin v. Löwiseba40652007-08-30 20:10:57 +000012219{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12220echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012221if test "${ac_cv_type_uintptr_t+set}" = set; then
12222 echo $ECHO_N "(cached) $ECHO_C" >&6
12223else
12224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012225/* confdefs.h. */
12226_ACEOF
12227cat confdefs.h >>conftest.$ac_ext
12228cat >>conftest.$ac_ext <<_ACEOF
12229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012230$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012231typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012232int
12233main ()
12234{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012235if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012236 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012237if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012238 return 0;
12239 ;
12240 return 0;
12241}
12242_ACEOF
12243rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012244if { (ac_try="$ac_compile"
12245case "(($ac_try" in
12246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12247 *) ac_try_echo=$ac_try;;
12248esac
12249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12250 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012252 grep -v '^ *+' conftest.er1 >conftest.err
12253 rm -f conftest.er1
12254 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012256 (exit $ac_status); } && {
12257 test -z "$ac_c_werror_flag" ||
12258 test ! -s conftest.err
12259 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012260 ac_cv_type_uintptr_t=yes
12261else
12262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012263sed 's/^/| /' conftest.$ac_ext >&5
12264
Martin v. Löwiseba40652007-08-30 20:10:57 +000012265 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012266fi
Brett Cannon19fab762007-06-02 03:02:29 +000012267
Martin v. Löwiseba40652007-08-30 20:10:57 +000012268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12269fi
12270{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12271echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12272
12273# The cast to long int works around a bug in the HP C Compiler
12274# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12275# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12276# This bug is HP SR number 8606223364.
12277{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12278echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012279if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12280 echo $ECHO_N "(cached) $ECHO_C" >&6
12281else
Martin v. Löwis11437992002-04-12 09:54:03 +000012282 if test "$cross_compiling" = yes; then
12283 # Depending upon the size, compute the lo and hi bounds.
12284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012285/* confdefs.h. */
12286_ACEOF
12287cat confdefs.h >>conftest.$ac_ext
12288cat >>conftest.$ac_ext <<_ACEOF
12289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012290$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012291 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012292int
12293main ()
12294{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012295static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012296test_array [0] = 0
12297
12298 ;
12299 return 0;
12300}
12301_ACEOF
12302rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012303if { (ac_try="$ac_compile"
12304case "(($ac_try" in
12305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12306 *) ac_try_echo=$ac_try;;
12307esac
12308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12309 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012310 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012311 grep -v '^ *+' conftest.er1 >conftest.err
12312 rm -f conftest.er1
12313 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012315 (exit $ac_status); } && {
12316 test -z "$ac_c_werror_flag" ||
12317 test ! -s conftest.err
12318 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 ac_lo=0 ac_mid=0
12320 while :; do
12321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012322/* confdefs.h. */
12323_ACEOF
12324cat confdefs.h >>conftest.$ac_ext
12325cat >>conftest.$ac_ext <<_ACEOF
12326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012327$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012328 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012329int
12330main ()
12331{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012332static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012333test_array [0] = 0
12334
12335 ;
12336 return 0;
12337}
12338_ACEOF
12339rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012340if { (ac_try="$ac_compile"
12341case "(($ac_try" in
12342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12343 *) ac_try_echo=$ac_try;;
12344esac
12345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12346 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012348 grep -v '^ *+' conftest.er1 >conftest.err
12349 rm -f conftest.er1
12350 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012352 (exit $ac_status); } && {
12353 test -z "$ac_c_werror_flag" ||
12354 test ! -s conftest.err
12355 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 ac_hi=$ac_mid; break
12357else
12358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012359sed 's/^/| /' conftest.$ac_ext >&5
12360
Martin v. Löwiseba40652007-08-30 20:10:57 +000012361 ac_lo=`expr $ac_mid + 1`
12362 if test $ac_lo -le $ac_mid; then
12363 ac_lo= ac_hi=
12364 break
12365 fi
12366 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012368
12369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 done
12371else
12372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012373sed 's/^/| /' conftest.$ac_ext >&5
12374
Martin v. Löwiseba40652007-08-30 20:10:57 +000012375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012376/* confdefs.h. */
12377_ACEOF
12378cat confdefs.h >>conftest.$ac_ext
12379cat >>conftest.$ac_ext <<_ACEOF
12380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012381$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012383int
12384main ()
12385{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012386static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012387test_array [0] = 0
12388
12389 ;
12390 return 0;
12391}
12392_ACEOF
12393rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012394if { (ac_try="$ac_compile"
12395case "(($ac_try" in
12396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12397 *) ac_try_echo=$ac_try;;
12398esac
12399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12400 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012402 grep -v '^ *+' conftest.er1 >conftest.err
12403 rm -f conftest.er1
12404 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012406 (exit $ac_status); } && {
12407 test -z "$ac_c_werror_flag" ||
12408 test ! -s conftest.err
12409 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 ac_hi=-1 ac_mid=-1
12411 while :; do
12412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012413/* confdefs.h. */
12414_ACEOF
12415cat confdefs.h >>conftest.$ac_ext
12416cat >>conftest.$ac_ext <<_ACEOF
12417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012418$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012419 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012420int
12421main ()
12422{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012423static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012424test_array [0] = 0
12425
12426 ;
12427 return 0;
12428}
12429_ACEOF
12430rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012431if { (ac_try="$ac_compile"
12432case "(($ac_try" in
12433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12434 *) ac_try_echo=$ac_try;;
12435esac
12436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012439 grep -v '^ *+' conftest.er1 >conftest.err
12440 rm -f conftest.er1
12441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012443 (exit $ac_status); } && {
12444 test -z "$ac_c_werror_flag" ||
12445 test ! -s conftest.err
12446 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012447 ac_lo=$ac_mid; break
12448else
12449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012450sed 's/^/| /' conftest.$ac_ext >&5
12451
Martin v. Löwiseba40652007-08-30 20:10:57 +000012452 ac_hi=`expr '(' $ac_mid ')' - 1`
12453 if test $ac_mid -le $ac_hi; then
12454 ac_lo= ac_hi=
12455 break
12456 fi
12457 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012459
12460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012461 done
12462else
12463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012464sed 's/^/| /' conftest.$ac_ext >&5
12465
Martin v. Löwiseba40652007-08-30 20:10:57 +000012466 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012468
12469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012471
12472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012473# Binary search between lo and hi bounds.
12474while test "x$ac_lo" != "x$ac_hi"; do
12475 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012477/* confdefs.h. */
12478_ACEOF
12479cat confdefs.h >>conftest.$ac_ext
12480cat >>conftest.$ac_ext <<_ACEOF
12481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012482$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012483 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012484int
12485main ()
12486{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012488test_array [0] = 0
12489
12490 ;
12491 return 0;
12492}
12493_ACEOF
12494rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012495if { (ac_try="$ac_compile"
12496case "(($ac_try" in
12497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12498 *) ac_try_echo=$ac_try;;
12499esac
12500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012503 grep -v '^ *+' conftest.er1 >conftest.err
12504 rm -f conftest.er1
12505 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012507 (exit $ac_status); } && {
12508 test -z "$ac_c_werror_flag" ||
12509 test ! -s conftest.err
12510 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012511 ac_hi=$ac_mid
12512else
12513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012514sed 's/^/| /' conftest.$ac_ext >&5
12515
Martin v. Löwiseba40652007-08-30 20:10:57 +000012516 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012518
12519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012520done
12521case $ac_lo in
12522?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012523'') if test "$ac_cv_type_uintptr_t" = yes; then
12524 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012525See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012526echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012527See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012528 { (exit 77); exit 77; }; }
12529 else
12530 ac_cv_sizeof_uintptr_t=0
12531 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012532esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012533else
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012535/* confdefs.h. */
12536_ACEOF
12537cat confdefs.h >>conftest.$ac_ext
12538cat >>conftest.$ac_ext <<_ACEOF
12539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012540$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541 typedef uintptr_t ac__type_sizeof_;
12542static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12543static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012544#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012545#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012546int
12547main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012548{
Martin v. Löwis11437992002-04-12 09:54:03 +000012549
12550 FILE *f = fopen ("conftest.val", "w");
12551 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012552 return 1;
12553 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012554 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012555 long int i = longval ();
12556 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12557 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012558 fprintf (f, "%ld\n", i);
12559 }
12560 else
12561 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012562 unsigned long int i = ulongval ();
12563 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12564 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012565 fprintf (f, "%lu\n", i);
12566 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012567 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012568
12569 ;
12570 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012571}
Martin v. Löwis11437992002-04-12 09:54:03 +000012572_ACEOF
12573rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012574if { (ac_try="$ac_link"
12575case "(($ac_try" in
12576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12577 *) ac_try_echo=$ac_try;;
12578esac
12579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12580 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012581 ac_status=$?
12582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12583 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012584 { (case "(($ac_try" in
12585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12586 *) ac_try_echo=$ac_try;;
12587esac
12588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12589 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 ac_status=$?
12591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12592 (exit $ac_status); }; }; then
12593 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012594else
Martin v. Löwis11437992002-04-12 09:54:03 +000012595 echo "$as_me: program exited with status $ac_status" >&5
12596echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012597sed 's/^/| /' conftest.$ac_ext >&5
12598
Martin v. Löwis11437992002-04-12 09:54:03 +000012599( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012600if test "$ac_cv_type_uintptr_t" = yes; then
12601 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012602See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012603echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012604See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012605 { (exit 77); exit 77; }; }
12606 else
12607 ac_cv_sizeof_uintptr_t=0
12608 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012610rm -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 +000012611fi
12612rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012614{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12615echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12616
12617
12618
Martin v. Löwis11437992002-04-12 09:54:03 +000012619cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012620#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012621_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012622
Michael W. Hudson54241132001-12-07 15:38:26 +000012623
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012624fi
12625
Martin v. Löwisebe26702006-10-02 14:55:51 +000012626
12627
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012628# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012629{ echo "$as_me:$LINENO: checking size of off_t" >&5
12630echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012631if test "${ac_cv_sizeof_off_t+set}" = set; then
12632 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012633else
12634 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012635 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012636else
Martin v. Löwis11437992002-04-12 09:54:03 +000012637 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012638/* confdefs.h. */
12639_ACEOF
12640cat confdefs.h >>conftest.$ac_ext
12641cat >>conftest.$ac_ext <<_ACEOF
12642/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012643#include <stdio.h>
12644#include <sys/types.h>
12645main()
12646{
12647 FILE *f=fopen("conftestval", "w");
12648 if (!f) exit(1);
12649 fprintf(f, "%d\n", sizeof(off_t));
12650 exit(0);
12651}
Martin v. Löwis11437992002-04-12 09:54:03 +000012652_ACEOF
12653rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012654if { (ac_try="$ac_link"
12655case "(($ac_try" in
12656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12657 *) ac_try_echo=$ac_try;;
12658esac
12659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12660 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012661 ac_status=$?
12662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12663 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012664 { (case "(($ac_try" in
12665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12666 *) ac_try_echo=$ac_try;;
12667esac
12668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12669 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012670 ac_status=$?
12671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12672 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012673 ac_cv_sizeof_off_t=`cat conftestval`
12674else
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 echo "$as_me: program exited with status $ac_status" >&5
12676echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012677sed 's/^/| /' conftest.$ac_ext >&5
12678
Martin v. Löwis11437992002-04-12 09:54:03 +000012679( exit $ac_status )
12680ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012682rm -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 +000012683fi
12684
Martin v. Löwiseba40652007-08-30 20:10:57 +000012685
12686
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012687fi
12688
Martin v. Löwiseba40652007-08-30 20:10:57 +000012689{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12690echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012691
12692cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012693#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012694_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012695
Michael W. Hudson54241132001-12-07 15:38:26 +000012696
Martin v. Löwiseba40652007-08-30 20:10:57 +000012697{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12698echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012699if test "$have_long_long" = yes -a \
12700 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12701 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012702
Martin v. Löwis11437992002-04-12 09:54:03 +000012703cat >>confdefs.h <<\_ACEOF
12704#define HAVE_LARGEFILE_SUPPORT 1
12705_ACEOF
12706
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707 { echo "$as_me:$LINENO: result: yes" >&5
12708echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012709else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012710 { echo "$as_me:$LINENO: result: no" >&5
12711echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012712fi
12713
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012714# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012715{ echo "$as_me:$LINENO: checking size of time_t" >&5
12716echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012717if test "${ac_cv_sizeof_time_t+set}" = set; then
12718 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012719else
12720 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012721 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012722else
Martin v. Löwis11437992002-04-12 09:54:03 +000012723 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012724/* confdefs.h. */
12725_ACEOF
12726cat confdefs.h >>conftest.$ac_ext
12727cat >>conftest.$ac_ext <<_ACEOF
12728/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012729#include <stdio.h>
12730#include <time.h>
12731main()
12732{
12733 FILE *f=fopen("conftestval", "w");
12734 if (!f) exit(1);
12735 fprintf(f, "%d\n", sizeof(time_t));
12736 exit(0);
12737}
Martin v. Löwis11437992002-04-12 09:54:03 +000012738_ACEOF
12739rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012740if { (ac_try="$ac_link"
12741case "(($ac_try" in
12742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12743 *) ac_try_echo=$ac_try;;
12744esac
12745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12746 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ac_status=$?
12748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012750 { (case "(($ac_try" in
12751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12752 *) ac_try_echo=$ac_try;;
12753esac
12754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12755 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 ac_status=$?
12757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12758 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012759 ac_cv_sizeof_time_t=`cat conftestval`
12760else
Martin v. Löwis11437992002-04-12 09:54:03 +000012761 echo "$as_me: program exited with status $ac_status" >&5
12762echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012763sed 's/^/| /' conftest.$ac_ext >&5
12764
Martin v. Löwis11437992002-04-12 09:54:03 +000012765( exit $ac_status )
12766ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012768rm -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 +000012769fi
12770
Martin v. Löwiseba40652007-08-30 20:10:57 +000012771
12772
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012773fi
12774
Martin v. Löwiseba40652007-08-30 20:10:57 +000012775{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12776echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012777
12778cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012779#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012780_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012781
Michael W. Hudson54241132001-12-07 15:38:26 +000012782
12783
Trent Mick635f6fb2000-08-23 21:33:05 +000012784# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012785ac_save_cc="$CC"
12786if test "$ac_cv_kpthread" = "yes"
12787then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012788elif test "$ac_cv_kthread" = "yes"
12789then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012790elif test "$ac_cv_pthread" = "yes"
12791then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012793{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12794echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012795have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012796cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012797/* confdefs.h. */
12798_ACEOF
12799cat confdefs.h >>conftest.$ac_ext
12800cat >>conftest.$ac_ext <<_ACEOF
12801/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012802#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012803int
12804main ()
12805{
Guido van Rossum12580492000-09-24 16:47:19 +000012806pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 ;
12808 return 0;
12809}
12810_ACEOF
12811rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012812if { (ac_try="$ac_compile"
12813case "(($ac_try" in
12814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12815 *) ac_try_echo=$ac_try;;
12816esac
12817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012820 grep -v '^ *+' conftest.er1 >conftest.err
12821 rm -f conftest.er1
12822 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012824 (exit $ac_status); } && {
12825 test -z "$ac_c_werror_flag" ||
12826 test ! -s conftest.err
12827 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012828 have_pthread_t=yes
12829else
Martin v. Löwis11437992002-04-12 09:54:03 +000012830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012831sed 's/^/| /' conftest.$ac_ext >&5
12832
Martin v. Löwiseba40652007-08-30 20:10:57 +000012833
Trent Mick635f6fb2000-08-23 21:33:05 +000012834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012835
12836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12837{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12838echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012839if test "$have_pthread_t" = yes ; then
12840 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012841 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12842echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012843 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12844 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012845else
12846 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012847 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012848else
Martin v. Löwis11437992002-04-12 09:54:03 +000012849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012850/* confdefs.h. */
12851_ACEOF
12852cat confdefs.h >>conftest.$ac_ext
12853cat >>conftest.$ac_ext <<_ACEOF
12854/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012855#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012856#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012857 main()
12858 {
12859 FILE *f=fopen("conftestval", "w");
12860 if (!f) exit(1);
12861 fprintf(f, "%d\n", sizeof(pthread_t));
12862 exit(0);
12863 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012864_ACEOF
12865rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866if { (ac_try="$ac_link"
12867case "(($ac_try" in
12868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12869 *) ac_try_echo=$ac_try;;
12870esac
12871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12872 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 ac_status=$?
12874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12875 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012876 { (case "(($ac_try" in
12877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12878 *) ac_try_echo=$ac_try;;
12879esac
12880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12881 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 ac_status=$?
12883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12884 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012885 ac_cv_sizeof_pthread_t=`cat conftestval`
12886else
Martin v. Löwis11437992002-04-12 09:54:03 +000012887 echo "$as_me: program exited with status $ac_status" >&5
12888echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012889sed 's/^/| /' conftest.$ac_ext >&5
12890
Martin v. Löwis11437992002-04-12 09:54:03 +000012891( exit $ac_status )
12892ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012894rm -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 +000012895fi
12896
Martin v. Löwiseba40652007-08-30 20:10:57 +000012897
12898
Trent Mick635f6fb2000-08-23 21:33:05 +000012899fi
12900
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12902echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012903
12904cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012905#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012906_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012907
12908fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012909CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012910
Martin v. Löwiseba40652007-08-30 20:10:57 +000012911{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12912echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12913# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012914if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012915 enableval=$enable_toolbox_glue;
12916fi
Jack Jansene578a632001-08-15 01:27:14 +000012917
12918
12919if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012920then
Jack Jansene578a632001-08-15 01:27:14 +000012921 case $ac_sys_system/$ac_sys_release in
12922 Darwin/*)
12923 enable_toolbox_glue="yes";;
12924 *)
12925 enable_toolbox_glue="no";;
12926 esac
12927fi
12928case "$enable_toolbox_glue" in
12929yes)
Jack Jansene578a632001-08-15 01:27:14 +000012930 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012931 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
12933cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012934#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012935_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012936
12937 ;;
12938*)
Jack Jansene578a632001-08-15 01:27:14 +000012939 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012940 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012941 ;;
12942esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012943{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12944echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012945
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012946
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000012947
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012948case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012949 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012950 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12951 ;;
12952 Darwin/*)
12953 OTHER_LIBTOOL_OPT=""
12954 ;;
12955esac
12956
12957
Ronald Oussoren7ab74352009-09-08 07:10:07 +000012958ARCH_RUN_32BIT=""
12959
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012960case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012961 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012962 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12963 if test "${enable_universalsdk}"; then
12964 :
12965 else
Ronald Oussoren7ab74352009-09-08 07:10:07 +000012966 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000012967 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012968 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012969 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012970 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012971 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12972 if test ${gcc_version} '<' 4.0
12973 then
12974 LIBTOOL_CRUFT="-lcc_dynamic"
12975 else
12976 LIBTOOL_CRUFT=""
12977 fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000012978 if test "$cross_compiling" = yes; then
12979 ac_osx_32bit=yes
12980else
12981 cat >conftest.$ac_ext <<_ACEOF
12982/* confdefs.h. */
12983_ACEOF
12984cat confdefs.h >>conftest.$ac_ext
12985cat >>conftest.$ac_ext <<_ACEOF
12986/* end confdefs.h. */
12987
12988 #include <unistd.h>
12989 int main(int argc, char*argv[])
12990 {
12991 if (sizeof(long) == 4) {
12992 return 0;
12993 } else {
12994 return 1;
12995 }
12996 }
12997
12998_ACEOF
12999rm -f conftest$ac_exeext
13000if { (ac_try="$ac_link"
13001case "(($ac_try" in
13002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13003 *) ac_try_echo=$ac_try;;
13004esac
13005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13006 (eval "$ac_link") 2>&5
13007 ac_status=$?
13008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13010 { (case "(($ac_try" in
13011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13012 *) ac_try_echo=$ac_try;;
13013esac
13014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13015 (eval "$ac_try") 2>&5
13016 ac_status=$?
13017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13018 (exit $ac_status); }; }; then
13019 ac_osx_32bit=yes
13020else
13021 echo "$as_me: program exited with status $ac_status" >&5
13022echo "$as_me: failed program was:" >&5
13023sed 's/^/| /' conftest.$ac_ext >&5
13024
13025( exit $ac_status )
13026ac_osx_32bit=no
13027fi
13028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13029fi
13030
13031
13032
13033 if test "${ac_osx_32bit}" = "yes"; then
13034 case `arch` in
13035 i386)
13036 MACOSX_DEFAULT_ARCH="i386"
13037 ;;
13038 ppc)
13039 MACOSX_DEFAULT_ARCH="ppc"
13040 ;;
13041 *)
13042 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13043echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
13044 { (exit 1); exit 1; }; }
13045 ;;
13046 esac
13047 else
13048 case `arch` in
13049 i386)
13050 MACOSX_DEFAULT_ARCH="x86_64"
13051 ;;
13052 ppc)
13053 MACOSX_DEFAULT_ARCH="ppc64"
13054 ;;
13055 *)
13056 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13057echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
13058 { (exit 1); exit 1; }; }
13059 ;;
13060 esac
13061
13062 #ARCH_RUN_32BIT="true"
13063 fi
13064
13065 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013066 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013067 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013068esac
13069
Martin v. Löwiseba40652007-08-30 20:10:57 +000013070{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13071echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013072if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013073then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013074 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013075 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013076 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013077
Martin v. Löwis11437992002-04-12 09:54:03 +000013078cat >>confdefs.h <<\_ACEOF
13079#define WITH_NEXT_FRAMEWORK 1
13080_ACEOF
13081
Martin v. Löwiseba40652007-08-30 20:10:57 +000013082 { echo "$as_me:$LINENO: result: yes" >&5
13083echo "${ECHO_T}yes" >&6; }
Ronald Oussorene6e62672009-06-08 21:19:36 +000013084 if test $enable_shared = "yes"
13085 then
Ronald Oussorend0841712009-09-29 13:01:59 +000013086 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
13087echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&2;}
Ronald Oussorene6e62672009-06-08 21:19:36 +000013088 { (exit 1); exit 1; }; }
13089 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013090else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013091 { echo "$as_me:$LINENO: result: no" >&5
13092echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013093fi
13094
Martin v. Löwiseba40652007-08-30 20:10:57 +000013095{ echo "$as_me:$LINENO: checking for dyld" >&5
13096echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013097case $ac_sys_system/$ac_sys_release in
13098 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013099
Martin v. Löwis11437992002-04-12 09:54:03 +000013100cat >>confdefs.h <<\_ACEOF
13101#define WITH_DYLD 1
13102_ACEOF
13103
Martin v. Löwiseba40652007-08-30 20:10:57 +000013104 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13105echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013106 ;;
13107 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013108 { echo "$as_me:$LINENO: result: no" >&5
13109echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013110 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013111esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013112
Guido van Rossum0a516c91994-09-12 10:58:40 +000013113# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013114
Michael W. Hudson54241132001-12-07 15:38:26 +000013115
13116
13117
13118
Guido van Rossum0a516c91994-09-12 10:58:40 +000013119# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013120# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000013121{ echo "$as_me:$LINENO: checking SO" >&5
13122echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013123if test -z "$SO"
13124then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013125 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000013126 hp*|HP*)
13127 case `uname -m` in
13128 ia64) SO=.so;;
13129 *) SO=.sl;;
13130 esac
13131 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013132 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013133 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013134 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013135else
13136 # this might also be a termcap variable, see #610332
13137 echo
13138 echo '====================================================================='
13139 echo '+ +'
13140 echo '+ WARNING: You have set SO in your environment. +'
13141 echo '+ Do you really mean to change the extension for shared libraries? +'
13142 echo '+ Continuing in 10 seconds to let you to ponder. +'
13143 echo '+ +'
13144 echo '====================================================================='
13145 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013147{ echo "$as_me:$LINENO: result: $SO" >&5
13148echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013149
Ronald Oussorene9cce8e2009-01-02 10:46:42 +000013150
Neal Norwitz58e28882006-05-19 07:00:58 +000013151cat >>confdefs.h <<_ACEOF
13152#define SHLIB_EXT "$SO"
13153_ACEOF
13154
Guido van Rossum0a516c91994-09-12 10:58:40 +000013155# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013156# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013157# (Shared libraries in this instance are shared modules to be loaded into
13158# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013159{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13160echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013161if test -z "$LDSHARED"
13162then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013163 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013164 AIX*)
13165 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013166 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013167 ;;
13168 BeOS*)
13169 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013170 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013171 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013172 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013173 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013174 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013175 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013176 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013177 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013178 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013179 hp*|HP*)
13180 if test "$GCC" = "yes"
13181 then LDSHARED='$(CC) -shared'
13182 else LDSHARED='ld -b';
13183 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013184 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013185 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013186 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13187 if test "$enable_framework" ; then
13188 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013189 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13190 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013191 else
13192 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013193 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013194 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013195 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013196 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13197 if test "$enable_framework" ; then
13198 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013199 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13200 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013201 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013202 # No framework, use the Python app as bundle-loader
13203 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013204 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013205 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013206 Darwin/*)
13207 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13208 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013209
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013210 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013211 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013212 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013213 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013214 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013215 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13216 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013217 else
13218 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13219 if test "$enable_framework" ; then
13220 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013221 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13222 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013223 else
13224 # No framework, use the Python app as bundle-loader
13225 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13226 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13227 fi
13228 fi
13229 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013230 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013231 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013232 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013233 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013234 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013235 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013236 else
13237 LDSHARED="ld -Bshareable ${LDFLAGS}"
13238 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013239 OpenBSD*)
13240 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13241 then
13242 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13243 else
13244 case `uname -r` in
13245 [01].* | 2.[0-7] | 2.[0-7].*)
13246 LDSHARED="ld -Bshareable ${LDFLAGS}"
13247 ;;
13248 *)
13249 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13250 ;;
13251 esac
13252 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013253 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013254 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013255 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013256 then LDSHARED='$(CC) -shared'
13257 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013258 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013259 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013260 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013261 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013262 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013263 *) LDSHARED="ld";;
13264 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013266{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13267echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013268BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013269# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013270# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013271{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13272echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013273if test -z "$CCSHARED"
13274then
Guido van Rossum07397971997-04-29 21:49:50 +000013275 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013276 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013277 then CCSHARED="-fPIC";
13278 elif test `uname -p` = sparc;
13279 then CCSHARED="-xcode=pic32";
13280 else CCSHARED="-Kpic";
13281 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013282 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013283 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013284 else CCSHARED="+z";
13285 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013286 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013287 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013288 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013289 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013290 if test "$GCC" = "yes"
13291 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013292 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013293 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013294 SCO_SV*)
13295 if test "$GCC" = "yes"
13296 then CCSHARED="-fPIC"
13297 else CCSHARED="-Kpic -belf"
13298 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013299 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013300 IRIX*/6*) case $CC in
13301 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013302 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013303 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013304 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013305 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013307{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13308echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013309# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013310# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013311{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13312echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013313if test -z "$LINKFORSHARED"
13314then
Guido van Rossum07397971997-04-29 21:49:50 +000013315 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013316 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013317 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013318 LINKFORSHARED="-Wl,-E -Wl,+s";;
13319# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013320 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013321 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013322 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013323 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013324 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13325 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013326 # not used by the core itself but which needs to be in the core so
13327 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013328 # -prebind is no longer used, because it actually seems to give a
13329 # slowdown in stead of a speedup, maybe due to the large number of
13330 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013331
13332 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013333 if test "$enable_framework"
13334 then
Jack Jansenda49e192005-01-07 13:08:22 +000013335 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013336 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013337 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013338 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013339 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013340 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013341 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013342 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13343 then
13344 LINKFORSHARED="-Wl,--export-dynamic"
13345 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013346 SunOS/5*) case $CC in
13347 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013348 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013349 then
13350 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013351 fi;;
13352 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013353 CYGWIN*)
13354 if test $enable_shared = "no"
13355 then
13356 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13357 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013358 QNX*)
13359 # -Wl,-E causes the symbols to be added to the dynamic
13360 # symbol table so that they can be found when a module
13361 # is loaded. -N 2048K causes the stack size to be set
13362 # to 2048 kilobytes so that the stack doesn't overflow
13363 # when running test_compile.py.
13364 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013365 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013367{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13368echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013369
Michael W. Hudson54241132001-12-07 15:38:26 +000013370
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013371
Martin v. Löwiseba40652007-08-30 20:10:57 +000013372{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13373echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013374if test ! "$LIBRARY" = "$LDLIBRARY"
13375then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013376 case $ac_sys_system in
13377 CYGWIN*)
13378 # Cygwin needs CCSHARED when building extension DLLs
13379 # but not when building the interpreter DLL.
13380 CFLAGSFORSHARED='';;
13381 *)
13382 CFLAGSFORSHARED='$(CCSHARED)'
13383 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013385{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13386echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013387
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013388# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13389# library (with --enable-shared).
13390# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013391# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13392# if it is not required, since it creates a dependency of the shared library
13393# to LIBS. This, in turn, means that applications linking the shared libpython
13394# don't need to link LIBS explicitly. The default should be only changed
13395# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013396
Martin v. Löwiseba40652007-08-30 20:10:57 +000013397{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13398echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013399case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013400 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013401 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013402esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013403{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13404echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013405
13406
Guido van Rossum627b2d71993-12-24 10:39:16 +000013407# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013408
Martin v. Löwiseba40652007-08-30 20:10:57 +000013409{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13410echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013411if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13412 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013413else
Martin v. Löwis11437992002-04-12 09:54:03 +000013414 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013415LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013416cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013417/* confdefs.h. */
13418_ACEOF
13419cat confdefs.h >>conftest.$ac_ext
13420cat >>conftest.$ac_ext <<_ACEOF
13421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013422
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423/* Override any GCC internal prototype to avoid an error.
13424 Use char because int might match the return type of a GCC
13425 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013426#ifdef __cplusplus
13427extern "C"
13428#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013429char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013430int
13431main ()
13432{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013433return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 ;
13435 return 0;
13436}
13437_ACEOF
13438rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013439if { (ac_try="$ac_link"
13440case "(($ac_try" in
13441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13442 *) ac_try_echo=$ac_try;;
13443esac
13444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13445 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013447 grep -v '^ *+' conftest.er1 >conftest.err
13448 rm -f conftest.er1
13449 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013451 (exit $ac_status); } && {
13452 test -z "$ac_c_werror_flag" ||
13453 test ! -s conftest.err
13454 } && test -s conftest$ac_exeext &&
13455 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013456 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457else
Martin v. Löwis11437992002-04-12 09:54:03 +000013458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013459sed 's/^/| /' conftest.$ac_ext >&5
13460
Martin v. Löwiseba40652007-08-30 20:10:57 +000013461 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013463
13464rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013465 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013466LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013468{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13469echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013470if test $ac_cv_lib_dl_dlopen = yes; then
13471 cat >>confdefs.h <<_ACEOF
13472#define HAVE_LIBDL 1
13473_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013474
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013475 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013476
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013477fi
13478 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013479
Martin v. Löwiseba40652007-08-30 20:10:57 +000013480{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13481echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013482if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13483 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013484else
Martin v. Löwis11437992002-04-12 09:54:03 +000013485 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013486LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013487cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013488/* confdefs.h. */
13489_ACEOF
13490cat confdefs.h >>conftest.$ac_ext
13491cat >>conftest.$ac_ext <<_ACEOF
13492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013493
Martin v. Löwiseba40652007-08-30 20:10:57 +000013494/* Override any GCC internal prototype to avoid an error.
13495 Use char because int might match the return type of a GCC
13496 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013497#ifdef __cplusplus
13498extern "C"
13499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013500char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013501int
13502main ()
13503{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013504return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013505 ;
13506 return 0;
13507}
13508_ACEOF
13509rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013510if { (ac_try="$ac_link"
13511case "(($ac_try" in
13512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13513 *) ac_try_echo=$ac_try;;
13514esac
13515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13516 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013518 grep -v '^ *+' conftest.er1 >conftest.err
13519 rm -f conftest.er1
13520 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013522 (exit $ac_status); } && {
13523 test -z "$ac_c_werror_flag" ||
13524 test ! -s conftest.err
13525 } && test -s conftest$ac_exeext &&
13526 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013527 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528else
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013530sed 's/^/| /' conftest.$ac_ext >&5
13531
Martin v. Löwiseba40652007-08-30 20:10:57 +000013532 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013534
13535rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013537LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013539{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13540echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013541if test $ac_cv_lib_dld_shl_load = yes; then
13542 cat >>confdefs.h <<_ACEOF
13543#define HAVE_LIBDLD 1
13544_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013545
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013546 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013547
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013548fi
13549 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013550
Ronald Oussorene9cce8e2009-01-02 10:46:42 +000013551# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013552if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013553 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13554echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013555if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013557else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013558 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013559cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013560/* confdefs.h. */
13561_ACEOF
13562cat confdefs.h >>conftest.$ac_ext
13563cat >>conftest.$ac_ext <<_ACEOF
13564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013565
Martin v. Löwiseba40652007-08-30 20:10:57 +000013566/* Override any GCC internal prototype to avoid an error.
13567 Use char because int might match the return type of a GCC
13568 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013569#ifdef __cplusplus
13570extern "C"
13571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013572char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013573int
13574main ()
13575{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013576return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013577 ;
13578 return 0;
13579}
13580_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013581for ac_lib in '' pthread rt posix4; do
13582 if test -z "$ac_lib"; then
13583 ac_res="none required"
13584 else
13585 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013586 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013587 fi
13588 rm -f conftest.$ac_objext conftest$ac_exeext
13589if { (ac_try="$ac_link"
13590case "(($ac_try" in
13591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13592 *) ac_try_echo=$ac_try;;
13593esac
13594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13595 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013596 ac_status=$?
13597 grep -v '^ *+' conftest.er1 >conftest.err
13598 rm -f conftest.er1
13599 cat conftest.err >&5
13600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013601 (exit $ac_status); } && {
13602 test -z "$ac_c_werror_flag" ||
13603 test ! -s conftest.err
13604 } && test -s conftest$ac_exeext &&
13605 $as_test_x conftest$ac_exeext; then
13606 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013607else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013608 echo "$as_me: failed program was:" >&5
13609sed 's/^/| /' conftest.$ac_ext >&5
13610
Martin v. Löwiseba40652007-08-30 20:10:57 +000013611
Brett Cannon19fab762007-06-02 03:02:29 +000013612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013613
13614rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13615 conftest$ac_exeext
13616 if test "${ac_cv_search_sem_init+set}" = set; then
13617 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013619done
13620if test "${ac_cv_search_sem_init+set}" = set; then
13621 :
13622else
13623 ac_cv_search_sem_init=no
13624fi
13625rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013626LIBS=$ac_func_search_save_LIBS
13627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013628{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13629echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13630ac_res=$ac_cv_search_sem_init
13631if test "$ac_res" != no; then
13632 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013633
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013634fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013635 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013636 # posix4 on Solaris 2.6
13637 # pthread (first!) on Linux
13638fi
13639
Martin v. Löwis19d17342003-06-14 21:03:05 +000013640# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013641{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13642echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013643if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13644 echo $ECHO_N "(cached) $ECHO_C" >&6
13645else
13646 ac_check_lib_save_LIBS=$LIBS
13647LIBS="-lintl $LIBS"
13648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013649/* confdefs.h. */
13650_ACEOF
13651cat confdefs.h >>conftest.$ac_ext
13652cat >>conftest.$ac_ext <<_ACEOF
13653/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013654
Martin v. Löwiseba40652007-08-30 20:10:57 +000013655/* Override any GCC internal prototype to avoid an error.
13656 Use char because int might match the return type of a GCC
13657 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013658#ifdef __cplusplus
13659extern "C"
13660#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013661char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013662int
13663main ()
13664{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013665return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013666 ;
13667 return 0;
13668}
13669_ACEOF
13670rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013671if { (ac_try="$ac_link"
13672case "(($ac_try" in
13673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13674 *) ac_try_echo=$ac_try;;
13675esac
13676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13677 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013679 grep -v '^ *+' conftest.er1 >conftest.err
13680 rm -f conftest.er1
13681 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013683 (exit $ac_status); } && {
13684 test -z "$ac_c_werror_flag" ||
13685 test ! -s conftest.err
13686 } && test -s conftest$ac_exeext &&
13687 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013688 ac_cv_lib_intl_textdomain=yes
13689else
13690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013691sed 's/^/| /' conftest.$ac_ext >&5
13692
Martin v. Löwiseba40652007-08-30 20:10:57 +000013693 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013695
13696rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013697 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013698LIBS=$ac_check_lib_save_LIBS
13699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013700{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13701echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013702if test $ac_cv_lib_intl_textdomain = yes; then
13703
13704cat >>confdefs.h <<\_ACEOF
13705#define WITH_LIBINTL 1
13706_ACEOF
13707
13708fi
13709
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013710
13711# checks for system dependent C++ extensions support
13712case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013713 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13714echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013716/* confdefs.h. */
13717_ACEOF
13718cat confdefs.h >>conftest.$ac_ext
13719cat >>conftest.$ac_ext <<_ACEOF
13720/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013721#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013722int
13723main ()
13724{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013725loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013726 ;
13727 return 0;
13728}
13729_ACEOF
13730rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013731if { (ac_try="$ac_link"
13732case "(($ac_try" in
13733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13734 *) ac_try_echo=$ac_try;;
13735esac
13736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13737 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013739 grep -v '^ *+' conftest.er1 >conftest.err
13740 rm -f conftest.er1
13741 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013743 (exit $ac_status); } && {
13744 test -z "$ac_c_werror_flag" ||
13745 test ! -s conftest.err
13746 } && test -s conftest$ac_exeext &&
13747 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013748
Martin v. Löwis11437992002-04-12 09:54:03 +000013749cat >>confdefs.h <<\_ACEOF
13750#define AIX_GENUINE_CPLUSPLUS 1
13751_ACEOF
13752
Martin v. Löwiseba40652007-08-30 20:10:57 +000013753 { echo "$as_me:$LINENO: result: yes" >&5
13754echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013755else
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013757sed 's/^/| /' conftest.$ac_ext >&5
13758
Martin v. Löwiseba40652007-08-30 20:10:57 +000013759 { echo "$as_me:$LINENO: result: no" >&5
13760echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013762
13763rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013764 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013765 *) ;;
13766esac
13767
Guido van Rossum70c7f481998-03-26 18:44:10 +000013768# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013769# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013770{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13771echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013772if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13773 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013774else
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013776LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013778/* confdefs.h. */
13779_ACEOF
13780cat confdefs.h >>conftest.$ac_ext
13781cat >>conftest.$ac_ext <<_ACEOF
13782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013783
Martin v. Löwiseba40652007-08-30 20:10:57 +000013784/* Override any GCC internal prototype to avoid an error.
13785 Use char because int might match the return type of a GCC
13786 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013787#ifdef __cplusplus
13788extern "C"
13789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013790char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013791int
13792main ()
13793{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013794return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 ;
13796 return 0;
13797}
13798_ACEOF
13799rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013800if { (ac_try="$ac_link"
13801case "(($ac_try" in
13802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13803 *) ac_try_echo=$ac_try;;
13804esac
13805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13806 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013808 grep -v '^ *+' conftest.er1 >conftest.err
13809 rm -f conftest.er1
13810 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013812 (exit $ac_status); } && {
13813 test -z "$ac_c_werror_flag" ||
13814 test ! -s conftest.err
13815 } && test -s conftest$ac_exeext &&
13816 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013818else
Martin v. Löwis11437992002-04-12 09:54:03 +000013819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013820sed 's/^/| /' conftest.$ac_ext >&5
13821
Martin v. Löwiseba40652007-08-30 20:10:57 +000013822 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013824
13825rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013827LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013828fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013829{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13830echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013831if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013832 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013833fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013834 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013835{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13836echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013837if test "${ac_cv_lib_socket_socket+set}" = set; then
13838 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013839else
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013841LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013842cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013843/* confdefs.h. */
13844_ACEOF
13845cat confdefs.h >>conftest.$ac_ext
13846cat >>conftest.$ac_ext <<_ACEOF
13847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013848
Martin v. Löwiseba40652007-08-30 20:10:57 +000013849/* Override any GCC internal prototype to avoid an error.
13850 Use char because int might match the return type of a GCC
13851 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013852#ifdef __cplusplus
13853extern "C"
13854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013855char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013856int
13857main ()
13858{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013859return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013860 ;
13861 return 0;
13862}
13863_ACEOF
13864rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013865if { (ac_try="$ac_link"
13866case "(($ac_try" in
13867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13868 *) ac_try_echo=$ac_try;;
13869esac
13870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13871 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013873 grep -v '^ *+' conftest.er1 >conftest.err
13874 rm -f conftest.er1
13875 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013877 (exit $ac_status); } && {
13878 test -z "$ac_c_werror_flag" ||
13879 test ! -s conftest.err
13880 } && test -s conftest$ac_exeext &&
13881 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013882 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013883else
Martin v. Löwis11437992002-04-12 09:54:03 +000013884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013885sed 's/^/| /' conftest.$ac_ext >&5
13886
Martin v. Löwiseba40652007-08-30 20:10:57 +000013887 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013889
13890rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013892LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013894{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13895echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013896if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013897 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013898fi
13899 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013900
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013901case "$ac_sys_system" in
13902BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13904echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013905if test "${ac_cv_lib_net_socket+set}" = set; then
13906 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013907else
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013909LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013910cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013911/* confdefs.h. */
13912_ACEOF
13913cat confdefs.h >>conftest.$ac_ext
13914cat >>conftest.$ac_ext <<_ACEOF
13915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013916
Martin v. Löwiseba40652007-08-30 20:10:57 +000013917/* Override any GCC internal prototype to avoid an error.
13918 Use char because int might match the return type of a GCC
13919 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013920#ifdef __cplusplus
13921extern "C"
13922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013923char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013924int
13925main ()
13926{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013927return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 ;
13929 return 0;
13930}
13931_ACEOF
13932rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013933if { (ac_try="$ac_link"
13934case "(($ac_try" in
13935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13936 *) ac_try_echo=$ac_try;;
13937esac
13938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13939 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013941 grep -v '^ *+' conftest.er1 >conftest.err
13942 rm -f conftest.er1
13943 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013945 (exit $ac_status); } && {
13946 test -z "$ac_c_werror_flag" ||
13947 test ! -s conftest.err
13948 } && test -s conftest$ac_exeext &&
13949 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013950 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013951else
Martin v. Löwis11437992002-04-12 09:54:03 +000013952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013953sed 's/^/| /' conftest.$ac_ext >&5
13954
Martin v. Löwiseba40652007-08-30 20:10:57 +000013955 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013957
13958rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013960LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013962{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13963echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013964if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013965 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013966fi
13967 # BeOS
13968;;
13969esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013970
Martin v. Löwiseba40652007-08-30 20:10:57 +000013971{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13972echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013973
Martin v. Löwiseba40652007-08-30 20:10:57 +000013974# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013975if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013976 withval=$with_libs;
13977{ echo "$as_me:$LINENO: result: $withval" >&5
13978echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013979LIBS="$withval $LIBS"
13980
13981else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013982 { echo "$as_me:$LINENO: result: no" >&5
13983echo "${ECHO_T}no" >&6; }
13984fi
13985
Guido van Rossum7f43da71994-08-01 12:15:30 +000013986
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013987# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013988{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13989echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013990
Martin v. Löwiseba40652007-08-30 20:10:57 +000013991# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013992if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013993 withval=$with_system_ffi;
13994fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013995
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013996
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13998echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013999
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014000# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014001
14002
Martin v. Löwiseba40652007-08-30 20:10:57 +000014003{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14004echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014005
Martin v. Löwiseba40652007-08-30 20:10:57 +000014006# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014007if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014008 withval=$with_signal_module;
14009fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014010
14011
14012if test -z "$with_signal_module"
14013then with_signal_module="yes"
14014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014015{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14016echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014017
14018if test "${with_signal_module}" = "yes"; then
14019 USE_SIGNAL_MODULE=""
14020 SIGNAL_OBJS=""
14021else
14022 USE_SIGNAL_MODULE="#"
14023 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14024fi
14025
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014026# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014027
Barry Warsawc0d24d82000-06-29 16:12:00 +000014028USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014029
Martin v. Löwiseba40652007-08-30 20:10:57 +000014030{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14031echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014032
Guido van Rossumec2f0731997-01-22 20:54:01 +000014033
Martin v. Löwiseba40652007-08-30 20:10:57 +000014034# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014035if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014036 withval=$with_dec_threads;
14037{ echo "$as_me:$LINENO: result: $withval" >&5
14038echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014039LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014040if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014041 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014042fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014043else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014044 { echo "$as_me:$LINENO: result: no" >&5
14045echo "${ECHO_T}no" >&6; }
14046fi
14047
Martin v. Löwis11437992002-04-12 09:54:03 +000014048
14049# Templates for things AC_DEFINEd more than once.
14050# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014051
14052
Martin v. Löwis11437992002-04-12 09:54:03 +000014053
14054
14055
14056
14057
Martin v. Löwiseba40652007-08-30 20:10:57 +000014058{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14059echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014060
Martin v. Löwiseba40652007-08-30 20:10:57 +000014061# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014062if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014063 withval=$with_threads;
14064fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014065
14066
Barry Warsawc0d24d82000-06-29 16:12:00 +000014067# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014068
Martin v. Löwiseba40652007-08-30 20:10:57 +000014069# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014070if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014071 withval=$with_thread; with_threads=$with_thread
14072fi
14073
Barry Warsawc0d24d82000-06-29 16:12:00 +000014074
14075if test -z "$with_threads"
14076then with_threads="yes"
14077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014078{ echo "$as_me:$LINENO: result: $with_threads" >&5
14079echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000014080
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014081
Barry Warsawc0d24d82000-06-29 16:12:00 +000014082if test "$with_threads" = "no"
14083then
14084 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014085elif test "$ac_cv_pthread_is_default" = yes
14086then
Martin v. Löwis11437992002-04-12 09:54:03 +000014087 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014088#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014089_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014090
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014091 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014093#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014094_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014095
14096 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014097 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014098elif test "$ac_cv_kpthread" = "yes"
14099then
14100 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014101 if test "$ac_cv_cxx_thread" = "yes"; then
14102 CXX="$CXX -Kpthread"
14103 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014104 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014105#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014106_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014107
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014108 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014109 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014110elif test "$ac_cv_kthread" = "yes"
14111then
14112 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014113 if test "$ac_cv_cxx_thread" = "yes"; then
14114 CXX="$CXX -Kthread"
14115 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014116 cat >>confdefs.h <<\_ACEOF
14117#define WITH_THREAD 1
14118_ACEOF
14119
14120 posix_threads=yes
14121 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014122elif test "$ac_cv_pthread" = "yes"
14123then
14124 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014125 if test "$ac_cv_cxx_thread" = "yes"; then
14126 CXX="$CXX -pthread"
14127 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014128 cat >>confdefs.h <<\_ACEOF
14129#define WITH_THREAD 1
14130_ACEOF
14131
14132 posix_threads=yes
14133 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014134else
14135 if test ! -z "$with_threads" -a -d "$with_threads"
14136 then LDFLAGS="$LDFLAGS -L$with_threads"
14137 fi
14138 if test ! -z "$withval" -a -d "$withval"
14139 then LDFLAGS="$LDFLAGS -L$withval"
14140 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014141
14142 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014143 # define _POSIX_THREADS in unistd.h. Some apparently don't
14144 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014145 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14146echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014148/* confdefs.h. */
14149_ACEOF
14150cat confdefs.h >>conftest.$ac_ext
14151cat >>conftest.$ac_ext <<_ACEOF
14152/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014153
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014154#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014155#ifdef _POSIX_THREADS
14156yes
14157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014158
14159_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014161 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014162 unistd_defines_pthreads=yes
14163else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014164 unistd_defines_pthreads=no
14165fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000014166rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014167
Martin v. Löwiseba40652007-08-30 20:10:57 +000014168 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14169echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014170
Martin v. Löwis11437992002-04-12 09:54:03 +000014171 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014172#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014173_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014174
Martin v. Löwis11437992002-04-12 09:54:03 +000014175 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014176 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14177echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014178if test "${ac_cv_header_cthreads_h+set}" = set; then
14179 echo $ECHO_N "(cached) $ECHO_C" >&6
14180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014181{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14182echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014183else
Martin v. Löwis11437992002-04-12 09:54:03 +000014184 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014185{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14186echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014187cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014188/* confdefs.h. */
14189_ACEOF
14190cat confdefs.h >>conftest.$ac_ext
14191cat >>conftest.$ac_ext <<_ACEOF
14192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014193$ac_includes_default
14194#include <cthreads.h>
14195_ACEOF
14196rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014197if { (ac_try="$ac_compile"
14198case "(($ac_try" in
14199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14200 *) ac_try_echo=$ac_try;;
14201esac
14202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14203 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014205 grep -v '^ *+' conftest.er1 >conftest.err
14206 rm -f conftest.er1
14207 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014209 (exit $ac_status); } && {
14210 test -z "$ac_c_werror_flag" ||
14211 test ! -s conftest.err
14212 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014213 ac_header_compiler=yes
14214else
14215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014216sed 's/^/| /' conftest.$ac_ext >&5
14217
Martin v. Löwiseba40652007-08-30 20:10:57 +000014218 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014220
14221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14222{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14223echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
14225# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014226{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14227echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014228cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014229/* confdefs.h. */
14230_ACEOF
14231cat confdefs.h >>conftest.$ac_ext
14232cat >>conftest.$ac_ext <<_ACEOF
14233/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014234#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014235_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014236if { (ac_try="$ac_cpp conftest.$ac_ext"
14237case "(($ac_try" in
14238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14239 *) ac_try_echo=$ac_try;;
14240esac
14241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14242 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014243 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014244 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014245 rm -f conftest.er1
14246 cat conftest.err >&5
14247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014248 (exit $ac_status); } >/dev/null && {
14249 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14250 test ! -s conftest.err
14251 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014252 ac_header_preproc=yes
14253else
14254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014255sed 's/^/| /' conftest.$ac_ext >&5
14256
Martin v. Löwis11437992002-04-12 09:54:03 +000014257 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014259
Martin v. Löwis11437992002-04-12 09:54:03 +000014260rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014261{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14262echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014263
14264# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014265case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14266 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014267 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14268echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014269 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14270echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14271 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014272 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014273 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014274 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14275echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014276 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14277echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14278 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14279echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14280 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14281echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014282 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14283echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014284 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14285echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014286 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014287## ------------------------------------------------ ##
14288## Report this to http://www.python.org/python-bugs ##
14289## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014290_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014291 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014292 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014293esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014294{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14295echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014296if test "${ac_cv_header_cthreads_h+set}" = set; then
14297 echo $ECHO_N "(cached) $ECHO_C" >&6
14298else
14299 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014301{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14302echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014303
14304fi
14305if test $ac_cv_header_cthreads_h = yes; then
14306 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014307#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014308_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014309
Martin v. Löwis11437992002-04-12 09:54:03 +000014310 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014311#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014312_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014313
Martin v. Löwis11437992002-04-12 09:54:03 +000014314
14315cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014316#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014317_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014318
14319 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014320 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014321else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014322
Martin v. Löwis11437992002-04-12 09:54:03 +000014323 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014324 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14325echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014326if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14327 echo $ECHO_N "(cached) $ECHO_C" >&6
14328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014329{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14330echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014331else
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014333{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14334echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014335cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014336/* confdefs.h. */
14337_ACEOF
14338cat confdefs.h >>conftest.$ac_ext
14339cat >>conftest.$ac_ext <<_ACEOF
14340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014341$ac_includes_default
14342#include <mach/cthreads.h>
14343_ACEOF
14344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014345if { (ac_try="$ac_compile"
14346case "(($ac_try" in
14347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14348 *) ac_try_echo=$ac_try;;
14349esac
14350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014353 grep -v '^ *+' conftest.er1 >conftest.err
14354 rm -f conftest.er1
14355 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014357 (exit $ac_status); } && {
14358 test -z "$ac_c_werror_flag" ||
14359 test ! -s conftest.err
14360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014361 ac_header_compiler=yes
14362else
14363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014364sed 's/^/| /' conftest.$ac_ext >&5
14365
Martin v. Löwiseba40652007-08-30 20:10:57 +000014366 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014368
14369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14370{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14371echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014372
14373# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014374{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14375echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014376cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014377/* confdefs.h. */
14378_ACEOF
14379cat confdefs.h >>conftest.$ac_ext
14380cat >>conftest.$ac_ext <<_ACEOF
14381/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014382#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014383_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014384if { (ac_try="$ac_cpp conftest.$ac_ext"
14385case "(($ac_try" in
14386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14387 *) ac_try_echo=$ac_try;;
14388esac
14389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14390 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014392 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 rm -f conftest.er1
14394 cat conftest.err >&5
14395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014396 (exit $ac_status); } >/dev/null && {
14397 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14398 test ! -s conftest.err
14399 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 ac_header_preproc=yes
14401else
14402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014403sed 's/^/| /' conftest.$ac_ext >&5
14404
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014407
Martin v. Löwis11437992002-04-12 09:54:03 +000014408rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014409{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14410echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014411
14412# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014413case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14414 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14416echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014417 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14418echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14419 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014420 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014421 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014422 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14423echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014424 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14425echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14426 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14427echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14428 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14429echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014430 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14431echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014432 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14433echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014434 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014435## ------------------------------------------------ ##
14436## Report this to http://www.python.org/python-bugs ##
14437## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014438_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014439 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014440 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014441esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014442{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14443echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014444if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14445 echo $ECHO_N "(cached) $ECHO_C" >&6
14446else
14447 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014449{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14450echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014451
14452fi
14453if test $ac_cv_header_mach_cthreads_h = yes; then
14454 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014455#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014456_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014457
Martin v. Löwis11437992002-04-12 09:54:03 +000014458 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014459#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014460_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014461
Martin v. Löwis11437992002-04-12 09:54:03 +000014462
14463cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014464#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014465_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014466
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014467 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014468else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014469
Martin v. Löwiseba40652007-08-30 20:10:57 +000014470 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14471echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014472
Martin v. Löwiseba40652007-08-30 20:10:57 +000014473# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014474if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014475 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14476echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014477 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014478#define WITH_THREAD 1
14479_ACEOF
14480
14481
14482cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014483#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014484_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014485
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014486 LIBS="-lpth $LIBS"
14487 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014488else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014489 { echo "$as_me:$LINENO: result: no" >&5
14490echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014491
14492 # Just looking for pthread_create in libpthread is not enough:
14493 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14494 # So we really have to include pthread.h, and then link.
14495 _libs=$LIBS
14496 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014497 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14498echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014500/* confdefs.h. */
14501_ACEOF
14502cat confdefs.h >>conftest.$ac_ext
14503cat >>conftest.$ac_ext <<_ACEOF
14504/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014505#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014506
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014507void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014508int
14509main ()
14510{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014511
14512pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 ;
14514 return 0;
14515}
14516_ACEOF
14517rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014518if { (ac_try="$ac_link"
14519case "(($ac_try" in
14520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14521 *) ac_try_echo=$ac_try;;
14522esac
14523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14524 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014526 grep -v '^ *+' conftest.er1 >conftest.err
14527 rm -f conftest.er1
14528 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014530 (exit $ac_status); } && {
14531 test -z "$ac_c_werror_flag" ||
14532 test ! -s conftest.err
14533 } && test -s conftest$ac_exeext &&
14534 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014535
Martin v. Löwiseba40652007-08-30 20:10:57 +000014536 { echo "$as_me:$LINENO: result: yes" >&5
14537echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014538 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014539#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014540_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014541
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014542 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014543 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014544else
Martin v. Löwis11437992002-04-12 09:54:03 +000014545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014546sed 's/^/| /' conftest.$ac_ext >&5
14547
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014549 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014550 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14551echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014552if test "${ac_cv_func_pthread_detach+set}" = set; then
14553 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014554else
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014556/* confdefs.h. */
14557_ACEOF
14558cat confdefs.h >>conftest.$ac_ext
14559cat >>conftest.$ac_ext <<_ACEOF
14560/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014561/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14562 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14563#define pthread_detach innocuous_pthread_detach
14564
Guido van Rossumad678af1998-10-02 14:42:15 +000014565/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014566 which can conflict with char pthread_detach (); below.
14567 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014568 <limits.h> exists even on freestanding compilers. */
14569
14570#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014571# include <limits.h>
14572#else
14573# include <assert.h>
14574#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014575
14576#undef pthread_detach
14577
Martin v. Löwiseba40652007-08-30 20:10:57 +000014578/* Override any GCC internal prototype to avoid an error.
14579 Use char because int might match the return type of a GCC
14580 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014581#ifdef __cplusplus
14582extern "C"
14583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014584char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014585/* The GNU C library defines this for functions which it implements
14586 to always fail with ENOSYS. Some functions are actually named
14587 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014588#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014589choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014590#endif
14591
Skip Montanaro6dead952003-09-25 14:50:04 +000014592int
14593main ()
14594{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014595return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014596 ;
14597 return 0;
14598}
14599_ACEOF
14600rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014601if { (ac_try="$ac_link"
14602case "(($ac_try" in
14603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14604 *) ac_try_echo=$ac_try;;
14605esac
14606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14607 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014609 grep -v '^ *+' conftest.er1 >conftest.err
14610 rm -f conftest.er1
14611 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014613 (exit $ac_status); } && {
14614 test -z "$ac_c_werror_flag" ||
14615 test ! -s conftest.err
14616 } && test -s conftest$ac_exeext &&
14617 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014618 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014619else
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014621sed 's/^/| /' conftest.$ac_ext >&5
14622
Martin v. Löwiseba40652007-08-30 20:10:57 +000014623 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014625
14626rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014627 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014629{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14630echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014631if test $ac_cv_func_pthread_detach = yes; then
14632 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014633#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014634_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014635
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014636 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014637 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014638else
Guido van Rossumad678af1998-10-02 14:42:15 +000014639
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014640 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014641 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14642echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014643if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14644 echo $ECHO_N "(cached) $ECHO_C" >&6
14645fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014646{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14647echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014648else
14649 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014650{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14651echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014653/* confdefs.h. */
14654_ACEOF
14655cat confdefs.h >>conftest.$ac_ext
14656cat >>conftest.$ac_ext <<_ACEOF
14657/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014658$ac_includes_default
14659#include <atheos/threads.h>
14660_ACEOF
14661rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014662if { (ac_try="$ac_compile"
14663case "(($ac_try" in
14664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14665 *) ac_try_echo=$ac_try;;
14666esac
14667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014670 grep -v '^ *+' conftest.er1 >conftest.err
14671 rm -f conftest.er1
14672 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014674 (exit $ac_status); } && {
14675 test -z "$ac_c_werror_flag" ||
14676 test ! -s conftest.err
14677 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014678 ac_header_compiler=yes
14679else
14680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014681sed 's/^/| /' conftest.$ac_ext >&5
14682
Martin v. Löwiseba40652007-08-30 20:10:57 +000014683 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014685
14686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14687{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14688echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014689
14690# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014691{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14692echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014693cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014694/* confdefs.h. */
14695_ACEOF
14696cat confdefs.h >>conftest.$ac_ext
14697cat >>conftest.$ac_ext <<_ACEOF
14698/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014699#include <atheos/threads.h>
14700_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014701if { (ac_try="$ac_cpp conftest.$ac_ext"
14702case "(($ac_try" in
14703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14704 *) ac_try_echo=$ac_try;;
14705esac
14706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14707 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014708 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014709 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014710 rm -f conftest.er1
14711 cat conftest.err >&5
14712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014713 (exit $ac_status); } >/dev/null && {
14714 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14715 test ! -s conftest.err
14716 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014717 ac_header_preproc=yes
14718else
14719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014720sed 's/^/| /' conftest.$ac_ext >&5
14721
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014722 ac_header_preproc=no
14723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014724
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014725rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014726{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14727echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014728
14729# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014730case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14731 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014732 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14733echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014734 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14735echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14736 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014737 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014738 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014739 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14740echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014741 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14742echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14743 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14744echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14745 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14746echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014747 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14748echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014749 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14750echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014751 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014752## ------------------------------------------------ ##
14753## Report this to http://www.python.org/python-bugs ##
14754## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014755_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014756 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014757 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014758esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014759{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14760echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014761if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14762 echo $ECHO_N "(cached) $ECHO_C" >&6
14763else
14764 ac_cv_header_atheos_threads_h=$ac_header_preproc
14765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014766{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14767echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014768
14769fi
14770if test $ac_cv_header_atheos_threads_h = yes; then
14771 cat >>confdefs.h <<\_ACEOF
14772#define WITH_THREAD 1
14773_ACEOF
14774
14775
14776cat >>confdefs.h <<\_ACEOF
14777#define ATHEOS_THREADS 1
14778_ACEOF
14779
14780 THREADOBJ="Python/thread.o"
14781else
14782
Martin v. Löwis11437992002-04-12 09:54:03 +000014783 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014784 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14785echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014786if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14787 echo $ECHO_N "(cached) $ECHO_C" >&6
14788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014789{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14790echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014791else
Martin v. Löwis11437992002-04-12 09:54:03 +000014792 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014793{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14794echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014795cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014796/* confdefs.h. */
14797_ACEOF
14798cat confdefs.h >>conftest.$ac_ext
14799cat >>conftest.$ac_ext <<_ACEOF
14800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014801$ac_includes_default
14802#include <kernel/OS.h>
14803_ACEOF
14804rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014805if { (ac_try="$ac_compile"
14806case "(($ac_try" in
14807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14808 *) ac_try_echo=$ac_try;;
14809esac
14810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014813 grep -v '^ *+' conftest.er1 >conftest.err
14814 rm -f conftest.er1
14815 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014817 (exit $ac_status); } && {
14818 test -z "$ac_c_werror_flag" ||
14819 test ! -s conftest.err
14820 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 ac_header_compiler=yes
14822else
14823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014824sed 's/^/| /' conftest.$ac_ext >&5
14825
Martin v. Löwiseba40652007-08-30 20:10:57 +000014826 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014828
14829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14830{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14831echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014832
14833# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014834{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14835echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014836cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014837/* confdefs.h. */
14838_ACEOF
14839cat confdefs.h >>conftest.$ac_ext
14840cat >>conftest.$ac_ext <<_ACEOF
14841/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014842#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014843_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014844if { (ac_try="$ac_cpp conftest.$ac_ext"
14845case "(($ac_try" in
14846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14847 *) ac_try_echo=$ac_try;;
14848esac
14849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14850 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014851 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014852 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014853 rm -f conftest.er1
14854 cat conftest.err >&5
14855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014856 (exit $ac_status); } >/dev/null && {
14857 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14858 test ! -s conftest.err
14859 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014860 ac_header_preproc=yes
14861else
14862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014863sed 's/^/| /' conftest.$ac_ext >&5
14864
Martin v. Löwis11437992002-04-12 09:54:03 +000014865 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014867
Martin v. Löwis11437992002-04-12 09:54:03 +000014868rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014869{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14870echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014871
Martin v. Löwis11437992002-04-12 09:54:03 +000014872# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014873case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14874 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014875 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14876echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014877 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14878echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14879 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014880 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014881 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014882 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14883echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014884 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14885echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14886 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14887echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14888 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14889echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014890 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14891echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014892 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14893echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014894 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014895## ------------------------------------------------ ##
14896## Report this to http://www.python.org/python-bugs ##
14897## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014898_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014899 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014900 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014901esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014902{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14903echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014904if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14905 echo $ECHO_N "(cached) $ECHO_C" >&6
14906else
14907 ac_cv_header_kernel_OS_h=$ac_header_preproc
14908fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014909{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14910echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014911
14912fi
14913if test $ac_cv_header_kernel_OS_h = yes; then
14914 cat >>confdefs.h <<\_ACEOF
14915#define WITH_THREAD 1
14916_ACEOF
14917
14918
14919cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014920#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014921_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014922
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014923 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014924else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014925
Martin v. Löwiseba40652007-08-30 20:10:57 +000014926 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14927echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014928if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14929 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014930else
Martin v. Löwis11437992002-04-12 09:54:03 +000014931 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014932LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014933cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014934/* confdefs.h. */
14935_ACEOF
14936cat confdefs.h >>conftest.$ac_ext
14937cat >>conftest.$ac_ext <<_ACEOF
14938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014939
Martin v. Löwiseba40652007-08-30 20:10:57 +000014940/* Override any GCC internal prototype to avoid an error.
14941 Use char because int might match the return type of a GCC
14942 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014943#ifdef __cplusplus
14944extern "C"
14945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014946char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014947int
14948main ()
14949{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014950return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 ;
14952 return 0;
14953}
14954_ACEOF
14955rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014956if { (ac_try="$ac_link"
14957case "(($ac_try" in
14958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14959 *) ac_try_echo=$ac_try;;
14960esac
14961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14962 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014964 grep -v '^ *+' conftest.er1 >conftest.err
14965 rm -f conftest.er1
14966 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014968 (exit $ac_status); } && {
14969 test -z "$ac_c_werror_flag" ||
14970 test ! -s conftest.err
14971 } && test -s conftest$ac_exeext &&
14972 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014974else
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014976sed 's/^/| /' conftest.$ac_ext >&5
14977
Martin v. Löwiseba40652007-08-30 20:10:57 +000014978 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014980
14981rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014982 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014983LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014985{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14986echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014987if test $ac_cv_lib_pthreads_pthread_create = yes; then
14988 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014989#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014990_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014991
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014992 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014993 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014994 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014995else
Greg Steinadf63d62000-07-05 10:38:09 +000014996
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14998echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014999if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
15000 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015001else
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015003LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015004cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015005/* confdefs.h. */
15006_ACEOF
15007cat confdefs.h >>conftest.$ac_ext
15008cat >>conftest.$ac_ext <<_ACEOF
15009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015010
Martin v. Löwiseba40652007-08-30 20:10:57 +000015011/* Override any GCC internal prototype to avoid an error.
15012 Use char because int might match the return type of a GCC
15013 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015014#ifdef __cplusplus
15015extern "C"
15016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015017char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015018int
15019main ()
15020{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015021return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015022 ;
15023 return 0;
15024}
15025_ACEOF
15026rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015027if { (ac_try="$ac_link"
15028case "(($ac_try" in
15029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15030 *) ac_try_echo=$ac_try;;
15031esac
15032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15033 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015035 grep -v '^ *+' conftest.er1 >conftest.err
15036 rm -f conftest.er1
15037 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015039 (exit $ac_status); } && {
15040 test -z "$ac_c_werror_flag" ||
15041 test ! -s conftest.err
15042 } && test -s conftest$ac_exeext &&
15043 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015045else
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015047sed 's/^/| /' conftest.$ac_ext >&5
15048
Martin v. Löwiseba40652007-08-30 20:10:57 +000015049 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015051
15052rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015053 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015054LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015056{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15057echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015058if test $ac_cv_lib_c_r_pthread_create = yes; then
15059 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015060#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015061_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015062
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015063 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015064 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015065 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015066else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015067
Martin v. Löwiseba40652007-08-30 20:10:57 +000015068 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15069echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015070if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
15071 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015072else
Martin v. Löwis11437992002-04-12 09:54:03 +000015073 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015074LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015076/* confdefs.h. */
15077_ACEOF
15078cat confdefs.h >>conftest.$ac_ext
15079cat >>conftest.$ac_ext <<_ACEOF
15080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015081
Martin v. Löwiseba40652007-08-30 20:10:57 +000015082/* Override any GCC internal prototype to avoid an error.
15083 Use char because int might match the return type of a GCC
15084 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015085#ifdef __cplusplus
15086extern "C"
15087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015088char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015089int
15090main ()
15091{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015092return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015093 ;
15094 return 0;
15095}
15096_ACEOF
15097rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015098if { (ac_try="$ac_link"
15099case "(($ac_try" in
15100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15101 *) ac_try_echo=$ac_try;;
15102esac
15103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15104 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015106 grep -v '^ *+' conftest.er1 >conftest.err
15107 rm -f conftest.er1
15108 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015110 (exit $ac_status); } && {
15111 test -z "$ac_c_werror_flag" ||
15112 test ! -s conftest.err
15113 } && test -s conftest$ac_exeext &&
15114 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015115 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015116else
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015118sed 's/^/| /' conftest.$ac_ext >&5
15119
Martin v. Löwiseba40652007-08-30 20:10:57 +000015120 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015122
15123rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015124 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015125LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015127{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15128echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015129if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15130 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015131#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015132_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015133
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015134 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015135 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015136 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015137else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015138
Martin v. Löwiseba40652007-08-30 20:10:57 +000015139 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15140echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015141if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15142 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015143else
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015145LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015146cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015147/* confdefs.h. */
15148_ACEOF
15149cat confdefs.h >>conftest.$ac_ext
15150cat >>conftest.$ac_ext <<_ACEOF
15151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015152
Martin v. Löwiseba40652007-08-30 20:10:57 +000015153/* Override any GCC internal prototype to avoid an error.
15154 Use char because int might match the return type of a GCC
15155 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015156#ifdef __cplusplus
15157extern "C"
15158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015159char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015160int
15161main ()
15162{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015163return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015164 ;
15165 return 0;
15166}
15167_ACEOF
15168rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015169if { (ac_try="$ac_link"
15170case "(($ac_try" in
15171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15172 *) ac_try_echo=$ac_try;;
15173esac
15174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15175 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015177 grep -v '^ *+' conftest.er1 >conftest.err
15178 rm -f conftest.er1
15179 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015181 (exit $ac_status); } && {
15182 test -z "$ac_c_werror_flag" ||
15183 test ! -s conftest.err
15184 } && test -s conftest$ac_exeext &&
15185 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015187else
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015189sed 's/^/| /' conftest.$ac_ext >&5
15190
Martin v. Löwiseba40652007-08-30 20:10:57 +000015191 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015193
15194rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015195 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015196LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15199echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015200if test $ac_cv_lib_cma_pthread_create = yes; then
15201 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015202#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015203_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015204
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015205 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015206 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015207 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015208else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015209
Martin v. Löwis130fb172001-07-19 11:00:41 +000015210 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015211fi
15212
Guido van Rossum627b2d71993-12-24 10:39:16 +000015213
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015214fi
15215
Guido van Rossum0be3e491997-05-22 20:33:33 +000015216fi
15217
Guido van Rossum49545951997-12-02 19:28:29 +000015218fi
15219
Guido van Rossumb93a8621998-05-07 13:27:32 +000015220fi
15221
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015222
Michael W. Hudson54241132001-12-07 15:38:26 +000015223fi
15224
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015225
15226fi
15227
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015229
15230rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015231 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015232fi
15233
Martin v. Löwis11437992002-04-12 09:54:03 +000015234fi
15235
15236
15237fi
15238
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015239
Michael W. Hudson54241132001-12-07 15:38:26 +000015240
Martin v. Löwiseba40652007-08-30 20:10:57 +000015241 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15242echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015243if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15244 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015245else
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015247LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015248cat >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öwis11437992002-04-12 09:54:03 +000015254
Martin v. Löwiseba40652007-08-30 20:10:57 +000015255/* Override any GCC internal prototype to avoid an error.
15256 Use char because int might match the return type of a GCC
15257 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015258#ifdef __cplusplus
15259extern "C"
15260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015261char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015262int
15263main ()
15264{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015265return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015266 ;
15267 return 0;
15268}
15269_ACEOF
15270rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015271if { (ac_try="$ac_link"
15272case "(($ac_try" in
15273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15274 *) ac_try_echo=$ac_try;;
15275esac
15276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15277 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015279 grep -v '^ *+' conftest.er1 >conftest.err
15280 rm -f conftest.er1
15281 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015283 (exit $ac_status); } && {
15284 test -z "$ac_c_werror_flag" ||
15285 test ! -s conftest.err
15286 } && test -s conftest$ac_exeext &&
15287 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015289else
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015291sed 's/^/| /' conftest.$ac_ext >&5
15292
Martin v. Löwiseba40652007-08-30 20:10:57 +000015293 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015295
15296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015298LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015300{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15301echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015302if test $ac_cv_lib_mpc_usconfig = yes; then
15303 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015304#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015305_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015306
Martin v. Löwis130fb172001-07-19 11:00:41 +000015307 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015308 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015309 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015310fi
15311
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015312
Neal Norwitza978ab02002-11-02 16:58:05 +000015313 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015314 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15315echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015316if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15317 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015318else
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015320LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015322/* confdefs.h. */
15323_ACEOF
15324cat confdefs.h >>conftest.$ac_ext
15325cat >>conftest.$ac_ext <<_ACEOF
15326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015327
Martin v. Löwiseba40652007-08-30 20:10:57 +000015328/* Override any GCC internal prototype to avoid an error.
15329 Use char because int might match the return type of a GCC
15330 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015331#ifdef __cplusplus
15332extern "C"
15333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015334char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015335int
15336main ()
15337{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 ;
15340 return 0;
15341}
15342_ACEOF
15343rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344if { (ac_try="$ac_link"
15345case "(($ac_try" in
15346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15347 *) ac_try_echo=$ac_try;;
15348esac
15349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15350 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015352 grep -v '^ *+' conftest.er1 >conftest.err
15353 rm -f conftest.er1
15354 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356 (exit $ac_status); } && {
15357 test -z "$ac_c_werror_flag" ||
15358 test ! -s conftest.err
15359 } && test -s conftest$ac_exeext &&
15360 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015361 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015362else
Martin v. Löwis11437992002-04-12 09:54:03 +000015363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015364sed 's/^/| /' conftest.$ac_ext >&5
15365
Martin v. Löwiseba40652007-08-30 20:10:57 +000015366 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015368
15369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015371LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15374echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015375if test $ac_cv_lib_thread_thr_create = yes; then
15376 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015377#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015378_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015379
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015380 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015381 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015382 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015383fi
15384
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015385 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015386
Martin v. Löwis130fb172001-07-19 11:00:41 +000015387 if test "$USE_THREAD_MODULE" != "#"
15388 then
15389 # If the above checks didn't disable threads, (at least) OSF1
15390 # needs this '-threads' argument during linking.
15391 case $ac_sys_system in
15392 OSF1) LDLAST=-threads;;
15393 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015394 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015395fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015396
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015397if test "$posix_threads" = "yes"; then
15398 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015399
15400cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015401#define _POSIX_THREADS 1
15402_ACEOF
15403
15404 fi
15405
15406 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15407 case $ac_sys_system/$ac_sys_release in
15408 SunOS/5.6)
15409cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015410#define HAVE_PTHREAD_DESTRUCTOR 1
15411_ACEOF
15412
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015413 ;;
15414 SunOS/5.8)
15415cat >>confdefs.h <<\_ACEOF
15416#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15417_ACEOF
15418
15419 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015420 AIX/5)
15421cat >>confdefs.h <<\_ACEOF
15422#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15423_ACEOF
15424
15425 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015426 esac
15427
Martin v. Löwiseba40652007-08-30 20:10:57 +000015428 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15429echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015430 if test "${ac_cv_pthread_system_supported+set}" = set; then
15431 echo $ECHO_N "(cached) $ECHO_C" >&6
15432else
15433 if test "$cross_compiling" = yes; then
15434 ac_cv_pthread_system_supported=no
15435else
15436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015437/* confdefs.h. */
15438_ACEOF
15439cat confdefs.h >>conftest.$ac_ext
15440cat >>conftest.$ac_ext <<_ACEOF
15441/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015442#include <pthread.h>
15443 void *foo(void *parm) {
15444 return NULL;
15445 }
15446 main() {
15447 pthread_attr_t attr;
15448 pthread_t id;
15449 if (pthread_attr_init(&attr)) exit(-1);
15450 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15451 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15452 exit(0);
15453 }
15454_ACEOF
15455rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015456if { (ac_try="$ac_link"
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_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015463 ac_status=$?
15464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15465 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015466 { (case "(($ac_try" in
15467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15468 *) ac_try_echo=$ac_try;;
15469esac
15470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15471 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015472 ac_status=$?
15473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15474 (exit $ac_status); }; }; then
15475 ac_cv_pthread_system_supported=yes
15476else
15477 echo "$as_me: program exited with status $ac_status" >&5
15478echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015479sed 's/^/| /' conftest.$ac_ext >&5
15480
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015481( exit $ac_status )
15482ac_cv_pthread_system_supported=no
15483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015484rm -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 +000015485fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015486
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487
15488
Guido van Rossum627b2d71993-12-24 10:39:16 +000015489fi
15490
Martin v. Löwiseba40652007-08-30 20:10:57 +000015491 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15492echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015493 if test "$ac_cv_pthread_system_supported" = "yes"; then
15494
15495cat >>confdefs.h <<\_ACEOF
15496#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15497_ACEOF
15498
15499 fi
15500
15501for ac_func in pthread_sigmask
15502do
15503as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015504{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15505echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15506if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015507 echo $ECHO_N "(cached) $ECHO_C" >&6
15508else
15509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015510/* confdefs.h. */
15511_ACEOF
15512cat confdefs.h >>conftest.$ac_ext
15513cat >>conftest.$ac_ext <<_ACEOF
15514/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015515/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15516 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15517#define $ac_func innocuous_$ac_func
15518
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015519/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015520 which can conflict with char $ac_func (); below.
15521 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015522 <limits.h> exists even on freestanding compilers. */
15523
15524#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015525# include <limits.h>
15526#else
15527# include <assert.h>
15528#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015529
15530#undef $ac_func
15531
Martin v. Löwiseba40652007-08-30 20:10:57 +000015532/* Override any GCC internal prototype to avoid an error.
15533 Use char because int might match the return type of a GCC
15534 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015535#ifdef __cplusplus
15536extern "C"
15537#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015538char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015539/* The GNU C library defines this for functions which it implements
15540 to always fail with ENOSYS. Some functions are actually named
15541 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015542#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015543choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015544#endif
15545
Skip Montanaro6dead952003-09-25 14:50:04 +000015546int
15547main ()
15548{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015549return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015550 ;
15551 return 0;
15552}
15553_ACEOF
15554rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015555if { (ac_try="$ac_link"
15556case "(($ac_try" in
15557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15558 *) ac_try_echo=$ac_try;;
15559esac
15560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15561 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015563 grep -v '^ *+' conftest.er1 >conftest.err
15564 rm -f conftest.er1
15565 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015567 (exit $ac_status); } && {
15568 test -z "$ac_c_werror_flag" ||
15569 test ! -s conftest.err
15570 } && test -s conftest$ac_exeext &&
15571 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015572 eval "$as_ac_var=yes"
15573else
15574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015575sed 's/^/| /' conftest.$ac_ext >&5
15576
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015579
15580rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015581 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015583ac_res=`eval echo '${'$as_ac_var'}'`
15584 { echo "$as_me:$LINENO: result: $ac_res" >&5
15585echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015586if test `eval echo '${'$as_ac_var'}'` = yes; then
15587 cat >>confdefs.h <<_ACEOF
15588#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15589_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015590 case $ac_sys_system in
15591 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015592
Jason Tishlerfac083d2003-07-22 15:20:49 +000015593cat >>confdefs.h <<\_ACEOF
15594#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15595_ACEOF
15596
15597 ;;
15598 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015599fi
15600done
15601
15602fi
15603
15604
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015605# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015606
15607
Martin v. Löwiseba40652007-08-30 20:10:57 +000015608{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15609echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15610# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015611if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015612 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015613 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015614 { echo "$as_me:$LINENO: result: no" >&5
15615echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015616 ipv6=no
15617 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015618 *) { echo "$as_me:$LINENO: result: yes" >&5
15619echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015620 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015621#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015622_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015623
15624 ipv6=yes
15625 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015626 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015627else
Martin v. Löwis11437992002-04-12 09:54:03 +000015628
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015629 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015630 { echo "$as_me:$LINENO: result: no" >&5
15631echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015632 ipv6=no
15633
15634else
Martin v. Löwis11437992002-04-12 09:54:03 +000015635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015636/* confdefs.h. */
15637_ACEOF
15638cat confdefs.h >>conftest.$ac_ext
15639cat >>conftest.$ac_ext <<_ACEOF
15640/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015641 /* AF_INET6 available check */
15642#include <sys/types.h>
15643#include <sys/socket.h>
15644main()
15645{
15646 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15647 exit(1);
15648 else
15649 exit(0);
15650}
15651
Martin v. Löwis11437992002-04-12 09:54:03 +000015652_ACEOF
15653rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015654if { (ac_try="$ac_link"
15655case "(($ac_try" in
15656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15657 *) ac_try_echo=$ac_try;;
15658esac
15659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15660 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015661 ac_status=$?
15662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15663 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015664 { (case "(($ac_try" in
15665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15666 *) ac_try_echo=$ac_try;;
15667esac
15668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15669 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015670 ac_status=$?
15671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15672 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015673 { echo "$as_me:$LINENO: result: yes" >&5
15674echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015675 ipv6=yes
15676else
Martin v. Löwis11437992002-04-12 09:54:03 +000015677 echo "$as_me: program exited with status $ac_status" >&5
15678echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015679sed 's/^/| /' conftest.$ac_ext >&5
15680
Martin v. Löwis11437992002-04-12 09:54:03 +000015681( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015682{ echo "$as_me:$LINENO: result: no" >&5
15683echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015684 ipv6=no
15685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015686rm -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 +000015687fi
15688
Martin v. Löwiseba40652007-08-30 20:10:57 +000015689
15690
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015691if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015692 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15693echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015695/* confdefs.h. */
15696_ACEOF
15697cat confdefs.h >>conftest.$ac_ext
15698cat >>conftest.$ac_ext <<_ACEOF
15699/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015700#include <sys/types.h>
15701#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015702int
15703main ()
15704{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015705struct sockaddr_in6 x;
15706x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015707 ;
15708 return 0;
15709}
15710_ACEOF
15711rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015712if { (ac_try="$ac_compile"
15713case "(($ac_try" in
15714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15715 *) ac_try_echo=$ac_try;;
15716esac
15717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15718 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015720 grep -v '^ *+' conftest.er1 >conftest.err
15721 rm -f conftest.er1
15722 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015724 (exit $ac_status); } && {
15725 test -z "$ac_c_werror_flag" ||
15726 test ! -s conftest.err
15727 } && test -s conftest.$ac_objext; then
15728 { echo "$as_me:$LINENO: result: yes" >&5
15729echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015730 ipv6=yes
15731else
Martin v. Löwis11437992002-04-12 09:54:03 +000015732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015733sed 's/^/| /' conftest.$ac_ext >&5
15734
Martin v. Löwiseba40652007-08-30 20:10:57 +000015735 { echo "$as_me:$LINENO: result: no" >&5
15736echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015737 ipv6=no
15738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015739
15740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015741fi
15742
15743if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015745#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015746_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015747
15748fi
15749
Martin v. Löwiseba40652007-08-30 20:10:57 +000015750fi
15751
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015752
15753ipv6type=unknown
15754ipv6lib=none
15755ipv6trylibc=no
15756
15757if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015758 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15759echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015760 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15761 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015762 case $i in
15763 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015765/* confdefs.h. */
15766_ACEOF
15767cat confdefs.h >>conftest.$ac_ext
15768cat >>conftest.$ac_ext <<_ACEOF
15769/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015770
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015771#include <netinet/in.h>
15772#ifdef IPV6_INRIA_VERSION
15773yes
15774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015775_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015777 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015778 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015779fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000015780rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015781
15782 ;;
15783 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015785/* confdefs.h. */
15786_ACEOF
15787cat confdefs.h >>conftest.$ac_ext
15788cat >>conftest.$ac_ext <<_ACEOF
15789/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015790
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015791#include <netinet/in.h>
15792#ifdef __KAME__
15793yes
15794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015795_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015797 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015798 ipv6type=$i;
15799 ipv6lib=inet6
15800 ipv6libdir=/usr/local/v6/lib
15801 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015802fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000015803rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015804
15805 ;;
15806 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015808/* confdefs.h. */
15809_ACEOF
15810cat confdefs.h >>conftest.$ac_ext
15811cat >>conftest.$ac_ext <<_ACEOF
15812/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015813
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015814#include <features.h>
15815#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15816yes
15817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015818_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015820 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015821 ipv6type=$i;
15822 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015823fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000015824rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015825
15826 ;;
15827 linux-inet6)
15828 if test -d /usr/inet6; then
15829 ipv6type=$i
15830 ipv6lib=inet6
15831 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015832 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015833 fi
15834 ;;
15835 solaris)
15836 if test -f /etc/netconfig; then
15837 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15838 ipv6type=$i
15839 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015840 fi
15841 fi
15842 ;;
15843 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015845/* confdefs.h. */
15846_ACEOF
15847cat confdefs.h >>conftest.$ac_ext
15848cat >>conftest.$ac_ext <<_ACEOF
15849/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015850
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015851#include <sys/param.h>
15852#ifdef _TOSHIBA_INET6
15853yes
15854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015855_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015857 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015858 ipv6type=$i;
15859 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015860 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015861fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000015862rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015863
15864 ;;
15865 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015867/* confdefs.h. */
15868_ACEOF
15869cat confdefs.h >>conftest.$ac_ext
15870cat >>conftest.$ac_ext <<_ACEOF
15871/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015872
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015873#include </usr/local/v6/include/sys/v6config.h>
15874#ifdef __V6D__
15875yes
15876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015877_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015879 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015880 ipv6type=$i;
15881 ipv6lib=v6;
15882 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015883 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015884fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000015885rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015886
15887 ;;
15888 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015890/* confdefs.h. */
15891_ACEOF
15892cat confdefs.h >>conftest.$ac_ext
15893cat >>conftest.$ac_ext <<_ACEOF
15894/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015895
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015896#include <sys/param.h>
15897#ifdef _ZETA_MINAMI_INET6
15898yes
15899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015900_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015902 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015903 ipv6type=$i;
15904 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015905 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015906fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000015907rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015908
15909 ;;
15910 esac
15911 if test "$ipv6type" != "unknown"; then
15912 break
15913 fi
15914 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015915 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15916echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015917fi
15918
15919if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15920 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15921 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15922 echo "using lib$ipv6lib"
15923 else
15924 if test $ipv6trylibc = "yes"; then
15925 echo "using libc"
15926 else
15927 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15928 echo "You need to fetch lib$ipv6lib.a from appropriate"
15929 echo 'ipv6 kit and compile beforehand.'
15930 exit 1
15931 fi
15932 fi
15933fi
15934
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015935{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
15936echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
15937cat >conftest.$ac_ext <<_ACEOF
15938/* confdefs.h. */
15939_ACEOF
15940cat confdefs.h >>conftest.$ac_ext
15941cat >>conftest.$ac_ext <<_ACEOF
15942/* end confdefs.h. */
15943#include <Carbon/Carbon.h>
15944int
15945main ()
15946{
15947FSIORefNum fRef = 0
15948 ;
15949 return 0;
15950}
15951_ACEOF
15952rm -f conftest.$ac_objext
15953if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
15960 ac_status=$?
15961 grep -v '^ *+' conftest.er1 >conftest.err
15962 rm -f conftest.er1
15963 cat conftest.err >&5
15964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15965 (exit $ac_status); } && {
15966 test -z "$ac_c_werror_flag" ||
15967 test ! -s conftest.err
15968 } && test -s conftest.$ac_objext; then
15969
15970cat >>confdefs.h <<\_ACEOF
15971#define HAVE_OSX105_SDK 1
15972_ACEOF
15973
15974 { echo "$as_me:$LINENO: result: yes" >&5
15975echo "${ECHO_T}yes" >&6; }
15976else
15977 echo "$as_me: failed program was:" >&5
15978sed 's/^/| /' conftest.$ac_ext >&5
15979
15980 { echo "$as_me:$LINENO: result: no" >&5
15981echo "${ECHO_T}no" >&6; }
15982
15983fi
15984
15985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15986
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015987# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015988{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15989echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015990
Martin v. Löwiseba40652007-08-30 20:10:57 +000015991# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015992if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015993 withval=$with_doc_strings;
15994fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015995
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015996
15997if test -z "$with_doc_strings"
15998then with_doc_strings="yes"
15999fi
16000if test "$with_doc_strings" != "no"
16001then
16002
16003cat >>confdefs.h <<\_ACEOF
16004#define WITH_DOC_STRINGS 1
16005_ACEOF
16006
16007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016008{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16009echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016010
Neil Schemenauera35c6882001-02-27 04:45:05 +000016011# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016012{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16013echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016014
Martin v. Löwiseba40652007-08-30 20:10:57 +000016015# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016016if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016017 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016018if test "$withval" != no
16019then
16020
16021cat >>confdefs.h <<\_ACEOF
16022#define WITH_TSC 1
16023_ACEOF
16024
Martin v. Löwiseba40652007-08-30 20:10:57 +000016025 { echo "$as_me:$LINENO: result: yes" >&5
16026echo "${ECHO_T}yes" >&6; }
16027else { echo "$as_me:$LINENO: result: no" >&5
16028echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016029fi
16030else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016031 { echo "$as_me:$LINENO: result: no" >&5
16032echo "${ECHO_T}no" >&6; }
16033fi
16034
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016035
16036# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016037{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16038echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016039
Martin v. Löwiseba40652007-08-30 20:10:57 +000016040# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016041if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016042 withval=$with_pymalloc;
16043fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016044
Neil Schemenauera35c6882001-02-27 04:45:05 +000016045
Neil Schemenauer16c22972002-03-22 15:34:49 +000016046if test -z "$with_pymalloc"
16047then with_pymalloc="yes"
16048fi
16049if test "$with_pymalloc" != "no"
16050then
Martin v. Löwis11437992002-04-12 09:54:03 +000016051
16052cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016053#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016054_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016055
16056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016057{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16058echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016059
Barry Warsawef82cd72000-06-30 16:21:01 +000016060# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000016061{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16062echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016063
Martin v. Löwiseba40652007-08-30 20:10:57 +000016064# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016065if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016066 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016067if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016068then
16069
16070cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016071#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016072_ACEOF
16073
Martin v. Löwiseba40652007-08-30 20:10:57 +000016074 { echo "$as_me:$LINENO: result: yes" >&5
16075echo "${ECHO_T}yes" >&6; }
16076else { echo "$as_me:$LINENO: result: no" >&5
16077echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016078fi
16079else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016080 { echo "$as_me:$LINENO: result: no" >&5
16081echo "${ECHO_T}no" >&6; }
16082fi
16083
Barry Warsawef82cd72000-06-30 16:21:01 +000016084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016085# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016086
Guido van Rossum98935bf2001-09-05 19:13:16 +000016087DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016088
Guido van Rossume97ee181999-12-20 21:27:22 +000016089# the dlopen() function means we might want to use dynload_shlib.o. some
16090# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016091
Thomas Wouters3a584202000-08-05 23:28:51 +000016092for ac_func in dlopen
16093do
Martin v. Löwis11437992002-04-12 09:54:03 +000016094as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016095{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16096echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16097if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016098 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016099else
Martin v. Löwis11437992002-04-12 09:54:03 +000016100 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016101/* confdefs.h. */
16102_ACEOF
16103cat confdefs.h >>conftest.$ac_ext
16104cat >>conftest.$ac_ext <<_ACEOF
16105/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016106/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16107 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16108#define $ac_func innocuous_$ac_func
16109
Guido van Rossume97ee181999-12-20 21:27:22 +000016110/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016111 which can conflict with char $ac_func (); below.
16112 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016113 <limits.h> exists even on freestanding compilers. */
16114
16115#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016116# include <limits.h>
16117#else
16118# include <assert.h>
16119#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016120
16121#undef $ac_func
16122
Martin v. Löwiseba40652007-08-30 20:10:57 +000016123/* Override any GCC internal prototype to avoid an error.
16124 Use char because int might match the return type of a GCC
16125 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016126#ifdef __cplusplus
16127extern "C"
16128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016129char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016130/* The GNU C library defines this for functions which it implements
16131 to always fail with ENOSYS. Some functions are actually named
16132 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016133#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016134choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016135#endif
16136
Skip Montanaro6dead952003-09-25 14:50:04 +000016137int
16138main ()
16139{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016140return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016141 ;
16142 return 0;
16143}
16144_ACEOF
16145rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016146if { (ac_try="$ac_link"
16147case "(($ac_try" in
16148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16149 *) ac_try_echo=$ac_try;;
16150esac
16151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16152 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016154 grep -v '^ *+' conftest.er1 >conftest.err
16155 rm -f conftest.er1
16156 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016158 (exit $ac_status); } && {
16159 test -z "$ac_c_werror_flag" ||
16160 test ! -s conftest.err
16161 } && test -s conftest$ac_exeext &&
16162 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016164else
Martin v. Löwis11437992002-04-12 09:54:03 +000016165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016166sed 's/^/| /' conftest.$ac_ext >&5
16167
Martin v. Löwiseba40652007-08-30 20:10:57 +000016168 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016170
16171rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016172 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016174ac_res=`eval echo '${'$as_ac_var'}'`
16175 { echo "$as_me:$LINENO: result: $ac_res" >&5
16176echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016177if test `eval echo '${'$as_ac_var'}'` = yes; then
16178 cat >>confdefs.h <<_ACEOF
16179#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16180_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016181
Guido van Rossume97ee181999-12-20 21:27:22 +000016182fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016183done
Guido van Rossume97ee181999-12-20 21:27:22 +000016184
Michael W. Hudson54241132001-12-07 15:38:26 +000016185
Guido van Rossume97ee181999-12-20 21:27:22 +000016186# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16187# loading of modules.
16188
Martin v. Löwiseba40652007-08-30 20:10:57 +000016189{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16190echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016191if test -z "$DYNLOADFILE"
16192then
16193 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016194 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16195 if test "$ac_cv_func_dlopen" = yes
16196 then DYNLOADFILE="dynload_shlib.o"
16197 else DYNLOADFILE="dynload_aix.o"
16198 fi
16199 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016200 BeOS*) DYNLOADFILE="dynload_beos.o";;
16201 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016202 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16203 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016204 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016205 *)
16206 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16207 # out any dynamic loading
16208 if test "$ac_cv_func_dlopen" = yes
16209 then DYNLOADFILE="dynload_shlib.o"
16210 else DYNLOADFILE="dynload_stub.o"
16211 fi
16212 ;;
16213 esac
16214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16216echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016217if test "$DYNLOADFILE" != "dynload_stub.o"
16218then
Martin v. Löwis11437992002-04-12 09:54:03 +000016219
16220cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016221#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016222_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016223
16224fi
16225
Neil Schemenauer4e425612001-06-19 15:44:15 +000016226# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16227
Michael W. Hudson54241132001-12-07 15:38:26 +000016228
Martin v. Löwiseba40652007-08-30 20:10:57 +000016229{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16230echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016231if test -z "$MACHDEP_OBJS"
16232then
Jack Jansene578a632001-08-15 01:27:14 +000016233 MACHDEP_OBJS=$extra_machdep_objs
16234else
16235 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016237{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16238echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016239
Guido van Rossum627b2d71993-12-24 10:39:16 +000016240# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
Martin v. Löwisd6320502004-08-12 13:45:08 +000016312
Martin v. Löwisc3001752005-01-23 09:27:24 +000016313
16314
Neal Norwitz05a45592006-03-20 06:30:08 +000016315
16316
Martin v. Löwis382abef2007-02-19 10:55:19 +000016317
16318
Christian Heimes36281872007-11-30 21:11:28 +000016319
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016320
16321
16322for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16323 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016324 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016325 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016326 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016327 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016328 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016329 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016330 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016331 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016332 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016333 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016334do
Martin v. Löwis11437992002-04-12 09:54:03 +000016335as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016336{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16337echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16338if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016339 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016340else
Martin v. Löwis11437992002-04-12 09:54:03 +000016341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016342/* confdefs.h. */
16343_ACEOF
16344cat confdefs.h >>conftest.$ac_ext
16345cat >>conftest.$ac_ext <<_ACEOF
16346/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016347/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16348 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16349#define $ac_func innocuous_$ac_func
16350
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016351/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016352 which can conflict with char $ac_func (); below.
16353 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016354 <limits.h> exists even on freestanding compilers. */
16355
16356#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016357# include <limits.h>
16358#else
16359# include <assert.h>
16360#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016361
16362#undef $ac_func
16363
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364/* Override any GCC internal prototype to avoid an error.
16365 Use char because int might match the return type of a GCC
16366 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016367#ifdef __cplusplus
16368extern "C"
16369#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016370char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016371/* The GNU C library defines this for functions which it implements
16372 to always fail with ENOSYS. Some functions are actually named
16373 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016374#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016375choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016376#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016377
Skip Montanaro6dead952003-09-25 14:50:04 +000016378int
16379main ()
16380{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016381return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016382 ;
16383 return 0;
16384}
16385_ACEOF
16386rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016387if { (ac_try="$ac_link"
16388case "(($ac_try" in
16389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16390 *) ac_try_echo=$ac_try;;
16391esac
16392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16393 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016395 grep -v '^ *+' conftest.er1 >conftest.err
16396 rm -f conftest.er1
16397 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016399 (exit $ac_status); } && {
16400 test -z "$ac_c_werror_flag" ||
16401 test ! -s conftest.err
16402 } && test -s conftest$ac_exeext &&
16403 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016404 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016405else
Martin v. Löwis11437992002-04-12 09:54:03 +000016406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016407sed 's/^/| /' conftest.$ac_ext >&5
16408
Martin v. Löwiseba40652007-08-30 20:10:57 +000016409 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016411
16412rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016413 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016414fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016415ac_res=`eval echo '${'$as_ac_var'}'`
16416 { echo "$as_me:$LINENO: result: $ac_res" >&5
16417echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016418if test `eval echo '${'$as_ac_var'}'` = yes; then
16419 cat >>confdefs.h <<_ACEOF
16420#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16421_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016422
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016423fi
16424done
16425
Michael W. Hudson54241132001-12-07 15:38:26 +000016426
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016427# For some functions, having a definition is not sufficient, since
16428# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016429{ echo "$as_me:$LINENO: checking for chroot" >&5
16430echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016431cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016432/* confdefs.h. */
16433_ACEOF
16434cat confdefs.h >>conftest.$ac_ext
16435cat >>conftest.$ac_ext <<_ACEOF
16436/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016437#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016438int
16439main ()
16440{
16441void *x=chroot
16442 ;
16443 return 0;
16444}
16445_ACEOF
16446rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016447if { (ac_try="$ac_compile"
16448case "(($ac_try" in
16449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16450 *) ac_try_echo=$ac_try;;
16451esac
16452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16453 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016455 grep -v '^ *+' conftest.er1 >conftest.err
16456 rm -f conftest.er1
16457 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016459 (exit $ac_status); } && {
16460 test -z "$ac_c_werror_flag" ||
16461 test ! -s conftest.err
16462 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016463
16464cat >>confdefs.h <<\_ACEOF
16465#define HAVE_CHROOT 1
16466_ACEOF
16467
Martin v. Löwiseba40652007-08-30 20:10:57 +000016468 { echo "$as_me:$LINENO: result: yes" >&5
16469echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016470else
16471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016472sed 's/^/| /' conftest.$ac_ext >&5
16473
Martin v. Löwiseba40652007-08-30 20:10:57 +000016474 { echo "$as_me:$LINENO: result: no" >&5
16475echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016476
16477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016478
16479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16480{ echo "$as_me:$LINENO: checking for link" >&5
16481echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016482cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016483/* confdefs.h. */
16484_ACEOF
16485cat confdefs.h >>conftest.$ac_ext
16486cat >>conftest.$ac_ext <<_ACEOF
16487/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016488#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016489int
16490main ()
16491{
16492void *x=link
16493 ;
16494 return 0;
16495}
16496_ACEOF
16497rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016498if { (ac_try="$ac_compile"
16499case "(($ac_try" in
16500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16501 *) ac_try_echo=$ac_try;;
16502esac
16503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016506 grep -v '^ *+' conftest.er1 >conftest.err
16507 rm -f conftest.er1
16508 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016510 (exit $ac_status); } && {
16511 test -z "$ac_c_werror_flag" ||
16512 test ! -s conftest.err
16513 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016514
16515cat >>confdefs.h <<\_ACEOF
16516#define HAVE_LINK 1
16517_ACEOF
16518
Martin v. Löwiseba40652007-08-30 20:10:57 +000016519 { echo "$as_me:$LINENO: result: yes" >&5
16520echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016521else
16522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016523sed 's/^/| /' conftest.$ac_ext >&5
16524
Martin v. Löwiseba40652007-08-30 20:10:57 +000016525 { echo "$as_me:$LINENO: result: no" >&5
16526echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016527
16528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016529
16530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16531{ echo "$as_me:$LINENO: checking for symlink" >&5
16532echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016533cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016534/* confdefs.h. */
16535_ACEOF
16536cat confdefs.h >>conftest.$ac_ext
16537cat >>conftest.$ac_ext <<_ACEOF
16538/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016539#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016540int
16541main ()
16542{
16543void *x=symlink
16544 ;
16545 return 0;
16546}
16547_ACEOF
16548rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016549if { (ac_try="$ac_compile"
16550case "(($ac_try" in
16551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16552 *) ac_try_echo=$ac_try;;
16553esac
16554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16555 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016557 grep -v '^ *+' conftest.er1 >conftest.err
16558 rm -f conftest.er1
16559 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016561 (exit $ac_status); } && {
16562 test -z "$ac_c_werror_flag" ||
16563 test ! -s conftest.err
16564 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016565
16566cat >>confdefs.h <<\_ACEOF
16567#define HAVE_SYMLINK 1
16568_ACEOF
16569
Martin v. Löwiseba40652007-08-30 20:10:57 +000016570 { echo "$as_me:$LINENO: result: yes" >&5
16571echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016572else
16573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016574sed 's/^/| /' conftest.$ac_ext >&5
16575
Martin v. Löwiseba40652007-08-30 20:10:57 +000016576 { echo "$as_me:$LINENO: result: no" >&5
16577echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016578
16579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580
16581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16582{ echo "$as_me:$LINENO: checking for fchdir" >&5
16583echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016584cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016585/* confdefs.h. */
16586_ACEOF
16587cat confdefs.h >>conftest.$ac_ext
16588cat >>conftest.$ac_ext <<_ACEOF
16589/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016590#include <unistd.h>
16591int
16592main ()
16593{
16594void *x=fchdir
16595 ;
16596 return 0;
16597}
16598_ACEOF
16599rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016600if { (ac_try="$ac_compile"
16601case "(($ac_try" in
16602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16603 *) ac_try_echo=$ac_try;;
16604esac
16605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16606 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016608 grep -v '^ *+' conftest.er1 >conftest.err
16609 rm -f conftest.er1
16610 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016612 (exit $ac_status); } && {
16613 test -z "$ac_c_werror_flag" ||
16614 test ! -s conftest.err
16615 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016616
16617cat >>confdefs.h <<\_ACEOF
16618#define HAVE_FCHDIR 1
16619_ACEOF
16620
Martin v. Löwiseba40652007-08-30 20:10:57 +000016621 { echo "$as_me:$LINENO: result: yes" >&5
16622echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016623else
16624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016625sed 's/^/| /' conftest.$ac_ext >&5
16626
Martin v. Löwiseba40652007-08-30 20:10:57 +000016627 { echo "$as_me:$LINENO: result: no" >&5
16628echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016629
16630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016631
16632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16633{ echo "$as_me:$LINENO: checking for fsync" >&5
16634echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016635cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016636/* confdefs.h. */
16637_ACEOF
16638cat confdefs.h >>conftest.$ac_ext
16639cat >>conftest.$ac_ext <<_ACEOF
16640/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016641#include <unistd.h>
16642int
16643main ()
16644{
16645void *x=fsync
16646 ;
16647 return 0;
16648}
16649_ACEOF
16650rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016651if { (ac_try="$ac_compile"
16652case "(($ac_try" in
16653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16654 *) ac_try_echo=$ac_try;;
16655esac
16656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016659 grep -v '^ *+' conftest.er1 >conftest.err
16660 rm -f conftest.er1
16661 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016663 (exit $ac_status); } && {
16664 test -z "$ac_c_werror_flag" ||
16665 test ! -s conftest.err
16666 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016667
16668cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016669#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016670_ACEOF
16671
Martin v. Löwiseba40652007-08-30 20:10:57 +000016672 { echo "$as_me:$LINENO: result: yes" >&5
16673echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016674else
16675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016676sed 's/^/| /' conftest.$ac_ext >&5
16677
Martin v. Löwiseba40652007-08-30 20:10:57 +000016678 { echo "$as_me:$LINENO: result: no" >&5
16679echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016680
16681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016682
16683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16684{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16685echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016687/* confdefs.h. */
16688_ACEOF
16689cat confdefs.h >>conftest.$ac_ext
16690cat >>conftest.$ac_ext <<_ACEOF
16691/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016692#include <unistd.h>
16693int
16694main ()
16695{
16696void *x=fdatasync
16697 ;
16698 return 0;
16699}
16700_ACEOF
16701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016702if { (ac_try="$ac_compile"
16703case "(($ac_try" in
16704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16705 *) ac_try_echo=$ac_try;;
16706esac
16707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016710 grep -v '^ *+' conftest.er1 >conftest.err
16711 rm -f conftest.er1
16712 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016714 (exit $ac_status); } && {
16715 test -z "$ac_c_werror_flag" ||
16716 test ! -s conftest.err
16717 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016718
16719cat >>confdefs.h <<\_ACEOF
16720#define HAVE_FDATASYNC 1
16721_ACEOF
16722
Martin v. Löwiseba40652007-08-30 20:10:57 +000016723 { echo "$as_me:$LINENO: result: yes" >&5
16724echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016725else
16726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016727sed 's/^/| /' conftest.$ac_ext >&5
16728
Martin v. Löwiseba40652007-08-30 20:10:57 +000016729 { echo "$as_me:$LINENO: result: no" >&5
16730echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016731
16732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016733
16734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016735{ echo "$as_me:$LINENO: checking for epoll" >&5
16736echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16737cat >conftest.$ac_ext <<_ACEOF
16738/* confdefs.h. */
16739_ACEOF
16740cat confdefs.h >>conftest.$ac_ext
16741cat >>conftest.$ac_ext <<_ACEOF
16742/* end confdefs.h. */
16743#include <sys/epoll.h>
16744int
16745main ()
16746{
16747void *x=epoll_create
16748 ;
16749 return 0;
16750}
16751_ACEOF
16752rm -f conftest.$ac_objext
16753if { (ac_try="$ac_compile"
16754case "(($ac_try" in
16755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16756 *) ac_try_echo=$ac_try;;
16757esac
16758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16759 (eval "$ac_compile") 2>conftest.er1
16760 ac_status=$?
16761 grep -v '^ *+' conftest.er1 >conftest.err
16762 rm -f conftest.er1
16763 cat conftest.err >&5
16764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16765 (exit $ac_status); } && {
16766 test -z "$ac_c_werror_flag" ||
16767 test ! -s conftest.err
16768 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016769
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016770cat >>confdefs.h <<\_ACEOF
16771#define HAVE_EPOLL 1
16772_ACEOF
16773
16774 { echo "$as_me:$LINENO: result: yes" >&5
16775echo "${ECHO_T}yes" >&6; }
16776else
16777 echo "$as_me: failed program was:" >&5
16778sed 's/^/| /' conftest.$ac_ext >&5
16779
16780 { echo "$as_me:$LINENO: result: no" >&5
16781echo "${ECHO_T}no" >&6; }
16782
16783fi
16784
16785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16786{ echo "$as_me:$LINENO: checking for kqueue" >&5
16787echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16788cat >conftest.$ac_ext <<_ACEOF
16789/* confdefs.h. */
16790_ACEOF
16791cat confdefs.h >>conftest.$ac_ext
16792cat >>conftest.$ac_ext <<_ACEOF
16793/* end confdefs.h. */
16794
16795#include <sys/types.h>
16796#include <sys/event.h>
16797
16798int
16799main ()
16800{
16801int x=kqueue()
16802 ;
16803 return 0;
16804}
16805_ACEOF
16806rm -f conftest.$ac_objext
16807if { (ac_try="$ac_compile"
16808case "(($ac_try" in
16809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16810 *) ac_try_echo=$ac_try;;
16811esac
16812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16813 (eval "$ac_compile") 2>conftest.er1
16814 ac_status=$?
16815 grep -v '^ *+' conftest.er1 >conftest.err
16816 rm -f conftest.er1
16817 cat conftest.err >&5
16818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16819 (exit $ac_status); } && {
16820 test -z "$ac_c_werror_flag" ||
16821 test ! -s conftest.err
16822 } && test -s conftest.$ac_objext; then
16823
16824cat >>confdefs.h <<\_ACEOF
16825#define HAVE_KQUEUE 1
16826_ACEOF
16827
16828 { echo "$as_me:$LINENO: result: yes" >&5
16829echo "${ECHO_T}yes" >&6; }
16830else
16831 echo "$as_me: failed program was:" >&5
16832sed 's/^/| /' conftest.$ac_ext >&5
16833
16834 { echo "$as_me:$LINENO: result: no" >&5
16835echo "${ECHO_T}no" >&6; }
16836
16837fi
16838
16839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016840# On some systems (eg. FreeBSD 5), we would find a definition of the
16841# functions ctermid_r, setgroups in the library, but no prototype
16842# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16843# address to avoid compiler warnings and potential miscompilations
16844# because of the missing prototypes.
16845
Martin v. Löwiseba40652007-08-30 20:10:57 +000016846{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16847echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016848cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016849/* confdefs.h. */
16850_ACEOF
16851cat confdefs.h >>conftest.$ac_ext
16852cat >>conftest.$ac_ext <<_ACEOF
16853/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016854
16855#include "confdefs.h"
16856#include <stdio.h>
16857
Martin v. Löwisd5843682002-11-21 20:41:28 +000016858int
16859main ()
16860{
16861void* p = ctermid_r
16862 ;
16863 return 0;
16864}
16865_ACEOF
16866rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016867if { (ac_try="$ac_compile"
16868case "(($ac_try" in
16869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16870 *) ac_try_echo=$ac_try;;
16871esac
16872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16873 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016875 grep -v '^ *+' conftest.er1 >conftest.err
16876 rm -f conftest.er1
16877 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016879 (exit $ac_status); } && {
16880 test -z "$ac_c_werror_flag" ||
16881 test ! -s conftest.err
16882 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016883
16884cat >>confdefs.h <<\_ACEOF
16885#define HAVE_CTERMID_R 1
16886_ACEOF
16887
Martin v. Löwiseba40652007-08-30 20:10:57 +000016888 { echo "$as_me:$LINENO: result: yes" >&5
16889echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016890else
16891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016892sed 's/^/| /' conftest.$ac_ext >&5
16893
Martin v. Löwiseba40652007-08-30 20:10:57 +000016894 { echo "$as_me:$LINENO: result: no" >&5
16895echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016896
16897fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016898
Martin v. Löwiseba40652007-08-30 20:10:57 +000016899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16900
16901{ echo "$as_me:$LINENO: checking for flock" >&5
16902echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016904/* confdefs.h. */
16905_ACEOF
16906cat confdefs.h >>conftest.$ac_ext
16907cat >>conftest.$ac_ext <<_ACEOF
16908/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016909
16910#include "confdefs.h"
16911#include <sys/file.h>
16912
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016913int
16914main ()
16915{
16916void* p = flock
16917 ;
16918 return 0;
16919}
16920_ACEOF
16921rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016922if { (ac_try="$ac_compile"
16923case "(($ac_try" in
16924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16925 *) ac_try_echo=$ac_try;;
16926esac
16927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16928 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016930 grep -v '^ *+' conftest.er1 >conftest.err
16931 rm -f conftest.er1
16932 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016934 (exit $ac_status); } && {
16935 test -z "$ac_c_werror_flag" ||
16936 test ! -s conftest.err
16937 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016938
16939cat >>confdefs.h <<\_ACEOF
16940#define HAVE_FLOCK 1
16941_ACEOF
16942
Martin v. Löwiseba40652007-08-30 20:10:57 +000016943 { echo "$as_me:$LINENO: result: yes" >&5
16944echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016945else
16946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016947sed 's/^/| /' conftest.$ac_ext >&5
16948
Martin v. Löwiseba40652007-08-30 20:10:57 +000016949 { echo "$as_me:$LINENO: result: no" >&5
16950echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016951
16952fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016953
Martin v. Löwiseba40652007-08-30 20:10:57 +000016954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16955
16956{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16957echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016958cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016959/* confdefs.h. */
16960_ACEOF
16961cat confdefs.h >>conftest.$ac_ext
16962cat >>conftest.$ac_ext <<_ACEOF
16963/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016964
16965#include "confdefs.h"
16966#include <unistd.h>
16967
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016968int
16969main ()
16970{
16971void* p = getpagesize
16972 ;
16973 return 0;
16974}
16975_ACEOF
16976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016977if { (ac_try="$ac_compile"
16978case "(($ac_try" in
16979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16980 *) ac_try_echo=$ac_try;;
16981esac
16982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016985 grep -v '^ *+' conftest.er1 >conftest.err
16986 rm -f conftest.er1
16987 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016989 (exit $ac_status); } && {
16990 test -z "$ac_c_werror_flag" ||
16991 test ! -s conftest.err
16992 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016993
16994cat >>confdefs.h <<\_ACEOF
16995#define HAVE_GETPAGESIZE 1
16996_ACEOF
16997
Martin v. Löwiseba40652007-08-30 20:10:57 +000016998 { echo "$as_me:$LINENO: result: yes" >&5
16999echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017000else
17001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017002sed 's/^/| /' conftest.$ac_ext >&5
17003
Martin v. Löwiseba40652007-08-30 20:10:57 +000017004 { echo "$as_me:$LINENO: result: no" >&5
17005echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017006
17007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017008
17009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017010
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017011for ac_prog in true
17012do
17013 # Extract the first word of "$ac_prog", so it can be a program name with args.
17014set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000017015{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17016echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017017if test "${ac_cv_prog_TRUE+set}" = set; then
17018 echo $ECHO_N "(cached) $ECHO_C" >&6
17019else
17020 if test -n "$TRUE"; then
17021 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17022else
17023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17024for as_dir in $PATH
17025do
17026 IFS=$as_save_IFS
17027 test -z "$as_dir" && as_dir=.
17028 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000017029 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 +000017030 ac_cv_prog_TRUE="$ac_prog"
17031 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17032 break 2
17033 fi
17034done
17035done
Martin v. Löwiseba40652007-08-30 20:10:57 +000017036IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017037
17038fi
17039fi
17040TRUE=$ac_cv_prog_TRUE
17041if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017042 { echo "$as_me:$LINENO: result: $TRUE" >&5
17043echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017044else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017045 { echo "$as_me:$LINENO: result: no" >&5
17046echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017047fi
17048
Martin v. Löwiseba40652007-08-30 20:10:57 +000017049
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017050 test -n "$TRUE" && break
17051done
17052test -n "$TRUE" || TRUE="/bin/true"
17053
17054
Martin v. Löwiseba40652007-08-30 20:10:57 +000017055{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17056echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017057if test "${ac_cv_lib_c_inet_aton+set}" = set; then
17058 echo $ECHO_N "(cached) $ECHO_C" >&6
17059else
17060 ac_check_lib_save_LIBS=$LIBS
17061LIBS="-lc $LIBS"
17062cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017063/* confdefs.h. */
17064_ACEOF
17065cat confdefs.h >>conftest.$ac_ext
17066cat >>conftest.$ac_ext <<_ACEOF
17067/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017068
Martin v. Löwiseba40652007-08-30 20:10:57 +000017069/* Override any GCC internal prototype to avoid an error.
17070 Use char because int might match the return type of a GCC
17071 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017072#ifdef __cplusplus
17073extern "C"
17074#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017075char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017076int
17077main ()
17078{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017079return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017080 ;
17081 return 0;
17082}
17083_ACEOF
17084rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017085if { (ac_try="$ac_link"
17086case "(($ac_try" in
17087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17088 *) ac_try_echo=$ac_try;;
17089esac
17090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17091 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017093 grep -v '^ *+' conftest.er1 >conftest.err
17094 rm -f conftest.er1
17095 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017097 (exit $ac_status); } && {
17098 test -z "$ac_c_werror_flag" ||
17099 test ! -s conftest.err
17100 } && test -s conftest$ac_exeext &&
17101 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017102 ac_cv_lib_c_inet_aton=yes
17103else
17104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017105sed 's/^/| /' conftest.$ac_ext >&5
17106
Martin v. Löwiseba40652007-08-30 20:10:57 +000017107 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017108fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017109
17110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017112LIBS=$ac_check_lib_save_LIBS
17113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017114{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17115echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017116if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017117 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017118else
17119
Martin v. Löwiseba40652007-08-30 20:10:57 +000017120{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17121echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017122if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
17123 echo $ECHO_N "(cached) $ECHO_C" >&6
17124else
17125 ac_check_lib_save_LIBS=$LIBS
17126LIBS="-lresolv $LIBS"
17127cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017128/* confdefs.h. */
17129_ACEOF
17130cat confdefs.h >>conftest.$ac_ext
17131cat >>conftest.$ac_ext <<_ACEOF
17132/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017133
Martin v. Löwiseba40652007-08-30 20:10:57 +000017134/* Override any GCC internal prototype to avoid an error.
17135 Use char because int might match the return type of a GCC
17136 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017137#ifdef __cplusplus
17138extern "C"
17139#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017140char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017141int
17142main ()
17143{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017144return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017145 ;
17146 return 0;
17147}
17148_ACEOF
17149rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017150if { (ac_try="$ac_link"
17151case "(($ac_try" in
17152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17153 *) ac_try_echo=$ac_try;;
17154esac
17155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17156 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017158 grep -v '^ *+' conftest.er1 >conftest.err
17159 rm -f conftest.er1
17160 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017162 (exit $ac_status); } && {
17163 test -z "$ac_c_werror_flag" ||
17164 test ! -s conftest.err
17165 } && test -s conftest$ac_exeext &&
17166 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017167 ac_cv_lib_resolv_inet_aton=yes
17168else
17169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017170sed 's/^/| /' conftest.$ac_ext >&5
17171
Martin v. Löwiseba40652007-08-30 20:10:57 +000017172 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017174
17175rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017176 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017177LIBS=$ac_check_lib_save_LIBS
17178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017179{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17180echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017181if test $ac_cv_lib_resolv_inet_aton = yes; then
17182 cat >>confdefs.h <<_ACEOF
17183#define HAVE_LIBRESOLV 1
17184_ACEOF
17185
17186 LIBS="-lresolv $LIBS"
17187
17188fi
17189
17190
17191fi
17192
17193
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017194# On Tru64, chflags seems to be present, but calling it will
17195# exit Python
17196{ echo "$as_me:$LINENO: checking for chflags" >&5
17197echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17198if test "$cross_compiling" = yes; then
17199 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17200See \`config.log' for more details." >&5
17201echo "$as_me: error: cannot run test program while cross compiling
17202See \`config.log' for more details." >&2;}
17203 { (exit 1); exit 1; }; }
17204else
17205 cat >conftest.$ac_ext <<_ACEOF
17206/* confdefs.h. */
17207_ACEOF
17208cat confdefs.h >>conftest.$ac_ext
17209cat >>conftest.$ac_ext <<_ACEOF
17210/* end confdefs.h. */
17211
17212#include <sys/stat.h>
17213#include <unistd.h>
17214int main(int argc, char*argv[])
17215{
17216 if(chflags(argv[0], 0) != 0)
17217 return 1;
17218 return 0;
17219}
17220
17221_ACEOF
17222rm -f conftest$ac_exeext
17223if { (ac_try="$ac_link"
17224case "(($ac_try" in
17225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17226 *) ac_try_echo=$ac_try;;
17227esac
17228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17229 (eval "$ac_link") 2>&5
17230 ac_status=$?
17231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17232 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17233 { (case "(($ac_try" in
17234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17235 *) ac_try_echo=$ac_try;;
17236esac
17237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17238 (eval "$ac_try") 2>&5
17239 ac_status=$?
17240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17241 (exit $ac_status); }; }; then
17242
17243cat >>confdefs.h <<\_ACEOF
17244#define HAVE_CHFLAGS 1
17245_ACEOF
17246
17247 { echo "$as_me:$LINENO: result: yes" >&5
17248echo "${ECHO_T}yes" >&6; }
17249else
17250 echo "$as_me: program exited with status $ac_status" >&5
17251echo "$as_me: failed program was:" >&5
17252sed 's/^/| /' conftest.$ac_ext >&5
17253
17254( exit $ac_status )
17255{ echo "$as_me:$LINENO: result: no" >&5
17256echo "${ECHO_T}no" >&6; }
17257
17258fi
17259rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17260fi
17261
17262
17263
17264{ echo "$as_me:$LINENO: checking for lchflags" >&5
17265echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17266if test "$cross_compiling" = yes; then
17267 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17268See \`config.log' for more details." >&5
17269echo "$as_me: error: cannot run test program while cross compiling
17270See \`config.log' for more details." >&2;}
17271 { (exit 1); exit 1; }; }
17272else
17273 cat >conftest.$ac_ext <<_ACEOF
17274/* confdefs.h. */
17275_ACEOF
17276cat confdefs.h >>conftest.$ac_ext
17277cat >>conftest.$ac_ext <<_ACEOF
17278/* end confdefs.h. */
17279
17280#include <sys/stat.h>
17281#include <unistd.h>
17282int main(int argc, char*argv[])
17283{
17284 if(lchflags(argv[0], 0) != 0)
17285 return 1;
17286 return 0;
17287}
17288
17289_ACEOF
17290rm -f conftest$ac_exeext
17291if { (ac_try="$ac_link"
17292case "(($ac_try" in
17293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17294 *) ac_try_echo=$ac_try;;
17295esac
17296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17297 (eval "$ac_link") 2>&5
17298 ac_status=$?
17299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17300 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17301 { (case "(($ac_try" in
17302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17303 *) ac_try_echo=$ac_try;;
17304esac
17305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17306 (eval "$ac_try") 2>&5
17307 ac_status=$?
17308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17309 (exit $ac_status); }; }; then
17310
17311cat >>confdefs.h <<\_ACEOF
17312#define HAVE_LCHFLAGS 1
17313_ACEOF
17314
17315 { echo "$as_me:$LINENO: result: yes" >&5
17316echo "${ECHO_T}yes" >&6; }
17317else
17318 echo "$as_me: program exited with status $ac_status" >&5
17319echo "$as_me: failed program was:" >&5
17320sed 's/^/| /' conftest.$ac_ext >&5
17321
17322( exit $ac_status )
17323{ echo "$as_me:$LINENO: result: no" >&5
17324echo "${ECHO_T}no" >&6; }
17325
17326fi
17327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17328fi
17329
17330
17331
Ronald Oussorenf8752642006-07-06 10:13:35 +000017332case $ac_sys_system/$ac_sys_release in
17333Darwin/*)
17334 _CUR_CFLAGS="${CFLAGS}"
17335 _CUR_LDFLAGS="${LDFLAGS}"
17336 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17337 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17338 ;;
17339esac
17340
Martin v. Löwiseba40652007-08-30 20:10:57 +000017341{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17342echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017343if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17344 echo $ECHO_N "(cached) $ECHO_C" >&6
17345else
17346 ac_check_lib_save_LIBS=$LIBS
17347LIBS="-lz $LIBS"
17348cat >conftest.$ac_ext <<_ACEOF
17349/* confdefs.h. */
17350_ACEOF
17351cat confdefs.h >>conftest.$ac_ext
17352cat >>conftest.$ac_ext <<_ACEOF
17353/* end confdefs.h. */
17354
Martin v. Löwiseba40652007-08-30 20:10:57 +000017355/* Override any GCC internal prototype to avoid an error.
17356 Use char because int might match the return type of a GCC
17357 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017358#ifdef __cplusplus
17359extern "C"
17360#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017361char inflateCopy ();
17362int
17363main ()
17364{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017365return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017366 ;
17367 return 0;
17368}
17369_ACEOF
17370rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017371if { (ac_try="$ac_link"
17372case "(($ac_try" in
17373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17374 *) ac_try_echo=$ac_try;;
17375esac
17376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17377 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017378 ac_status=$?
17379 grep -v '^ *+' conftest.er1 >conftest.err
17380 rm -f conftest.er1
17381 cat conftest.err >&5
17382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017383 (exit $ac_status); } && {
17384 test -z "$ac_c_werror_flag" ||
17385 test ! -s conftest.err
17386 } && test -s conftest$ac_exeext &&
17387 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017388 ac_cv_lib_z_inflateCopy=yes
17389else
17390 echo "$as_me: failed program was:" >&5
17391sed 's/^/| /' conftest.$ac_ext >&5
17392
Martin v. Löwiseba40652007-08-30 20:10:57 +000017393 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017395
17396rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017397 conftest$ac_exeext conftest.$ac_ext
17398LIBS=$ac_check_lib_save_LIBS
17399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017400{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17401echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017402if test $ac_cv_lib_z_inflateCopy = yes; then
17403
17404cat >>confdefs.h <<\_ACEOF
17405#define HAVE_ZLIB_COPY 1
17406_ACEOF
17407
17408fi
17409
17410
Ronald Oussorenf8752642006-07-06 10:13:35 +000017411case $ac_sys_system/$ac_sys_release in
17412Darwin/*)
17413 CFLAGS="${_CUR_CFLAGS}"
17414 LDFLAGS="${_CUR_LDFLAGS}"
17415 ;;
17416esac
17417
Martin v. Löwiseba40652007-08-30 20:10:57 +000017418{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17419echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017420cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017421/* confdefs.h. */
17422_ACEOF
17423cat confdefs.h >>conftest.$ac_ext
17424cat >>conftest.$ac_ext <<_ACEOF
17425/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017426
17427#include "confdefs.h"
17428#include <netdb.h>
17429
Martin v. Löwise9416172003-05-03 10:12:45 +000017430int
17431main ()
17432{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017433void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017434 ;
17435 return 0;
17436}
17437_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017438rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017439if { (ac_try="$ac_link"
17440case "(($ac_try" in
17441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17442 *) ac_try_echo=$ac_try;;
17443esac
17444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17445 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017447 grep -v '^ *+' conftest.er1 >conftest.err
17448 rm -f conftest.er1
17449 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017451 (exit $ac_status); } && {
17452 test -z "$ac_c_werror_flag" ||
17453 test ! -s conftest.err
17454 } && test -s conftest$ac_exeext &&
17455 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017456
17457cat >>confdefs.h <<\_ACEOF
17458#define HAVE_HSTRERROR 1
17459_ACEOF
17460
Martin v. Löwiseba40652007-08-30 20:10:57 +000017461 { echo "$as_me:$LINENO: result: yes" >&5
17462echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017463else
17464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017465sed 's/^/| /' conftest.$ac_ext >&5
17466
Martin v. Löwiseba40652007-08-30 20:10:57 +000017467 { echo "$as_me:$LINENO: result: no" >&5
17468echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017469
17470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017471
17472rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017473 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017474
Martin v. Löwiseba40652007-08-30 20:10:57 +000017475{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17476echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017477cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017478/* confdefs.h. */
17479_ACEOF
17480cat confdefs.h >>conftest.$ac_ext
17481cat >>conftest.$ac_ext <<_ACEOF
17482/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017483
17484#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017485#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017486#include <sys/socket.h>
17487#include <netinet/in.h>
17488#include <arpa/inet.h>
17489
Martin v. Löwise9416172003-05-03 10:12:45 +000017490int
17491main ()
17492{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017493void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017494 ;
17495 return 0;
17496}
17497_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017498rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017499if { (ac_try="$ac_link"
17500case "(($ac_try" in
17501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17502 *) ac_try_echo=$ac_try;;
17503esac
17504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17505 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017507 grep -v '^ *+' conftest.er1 >conftest.err
17508 rm -f conftest.er1
17509 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017511 (exit $ac_status); } && {
17512 test -z "$ac_c_werror_flag" ||
17513 test ! -s conftest.err
17514 } && test -s conftest$ac_exeext &&
17515 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017516
17517cat >>confdefs.h <<\_ACEOF
17518#define HAVE_INET_ATON 1
17519_ACEOF
17520
Martin v. Löwiseba40652007-08-30 20:10:57 +000017521 { echo "$as_me:$LINENO: result: yes" >&5
17522echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017523else
17524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017525sed 's/^/| /' conftest.$ac_ext >&5
17526
Martin v. Löwiseba40652007-08-30 20:10:57 +000017527 { echo "$as_me:$LINENO: result: no" >&5
17528echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017529
17530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017531
17532rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017534
Martin v. Löwiseba40652007-08-30 20:10:57 +000017535{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17536echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017537cat >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öwise9416172003-05-03 10:12:45 +000017543
17544#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017545#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017546#include <sys/socket.h>
17547#include <netinet/in.h>
17548#include <arpa/inet.h>
17549
Martin v. Löwise9416172003-05-03 10:12:45 +000017550int
17551main ()
17552{
17553void* p = inet_pton
17554 ;
17555 return 0;
17556}
17557_ACEOF
17558rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017559if { (ac_try="$ac_compile"
17560case "(($ac_try" in
17561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17562 *) ac_try_echo=$ac_try;;
17563esac
17564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17565 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017567 grep -v '^ *+' conftest.er1 >conftest.err
17568 rm -f conftest.er1
17569 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017571 (exit $ac_status); } && {
17572 test -z "$ac_c_werror_flag" ||
17573 test ! -s conftest.err
17574 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017575
17576cat >>confdefs.h <<\_ACEOF
17577#define HAVE_INET_PTON 1
17578_ACEOF
17579
Martin v. Löwiseba40652007-08-30 20:10:57 +000017580 { echo "$as_me:$LINENO: result: yes" >&5
17581echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017582else
17583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017584sed 's/^/| /' conftest.$ac_ext >&5
17585
Martin v. Löwiseba40652007-08-30 20:10:57 +000017586 { echo "$as_me:$LINENO: result: no" >&5
17587echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017588
17589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017590
17591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017592
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017593# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017594{ echo "$as_me:$LINENO: checking for setgroups" >&5
17595echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017597/* confdefs.h. */
17598_ACEOF
17599cat confdefs.h >>conftest.$ac_ext
17600cat >>conftest.$ac_ext <<_ACEOF
17601/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017602
17603#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017604#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017605#ifdef HAVE_GRP_H
17606#include <grp.h>
17607#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017608
Martin v. Löwisd5843682002-11-21 20:41:28 +000017609int
17610main ()
17611{
17612void* p = setgroups
17613 ;
17614 return 0;
17615}
17616_ACEOF
17617rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017618if { (ac_try="$ac_compile"
17619case "(($ac_try" in
17620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17621 *) ac_try_echo=$ac_try;;
17622esac
17623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17624 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017626 grep -v '^ *+' conftest.er1 >conftest.err
17627 rm -f conftest.er1
17628 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017630 (exit $ac_status); } && {
17631 test -z "$ac_c_werror_flag" ||
17632 test ! -s conftest.err
17633 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017634
17635cat >>confdefs.h <<\_ACEOF
17636#define HAVE_SETGROUPS 1
17637_ACEOF
17638
Martin v. Löwiseba40652007-08-30 20:10:57 +000017639 { echo "$as_me:$LINENO: result: yes" >&5
17640echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017641else
17642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017643sed 's/^/| /' conftest.$ac_ext >&5
17644
Martin v. Löwiseba40652007-08-30 20:10:57 +000017645 { echo "$as_me:$LINENO: result: no" >&5
17646echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017647
17648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017649
17650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017651
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017652# check for openpty and forkpty
17653
Martin v. Löwis11437992002-04-12 09:54:03 +000017654
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017655for ac_func in openpty
17656do
Martin v. Löwis11437992002-04-12 09:54:03 +000017657as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017658{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17659echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17660if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017661 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017662else
Martin v. Löwis11437992002-04-12 09:54:03 +000017663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017664/* confdefs.h. */
17665_ACEOF
17666cat confdefs.h >>conftest.$ac_ext
17667cat >>conftest.$ac_ext <<_ACEOF
17668/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017669/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17670 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17671#define $ac_func innocuous_$ac_func
17672
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017673/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017674 which can conflict with char $ac_func (); below.
17675 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017676 <limits.h> exists even on freestanding compilers. */
17677
17678#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017679# include <limits.h>
17680#else
17681# include <assert.h>
17682#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017683
17684#undef $ac_func
17685
Martin v. Löwiseba40652007-08-30 20:10:57 +000017686/* Override any GCC internal prototype to avoid an error.
17687 Use char because int might match the return type of a GCC
17688 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017689#ifdef __cplusplus
17690extern "C"
17691#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017692char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017693/* The GNU C library defines this for functions which it implements
17694 to always fail with ENOSYS. Some functions are actually named
17695 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017696#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017697choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017698#endif
17699
Skip Montanaro6dead952003-09-25 14:50:04 +000017700int
17701main ()
17702{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017703return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017704 ;
17705 return 0;
17706}
17707_ACEOF
17708rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017709if { (ac_try="$ac_link"
17710case "(($ac_try" in
17711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17712 *) ac_try_echo=$ac_try;;
17713esac
17714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17715 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017717 grep -v '^ *+' conftest.er1 >conftest.err
17718 rm -f conftest.er1
17719 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017721 (exit $ac_status); } && {
17722 test -z "$ac_c_werror_flag" ||
17723 test ! -s conftest.err
17724 } && test -s conftest$ac_exeext &&
17725 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017726 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017727else
Martin v. Löwis11437992002-04-12 09:54:03 +000017728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017729sed 's/^/| /' conftest.$ac_ext >&5
17730
Martin v. Löwiseba40652007-08-30 20:10:57 +000017731 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017733
17734rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017735 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017737ac_res=`eval echo '${'$as_ac_var'}'`
17738 { echo "$as_me:$LINENO: result: $ac_res" >&5
17739echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017740if test `eval echo '${'$as_ac_var'}'` = yes; then
17741 cat >>confdefs.h <<_ACEOF
17742#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17743_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017744
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017745else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017746 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17747echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017748if test "${ac_cv_lib_util_openpty+set}" = set; then
17749 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017750else
Martin v. Löwis11437992002-04-12 09:54:03 +000017751 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017752LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017753cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017754/* confdefs.h. */
17755_ACEOF
17756cat confdefs.h >>conftest.$ac_ext
17757cat >>conftest.$ac_ext <<_ACEOF
17758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017759
Martin v. Löwiseba40652007-08-30 20:10:57 +000017760/* Override any GCC internal prototype to avoid an error.
17761 Use char because int might match the return type of a GCC
17762 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017763#ifdef __cplusplus
17764extern "C"
17765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017766char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017767int
17768main ()
17769{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017770return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017771 ;
17772 return 0;
17773}
17774_ACEOF
17775rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017776if { (ac_try="$ac_link"
17777case "(($ac_try" in
17778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17779 *) ac_try_echo=$ac_try;;
17780esac
17781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17782 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017784 grep -v '^ *+' conftest.er1 >conftest.err
17785 rm -f conftest.er1
17786 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017788 (exit $ac_status); } && {
17789 test -z "$ac_c_werror_flag" ||
17790 test ! -s conftest.err
17791 } && test -s conftest$ac_exeext &&
17792 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017793 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017794else
Martin v. Löwis11437992002-04-12 09:54:03 +000017795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017796sed 's/^/| /' conftest.$ac_ext >&5
17797
Martin v. Löwiseba40652007-08-30 20:10:57 +000017798 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017800
17801rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017803LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017805{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17806echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017807if test $ac_cv_lib_util_openpty = yes; then
17808 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017809#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017810_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017811 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017812else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017813 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17814echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017815if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17816 echo $ECHO_N "(cached) $ECHO_C" >&6
17817else
17818 ac_check_lib_save_LIBS=$LIBS
17819LIBS="-lbsd $LIBS"
17820cat >conftest.$ac_ext <<_ACEOF
17821/* confdefs.h. */
17822_ACEOF
17823cat confdefs.h >>conftest.$ac_ext
17824cat >>conftest.$ac_ext <<_ACEOF
17825/* end confdefs.h. */
17826
Martin v. Löwiseba40652007-08-30 20:10:57 +000017827/* Override any GCC internal prototype to avoid an error.
17828 Use char because int might match the return type of a GCC
17829 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017830#ifdef __cplusplus
17831extern "C"
17832#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017833char openpty ();
17834int
17835main ()
17836{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017837return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017838 ;
17839 return 0;
17840}
17841_ACEOF
17842rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017843if { (ac_try="$ac_link"
17844case "(($ac_try" in
17845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17846 *) ac_try_echo=$ac_try;;
17847esac
17848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17849 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017850 ac_status=$?
17851 grep -v '^ *+' conftest.er1 >conftest.err
17852 rm -f conftest.er1
17853 cat conftest.err >&5
17854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017855 (exit $ac_status); } && {
17856 test -z "$ac_c_werror_flag" ||
17857 test ! -s conftest.err
17858 } && test -s conftest$ac_exeext &&
17859 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017860 ac_cv_lib_bsd_openpty=yes
17861else
17862 echo "$as_me: failed program was:" >&5
17863sed 's/^/| /' conftest.$ac_ext >&5
17864
Martin v. Löwiseba40652007-08-30 20:10:57 +000017865 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017867
17868rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017869 conftest$ac_exeext conftest.$ac_ext
17870LIBS=$ac_check_lib_save_LIBS
17871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017872{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17873echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017874if test $ac_cv_lib_bsd_openpty = yes; then
17875 cat >>confdefs.h <<\_ACEOF
17876#define HAVE_OPENPTY 1
17877_ACEOF
17878 LIBS="$LIBS -lbsd"
17879fi
17880
17881
17882fi
17883
Fred Drake8cef4cf2000-06-28 16:40:38 +000017884
17885fi
17886done
17887
Martin v. Löwis11437992002-04-12 09:54:03 +000017888
Fred Drake8cef4cf2000-06-28 16:40:38 +000017889for ac_func in forkpty
17890do
Martin v. Löwis11437992002-04-12 09:54:03 +000017891as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017892{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17893echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17894if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017895 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017896else
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017898/* confdefs.h. */
17899_ACEOF
17900cat confdefs.h >>conftest.$ac_ext
17901cat >>conftest.$ac_ext <<_ACEOF
17902/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017903/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17904 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17905#define $ac_func innocuous_$ac_func
17906
Fred Drake8cef4cf2000-06-28 16:40:38 +000017907/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017908 which can conflict with char $ac_func (); below.
17909 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017910 <limits.h> exists even on freestanding compilers. */
17911
17912#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017913# include <limits.h>
17914#else
17915# include <assert.h>
17916#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017917
17918#undef $ac_func
17919
Martin v. Löwiseba40652007-08-30 20:10:57 +000017920/* Override any GCC internal prototype to avoid an error.
17921 Use char because int might match the return type of a GCC
17922 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017923#ifdef __cplusplus
17924extern "C"
17925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017926char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017927/* The GNU C library defines this for functions which it implements
17928 to always fail with ENOSYS. Some functions are actually named
17929 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017930#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017931choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017932#endif
17933
Skip Montanaro6dead952003-09-25 14:50:04 +000017934int
17935main ()
17936{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017937return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017938 ;
17939 return 0;
17940}
17941_ACEOF
17942rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017943if { (ac_try="$ac_link"
17944case "(($ac_try" in
17945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17946 *) ac_try_echo=$ac_try;;
17947esac
17948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17949 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017951 grep -v '^ *+' conftest.er1 >conftest.err
17952 rm -f conftest.er1
17953 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017955 (exit $ac_status); } && {
17956 test -z "$ac_c_werror_flag" ||
17957 test ! -s conftest.err
17958 } && test -s conftest$ac_exeext &&
17959 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017960 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017961else
Martin v. Löwis11437992002-04-12 09:54:03 +000017962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017963sed 's/^/| /' conftest.$ac_ext >&5
17964
Martin v. Löwiseba40652007-08-30 20:10:57 +000017965 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017967
17968rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017969 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017971ac_res=`eval echo '${'$as_ac_var'}'`
17972 { echo "$as_me:$LINENO: result: $ac_res" >&5
17973echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017974if test `eval echo '${'$as_ac_var'}'` = yes; then
17975 cat >>confdefs.h <<_ACEOF
17976#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17977_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017978
Fred Drake8cef4cf2000-06-28 16:40:38 +000017979else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017980 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17981echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017982if test "${ac_cv_lib_util_forkpty+set}" = set; then
17983 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017984else
Martin v. Löwis11437992002-04-12 09:54:03 +000017985 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017986LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017988/* confdefs.h. */
17989_ACEOF
17990cat confdefs.h >>conftest.$ac_ext
17991cat >>conftest.$ac_ext <<_ACEOF
17992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017993
Martin v. Löwiseba40652007-08-30 20:10:57 +000017994/* Override any GCC internal prototype to avoid an error.
17995 Use char because int might match the return type of a GCC
17996 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017997#ifdef __cplusplus
17998extern "C"
17999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018000char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018001int
18002main ()
18003{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018004return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018005 ;
18006 return 0;
18007}
18008_ACEOF
18009rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018010if { (ac_try="$ac_link"
18011case "(($ac_try" in
18012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18013 *) ac_try_echo=$ac_try;;
18014esac
18015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18016 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018018 grep -v '^ *+' conftest.er1 >conftest.err
18019 rm -f conftest.er1
18020 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018022 (exit $ac_status); } && {
18023 test -z "$ac_c_werror_flag" ||
18024 test ! -s conftest.err
18025 } && test -s conftest$ac_exeext &&
18026 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018027 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018028else
Martin v. Löwis11437992002-04-12 09:54:03 +000018029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018030sed 's/^/| /' conftest.$ac_ext >&5
18031
Martin v. Löwiseba40652007-08-30 20:10:57 +000018032 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018034
18035rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018036 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018037LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018039{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18040echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018041if test $ac_cv_lib_util_forkpty = yes; then
18042 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018043#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018044_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018045 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018046else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018047 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18048echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018049if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
18050 echo $ECHO_N "(cached) $ECHO_C" >&6
18051else
18052 ac_check_lib_save_LIBS=$LIBS
18053LIBS="-lbsd $LIBS"
18054cat >conftest.$ac_ext <<_ACEOF
18055/* confdefs.h. */
18056_ACEOF
18057cat confdefs.h >>conftest.$ac_ext
18058cat >>conftest.$ac_ext <<_ACEOF
18059/* end confdefs.h. */
18060
Martin v. Löwiseba40652007-08-30 20:10:57 +000018061/* Override any GCC internal prototype to avoid an error.
18062 Use char because int might match the return type of a GCC
18063 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018064#ifdef __cplusplus
18065extern "C"
18066#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018067char forkpty ();
18068int
18069main ()
18070{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018071return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018072 ;
18073 return 0;
18074}
18075_ACEOF
18076rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018077if { (ac_try="$ac_link"
18078case "(($ac_try" in
18079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18080 *) ac_try_echo=$ac_try;;
18081esac
18082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18083 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018084 ac_status=$?
18085 grep -v '^ *+' conftest.er1 >conftest.err
18086 rm -f conftest.er1
18087 cat conftest.err >&5
18088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018089 (exit $ac_status); } && {
18090 test -z "$ac_c_werror_flag" ||
18091 test ! -s conftest.err
18092 } && test -s conftest$ac_exeext &&
18093 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018094 ac_cv_lib_bsd_forkpty=yes
18095else
18096 echo "$as_me: failed program was:" >&5
18097sed 's/^/| /' conftest.$ac_ext >&5
18098
Martin v. Löwiseba40652007-08-30 20:10:57 +000018099 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018101
18102rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018103 conftest$ac_exeext conftest.$ac_ext
18104LIBS=$ac_check_lib_save_LIBS
18105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018106{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18107echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018108if test $ac_cv_lib_bsd_forkpty = yes; then
18109 cat >>confdefs.h <<\_ACEOF
18110#define HAVE_FORKPTY 1
18111_ACEOF
18112 LIBS="$LIBS -lbsd"
18113fi
18114
18115
18116fi
18117
Fred Drake8cef4cf2000-06-28 16:40:38 +000018118
18119fi
18120done
18121
Jack Jansendd19cf82001-12-06 22:36:17 +000018122
Brett Cannonaa5778d2008-03-18 04:09:00 +000018123# Stuff for expat.
18124
18125for ac_func in memmove
18126do
18127as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18128{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18129echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18130if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18131 echo $ECHO_N "(cached) $ECHO_C" >&6
18132else
18133 cat >conftest.$ac_ext <<_ACEOF
18134/* confdefs.h. */
18135_ACEOF
18136cat confdefs.h >>conftest.$ac_ext
18137cat >>conftest.$ac_ext <<_ACEOF
18138/* end confdefs.h. */
18139/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18140 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18141#define $ac_func innocuous_$ac_func
18142
18143/* System header to define __stub macros and hopefully few prototypes,
18144 which can conflict with char $ac_func (); below.
18145 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18146 <limits.h> exists even on freestanding compilers. */
18147
18148#ifdef __STDC__
18149# include <limits.h>
18150#else
18151# include <assert.h>
18152#endif
18153
18154#undef $ac_func
18155
18156/* Override any GCC internal prototype to avoid an error.
18157 Use char because int might match the return type of a GCC
18158 builtin and then its argument prototype would still apply. */
18159#ifdef __cplusplus
18160extern "C"
18161#endif
18162char $ac_func ();
18163/* The GNU C library defines this for functions which it implements
18164 to always fail with ENOSYS. Some functions are actually named
18165 something starting with __ and the normal name is an alias. */
18166#if defined __stub_$ac_func || defined __stub___$ac_func
18167choke me
18168#endif
18169
18170int
18171main ()
18172{
18173return $ac_func ();
18174 ;
18175 return 0;
18176}
18177_ACEOF
18178rm -f conftest.$ac_objext conftest$ac_exeext
18179if { (ac_try="$ac_link"
18180case "(($ac_try" in
18181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18182 *) ac_try_echo=$ac_try;;
18183esac
18184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18185 (eval "$ac_link") 2>conftest.er1
18186 ac_status=$?
18187 grep -v '^ *+' conftest.er1 >conftest.err
18188 rm -f conftest.er1
18189 cat conftest.err >&5
18190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18191 (exit $ac_status); } && {
18192 test -z "$ac_c_werror_flag" ||
18193 test ! -s conftest.err
18194 } && test -s conftest$ac_exeext &&
18195 $as_test_x conftest$ac_exeext; then
18196 eval "$as_ac_var=yes"
18197else
18198 echo "$as_me: failed program was:" >&5
18199sed 's/^/| /' conftest.$ac_ext >&5
18200
18201 eval "$as_ac_var=no"
18202fi
18203
18204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18205 conftest$ac_exeext conftest.$ac_ext
18206fi
18207ac_res=`eval echo '${'$as_ac_var'}'`
18208 { echo "$as_me:$LINENO: result: $ac_res" >&5
18209echo "${ECHO_T}$ac_res" >&6; }
18210if test `eval echo '${'$as_ac_var'}'` = yes; then
18211 cat >>confdefs.h <<_ACEOF
18212#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18213_ACEOF
18214
18215fi
18216done
18217
18218
Michael W. Hudson54241132001-12-07 15:38:26 +000018219# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018220
18221
18222
18223
18224
18225
Fred Drake8cef4cf2000-06-28 16:40:38 +000018226for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18227do
Martin v. Löwis11437992002-04-12 09:54:03 +000018228as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018229{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18230echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18231if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018232 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018233else
Martin v. Löwis11437992002-04-12 09:54:03 +000018234 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018235/* confdefs.h. */
18236_ACEOF
18237cat confdefs.h >>conftest.$ac_ext
18238cat >>conftest.$ac_ext <<_ACEOF
18239/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018240/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18241 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18242#define $ac_func innocuous_$ac_func
18243
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018244/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018245 which can conflict with char $ac_func (); below.
18246 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018247 <limits.h> exists even on freestanding compilers. */
18248
18249#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018250# include <limits.h>
18251#else
18252# include <assert.h>
18253#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018254
18255#undef $ac_func
18256
Martin v. Löwiseba40652007-08-30 20:10:57 +000018257/* Override any GCC internal prototype to avoid an error.
18258 Use char because int might match the return type of a GCC
18259 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018260#ifdef __cplusplus
18261extern "C"
18262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018263char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018264/* The GNU C library defines this for functions which it implements
18265 to always fail with ENOSYS. Some functions are actually named
18266 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018267#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018268choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018269#endif
18270
Skip Montanaro6dead952003-09-25 14:50:04 +000018271int
18272main ()
18273{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018274return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018275 ;
18276 return 0;
18277}
18278_ACEOF
18279rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018280if { (ac_try="$ac_link"
18281case "(($ac_try" in
18282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18283 *) ac_try_echo=$ac_try;;
18284esac
18285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18286 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018288 grep -v '^ *+' conftest.er1 >conftest.err
18289 rm -f conftest.er1
18290 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018292 (exit $ac_status); } && {
18293 test -z "$ac_c_werror_flag" ||
18294 test ! -s conftest.err
18295 } && test -s conftest$ac_exeext &&
18296 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018297 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018298else
Martin v. Löwis11437992002-04-12 09:54:03 +000018299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018300sed 's/^/| /' conftest.$ac_ext >&5
18301
Martin v. Löwiseba40652007-08-30 20:10:57 +000018302 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018304
18305rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018306 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018308ac_res=`eval echo '${'$as_ac_var'}'`
18309 { echo "$as_me:$LINENO: result: $ac_res" >&5
18310echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018311if test `eval echo '${'$as_ac_var'}'` = yes; then
18312 cat >>confdefs.h <<_ACEOF
18313#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18314_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018315
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018316fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018317done
18318
Michael W. Hudson54241132001-12-07 15:38:26 +000018319
Martin v. Löwis11437992002-04-12 09:54:03 +000018320
18321
18322
Brett Cannonaa5778d2008-03-18 04:09:00 +000018323for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018324do
Martin v. Löwis11437992002-04-12 09:54:03 +000018325as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018326{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18327echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18328if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018329 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018330else
Martin v. Löwis11437992002-04-12 09:54:03 +000018331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018332/* confdefs.h. */
18333_ACEOF
18334cat confdefs.h >>conftest.$ac_ext
18335cat >>conftest.$ac_ext <<_ACEOF
18336/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018337/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18338 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18339#define $ac_func innocuous_$ac_func
18340
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018341/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018342 which can conflict with char $ac_func (); below.
18343 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018344 <limits.h> exists even on freestanding compilers. */
18345
18346#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018347# include <limits.h>
18348#else
18349# include <assert.h>
18350#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018351
18352#undef $ac_func
18353
Martin v. Löwiseba40652007-08-30 20:10:57 +000018354/* Override any GCC internal prototype to avoid an error.
18355 Use char because int might match the return type of a GCC
18356 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018357#ifdef __cplusplus
18358extern "C"
18359#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018360char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018361/* The GNU C library defines this for functions which it implements
18362 to always fail with ENOSYS. Some functions are actually named
18363 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018364#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018365choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018366#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018367
Skip Montanaro6dead952003-09-25 14:50:04 +000018368int
18369main ()
18370{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018371return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018372 ;
18373 return 0;
18374}
18375_ACEOF
18376rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018377if { (ac_try="$ac_link"
18378case "(($ac_try" in
18379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18380 *) ac_try_echo=$ac_try;;
18381esac
18382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18383 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018385 grep -v '^ *+' conftest.er1 >conftest.err
18386 rm -f conftest.er1
18387 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018389 (exit $ac_status); } && {
18390 test -z "$ac_c_werror_flag" ||
18391 test ! -s conftest.err
18392 } && test -s conftest$ac_exeext &&
18393 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018394 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018395else
Martin v. Löwis11437992002-04-12 09:54:03 +000018396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018397sed 's/^/| /' conftest.$ac_ext >&5
18398
Martin v. Löwiseba40652007-08-30 20:10:57 +000018399 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018401
18402rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018403 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018405ac_res=`eval echo '${'$as_ac_var'}'`
18406 { echo "$as_me:$LINENO: result: $ac_res" >&5
18407echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018408if test `eval echo '${'$as_ac_var'}'` = yes; then
18409 cat >>confdefs.h <<_ACEOF
18410#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18411_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018412
Martin v. Löwis1142de32002-03-29 16:28:31 +000018413else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018414 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018415 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018416 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18417 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018418esac
18419
Martin v. Löwis1142de32002-03-29 16:28:31 +000018420fi
18421done
18422
18423
Martin v. Löwis11437992002-04-12 09:54:03 +000018424
Martin v. Löwis1142de32002-03-29 16:28:31 +000018425for ac_func in getpgrp
18426do
Martin v. Löwis11437992002-04-12 09:54:03 +000018427as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018428{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18429echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18430if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018431 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018432else
Martin v. Löwis11437992002-04-12 09:54:03 +000018433 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018434/* confdefs.h. */
18435_ACEOF
18436cat confdefs.h >>conftest.$ac_ext
18437cat >>conftest.$ac_ext <<_ACEOF
18438/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018439/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18440 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18441#define $ac_func innocuous_$ac_func
18442
Martin v. Löwis1142de32002-03-29 16:28:31 +000018443/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018444 which can conflict with char $ac_func (); below.
18445 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018446 <limits.h> exists even on freestanding compilers. */
18447
18448#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018449# include <limits.h>
18450#else
18451# include <assert.h>
18452#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018453
18454#undef $ac_func
18455
Martin v. Löwiseba40652007-08-30 20:10:57 +000018456/* Override any GCC internal prototype to avoid an error.
18457 Use char because int might match the return type of a GCC
18458 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018459#ifdef __cplusplus
18460extern "C"
18461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018462char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018463/* The GNU C library defines this for functions which it implements
18464 to always fail with ENOSYS. Some functions are actually named
18465 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018466#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018467choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018468#endif
18469
Skip Montanaro6dead952003-09-25 14:50:04 +000018470int
18471main ()
18472{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018473return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018474 ;
18475 return 0;
18476}
18477_ACEOF
18478rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018479if { (ac_try="$ac_link"
18480case "(($ac_try" in
18481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18482 *) ac_try_echo=$ac_try;;
18483esac
18484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18485 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018487 grep -v '^ *+' conftest.er1 >conftest.err
18488 rm -f conftest.er1
18489 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018491 (exit $ac_status); } && {
18492 test -z "$ac_c_werror_flag" ||
18493 test ! -s conftest.err
18494 } && test -s conftest$ac_exeext &&
18495 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018496 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018497else
Martin v. Löwis11437992002-04-12 09:54:03 +000018498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018499sed 's/^/| /' conftest.$ac_ext >&5
18500
Martin v. Löwiseba40652007-08-30 20:10:57 +000018501 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018503
18504rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018505 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018507ac_res=`eval echo '${'$as_ac_var'}'`
18508 { echo "$as_me:$LINENO: result: $ac_res" >&5
18509echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018510if test `eval echo '${'$as_ac_var'}'` = yes; then
18511 cat >>confdefs.h <<_ACEOF
18512#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18513_ACEOF
18514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018515/* confdefs.h. */
18516_ACEOF
18517cat confdefs.h >>conftest.$ac_ext
18518cat >>conftest.$ac_ext <<_ACEOF
18519/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018520#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018521int
18522main ()
18523{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018524getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018525 ;
18526 return 0;
18527}
18528_ACEOF
18529rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018530if { (ac_try="$ac_compile"
18531case "(($ac_try" in
18532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18533 *) ac_try_echo=$ac_try;;
18534esac
18535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18536 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018538 grep -v '^ *+' conftest.er1 >conftest.err
18539 rm -f conftest.er1
18540 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018542 (exit $ac_status); } && {
18543 test -z "$ac_c_werror_flag" ||
18544 test ! -s conftest.err
18545 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018546
18547cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018548#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018549_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018550
Martin v. Löwis11437992002-04-12 09:54:03 +000018551
Guido van Rossumf78abae1997-01-21 22:02:36 +000018552else
Martin v. Löwis11437992002-04-12 09:54:03 +000018553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018554sed 's/^/| /' conftest.$ac_ext >&5
18555
Martin v. Löwiseba40652007-08-30 20:10:57 +000018556
Guido van Rossum627b2d71993-12-24 10:39:16 +000018557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018558
18559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018560
Guido van Rossum627b2d71993-12-24 10:39:16 +000018561fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018562done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018563
Jack Jansen150753c2003-03-29 22:07:47 +000018564
18565for ac_func in setpgrp
18566do
18567as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018568{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18569echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18570if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018571 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018572else
Martin v. Löwis11437992002-04-12 09:54:03 +000018573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018574/* confdefs.h. */
18575_ACEOF
18576cat confdefs.h >>conftest.$ac_ext
18577cat >>conftest.$ac_ext <<_ACEOF
18578/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018579/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18580 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18581#define $ac_func innocuous_$ac_func
18582
Jack Jansen150753c2003-03-29 22:07:47 +000018583/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018584 which can conflict with char $ac_func (); below.
18585 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018586 <limits.h> exists even on freestanding compilers. */
18587
18588#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018589# include <limits.h>
18590#else
18591# include <assert.h>
18592#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018593
18594#undef $ac_func
18595
Martin v. Löwiseba40652007-08-30 20:10:57 +000018596/* Override any GCC internal prototype to avoid an error.
18597 Use char because int might match the return type of a GCC
18598 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018599#ifdef __cplusplus
18600extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018601#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018602char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018603/* The GNU C library defines this for functions which it implements
18604 to always fail with ENOSYS. Some functions are actually named
18605 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018606#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018607choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018608#endif
18609
Skip Montanaro6dead952003-09-25 14:50:04 +000018610int
18611main ()
18612{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018613return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018614 ;
18615 return 0;
18616}
18617_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018618rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018619if { (ac_try="$ac_link"
18620case "(($ac_try" in
18621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18622 *) ac_try_echo=$ac_try;;
18623esac
18624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18625 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018627 grep -v '^ *+' conftest.er1 >conftest.err
18628 rm -f conftest.er1
18629 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018631 (exit $ac_status); } && {
18632 test -z "$ac_c_werror_flag" ||
18633 test ! -s conftest.err
18634 } && test -s conftest$ac_exeext &&
18635 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018636 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018637else
Jack Jansen150753c2003-03-29 22:07:47 +000018638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018639sed 's/^/| /' conftest.$ac_ext >&5
18640
Martin v. Löwiseba40652007-08-30 20:10:57 +000018641 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018643
18644rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018645 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018647ac_res=`eval echo '${'$as_ac_var'}'`
18648 { echo "$as_me:$LINENO: result: $ac_res" >&5
18649echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018650if test `eval echo '${'$as_ac_var'}'` = yes; then
18651 cat >>confdefs.h <<_ACEOF
18652#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18653_ACEOF
18654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018655/* confdefs.h. */
18656_ACEOF
18657cat confdefs.h >>conftest.$ac_ext
18658cat >>conftest.$ac_ext <<_ACEOF
18659/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018660#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018661int
18662main ()
18663{
18664setpgrp(0,0);
18665 ;
18666 return 0;
18667}
18668_ACEOF
18669rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018670if { (ac_try="$ac_compile"
18671case "(($ac_try" in
18672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18673 *) ac_try_echo=$ac_try;;
18674esac
18675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18676 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018678 grep -v '^ *+' conftest.er1 >conftest.err
18679 rm -f conftest.er1
18680 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018682 (exit $ac_status); } && {
18683 test -z "$ac_c_werror_flag" ||
18684 test ! -s conftest.err
18685 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018686
18687cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018688#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018689_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018690
Jack Jansen150753c2003-03-29 22:07:47 +000018691
18692else
18693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018694sed 's/^/| /' conftest.$ac_ext >&5
18695
Martin v. Löwiseba40652007-08-30 20:10:57 +000018696
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018698
18699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018700
18701fi
18702done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018703
Martin v. Löwis11437992002-04-12 09:54:03 +000018704
Thomas Wouters3a584202000-08-05 23:28:51 +000018705for ac_func in gettimeofday
18706do
Martin v. Löwis11437992002-04-12 09:54:03 +000018707as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018708{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18709echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18710if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018711 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018712else
Martin v. Löwis11437992002-04-12 09:54:03 +000018713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018714/* confdefs.h. */
18715_ACEOF
18716cat confdefs.h >>conftest.$ac_ext
18717cat >>conftest.$ac_ext <<_ACEOF
18718/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018719/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18720 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18721#define $ac_func innocuous_$ac_func
18722
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018723/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018724 which can conflict with char $ac_func (); below.
18725 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018726 <limits.h> exists even on freestanding compilers. */
18727
18728#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018729# include <limits.h>
18730#else
18731# include <assert.h>
18732#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018733
18734#undef $ac_func
18735
Martin v. Löwiseba40652007-08-30 20:10:57 +000018736/* Override any GCC internal prototype to avoid an error.
18737 Use char because int might match the return type of a GCC
18738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018739#ifdef __cplusplus
18740extern "C"
18741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018742char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018743/* The GNU C library defines this for functions which it implements
18744 to always fail with ENOSYS. Some functions are actually named
18745 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018746#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018747choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018748#endif
18749
Skip Montanaro6dead952003-09-25 14:50:04 +000018750int
18751main ()
18752{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018753return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018754 ;
18755 return 0;
18756}
18757_ACEOF
18758rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018759if { (ac_try="$ac_link"
18760case "(($ac_try" in
18761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18762 *) ac_try_echo=$ac_try;;
18763esac
18764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18765 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018767 grep -v '^ *+' conftest.er1 >conftest.err
18768 rm -f conftest.er1
18769 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018771 (exit $ac_status); } && {
18772 test -z "$ac_c_werror_flag" ||
18773 test ! -s conftest.err
18774 } && test -s conftest$ac_exeext &&
18775 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018776 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018777else
Martin v. Löwis11437992002-04-12 09:54:03 +000018778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018779sed 's/^/| /' conftest.$ac_ext >&5
18780
Martin v. Löwiseba40652007-08-30 20:10:57 +000018781 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018783
18784rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018785 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018787ac_res=`eval echo '${'$as_ac_var'}'`
18788 { echo "$as_me:$LINENO: result: $ac_res" >&5
18789echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018790if test `eval echo '${'$as_ac_var'}'` = yes; then
18791 cat >>confdefs.h <<_ACEOF
18792#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18793_ACEOF
18794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018795/* confdefs.h. */
18796_ACEOF
18797cat confdefs.h >>conftest.$ac_ext
18798cat >>conftest.$ac_ext <<_ACEOF
18799/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018800#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018801int
18802main ()
18803{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018804gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018805 ;
18806 return 0;
18807}
18808_ACEOF
18809rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018810if { (ac_try="$ac_compile"
18811case "(($ac_try" in
18812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18813 *) ac_try_echo=$ac_try;;
18814esac
18815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018818 grep -v '^ *+' conftest.er1 >conftest.err
18819 rm -f conftest.er1
18820 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018822 (exit $ac_status); } && {
18823 test -z "$ac_c_werror_flag" ||
18824 test ! -s conftest.err
18825 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018826 :
18827else
Martin v. Löwis11437992002-04-12 09:54:03 +000018828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018829sed 's/^/| /' conftest.$ac_ext >&5
18830
Martin v. Löwis11437992002-04-12 09:54:03 +000018831
18832cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018833#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018834_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018835
Martin v. Löwis11437992002-04-12 09:54:03 +000018836
Guido van Rossum627b2d71993-12-24 10:39:16 +000018837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018838
18839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018840
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018841fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018842done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018843
Michael W. Hudson54241132001-12-07 15:38:26 +000018844
Martin v. Löwiseba40652007-08-30 20:10:57 +000018845{ echo "$as_me:$LINENO: checking for major" >&5
18846echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +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. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018853
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018854#if defined(MAJOR_IN_MKDEV)
18855#include <sys/mkdev.h>
18856#elif defined(MAJOR_IN_SYSMACROS)
18857#include <sys/sysmacros.h>
18858#else
18859#include <sys/types.h>
18860#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018861
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018862int
18863main ()
18864{
18865
18866 makedev(major(0),minor(0));
18867
18868 ;
18869 return 0;
18870}
18871_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018872rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018873if { (ac_try="$ac_link"
18874case "(($ac_try" in
18875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18876 *) ac_try_echo=$ac_try;;
18877esac
18878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18879 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018881 grep -v '^ *+' conftest.er1 >conftest.err
18882 rm -f conftest.er1
18883 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018885 (exit $ac_status); } && {
18886 test -z "$ac_c_werror_flag" ||
18887 test ! -s conftest.err
18888 } && test -s conftest$ac_exeext &&
18889 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018890
18891
18892cat >>confdefs.h <<\_ACEOF
18893#define HAVE_DEVICE_MACROS 1
18894_ACEOF
18895
Martin v. Löwiseba40652007-08-30 20:10:57 +000018896 { echo "$as_me:$LINENO: result: yes" >&5
18897echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018898
18899else
18900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018901sed 's/^/| /' conftest.$ac_ext >&5
18902
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018903
Martin v. Löwiseba40652007-08-30 20:10:57 +000018904 { echo "$as_me:$LINENO: result: no" >&5
18905echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018906
18907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018908
18909rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018910 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018911
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018912# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018913# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018914{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18915echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018916cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018917/* confdefs.h. */
18918_ACEOF
18919cat confdefs.h >>conftest.$ac_ext
18920cat >>conftest.$ac_ext <<_ACEOF
18921/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018922
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018923#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018924#include <sys/socket.h>
18925#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018926#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018927
Martin v. Löwis11437992002-04-12 09:54:03 +000018928int
18929main ()
18930{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018931
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018932getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018933
Martin v. Löwis11437992002-04-12 09:54:03 +000018934 ;
18935 return 0;
18936}
18937_ACEOF
18938rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018939if { (ac_try="$ac_link"
18940case "(($ac_try" in
18941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18942 *) ac_try_echo=$ac_try;;
18943esac
18944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18945 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018947 grep -v '^ *+' conftest.er1 >conftest.err
18948 rm -f conftest.er1
18949 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018951 (exit $ac_status); } && {
18952 test -z "$ac_c_werror_flag" ||
18953 test ! -s conftest.err
18954 } && test -s conftest$ac_exeext &&
18955 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018956
Martin v. Löwiseba40652007-08-30 20:10:57 +000018957{ echo "$as_me:$LINENO: result: yes" >&5
18958echo "${ECHO_T}yes" >&6; }
18959{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18960echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018961if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018962 { echo "$as_me:$LINENO: result: buggy" >&5
18963echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018964buggygetaddrinfo=yes
18965else
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 <netdb.h>
18975#include <string.h>
18976#include <sys/socket.h>
18977#include <netinet/in.h>
18978
18979main()
18980{
18981 int passive, gaierr, inet4 = 0, inet6 = 0;
18982 struct addrinfo hints, *ai, *aitop;
18983 char straddr[INET6_ADDRSTRLEN], strport[16];
18984
18985 for (passive = 0; passive <= 1; passive++) {
18986 memset(&hints, 0, sizeof(hints));
18987 hints.ai_family = AF_UNSPEC;
18988 hints.ai_flags = passive ? AI_PASSIVE : 0;
18989 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018990 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018991 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18992 (void)gai_strerror(gaierr);
18993 goto bad;
18994 }
18995 for (ai = aitop; ai; ai = ai->ai_next) {
18996 if (ai->ai_addr == NULL ||
18997 ai->ai_addrlen == 0 ||
18998 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18999 straddr, sizeof(straddr), strport, sizeof(strport),
19000 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19001 goto bad;
19002 }
19003 switch (ai->ai_family) {
19004 case AF_INET:
19005 if (strcmp(strport, "54321") != 0) {
19006 goto bad;
19007 }
19008 if (passive) {
19009 if (strcmp(straddr, "0.0.0.0") != 0) {
19010 goto bad;
19011 }
19012 } else {
19013 if (strcmp(straddr, "127.0.0.1") != 0) {
19014 goto bad;
19015 }
19016 }
19017 inet4++;
19018 break;
19019 case AF_INET6:
19020 if (strcmp(strport, "54321") != 0) {
19021 goto bad;
19022 }
19023 if (passive) {
19024 if (strcmp(straddr, "::") != 0) {
19025 goto bad;
19026 }
19027 } else {
19028 if (strcmp(straddr, "::1") != 0) {
19029 goto bad;
19030 }
19031 }
19032 inet6++;
19033 break;
19034 case AF_UNSPEC:
19035 goto bad;
19036 break;
19037 default:
19038 /* another family support? */
19039 break;
19040 }
19041 }
19042 }
19043
19044 if (!(inet4 == 0 || inet4 == 2))
19045 goto bad;
19046 if (!(inet6 == 0 || inet6 == 2))
19047 goto bad;
19048
19049 if (aitop)
19050 freeaddrinfo(aitop);
19051 exit(0);
19052
19053 bad:
19054 if (aitop)
19055 freeaddrinfo(aitop);
19056 exit(1);
19057}
19058
Martin v. Löwis11437992002-04-12 09:54:03 +000019059_ACEOF
19060rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019061if { (ac_try="$ac_link"
19062case "(($ac_try" in
19063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19064 *) ac_try_echo=$ac_try;;
19065esac
19066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19067 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019068 ac_status=$?
19069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19070 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000019071 { (case "(($ac_try" in
19072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19073 *) ac_try_echo=$ac_try;;
19074esac
19075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19076 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019077 ac_status=$?
19078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19079 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019080 { echo "$as_me:$LINENO: result: good" >&5
19081echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019082buggygetaddrinfo=no
19083else
Martin v. Löwis11437992002-04-12 09:54:03 +000019084 echo "$as_me: program exited with status $ac_status" >&5
19085echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019086sed 's/^/| /' conftest.$ac_ext >&5
19087
Martin v. Löwis11437992002-04-12 09:54:03 +000019088( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000019089{ echo "$as_me:$LINENO: result: buggy" >&5
19090echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019091buggygetaddrinfo=yes
19092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019093rm -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 +000019094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019095
19096
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019097else
Martin v. Löwis11437992002-04-12 09:54:03 +000019098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019099sed 's/^/| /' conftest.$ac_ext >&5
19100
Martin v. Löwis11437992002-04-12 09:54:03 +000019101
Martin v. Löwiseba40652007-08-30 20:10:57 +000019102{ echo "$as_me:$LINENO: result: no" >&5
19103echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019104buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019105
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019107
19108rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019109 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019110
19111if test "$buggygetaddrinfo" = "yes"; then
19112 if test "$ipv6" = "yes"; then
19113 echo 'Fatal: You must get working getaddrinfo() function.'
19114 echo ' or you can specify "--disable-ipv6"'.
19115 exit 1
19116 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019117else
Martin v. Löwis11437992002-04-12 09:54:03 +000019118
19119cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019120#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019121_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019122
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019123fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019124
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019125for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019126do
Martin v. Löwis11437992002-04-12 09:54:03 +000019127as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000019128{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19129echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19130if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019131 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019132else
Martin v. Löwis11437992002-04-12 09:54:03 +000019133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019134/* confdefs.h. */
19135_ACEOF
19136cat confdefs.h >>conftest.$ac_ext
19137cat >>conftest.$ac_ext <<_ACEOF
19138/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019139/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19140 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19141#define $ac_func innocuous_$ac_func
19142
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019143/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019144 which can conflict with char $ac_func (); below.
19145 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019146 <limits.h> exists even on freestanding compilers. */
19147
19148#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019149# include <limits.h>
19150#else
19151# include <assert.h>
19152#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019153
19154#undef $ac_func
19155
Martin v. Löwiseba40652007-08-30 20:10:57 +000019156/* Override any GCC internal prototype to avoid an error.
19157 Use char because int might match the return type of a GCC
19158 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019159#ifdef __cplusplus
19160extern "C"
19161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019162char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019163/* The GNU C library defines this for functions which it implements
19164 to always fail with ENOSYS. Some functions are actually named
19165 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019166#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019167choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019168#endif
19169
Skip Montanaro6dead952003-09-25 14:50:04 +000019170int
19171main ()
19172{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019173return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019174 ;
19175 return 0;
19176}
19177_ACEOF
19178rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019179if { (ac_try="$ac_link"
19180case "(($ac_try" in
19181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19182 *) ac_try_echo=$ac_try;;
19183esac
19184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19185 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019187 grep -v '^ *+' conftest.er1 >conftest.err
19188 rm -f conftest.er1
19189 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019191 (exit $ac_status); } && {
19192 test -z "$ac_c_werror_flag" ||
19193 test ! -s conftest.err
19194 } && test -s conftest$ac_exeext &&
19195 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019196 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019197else
Martin v. Löwis11437992002-04-12 09:54:03 +000019198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019199sed 's/^/| /' conftest.$ac_ext >&5
19200
Martin v. Löwiseba40652007-08-30 20:10:57 +000019201 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019203
19204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019205 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019207ac_res=`eval echo '${'$as_ac_var'}'`
19208 { echo "$as_me:$LINENO: result: $ac_res" >&5
19209echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019210if test `eval echo '${'$as_ac_var'}'` = yes; then
19211 cat >>confdefs.h <<_ACEOF
19212#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19213_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019214
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019215fi
19216done
19217
Michael W. Hudson54241132001-12-07 15:38:26 +000019218
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019219# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019220{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19221echo $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 +000019222if test "${ac_cv_header_time+set}" = set; then
19223 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019224else
Martin v. Löwis11437992002-04-12 09:54:03 +000019225 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019226/* confdefs.h. */
19227_ACEOF
19228cat confdefs.h >>conftest.$ac_ext
19229cat >>conftest.$ac_ext <<_ACEOF
19230/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019231#include <sys/types.h>
19232#include <sys/time.h>
19233#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019234
Martin v. Löwis11437992002-04-12 09:54:03 +000019235int
19236main ()
19237{
19238if ((struct tm *) 0)
19239return 0;
19240 ;
19241 return 0;
19242}
19243_ACEOF
19244rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019245if { (ac_try="$ac_compile"
19246case "(($ac_try" in
19247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19248 *) ac_try_echo=$ac_try;;
19249esac
19250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19251 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019253 grep -v '^ *+' conftest.er1 >conftest.err
19254 rm -f conftest.er1
19255 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019257 (exit $ac_status); } && {
19258 test -z "$ac_c_werror_flag" ||
19259 test ! -s conftest.err
19260 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019261 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019262else
Martin v. Löwis11437992002-04-12 09:54:03 +000019263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019264sed 's/^/| /' conftest.$ac_ext >&5
19265
Martin v. Löwiseba40652007-08-30 20:10:57 +000019266 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019268
19269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019271{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19272echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019273if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019274
19275cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019276#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019277_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019278
19279fi
19280
Martin v. Löwiseba40652007-08-30 20:10:57 +000019281{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19282echo $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 +000019283if test "${ac_cv_struct_tm+set}" = set; then
19284 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019285else
Martin v. Löwis11437992002-04-12 09:54:03 +000019286 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019287/* confdefs.h. */
19288_ACEOF
19289cat confdefs.h >>conftest.$ac_ext
19290cat >>conftest.$ac_ext <<_ACEOF
19291/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019292#include <sys/types.h>
19293#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019294
Martin v. Löwis11437992002-04-12 09:54:03 +000019295int
19296main ()
19297{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019298struct tm tm;
19299 int *p = &tm.tm_sec;
19300 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019301 ;
19302 return 0;
19303}
19304_ACEOF
19305rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019306if { (ac_try="$ac_compile"
19307case "(($ac_try" in
19308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19309 *) ac_try_echo=$ac_try;;
19310esac
19311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019314 grep -v '^ *+' conftest.er1 >conftest.err
19315 rm -f conftest.er1
19316 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019318 (exit $ac_status); } && {
19319 test -z "$ac_c_werror_flag" ||
19320 test ! -s conftest.err
19321 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019322 ac_cv_struct_tm=time.h
19323else
Martin v. Löwis11437992002-04-12 09:54:03 +000019324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019325sed 's/^/| /' conftest.$ac_ext >&5
19326
Martin v. Löwiseba40652007-08-30 20:10:57 +000019327 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019329
19330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019332{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19333echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019334if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019335
19336cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019337#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019338_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019339
19340fi
19341
Martin v. Löwiseba40652007-08-30 20:10:57 +000019342{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19343echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019344if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19345 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019346else
Martin v. Löwis11437992002-04-12 09:54:03 +000019347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019348/* confdefs.h. */
19349_ACEOF
19350cat confdefs.h >>conftest.$ac_ext
19351cat >>conftest.$ac_ext <<_ACEOF
19352/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019353#include <sys/types.h>
19354#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019355
19356
Martin v. Löwis11437992002-04-12 09:54:03 +000019357int
19358main ()
19359{
19360static struct tm ac_aggr;
19361if (ac_aggr.tm_zone)
19362return 0;
19363 ;
19364 return 0;
19365}
19366_ACEOF
19367rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019368if { (ac_try="$ac_compile"
19369case "(($ac_try" in
19370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19371 *) ac_try_echo=$ac_try;;
19372esac
19373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19374 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019376 grep -v '^ *+' conftest.er1 >conftest.err
19377 rm -f conftest.er1
19378 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019380 (exit $ac_status); } && {
19381 test -z "$ac_c_werror_flag" ||
19382 test ! -s conftest.err
19383 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019384 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019385else
Martin v. Löwis11437992002-04-12 09:54:03 +000019386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019387sed 's/^/| /' conftest.$ac_ext >&5
19388
Martin v. Löwiseba40652007-08-30 20:10:57 +000019389 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019390/* confdefs.h. */
19391_ACEOF
19392cat confdefs.h >>conftest.$ac_ext
19393cat >>conftest.$ac_ext <<_ACEOF
19394/* end confdefs.h. */
19395#include <sys/types.h>
19396#include <$ac_cv_struct_tm>
19397
19398
19399int
19400main ()
19401{
19402static struct tm ac_aggr;
19403if (sizeof ac_aggr.tm_zone)
19404return 0;
19405 ;
19406 return 0;
19407}
19408_ACEOF
19409rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019410if { (ac_try="$ac_compile"
19411case "(($ac_try" in
19412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19413 *) ac_try_echo=$ac_try;;
19414esac
19415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19416 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019418 grep -v '^ *+' conftest.er1 >conftest.err
19419 rm -f conftest.er1
19420 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019422 (exit $ac_status); } && {
19423 test -z "$ac_c_werror_flag" ||
19424 test ! -s conftest.err
19425 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019426 ac_cv_member_struct_tm_tm_zone=yes
19427else
19428 echo "$as_me: failed program was:" >&5
19429sed 's/^/| /' conftest.$ac_ext >&5
19430
Martin v. Löwiseba40652007-08-30 20:10:57 +000019431 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019433
19434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019436
19437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019439{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19440echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019441if test $ac_cv_member_struct_tm_tm_zone = yes; then
19442
19443cat >>confdefs.h <<_ACEOF
19444#define HAVE_STRUCT_TM_TM_ZONE 1
19445_ACEOF
19446
19447
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019448fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019449
Martin v. Löwis11437992002-04-12 09:54:03 +000019450if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19451
19452cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019453#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019454_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019455
19456else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019457 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19458echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19459if test "${ac_cv_have_decl_tzname+set}" = set; then
19460 echo $ECHO_N "(cached) $ECHO_C" >&6
19461else
19462 cat >conftest.$ac_ext <<_ACEOF
19463/* confdefs.h. */
19464_ACEOF
19465cat confdefs.h >>conftest.$ac_ext
19466cat >>conftest.$ac_ext <<_ACEOF
19467/* end confdefs.h. */
19468#include <time.h>
19469
19470int
19471main ()
19472{
19473#ifndef tzname
19474 (void) tzname;
19475#endif
19476
19477 ;
19478 return 0;
19479}
19480_ACEOF
19481rm -f conftest.$ac_objext
19482if { (ac_try="$ac_compile"
19483case "(($ac_try" in
19484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19485 *) ac_try_echo=$ac_try;;
19486esac
19487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19488 (eval "$ac_compile") 2>conftest.er1
19489 ac_status=$?
19490 grep -v '^ *+' conftest.er1 >conftest.err
19491 rm -f conftest.er1
19492 cat conftest.err >&5
19493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19494 (exit $ac_status); } && {
19495 test -z "$ac_c_werror_flag" ||
19496 test ! -s conftest.err
19497 } && test -s conftest.$ac_objext; then
19498 ac_cv_have_decl_tzname=yes
19499else
19500 echo "$as_me: failed program was:" >&5
19501sed 's/^/| /' conftest.$ac_ext >&5
19502
19503 ac_cv_have_decl_tzname=no
19504fi
19505
19506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19507fi
19508{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19509echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19510if test $ac_cv_have_decl_tzname = yes; then
19511
19512cat >>confdefs.h <<_ACEOF
19513#define HAVE_DECL_TZNAME 1
19514_ACEOF
19515
19516
19517else
19518 cat >>confdefs.h <<_ACEOF
19519#define HAVE_DECL_TZNAME 0
19520_ACEOF
19521
19522
19523fi
19524
19525
19526 { echo "$as_me:$LINENO: checking for tzname" >&5
19527echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019528if test "${ac_cv_var_tzname+set}" = set; then
19529 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019530else
Martin v. Löwis11437992002-04-12 09:54:03 +000019531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019532/* confdefs.h. */
19533_ACEOF
19534cat confdefs.h >>conftest.$ac_ext
19535cat >>conftest.$ac_ext <<_ACEOF
19536/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019537#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019538#if !HAVE_DECL_TZNAME
19539extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019541
Martin v. Löwis11437992002-04-12 09:54:03 +000019542int
19543main ()
19544{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019545return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019546 ;
19547 return 0;
19548}
19549_ACEOF
19550rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019551if { (ac_try="$ac_link"
19552case "(($ac_try" in
19553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19554 *) ac_try_echo=$ac_try;;
19555esac
19556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19557 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019558 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019559 grep -v '^ *+' conftest.er1 >conftest.err
19560 rm -f conftest.er1
19561 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019563 (exit $ac_status); } && {
19564 test -z "$ac_c_werror_flag" ||
19565 test ! -s conftest.err
19566 } && test -s conftest$ac_exeext &&
19567 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019568 ac_cv_var_tzname=yes
19569else
Martin v. Löwis11437992002-04-12 09:54:03 +000019570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019571sed 's/^/| /' conftest.$ac_ext >&5
19572
Martin v. Löwiseba40652007-08-30 20:10:57 +000019573 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019575
19576rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019577 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019579{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19580echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019581 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019582
19583cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019584#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019585_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019586
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019587 fi
19588fi
19589
Martin v. Löwiseba40652007-08-30 20:10:57 +000019590{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19591echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019592if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19593 echo $ECHO_N "(cached) $ECHO_C" >&6
19594else
19595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019596/* confdefs.h. */
19597_ACEOF
19598cat confdefs.h >>conftest.$ac_ext
19599cat >>conftest.$ac_ext <<_ACEOF
19600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019601$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019602int
19603main ()
19604{
19605static struct stat ac_aggr;
19606if (ac_aggr.st_rdev)
19607return 0;
19608 ;
19609 return 0;
19610}
19611_ACEOF
19612rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019613if { (ac_try="$ac_compile"
19614case "(($ac_try" in
19615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19616 *) ac_try_echo=$ac_try;;
19617esac
19618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019621 grep -v '^ *+' conftest.er1 >conftest.err
19622 rm -f conftest.er1
19623 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019625 (exit $ac_status); } && {
19626 test -z "$ac_c_werror_flag" ||
19627 test ! -s conftest.err
19628 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019629 ac_cv_member_struct_stat_st_rdev=yes
19630else
19631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019632sed 's/^/| /' conftest.$ac_ext >&5
19633
Martin v. Löwiseba40652007-08-30 20:10:57 +000019634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019635/* confdefs.h. */
19636_ACEOF
19637cat confdefs.h >>conftest.$ac_ext
19638cat >>conftest.$ac_ext <<_ACEOF
19639/* end confdefs.h. */
19640$ac_includes_default
19641int
19642main ()
19643{
19644static struct stat ac_aggr;
19645if (sizeof ac_aggr.st_rdev)
19646return 0;
19647 ;
19648 return 0;
19649}
19650_ACEOF
19651rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019652if { (ac_try="$ac_compile"
19653case "(($ac_try" in
19654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19655 *) ac_try_echo=$ac_try;;
19656esac
19657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19658 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019660 grep -v '^ *+' conftest.er1 >conftest.err
19661 rm -f conftest.er1
19662 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019664 (exit $ac_status); } && {
19665 test -z "$ac_c_werror_flag" ||
19666 test ! -s conftest.err
19667 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019668 ac_cv_member_struct_stat_st_rdev=yes
19669else
19670 echo "$as_me: failed program was:" >&5
19671sed 's/^/| /' conftest.$ac_ext >&5
19672
Martin v. Löwiseba40652007-08-30 20:10:57 +000019673 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019675
19676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019678
19679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019681{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19682echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019683if test $ac_cv_member_struct_stat_st_rdev = yes; then
19684
19685cat >>confdefs.h <<_ACEOF
19686#define HAVE_STRUCT_STAT_ST_RDEV 1
19687_ACEOF
19688
19689
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019690fi
19691
Martin v. Löwiseba40652007-08-30 20:10:57 +000019692{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19693echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019694if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19695 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019696else
Martin v. Löwis11437992002-04-12 09:54:03 +000019697 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019698/* confdefs.h. */
19699_ACEOF
19700cat confdefs.h >>conftest.$ac_ext
19701cat >>conftest.$ac_ext <<_ACEOF
19702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019703$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019704int
19705main ()
19706{
19707static struct stat ac_aggr;
19708if (ac_aggr.st_blksize)
19709return 0;
19710 ;
19711 return 0;
19712}
19713_ACEOF
19714rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019715if { (ac_try="$ac_compile"
19716case "(($ac_try" in
19717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19718 *) ac_try_echo=$ac_try;;
19719esac
19720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019723 grep -v '^ *+' conftest.er1 >conftest.err
19724 rm -f conftest.er1
19725 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019727 (exit $ac_status); } && {
19728 test -z "$ac_c_werror_flag" ||
19729 test ! -s conftest.err
19730 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019731 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019732else
Martin v. Löwis11437992002-04-12 09:54:03 +000019733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019734sed 's/^/| /' conftest.$ac_ext >&5
19735
Martin v. Löwiseba40652007-08-30 20:10:57 +000019736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019737/* confdefs.h. */
19738_ACEOF
19739cat confdefs.h >>conftest.$ac_ext
19740cat >>conftest.$ac_ext <<_ACEOF
19741/* end confdefs.h. */
19742$ac_includes_default
19743int
19744main ()
19745{
19746static struct stat ac_aggr;
19747if (sizeof ac_aggr.st_blksize)
19748return 0;
19749 ;
19750 return 0;
19751}
19752_ACEOF
19753rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019754if { (ac_try="$ac_compile"
19755case "(($ac_try" in
19756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19757 *) ac_try_echo=$ac_try;;
19758esac
19759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19760 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019762 grep -v '^ *+' conftest.er1 >conftest.err
19763 rm -f conftest.er1
19764 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019766 (exit $ac_status); } && {
19767 test -z "$ac_c_werror_flag" ||
19768 test ! -s conftest.err
19769 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019770 ac_cv_member_struct_stat_st_blksize=yes
19771else
19772 echo "$as_me: failed program was:" >&5
19773sed 's/^/| /' conftest.$ac_ext >&5
19774
Martin v. Löwiseba40652007-08-30 20:10:57 +000019775 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019777
19778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019780
19781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019783{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19784echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019785if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019786
Martin v. Löwis11437992002-04-12 09:54:03 +000019787cat >>confdefs.h <<_ACEOF
19788#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19789_ACEOF
19790
19791
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019792fi
19793
Martin v. Löwiseba40652007-08-30 20:10:57 +000019794{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19795echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019796if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19797 echo $ECHO_N "(cached) $ECHO_C" >&6
19798else
19799 cat >conftest.$ac_ext <<_ACEOF
19800/* confdefs.h. */
19801_ACEOF
19802cat confdefs.h >>conftest.$ac_ext
19803cat >>conftest.$ac_ext <<_ACEOF
19804/* end confdefs.h. */
19805$ac_includes_default
19806int
19807main ()
19808{
19809static struct stat ac_aggr;
19810if (ac_aggr.st_flags)
19811return 0;
19812 ;
19813 return 0;
19814}
19815_ACEOF
19816rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019817if { (ac_try="$ac_compile"
19818case "(($ac_try" in
19819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19820 *) ac_try_echo=$ac_try;;
19821esac
19822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19823 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019824 ac_status=$?
19825 grep -v '^ *+' conftest.er1 >conftest.err
19826 rm -f conftest.er1
19827 cat conftest.err >&5
19828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019829 (exit $ac_status); } && {
19830 test -z "$ac_c_werror_flag" ||
19831 test ! -s conftest.err
19832 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019833 ac_cv_member_struct_stat_st_flags=yes
19834else
19835 echo "$as_me: failed program was:" >&5
19836sed 's/^/| /' conftest.$ac_ext >&5
19837
Martin v. Löwiseba40652007-08-30 20:10:57 +000019838 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019839/* confdefs.h. */
19840_ACEOF
19841cat confdefs.h >>conftest.$ac_ext
19842cat >>conftest.$ac_ext <<_ACEOF
19843/* end confdefs.h. */
19844$ac_includes_default
19845int
19846main ()
19847{
19848static struct stat ac_aggr;
19849if (sizeof ac_aggr.st_flags)
19850return 0;
19851 ;
19852 return 0;
19853}
19854_ACEOF
19855rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019856if { (ac_try="$ac_compile"
19857case "(($ac_try" in
19858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19859 *) ac_try_echo=$ac_try;;
19860esac
19861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19862 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019863 ac_status=$?
19864 grep -v '^ *+' conftest.er1 >conftest.err
19865 rm -f conftest.er1
19866 cat conftest.err >&5
19867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019868 (exit $ac_status); } && {
19869 test -z "$ac_c_werror_flag" ||
19870 test ! -s conftest.err
19871 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019872 ac_cv_member_struct_stat_st_flags=yes
19873else
19874 echo "$as_me: failed program was:" >&5
19875sed 's/^/| /' conftest.$ac_ext >&5
19876
Martin v. Löwiseba40652007-08-30 20:10:57 +000019877 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019879
19880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019882
19883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019885{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19886echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019887if test $ac_cv_member_struct_stat_st_flags = yes; then
19888
19889cat >>confdefs.h <<_ACEOF
19890#define HAVE_STRUCT_STAT_ST_FLAGS 1
19891_ACEOF
19892
19893
19894fi
19895
Martin v. Löwiseba40652007-08-30 20:10:57 +000019896{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19897echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019898if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19899 echo $ECHO_N "(cached) $ECHO_C" >&6
19900else
19901 cat >conftest.$ac_ext <<_ACEOF
19902/* confdefs.h. */
19903_ACEOF
19904cat confdefs.h >>conftest.$ac_ext
19905cat >>conftest.$ac_ext <<_ACEOF
19906/* end confdefs.h. */
19907$ac_includes_default
19908int
19909main ()
19910{
19911static struct stat ac_aggr;
19912if (ac_aggr.st_gen)
19913return 0;
19914 ;
19915 return 0;
19916}
19917_ACEOF
19918rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019919if { (ac_try="$ac_compile"
19920case "(($ac_try" in
19921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19922 *) ac_try_echo=$ac_try;;
19923esac
19924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019926 ac_status=$?
19927 grep -v '^ *+' conftest.er1 >conftest.err
19928 rm -f conftest.er1
19929 cat conftest.err >&5
19930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019931 (exit $ac_status); } && {
19932 test -z "$ac_c_werror_flag" ||
19933 test ! -s conftest.err
19934 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019935 ac_cv_member_struct_stat_st_gen=yes
19936else
19937 echo "$as_me: failed program was:" >&5
19938sed 's/^/| /' conftest.$ac_ext >&5
19939
Martin v. Löwiseba40652007-08-30 20:10:57 +000019940 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019941/* confdefs.h. */
19942_ACEOF
19943cat confdefs.h >>conftest.$ac_ext
19944cat >>conftest.$ac_ext <<_ACEOF
19945/* end confdefs.h. */
19946$ac_includes_default
19947int
19948main ()
19949{
19950static struct stat ac_aggr;
19951if (sizeof ac_aggr.st_gen)
19952return 0;
19953 ;
19954 return 0;
19955}
19956_ACEOF
19957rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019958if { (ac_try="$ac_compile"
19959case "(($ac_try" in
19960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19961 *) ac_try_echo=$ac_try;;
19962esac
19963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19964 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019965 ac_status=$?
19966 grep -v '^ *+' conftest.er1 >conftest.err
19967 rm -f conftest.er1
19968 cat conftest.err >&5
19969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019970 (exit $ac_status); } && {
19971 test -z "$ac_c_werror_flag" ||
19972 test ! -s conftest.err
19973 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019974 ac_cv_member_struct_stat_st_gen=yes
19975else
19976 echo "$as_me: failed program was:" >&5
19977sed 's/^/| /' conftest.$ac_ext >&5
19978
Martin v. Löwiseba40652007-08-30 20:10:57 +000019979 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019981
19982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019984
19985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019987{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19988echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019989if test $ac_cv_member_struct_stat_st_gen = yes; then
19990
19991cat >>confdefs.h <<_ACEOF
19992#define HAVE_STRUCT_STAT_ST_GEN 1
19993_ACEOF
19994
19995
19996fi
19997
Martin v. Löwiseba40652007-08-30 20:10:57 +000019998{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19999echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020000if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
20001 echo $ECHO_N "(cached) $ECHO_C" >&6
20002else
20003 cat >conftest.$ac_ext <<_ACEOF
20004/* confdefs.h. */
20005_ACEOF
20006cat confdefs.h >>conftest.$ac_ext
20007cat >>conftest.$ac_ext <<_ACEOF
20008/* end confdefs.h. */
20009$ac_includes_default
20010int
20011main ()
20012{
20013static struct stat ac_aggr;
20014if (ac_aggr.st_birthtime)
20015return 0;
20016 ;
20017 return 0;
20018}
20019_ACEOF
20020rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020021if { (ac_try="$ac_compile"
20022case "(($ac_try" in
20023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20024 *) ac_try_echo=$ac_try;;
20025esac
20026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20027 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020028 ac_status=$?
20029 grep -v '^ *+' conftest.er1 >conftest.err
20030 rm -f conftest.er1
20031 cat conftest.err >&5
20032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020033 (exit $ac_status); } && {
20034 test -z "$ac_c_werror_flag" ||
20035 test ! -s conftest.err
20036 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020037 ac_cv_member_struct_stat_st_birthtime=yes
20038else
20039 echo "$as_me: failed program was:" >&5
20040sed 's/^/| /' conftest.$ac_ext >&5
20041
Martin v. Löwiseba40652007-08-30 20:10:57 +000020042 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020043/* confdefs.h. */
20044_ACEOF
20045cat confdefs.h >>conftest.$ac_ext
20046cat >>conftest.$ac_ext <<_ACEOF
20047/* end confdefs.h. */
20048$ac_includes_default
20049int
20050main ()
20051{
20052static struct stat ac_aggr;
20053if (sizeof ac_aggr.st_birthtime)
20054return 0;
20055 ;
20056 return 0;
20057}
20058_ACEOF
20059rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020060if { (ac_try="$ac_compile"
20061case "(($ac_try" in
20062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20063 *) ac_try_echo=$ac_try;;
20064esac
20065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20066 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020067 ac_status=$?
20068 grep -v '^ *+' conftest.er1 >conftest.err
20069 rm -f conftest.er1
20070 cat conftest.err >&5
20071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020072 (exit $ac_status); } && {
20073 test -z "$ac_c_werror_flag" ||
20074 test ! -s conftest.err
20075 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020076 ac_cv_member_struct_stat_st_birthtime=yes
20077else
20078 echo "$as_me: failed program was:" >&5
20079sed 's/^/| /' conftest.$ac_ext >&5
20080
Martin v. Löwiseba40652007-08-30 20:10:57 +000020081 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020082fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020083
20084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020086
20087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020089{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20090echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020091if test $ac_cv_member_struct_stat_st_birthtime = yes; then
20092
20093cat >>confdefs.h <<_ACEOF
20094#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20095_ACEOF
20096
20097
20098fi
20099
Martin v. Löwiseba40652007-08-30 20:10:57 +000020100{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20101echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020102if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
20103 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020104else
Martin v. Löwis11437992002-04-12 09:54:03 +000020105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020106/* confdefs.h. */
20107_ACEOF
20108cat confdefs.h >>conftest.$ac_ext
20109cat >>conftest.$ac_ext <<_ACEOF
20110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020111$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020112int
20113main ()
20114{
20115static struct stat ac_aggr;
20116if (ac_aggr.st_blocks)
20117return 0;
20118 ;
20119 return 0;
20120}
20121_ACEOF
20122rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020123if { (ac_try="$ac_compile"
20124case "(($ac_try" in
20125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20126 *) ac_try_echo=$ac_try;;
20127esac
20128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20129 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020131 grep -v '^ *+' conftest.er1 >conftest.err
20132 rm -f conftest.er1
20133 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020135 (exit $ac_status); } && {
20136 test -z "$ac_c_werror_flag" ||
20137 test ! -s conftest.err
20138 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020139 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020140else
Martin v. Löwis11437992002-04-12 09:54:03 +000020141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020142sed 's/^/| /' conftest.$ac_ext >&5
20143
Martin v. Löwiseba40652007-08-30 20:10:57 +000020144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020145/* confdefs.h. */
20146_ACEOF
20147cat confdefs.h >>conftest.$ac_ext
20148cat >>conftest.$ac_ext <<_ACEOF
20149/* end confdefs.h. */
20150$ac_includes_default
20151int
20152main ()
20153{
20154static struct stat ac_aggr;
20155if (sizeof ac_aggr.st_blocks)
20156return 0;
20157 ;
20158 return 0;
20159}
20160_ACEOF
20161rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020162if { (ac_try="$ac_compile"
20163case "(($ac_try" in
20164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20165 *) ac_try_echo=$ac_try;;
20166esac
20167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20168 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020170 grep -v '^ *+' conftest.er1 >conftest.err
20171 rm -f conftest.er1
20172 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020174 (exit $ac_status); } && {
20175 test -z "$ac_c_werror_flag" ||
20176 test ! -s conftest.err
20177 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020178 ac_cv_member_struct_stat_st_blocks=yes
20179else
20180 echo "$as_me: failed program was:" >&5
20181sed 's/^/| /' conftest.$ac_ext >&5
20182
Martin v. Löwiseba40652007-08-30 20:10:57 +000020183 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020185
20186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020188
20189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020191{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20192echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020193if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020194
Martin v. Löwis11437992002-04-12 09:54:03 +000020195cat >>confdefs.h <<_ACEOF
20196#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20197_ACEOF
20198
20199
20200cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020201#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020202_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020203
20204else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020205 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020206 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020207 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20208 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020209esac
20210
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020211fi
20212
Michael W. Hudson54241132001-12-07 15:38:26 +000020213
Martin v. Löwis11437992002-04-12 09:54:03 +000020214
Martin v. Löwiseba40652007-08-30 20:10:57 +000020215{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20216echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020217if test "${ac_cv_header_time_altzone+set}" = set; then
20218 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020219else
Martin v. Löwis11437992002-04-12 09:54:03 +000020220 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020221/* confdefs.h. */
20222_ACEOF
20223cat confdefs.h >>conftest.$ac_ext
20224cat >>conftest.$ac_ext <<_ACEOF
20225/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020226#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020227int
20228main ()
20229{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020230return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020231 ;
20232 return 0;
20233}
20234_ACEOF
20235rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020236if { (ac_try="$ac_compile"
20237case "(($ac_try" in
20238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20239 *) ac_try_echo=$ac_try;;
20240esac
20241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020244 grep -v '^ *+' conftest.er1 >conftest.err
20245 rm -f conftest.er1
20246 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020248 (exit $ac_status); } && {
20249 test -z "$ac_c_werror_flag" ||
20250 test ! -s conftest.err
20251 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020252 ac_cv_header_time_altzone=yes
20253else
Martin v. Löwis11437992002-04-12 09:54:03 +000020254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020255sed 's/^/| /' conftest.$ac_ext >&5
20256
Martin v. Löwiseba40652007-08-30 20:10:57 +000020257 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020258fi
20259
Martin v. Löwiseba40652007-08-30 20:10:57 +000020260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20261fi
20262
20263{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20264echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020265if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020266
20267cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020268#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020269_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020270
20271fi
20272
Guido van Rossumda88dad1995-01-26 00:46:29 +000020273was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020274{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20275echo $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 +000020276cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020277/* confdefs.h. */
20278_ACEOF
20279cat confdefs.h >>conftest.$ac_ext
20280cat >>conftest.$ac_ext <<_ACEOF
20281/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020282
20283#include <sys/types.h>
20284#include <sys/select.h>
20285#include <sys/time.h>
20286
Martin v. Löwis11437992002-04-12 09:54:03 +000020287int
20288main ()
20289{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020290;
Martin v. Löwis11437992002-04-12 09:54:03 +000020291 ;
20292 return 0;
20293}
20294_ACEOF
20295rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020296if { (ac_try="$ac_compile"
20297case "(($ac_try" in
20298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20299 *) ac_try_echo=$ac_try;;
20300esac
20301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20302 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020304 grep -v '^ *+' conftest.er1 >conftest.err
20305 rm -f conftest.er1
20306 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020308 (exit $ac_status); } && {
20309 test -z "$ac_c_werror_flag" ||
20310 test ! -s conftest.err
20311 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020312
20313
20314cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020315#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020316_ACEOF
20317
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020318 was_it_defined=yes
20319
Guido van Rossumf78abae1997-01-21 22:02:36 +000020320else
Martin v. Löwis11437992002-04-12 09:54:03 +000020321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020322sed 's/^/| /' conftest.$ac_ext >&5
20323
Brett Cannon19fab762007-06-02 03:02:29 +000020324
Martin v. Löwiseba40652007-08-30 20:10:57 +000020325fi
20326
20327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20328{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20329echo "${ECHO_T}$was_it_defined" >&6; }
20330
20331{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20332echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020333if test "${ac_cv_struct_addrinfo+set}" = set; then
20334 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020335else
Martin v. Löwis11437992002-04-12 09:54:03 +000020336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020337/* confdefs.h. */
20338_ACEOF
20339cat confdefs.h >>conftest.$ac_ext
20340cat >>conftest.$ac_ext <<_ACEOF
20341/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020342
20343# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020344int
20345main ()
20346{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020347struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020348 ;
20349 return 0;
20350}
20351_ACEOF
20352rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020353if { (ac_try="$ac_compile"
20354case "(($ac_try" in
20355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20356 *) ac_try_echo=$ac_try;;
20357esac
20358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020361 grep -v '^ *+' conftest.er1 >conftest.err
20362 rm -f conftest.er1
20363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020365 (exit $ac_status); } && {
20366 test -z "$ac_c_werror_flag" ||
20367 test ! -s conftest.err
20368 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020369 ac_cv_struct_addrinfo=yes
20370else
Martin v. Löwis11437992002-04-12 09:54:03 +000020371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020372sed 's/^/| /' conftest.$ac_ext >&5
20373
Martin v. Löwiseba40652007-08-30 20:10:57 +000020374 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020375fi
20376
Martin v. Löwiseba40652007-08-30 20:10:57 +000020377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20378fi
20379
20380{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20381echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020382if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020383
20384cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020385#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020386_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020387
20388fi
20389
Martin v. Löwiseba40652007-08-30 20:10:57 +000020390{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20391echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020392if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020394else
Martin v. Löwis11437992002-04-12 09:54:03 +000020395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020396/* confdefs.h. */
20397_ACEOF
20398cat confdefs.h >>conftest.$ac_ext
20399cat >>conftest.$ac_ext <<_ACEOF
20400/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020401
20402# include <sys/types.h>
20403# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020404int
20405main ()
20406{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020407struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020408 ;
20409 return 0;
20410}
20411_ACEOF
20412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020413if { (ac_try="$ac_compile"
20414case "(($ac_try" in
20415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20416 *) ac_try_echo=$ac_try;;
20417esac
20418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020421 grep -v '^ *+' conftest.er1 >conftest.err
20422 rm -f conftest.er1
20423 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020425 (exit $ac_status); } && {
20426 test -z "$ac_c_werror_flag" ||
20427 test ! -s conftest.err
20428 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020429 ac_cv_struct_sockaddr_storage=yes
20430else
Martin v. Löwis11437992002-04-12 09:54:03 +000020431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020432sed 's/^/| /' conftest.$ac_ext >&5
20433
Martin v. Löwiseba40652007-08-30 20:10:57 +000020434 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020435fi
20436
Martin v. Löwiseba40652007-08-30 20:10:57 +000020437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20438fi
20439
20440{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20441echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020442if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020443
20444cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020445#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020446_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020447
20448fi
20449
Guido van Rossum627b2d71993-12-24 10:39:16 +000020450# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020451
Michael W. Hudson54241132001-12-07 15:38:26 +000020452
Martin v. Löwiseba40652007-08-30 20:10:57 +000020453{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20454echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020455if test "${ac_cv_c_char_unsigned+set}" = set; then
20456 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020457else
Martin v. Löwis11437992002-04-12 09:54:03 +000020458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020459/* confdefs.h. */
20460_ACEOF
20461cat confdefs.h >>conftest.$ac_ext
20462cat >>conftest.$ac_ext <<_ACEOF
20463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020464$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020465int
20466main ()
20467{
20468static int test_array [1 - 2 * !(((char) -1) < 0)];
20469test_array [0] = 0
20470
20471 ;
20472 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020473}
Martin v. Löwis11437992002-04-12 09:54:03 +000020474_ACEOF
20475rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020476if { (ac_try="$ac_compile"
20477case "(($ac_try" in
20478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20479 *) ac_try_echo=$ac_try;;
20480esac
20481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20482 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020484 grep -v '^ *+' conftest.er1 >conftest.err
20485 rm -f conftest.er1
20486 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020488 (exit $ac_status); } && {
20489 test -z "$ac_c_werror_flag" ||
20490 test ! -s conftest.err
20491 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020492 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020493else
20494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020495sed 's/^/| /' conftest.$ac_ext >&5
20496
Martin v. Löwiseba40652007-08-30 20:10:57 +000020497 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020499
20500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020501fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020502{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20503echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020504if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020505 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020506#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020507_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020508
20509fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020510
Martin v. Löwiseba40652007-08-30 20:10:57 +000020511{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20512echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020513if test "${ac_cv_c_const+set}" = set; then
20514 echo $ECHO_N "(cached) $ECHO_C" >&6
20515else
20516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020517/* confdefs.h. */
20518_ACEOF
20519cat confdefs.h >>conftest.$ac_ext
20520cat >>conftest.$ac_ext <<_ACEOF
20521/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020522
Martin v. Löwis11437992002-04-12 09:54:03 +000020523int
20524main ()
20525{
20526/* FIXME: Include the comments suggested by Paul. */
20527#ifndef __cplusplus
20528 /* Ultrix mips cc rejects this. */
20529 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020530 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020531 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020532 char const *const *pcpcc;
20533 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020534 /* NEC SVR4.0.2 mips cc rejects this. */
20535 struct point {int x, y;};
20536 static struct point const zero = {0,0};
20537 /* AIX XL C 1.02.0.0 rejects this.
20538 It does not let you subtract one const X* pointer from another in
20539 an arm of an if-expression whose if-part is not a constant
20540 expression */
20541 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020542 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020543 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020544 ++pcpcc;
20545 ppc = (char**) pcpcc;
20546 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020547 { /* SCO 3.2v4 cc rejects this. */
20548 char *t;
20549 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020550
Martin v. Löwis11437992002-04-12 09:54:03 +000020551 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020552 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020553 }
20554 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20555 int x[] = {25, 17};
20556 const int *foo = &x[0];
20557 ++foo;
20558 }
20559 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20560 typedef const int *iptr;
20561 iptr p = 0;
20562 ++p;
20563 }
20564 { /* AIX XL C 1.02.0.0 rejects this saying
20565 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20566 struct s { int j; const int *ap[3]; };
20567 struct s *b; b->j = 5;
20568 }
20569 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20570 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020571 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020572 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020573 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020574#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020575
Martin v. Löwis11437992002-04-12 09:54:03 +000020576 ;
20577 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020578}
Martin v. Löwis11437992002-04-12 09:54:03 +000020579_ACEOF
20580rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020581if { (ac_try="$ac_compile"
20582case "(($ac_try" in
20583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20584 *) ac_try_echo=$ac_try;;
20585esac
20586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020589 grep -v '^ *+' conftest.er1 >conftest.err
20590 rm -f conftest.er1
20591 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020593 (exit $ac_status); } && {
20594 test -z "$ac_c_werror_flag" ||
20595 test ! -s conftest.err
20596 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020597 ac_cv_c_const=yes
20598else
Martin v. Löwis11437992002-04-12 09:54:03 +000020599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020600sed 's/^/| /' conftest.$ac_ext >&5
20601
Martin v. Löwiseba40652007-08-30 20:10:57 +000020602 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020604
20605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020607{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20608echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020609if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020610
20611cat >>confdefs.h <<\_ACEOF
20612#define const
20613_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020614
20615fi
20616
Michael W. Hudson54241132001-12-07 15:38:26 +000020617
Guido van Rossumda88dad1995-01-26 00:46:29 +000020618works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020619{ echo "$as_me:$LINENO: checking for working volatile" >&5
20620echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020622/* confdefs.h. */
20623_ACEOF
20624cat confdefs.h >>conftest.$ac_ext
20625cat >>conftest.$ac_ext <<_ACEOF
20626/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020627
Martin v. Löwis11437992002-04-12 09:54:03 +000020628int
20629main ()
20630{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020631volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020632 ;
20633 return 0;
20634}
20635_ACEOF
20636rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020637if { (ac_try="$ac_compile"
20638case "(($ac_try" in
20639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20640 *) ac_try_echo=$ac_try;;
20641esac
20642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020645 grep -v '^ *+' conftest.er1 >conftest.err
20646 rm -f conftest.er1
20647 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020649 (exit $ac_status); } && {
20650 test -z "$ac_c_werror_flag" ||
20651 test ! -s conftest.err
20652 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020653 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020654else
Martin v. Löwis11437992002-04-12 09:54:03 +000020655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020656sed 's/^/| /' conftest.$ac_ext >&5
20657
Martin v. Löwis11437992002-04-12 09:54:03 +000020658
20659cat >>confdefs.h <<\_ACEOF
20660#define volatile
20661_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020662
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020663
Guido van Rossum627b2d71993-12-24 10:39:16 +000020664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020665
20666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20667{ echo "$as_me:$LINENO: result: $works" >&5
20668echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020669
Guido van Rossumda88dad1995-01-26 00:46:29 +000020670works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020671{ echo "$as_me:$LINENO: checking for working signed char" >&5
20672echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020673cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020674/* confdefs.h. */
20675_ACEOF
20676cat confdefs.h >>conftest.$ac_ext
20677cat >>conftest.$ac_ext <<_ACEOF
20678/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020679
Martin v. Löwis11437992002-04-12 09:54:03 +000020680int
20681main ()
20682{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020683signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020684 ;
20685 return 0;
20686}
20687_ACEOF
20688rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020689if { (ac_try="$ac_compile"
20690case "(($ac_try" in
20691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20692 *) ac_try_echo=$ac_try;;
20693esac
20694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20695 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020697 grep -v '^ *+' conftest.er1 >conftest.err
20698 rm -f conftest.er1
20699 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020701 (exit $ac_status); } && {
20702 test -z "$ac_c_werror_flag" ||
20703 test ! -s conftest.err
20704 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020705 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020706else
Martin v. Löwis11437992002-04-12 09:54:03 +000020707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020708sed 's/^/| /' conftest.$ac_ext >&5
20709
Martin v. Löwis11437992002-04-12 09:54:03 +000020710
20711cat >>confdefs.h <<\_ACEOF
20712#define signed
20713_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020714
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020715
Guido van Rossum7f43da71994-08-01 12:15:30 +000020716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020717
20718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20719{ echo "$as_me:$LINENO: result: $works" >&5
20720echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020721
Guido van Rossumda88dad1995-01-26 00:46:29 +000020722have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020723{ echo "$as_me:$LINENO: checking for prototypes" >&5
20724echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020725cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020726/* confdefs.h. */
20727_ACEOF
20728cat confdefs.h >>conftest.$ac_ext
20729cat >>conftest.$ac_ext <<_ACEOF
20730/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020731int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020732int
20733main ()
20734{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020735return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020736 ;
20737 return 0;
20738}
20739_ACEOF
20740rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020741if { (ac_try="$ac_compile"
20742case "(($ac_try" in
20743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20744 *) ac_try_echo=$ac_try;;
20745esac
20746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20747 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020749 grep -v '^ *+' conftest.er1 >conftest.err
20750 rm -f conftest.er1
20751 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020753 (exit $ac_status); } && {
20754 test -z "$ac_c_werror_flag" ||
20755 test ! -s conftest.err
20756 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020757
20758
20759cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020760#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020761_ACEOF
20762
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020763 have_prototypes=yes
20764
Guido van Rossumf78abae1997-01-21 22:02:36 +000020765else
Martin v. Löwis11437992002-04-12 09:54:03 +000020766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020767sed 's/^/| /' conftest.$ac_ext >&5
20768
Martin v. Löwiseba40652007-08-30 20:10:57 +000020769
Guido van Rossum7f43da71994-08-01 12:15:30 +000020770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020771
20772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20773{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20774echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020775
Guido van Rossumda88dad1995-01-26 00:46:29 +000020776works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020777{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20778echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020779cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020780/* confdefs.h. */
20781_ACEOF
20782cat confdefs.h >>conftest.$ac_ext
20783cat >>conftest.$ac_ext <<_ACEOF
20784/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020785
20786#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020787int foo(int x, ...) {
20788 va_list va;
20789 va_start(va, x);
20790 va_arg(va, int);
20791 va_arg(va, char *);
20792 va_arg(va, double);
20793 return 0;
20794}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020795
Martin v. Löwis11437992002-04-12 09:54:03 +000020796int
20797main ()
20798{
Guido van Rossum90eea071996-08-30 20:58:57 +000020799return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020800 ;
20801 return 0;
20802}
20803_ACEOF
20804rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020805if { (ac_try="$ac_compile"
20806case "(($ac_try" in
20807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20808 *) ac_try_echo=$ac_try;;
20809esac
20810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020813 grep -v '^ *+' conftest.er1 >conftest.err
20814 rm -f conftest.er1
20815 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020817 (exit $ac_status); } && {
20818 test -z "$ac_c_werror_flag" ||
20819 test ! -s conftest.err
20820 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020821
20822
20823cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020824#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020825_ACEOF
20826
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020827 works=yes
20828
Guido van Rossumf78abae1997-01-21 22:02:36 +000020829else
Martin v. Löwis11437992002-04-12 09:54:03 +000020830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020831sed 's/^/| /' conftest.$ac_ext >&5
20832
Martin v. Löwiseba40652007-08-30 20:10:57 +000020833
Guido van Rossum627b2d71993-12-24 10:39:16 +000020834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020835
20836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20837{ echo "$as_me:$LINENO: result: $works" >&5
20838echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020839
Martin v. Löwisd6320502004-08-12 13:45:08 +000020840# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020841{ echo "$as_me:$LINENO: checking for socketpair" >&5
20842echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020843cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020844/* confdefs.h. */
20845_ACEOF
20846cat confdefs.h >>conftest.$ac_ext
20847cat >>conftest.$ac_ext <<_ACEOF
20848/* end confdefs.h. */
20849
20850#include <sys/types.h>
20851#include <sys/socket.h>
20852
20853int
20854main ()
20855{
20856void *x=socketpair
20857 ;
20858 return 0;
20859}
20860_ACEOF
20861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020862if { (ac_try="$ac_compile"
20863case "(($ac_try" in
20864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20865 *) ac_try_echo=$ac_try;;
20866esac
20867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020870 grep -v '^ *+' conftest.er1 >conftest.err
20871 rm -f conftest.er1
20872 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020874 (exit $ac_status); } && {
20875 test -z "$ac_c_werror_flag" ||
20876 test ! -s conftest.err
20877 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020878
20879cat >>confdefs.h <<\_ACEOF
20880#define HAVE_SOCKETPAIR 1
20881_ACEOF
20882
Martin v. Löwiseba40652007-08-30 20:10:57 +000020883 { echo "$as_me:$LINENO: result: yes" >&5
20884echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020885else
20886 echo "$as_me: failed program was:" >&5
20887sed 's/^/| /' conftest.$ac_ext >&5
20888
Martin v. Löwiseba40652007-08-30 20:10:57 +000020889 { echo "$as_me:$LINENO: result: no" >&5
20890echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020891
20892fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020893
20894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020895
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020896# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020897{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20898echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020899cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020900/* confdefs.h. */
20901_ACEOF
20902cat confdefs.h >>conftest.$ac_ext
20903cat >>conftest.$ac_ext <<_ACEOF
20904/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020905#include <sys/types.h>
20906#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020907int
20908main ()
20909{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020910struct sockaddr x;
20911x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020912 ;
20913 return 0;
20914}
20915_ACEOF
20916rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020917if { (ac_try="$ac_compile"
20918case "(($ac_try" in
20919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20920 *) ac_try_echo=$ac_try;;
20921esac
20922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020925 grep -v '^ *+' conftest.er1 >conftest.err
20926 rm -f conftest.er1
20927 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020929 (exit $ac_status); } && {
20930 test -z "$ac_c_werror_flag" ||
20931 test ! -s conftest.err
20932 } && test -s conftest.$ac_objext; then
20933 { echo "$as_me:$LINENO: result: yes" >&5
20934echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020935
20936cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020937#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020938_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020939
20940else
Martin v. Löwis11437992002-04-12 09:54:03 +000020941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020942sed 's/^/| /' conftest.$ac_ext >&5
20943
Martin v. Löwiseba40652007-08-30 20:10:57 +000020944 { echo "$as_me:$LINENO: result: no" >&5
20945echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020947
20948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020949
Guido van Rossumda88dad1995-01-26 00:46:29 +000020950va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020951{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20952echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020953cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020954/* confdefs.h. */
20955_ACEOF
20956cat confdefs.h >>conftest.$ac_ext
20957cat >>conftest.$ac_ext <<_ACEOF
20958/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020959
20960#ifdef HAVE_STDARG_PROTOTYPES
20961#include <stdarg.h>
20962#else
20963#include <varargs.h>
20964#endif
20965
Martin v. Löwis11437992002-04-12 09:54:03 +000020966int
20967main ()
20968{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020969va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020970 ;
20971 return 0;
20972}
20973_ACEOF
20974rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020975if { (ac_try="$ac_compile"
20976case "(($ac_try" in
20977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20978 *) ac_try_echo=$ac_try;;
20979esac
20980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020983 grep -v '^ *+' conftest.er1 >conftest.err
20984 rm -f conftest.er1
20985 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020987 (exit $ac_status); } && {
20988 test -z "$ac_c_werror_flag" ||
20989 test ! -s conftest.err
20990 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020991 :
20992else
Martin v. Löwis11437992002-04-12 09:54:03 +000020993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020994sed 's/^/| /' conftest.$ac_ext >&5
20995
Martin v. Löwis11437992002-04-12 09:54:03 +000020996
20997
20998cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020999#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021000_ACEOF
21001
Guido van Rossumda88dad1995-01-26 00:46:29 +000021002 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021003
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021005
21006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21007{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21008echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021009
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021010# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021011
21012
21013
Martin v. Löwiseba40652007-08-30 20:10:57 +000021014{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21015echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021016if test "${ac_cv_func_gethostbyname_r+set}" = set; then
21017 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021018else
Martin v. Löwis11437992002-04-12 09:54:03 +000021019 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021020/* confdefs.h. */
21021_ACEOF
21022cat confdefs.h >>conftest.$ac_ext
21023cat >>conftest.$ac_ext <<_ACEOF
21024/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021025/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21026 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21027#define gethostbyname_r innocuous_gethostbyname_r
21028
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021029/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021030 which can conflict with char gethostbyname_r (); below.
21031 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021032 <limits.h> exists even on freestanding compilers. */
21033
21034#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021035# include <limits.h>
21036#else
21037# include <assert.h>
21038#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021039
21040#undef gethostbyname_r
21041
Martin v. Löwiseba40652007-08-30 20:10:57 +000021042/* Override any GCC internal prototype to avoid an error.
21043 Use char because int might match the return type of a GCC
21044 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021045#ifdef __cplusplus
21046extern "C"
21047#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021048char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021049/* The GNU C library defines this for functions which it implements
21050 to always fail with ENOSYS. Some functions are actually named
21051 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021052#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021053choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021054#endif
21055
Skip Montanaro6dead952003-09-25 14:50:04 +000021056int
21057main ()
21058{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021059return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021060 ;
21061 return 0;
21062}
21063_ACEOF
21064rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021065if { (ac_try="$ac_link"
21066case "(($ac_try" in
21067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21068 *) ac_try_echo=$ac_try;;
21069esac
21070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21071 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021072 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021073 grep -v '^ *+' conftest.er1 >conftest.err
21074 rm -f conftest.er1
21075 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021077 (exit $ac_status); } && {
21078 test -z "$ac_c_werror_flag" ||
21079 test ! -s conftest.err
21080 } && test -s conftest$ac_exeext &&
21081 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021082 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021083else
Martin v. Löwis11437992002-04-12 09:54:03 +000021084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021085sed 's/^/| /' conftest.$ac_ext >&5
21086
Martin v. Löwiseba40652007-08-30 20:10:57 +000021087 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021089
21090rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021091 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021093{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21094echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021095if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021096
Martin v. Löwis11437992002-04-12 09:54:03 +000021097 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021098#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021099_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021100
Martin v. Löwiseba40652007-08-30 20:10:57 +000021101 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21102echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021103 OLD_CFLAGS=$CFLAGS
21104 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021106/* confdefs.h. */
21107_ACEOF
21108cat confdefs.h >>conftest.$ac_ext
21109cat >>conftest.$ac_ext <<_ACEOF
21110/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021111
21112# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021113
Martin v. Löwis11437992002-04-12 09:54:03 +000021114int
21115main ()
21116{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021117
21118 char *name;
21119 struct hostent *he, *res;
21120 char buffer[2048];
21121 int buflen = 2048;
21122 int h_errnop;
21123
21124 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021125
21126 ;
21127 return 0;
21128}
21129_ACEOF
21130rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021131if { (ac_try="$ac_compile"
21132case "(($ac_try" in
21133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21134 *) ac_try_echo=$ac_try;;
21135esac
21136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21137 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021139 grep -v '^ *+' conftest.er1 >conftest.err
21140 rm -f conftest.er1
21141 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021143 (exit $ac_status); } && {
21144 test -z "$ac_c_werror_flag" ||
21145 test ! -s conftest.err
21146 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021147
21148 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021149#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021150_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021151
Martin v. Löwis11437992002-04-12 09:54:03 +000021152
21153cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021154#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021155_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021156
Martin v. Löwiseba40652007-08-30 20:10:57 +000021157 { echo "$as_me:$LINENO: result: yes" >&5
21158echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021159
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021160else
Martin v. Löwis11437992002-04-12 09:54:03 +000021161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021162sed 's/^/| /' conftest.$ac_ext >&5
21163
Martin v. Löwis11437992002-04-12 09:54:03 +000021164
Martin v. Löwiseba40652007-08-30 20:10:57 +000021165 { echo "$as_me:$LINENO: result: no" >&5
21166echo "${ECHO_T}no" >&6; }
21167 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21168echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021170/* confdefs.h. */
21171_ACEOF
21172cat confdefs.h >>conftest.$ac_ext
21173cat >>conftest.$ac_ext <<_ACEOF
21174/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021175
21176# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021177
Martin v. Löwis11437992002-04-12 09:54:03 +000021178int
21179main ()
21180{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021181
21182 char *name;
21183 struct hostent *he;
21184 char buffer[2048];
21185 int buflen = 2048;
21186 int h_errnop;
21187
21188 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021189
21190 ;
21191 return 0;
21192}
21193_ACEOF
21194rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021195if { (ac_try="$ac_compile"
21196case "(($ac_try" in
21197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21198 *) ac_try_echo=$ac_try;;
21199esac
21200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21201 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021203 grep -v '^ *+' conftest.er1 >conftest.err
21204 rm -f conftest.er1
21205 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021207 (exit $ac_status); } && {
21208 test -z "$ac_c_werror_flag" ||
21209 test ! -s conftest.err
21210 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021211
21212 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021213#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021214_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021215
Martin v. Löwis11437992002-04-12 09:54:03 +000021216
21217cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021218#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021219_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021220
Martin v. Löwiseba40652007-08-30 20:10:57 +000021221 { echo "$as_me:$LINENO: result: yes" >&5
21222echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021223
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021224else
Martin v. Löwis11437992002-04-12 09:54:03 +000021225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021226sed 's/^/| /' conftest.$ac_ext >&5
21227
Martin v. Löwis11437992002-04-12 09:54:03 +000021228
Martin v. Löwiseba40652007-08-30 20:10:57 +000021229 { echo "$as_me:$LINENO: result: no" >&5
21230echo "${ECHO_T}no" >&6; }
21231 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21232echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021233 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021234/* confdefs.h. */
21235_ACEOF
21236cat confdefs.h >>conftest.$ac_ext
21237cat >>conftest.$ac_ext <<_ACEOF
21238/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021239
21240# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021241
Martin v. Löwis11437992002-04-12 09:54:03 +000021242int
21243main ()
21244{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021245
21246 char *name;
21247 struct hostent *he;
21248 struct hostent_data data;
21249
21250 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021251
21252 ;
21253 return 0;
21254}
21255_ACEOF
21256rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021257if { (ac_try="$ac_compile"
21258case "(($ac_try" in
21259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21260 *) ac_try_echo=$ac_try;;
21261esac
21262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21263 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021265 grep -v '^ *+' conftest.er1 >conftest.err
21266 rm -f conftest.er1
21267 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021269 (exit $ac_status); } && {
21270 test -z "$ac_c_werror_flag" ||
21271 test ! -s conftest.err
21272 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021273
21274 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021275#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021276_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021277
Martin v. Löwis11437992002-04-12 09:54:03 +000021278
21279cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021280#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021281_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021282
Martin v. Löwiseba40652007-08-30 20:10:57 +000021283 { echo "$as_me:$LINENO: result: yes" >&5
21284echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021285
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021286else
Martin v. Löwis11437992002-04-12 09:54:03 +000021287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021288sed 's/^/| /' conftest.$ac_ext >&5
21289
Martin v. Löwis11437992002-04-12 09:54:03 +000021290
Martin v. Löwiseba40652007-08-30 20:10:57 +000021291 { echo "$as_me:$LINENO: result: no" >&5
21292echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021293
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021295
21296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021297
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021299
21300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021301
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021303
21304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021305 CFLAGS=$OLD_CFLAGS
21306
21307else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021308
Martin v. Löwis11437992002-04-12 09:54:03 +000021309
21310for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021311do
Martin v. Löwis11437992002-04-12 09:54:03 +000021312as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021313{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21314echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21315if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021316 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021317else
Martin v. Löwis11437992002-04-12 09:54:03 +000021318 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021319/* confdefs.h. */
21320_ACEOF
21321cat confdefs.h >>conftest.$ac_ext
21322cat >>conftest.$ac_ext <<_ACEOF
21323/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021324/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21325 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21326#define $ac_func innocuous_$ac_func
21327
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021328/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021329 which can conflict with char $ac_func (); below.
21330 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021331 <limits.h> exists even on freestanding compilers. */
21332
21333#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021334# include <limits.h>
21335#else
21336# include <assert.h>
21337#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021338
21339#undef $ac_func
21340
Martin v. Löwiseba40652007-08-30 20:10:57 +000021341/* Override any GCC internal prototype to avoid an error.
21342 Use char because int might match the return type of a GCC
21343 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021344#ifdef __cplusplus
21345extern "C"
21346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021347char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021348/* The GNU C library defines this for functions which it implements
21349 to always fail with ENOSYS. Some functions are actually named
21350 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021351#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021352choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021353#endif
21354
Skip Montanaro6dead952003-09-25 14:50:04 +000021355int
21356main ()
21357{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021358return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021359 ;
21360 return 0;
21361}
21362_ACEOF
21363rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021364if { (ac_try="$ac_link"
21365case "(($ac_try" in
21366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21367 *) ac_try_echo=$ac_try;;
21368esac
21369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21370 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021372 grep -v '^ *+' conftest.er1 >conftest.err
21373 rm -f conftest.er1
21374 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021376 (exit $ac_status); } && {
21377 test -z "$ac_c_werror_flag" ||
21378 test ! -s conftest.err
21379 } && test -s conftest$ac_exeext &&
21380 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021381 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021382else
Martin v. Löwis11437992002-04-12 09:54:03 +000021383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021384sed 's/^/| /' conftest.$ac_ext >&5
21385
Martin v. Löwiseba40652007-08-30 20:10:57 +000021386 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021388
21389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021390 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021392ac_res=`eval echo '${'$as_ac_var'}'`
21393 { echo "$as_me:$LINENO: result: $ac_res" >&5
21394echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021395if test `eval echo '${'$as_ac_var'}'` = yes; then
21396 cat >>confdefs.h <<_ACEOF
21397#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21398_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021399
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021400fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021401done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021402
Michael W. Hudson54241132001-12-07 15:38:26 +000021403
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021404fi
21405
Michael W. Hudson54241132001-12-07 15:38:26 +000021406
21407
21408
21409
21410
21411
Guido van Rossum627b2d71993-12-24 10:39:16 +000021412# checks for system services
21413# (none yet)
21414
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021415# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021416{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21417echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021418if test "${ac_cv_func___fpu_control+set}" = set; then
21419 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021420else
Martin v. Löwis11437992002-04-12 09:54:03 +000021421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021422/* confdefs.h. */
21423_ACEOF
21424cat confdefs.h >>conftest.$ac_ext
21425cat >>conftest.$ac_ext <<_ACEOF
21426/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021427/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21428 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21429#define __fpu_control innocuous___fpu_control
21430
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021431/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021432 which can conflict with char __fpu_control (); below.
21433 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021434 <limits.h> exists even on freestanding compilers. */
21435
21436#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021437# include <limits.h>
21438#else
21439# include <assert.h>
21440#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021441
21442#undef __fpu_control
21443
Martin v. Löwiseba40652007-08-30 20:10:57 +000021444/* Override any GCC internal prototype to avoid an error.
21445 Use char because int might match the return type of a GCC
21446 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021447#ifdef __cplusplus
21448extern "C"
21449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021450char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021451/* The GNU C library defines this for functions which it implements
21452 to always fail with ENOSYS. Some functions are actually named
21453 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021454#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021455choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021456#endif
21457
Skip Montanaro6dead952003-09-25 14:50:04 +000021458int
21459main ()
21460{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021461return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021462 ;
21463 return 0;
21464}
21465_ACEOF
21466rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021467if { (ac_try="$ac_link"
21468case "(($ac_try" in
21469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21470 *) ac_try_echo=$ac_try;;
21471esac
21472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21473 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021475 grep -v '^ *+' conftest.er1 >conftest.err
21476 rm -f conftest.er1
21477 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021479 (exit $ac_status); } && {
21480 test -z "$ac_c_werror_flag" ||
21481 test ! -s conftest.err
21482 } && test -s conftest$ac_exeext &&
21483 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021484 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021485else
Martin v. Löwis11437992002-04-12 09:54:03 +000021486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021487sed 's/^/| /' conftest.$ac_ext >&5
21488
Martin v. Löwiseba40652007-08-30 20:10:57 +000021489 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021491
21492rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021493 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021495{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21496echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021497if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021498 :
21499else
Martin v. Löwis11437992002-04-12 09:54:03 +000021500
Martin v. Löwiseba40652007-08-30 20:10:57 +000021501{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21502echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021503if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21504 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021505else
Martin v. Löwis11437992002-04-12 09:54:03 +000021506 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021507LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021508cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021509/* confdefs.h. */
21510_ACEOF
21511cat confdefs.h >>conftest.$ac_ext
21512cat >>conftest.$ac_ext <<_ACEOF
21513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021514
Martin v. Löwiseba40652007-08-30 20:10:57 +000021515/* Override any GCC internal prototype to avoid an error.
21516 Use char because int might match the return type of a GCC
21517 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021518#ifdef __cplusplus
21519extern "C"
21520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021521char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021522int
21523main ()
21524{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021525return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021526 ;
21527 return 0;
21528}
21529_ACEOF
21530rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021531if { (ac_try="$ac_link"
21532case "(($ac_try" in
21533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21534 *) ac_try_echo=$ac_try;;
21535esac
21536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21537 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021539 grep -v '^ *+' conftest.er1 >conftest.err
21540 rm -f conftest.er1
21541 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021543 (exit $ac_status); } && {
21544 test -z "$ac_c_werror_flag" ||
21545 test ! -s conftest.err
21546 } && test -s conftest$ac_exeext &&
21547 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021548 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021549else
Martin v. Löwis11437992002-04-12 09:54:03 +000021550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021551sed 's/^/| /' conftest.$ac_ext >&5
21552
Martin v. Löwiseba40652007-08-30 20:10:57 +000021553 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021555
21556rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021557 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021558LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021560{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21561echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021562if test $ac_cv_lib_ieee___fpu_control = yes; then
21563 cat >>confdefs.h <<_ACEOF
21564#define HAVE_LIBIEEE 1
21565_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021566
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021567 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021568
Guido van Rossum627b2d71993-12-24 10:39:16 +000021569fi
21570
Michael W. Hudson54241132001-12-07 15:38:26 +000021571
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021572fi
21573
Michael W. Hudson54241132001-12-07 15:38:26 +000021574
Guido van Rossum7f253911997-05-09 02:42:48 +000021575# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021576{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21577echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021578
Martin v. Löwiseba40652007-08-30 20:10:57 +000021579# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021580if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021581 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021582if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021583then
21584
21585cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021586#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021587_ACEOF
21588
Martin v. Löwiseba40652007-08-30 20:10:57 +000021589 { echo "$as_me:$LINENO: result: yes" >&5
21590echo "${ECHO_T}yes" >&6; }
21591else { echo "$as_me:$LINENO: result: no" >&5
21592echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021593fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021594else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021595 { echo "$as_me:$LINENO: result: no" >&5
21596echo "${ECHO_T}no" >&6; }
21597fi
21598
Guido van Rossum7f253911997-05-09 02:42:48 +000021599
Guido van Rossum7f43da71994-08-01 12:15:30 +000021600# check for --with-libm=...
21601
Guido van Rossum563e7081996-09-10 18:20:48 +000021602case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021603Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021604BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021605*) LIBM=-lm
21606esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021607{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21608echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021609
Martin v. Löwiseba40652007-08-30 20:10:57 +000021610# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021611if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021613if test "$withval" = no
21614then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021615 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21616echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021617elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021618then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021619 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21620echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021621else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21622echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21623 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021624fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021625else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021626 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21627echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21628fi
21629
Guido van Rossum7f43da71994-08-01 12:15:30 +000021630
21631# check for --with-libc=...
21632
Martin v. Löwiseba40652007-08-30 20:10:57 +000021633{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21634echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021635
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021637if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021638 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021639if test "$withval" = no
21640then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021641 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21642echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021643elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021644then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021645 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21646echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021647else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21648echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21649 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021650fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021651else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021652 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21653echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21654fi
21655
Guido van Rossum7f43da71994-08-01 12:15:30 +000021656
Christian Heimes0a8143f2007-12-18 23:22:54 +000021657# ************************************
21658# * Check for mathematical functions *
21659# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021660
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021661LIBS_SAVE=$LIBS
21662LIBS="$LIBS $LIBM"
21663
Mark Dickinsone05e8402009-05-04 13:30:43 +000021664# Detect whether system arithmetic is subject to x87-style double
21665# rounding issues. The result of this test has little meaning on non
21666# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21667# mode is round-to-nearest and double rounding issues are present, and
21668# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
21669{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21670echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
21671if test "${ac_cv_x87_double_rounding+set}" = set; then
21672 echo $ECHO_N "(cached) $ECHO_C" >&6
21673else
21674
21675if test "$cross_compiling" = yes; then
21676 ac_cv_x87_double_rounding=no
21677else
21678 cat >conftest.$ac_ext <<_ACEOF
21679/* confdefs.h. */
21680_ACEOF
21681cat confdefs.h >>conftest.$ac_ext
21682cat >>conftest.$ac_ext <<_ACEOF
21683/* end confdefs.h. */
21684
21685#include <stdlib.h>
21686#include <math.h>
21687int main() {
21688 volatile double x, y, z;
21689 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21690 x = 0.99999999999999989; /* 1-2**-53 */
21691 y = 1./x;
21692 if (y != 1.)
21693 exit(0);
21694 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21695 x = 1e16;
21696 y = 2.99999;
21697 z = x + y;
21698 if (z != 1e16+4.)
21699 exit(0);
21700 /* both tests show evidence of double rounding */
21701 exit(1);
21702}
21703
21704_ACEOF
21705rm -f conftest$ac_exeext
21706if { (ac_try="$ac_link"
21707case "(($ac_try" in
21708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21709 *) ac_try_echo=$ac_try;;
21710esac
21711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21712 (eval "$ac_link") 2>&5
21713 ac_status=$?
21714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21715 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21716 { (case "(($ac_try" in
21717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21718 *) ac_try_echo=$ac_try;;
21719esac
21720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21721 (eval "$ac_try") 2>&5
21722 ac_status=$?
21723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21724 (exit $ac_status); }; }; then
21725 ac_cv_x87_double_rounding=no
21726else
21727 echo "$as_me: program exited with status $ac_status" >&5
21728echo "$as_me: failed program was:" >&5
21729sed 's/^/| /' conftest.$ac_ext >&5
21730
21731( exit $ac_status )
21732ac_cv_x87_double_rounding=yes
21733fi
21734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21735fi
21736
21737
21738fi
21739
21740{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
21741echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
21742if test "$ac_cv_x87_double_rounding" = yes
21743then
21744
21745cat >>confdefs.h <<\_ACEOF
21746#define X87_DOUBLE_ROUNDING 1
21747_ACEOF
21748
21749fi
21750
21751
Mark Dickinson265d7382008-04-21 22:32:24 +000021752# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21753# -0. on some architectures.
21754{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
21755echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
21756if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
21757 echo $ECHO_N "(cached) $ECHO_C" >&6
21758else
21759
21760if test "$cross_compiling" = yes; then
21761 ac_cv_tanh_preserves_zero_sign=no
21762else
21763 cat >conftest.$ac_ext <<_ACEOF
21764/* confdefs.h. */
21765_ACEOF
21766cat confdefs.h >>conftest.$ac_ext
21767cat >>conftest.$ac_ext <<_ACEOF
21768/* end confdefs.h. */
21769
21770#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021771#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000021772int main() {
21773 /* return 0 if either negative zeros don't exist
21774 on this platform or if negative zeros exist
21775 and tanh(-0.) == -0. */
21776 if (atan2(0., -1.) == atan2(-0., -1.) ||
21777 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
21778 else exit(1);
21779}
21780
21781_ACEOF
21782rm -f conftest$ac_exeext
21783if { (ac_try="$ac_link"
21784case "(($ac_try" in
21785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21786 *) ac_try_echo=$ac_try;;
21787esac
21788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21789 (eval "$ac_link") 2>&5
21790 ac_status=$?
21791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21792 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21793 { (case "(($ac_try" in
21794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21795 *) ac_try_echo=$ac_try;;
21796esac
21797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21798 (eval "$ac_try") 2>&5
21799 ac_status=$?
21800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21801 (exit $ac_status); }; }; then
21802 ac_cv_tanh_preserves_zero_sign=yes
21803else
21804 echo "$as_me: program exited with status $ac_status" >&5
21805echo "$as_me: failed program was:" >&5
21806sed 's/^/| /' conftest.$ac_ext >&5
21807
21808( exit $ac_status )
21809ac_cv_tanh_preserves_zero_sign=no
21810fi
21811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21812fi
21813
21814
21815fi
21816
21817{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
21818echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
21819if test "$ac_cv_tanh_preserves_zero_sign" = yes
21820then
21821
21822cat >>confdefs.h <<\_ACEOF
21823#define TANH_PRESERVES_ZERO_SIGN 1
21824_ACEOF
21825
21826fi
21827
Martin v. Löwis11437992002-04-12 09:54:03 +000021828
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021829
Michael W. Hudson54241132001-12-07 15:38:26 +000021830
Christian Heimes0a8143f2007-12-18 23:22:54 +000021831
21832
21833
21834
21835
Mark Dickinsone05e8402009-05-04 13:30:43 +000021836for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021837do
21838as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21839{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21840echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21841if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21842 echo $ECHO_N "(cached) $ECHO_C" >&6
21843else
21844 cat >conftest.$ac_ext <<_ACEOF
21845/* confdefs.h. */
21846_ACEOF
21847cat confdefs.h >>conftest.$ac_ext
21848cat >>conftest.$ac_ext <<_ACEOF
21849/* end confdefs.h. */
21850/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21851 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21852#define $ac_func innocuous_$ac_func
21853
21854/* System header to define __stub macros and hopefully few prototypes,
21855 which can conflict with char $ac_func (); below.
21856 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21857 <limits.h> exists even on freestanding compilers. */
21858
21859#ifdef __STDC__
21860# include <limits.h>
21861#else
21862# include <assert.h>
21863#endif
21864
21865#undef $ac_func
21866
21867/* Override any GCC internal prototype to avoid an error.
21868 Use char because int might match the return type of a GCC
21869 builtin and then its argument prototype would still apply. */
21870#ifdef __cplusplus
21871extern "C"
21872#endif
21873char $ac_func ();
21874/* The GNU C library defines this for functions which it implements
21875 to always fail with ENOSYS. Some functions are actually named
21876 something starting with __ and the normal name is an alias. */
21877#if defined __stub_$ac_func || defined __stub___$ac_func
21878choke me
21879#endif
21880
21881int
21882main ()
21883{
21884return $ac_func ();
21885 ;
21886 return 0;
21887}
21888_ACEOF
21889rm -f conftest.$ac_objext conftest$ac_exeext
21890if { (ac_try="$ac_link"
21891case "(($ac_try" in
21892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21893 *) ac_try_echo=$ac_try;;
21894esac
21895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21896 (eval "$ac_link") 2>conftest.er1
21897 ac_status=$?
21898 grep -v '^ *+' conftest.er1 >conftest.err
21899 rm -f conftest.er1
21900 cat conftest.err >&5
21901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21902 (exit $ac_status); } && {
21903 test -z "$ac_c_werror_flag" ||
21904 test ! -s conftest.err
21905 } && test -s conftest$ac_exeext &&
21906 $as_test_x conftest$ac_exeext; then
21907 eval "$as_ac_var=yes"
21908else
21909 echo "$as_me: failed program was:" >&5
21910sed 's/^/| /' conftest.$ac_ext >&5
21911
21912 eval "$as_ac_var=no"
21913fi
21914
21915rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21916 conftest$ac_exeext conftest.$ac_ext
21917fi
21918ac_res=`eval echo '${'$as_ac_var'}'`
21919 { echo "$as_me:$LINENO: result: $ac_res" >&5
21920echo "${ECHO_T}$ac_res" >&6; }
21921if test `eval echo '${'$as_ac_var'}'` = yes; then
21922 cat >>confdefs.h <<_ACEOF
21923#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21924_ACEOF
21925
21926fi
21927done
21928
Mark Dickinsone05e8402009-05-04 13:30:43 +000021929{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
21930echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
21931if test "${ac_cv_have_decl_isinf+set}" = set; then
21932 echo $ECHO_N "(cached) $ECHO_C" >&6
21933else
21934 cat >conftest.$ac_ext <<_ACEOF
21935/* confdefs.h. */
21936_ACEOF
21937cat confdefs.h >>conftest.$ac_ext
21938cat >>conftest.$ac_ext <<_ACEOF
21939/* end confdefs.h. */
21940#include <math.h>
21941
21942int
21943main ()
21944{
21945#ifndef isinf
21946 (void) isinf;
21947#endif
21948
21949 ;
21950 return 0;
21951}
21952_ACEOF
21953rm -f conftest.$ac_objext
21954if { (ac_try="$ac_compile"
21955case "(($ac_try" in
21956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21957 *) ac_try_echo=$ac_try;;
21958esac
21959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21960 (eval "$ac_compile") 2>conftest.er1
21961 ac_status=$?
21962 grep -v '^ *+' conftest.er1 >conftest.err
21963 rm -f conftest.er1
21964 cat conftest.err >&5
21965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21966 (exit $ac_status); } && {
21967 test -z "$ac_c_werror_flag" ||
21968 test ! -s conftest.err
21969 } && test -s conftest.$ac_objext; then
21970 ac_cv_have_decl_isinf=yes
21971else
21972 echo "$as_me: failed program was:" >&5
21973sed 's/^/| /' conftest.$ac_ext >&5
21974
21975 ac_cv_have_decl_isinf=no
21976fi
21977
21978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21979fi
21980{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
21981echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
21982if test $ac_cv_have_decl_isinf = yes; then
21983
21984cat >>confdefs.h <<_ACEOF
21985#define HAVE_DECL_ISINF 1
21986_ACEOF
21987
21988
21989else
21990 cat >>confdefs.h <<_ACEOF
21991#define HAVE_DECL_ISINF 0
21992_ACEOF
21993
21994
21995fi
21996{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
21997echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
21998if test "${ac_cv_have_decl_isnan+set}" = set; then
21999 echo $ECHO_N "(cached) $ECHO_C" >&6
22000else
22001 cat >conftest.$ac_ext <<_ACEOF
22002/* confdefs.h. */
22003_ACEOF
22004cat confdefs.h >>conftest.$ac_ext
22005cat >>conftest.$ac_ext <<_ACEOF
22006/* end confdefs.h. */
22007#include <math.h>
22008
22009int
22010main ()
22011{
22012#ifndef isnan
22013 (void) isnan;
22014#endif
22015
22016 ;
22017 return 0;
22018}
22019_ACEOF
22020rm -f conftest.$ac_objext
22021if { (ac_try="$ac_compile"
22022case "(($ac_try" in
22023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22024 *) ac_try_echo=$ac_try;;
22025esac
22026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22027 (eval "$ac_compile") 2>conftest.er1
22028 ac_status=$?
22029 grep -v '^ *+' conftest.er1 >conftest.err
22030 rm -f conftest.er1
22031 cat conftest.err >&5
22032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22033 (exit $ac_status); } && {
22034 test -z "$ac_c_werror_flag" ||
22035 test ! -s conftest.err
22036 } && test -s conftest.$ac_objext; then
22037 ac_cv_have_decl_isnan=yes
22038else
22039 echo "$as_me: failed program was:" >&5
22040sed 's/^/| /' conftest.$ac_ext >&5
22041
22042 ac_cv_have_decl_isnan=no
22043fi
22044
22045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22046fi
22047{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22048echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22049if test $ac_cv_have_decl_isnan = yes; then
22050
22051cat >>confdefs.h <<_ACEOF
22052#define HAVE_DECL_ISNAN 1
22053_ACEOF
22054
22055
22056else
22057 cat >>confdefs.h <<_ACEOF
22058#define HAVE_DECL_ISNAN 0
22059_ACEOF
22060
22061
22062fi
22063{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22064echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
22065if test "${ac_cv_have_decl_isfinite+set}" = set; then
22066 echo $ECHO_N "(cached) $ECHO_C" >&6
22067else
22068 cat >conftest.$ac_ext <<_ACEOF
22069/* confdefs.h. */
22070_ACEOF
22071cat confdefs.h >>conftest.$ac_ext
22072cat >>conftest.$ac_ext <<_ACEOF
22073/* end confdefs.h. */
22074#include <math.h>
22075
22076int
22077main ()
22078{
22079#ifndef isfinite
22080 (void) isfinite;
22081#endif
22082
22083 ;
22084 return 0;
22085}
22086_ACEOF
22087rm -f conftest.$ac_objext
22088if { (ac_try="$ac_compile"
22089case "(($ac_try" in
22090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22091 *) ac_try_echo=$ac_try;;
22092esac
22093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22094 (eval "$ac_compile") 2>conftest.er1
22095 ac_status=$?
22096 grep -v '^ *+' conftest.er1 >conftest.err
22097 rm -f conftest.er1
22098 cat conftest.err >&5
22099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22100 (exit $ac_status); } && {
22101 test -z "$ac_c_werror_flag" ||
22102 test ! -s conftest.err
22103 } && test -s conftest.$ac_objext; then
22104 ac_cv_have_decl_isfinite=yes
22105else
22106 echo "$as_me: failed program was:" >&5
22107sed 's/^/| /' conftest.$ac_ext >&5
22108
22109 ac_cv_have_decl_isfinite=no
22110fi
22111
22112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22113fi
22114{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22115echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22116if test $ac_cv_have_decl_isfinite = yes; then
22117
22118cat >>confdefs.h <<_ACEOF
22119#define HAVE_DECL_ISFINITE 1
22120_ACEOF
22121
22122
22123else
22124 cat >>confdefs.h <<_ACEOF
22125#define HAVE_DECL_ISFINITE 0
22126_ACEOF
22127
22128
22129fi
22130
22131
Christian Heimes0a8143f2007-12-18 23:22:54 +000022132
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022133LIBS=$LIBS_SAVE
22134
Guido van Rossumef2255b2000-03-10 22:30:29 +000022135# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022136if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022137 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22138echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022139if test "${ac_cv_header_wchar_h+set}" = set; then
22140 echo $ECHO_N "(cached) $ECHO_C" >&6
22141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022142{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22143echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022144else
Martin v. Löwis11437992002-04-12 09:54:03 +000022145 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022146{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22147echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022149/* confdefs.h. */
22150_ACEOF
22151cat confdefs.h >>conftest.$ac_ext
22152cat >>conftest.$ac_ext <<_ACEOF
22153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022154$ac_includes_default
22155#include <wchar.h>
22156_ACEOF
22157rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022158if { (ac_try="$ac_compile"
22159case "(($ac_try" in
22160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22161 *) ac_try_echo=$ac_try;;
22162esac
22163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022166 grep -v '^ *+' conftest.er1 >conftest.err
22167 rm -f conftest.er1
22168 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022170 (exit $ac_status); } && {
22171 test -z "$ac_c_werror_flag" ||
22172 test ! -s conftest.err
22173 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022174 ac_header_compiler=yes
22175else
22176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022177sed 's/^/| /' conftest.$ac_ext >&5
22178
Martin v. Löwiseba40652007-08-30 20:10:57 +000022179 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022181
22182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22183{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22184echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022185
22186# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022187{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22188echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022189cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022190/* confdefs.h. */
22191_ACEOF
22192cat confdefs.h >>conftest.$ac_ext
22193cat >>conftest.$ac_ext <<_ACEOF
22194/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022195#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022196_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022197if { (ac_try="$ac_cpp conftest.$ac_ext"
22198case "(($ac_try" in
22199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22200 *) ac_try_echo=$ac_try;;
22201esac
22202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22203 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022204 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022205 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022206 rm -f conftest.er1
22207 cat conftest.err >&5
22208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022209 (exit $ac_status); } >/dev/null && {
22210 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22211 test ! -s conftest.err
22212 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022213 ac_header_preproc=yes
22214else
22215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022216sed 's/^/| /' conftest.$ac_ext >&5
22217
Martin v. Löwis11437992002-04-12 09:54:03 +000022218 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022220
Martin v. Löwis11437992002-04-12 09:54:03 +000022221rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022222{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22223echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022224
22225# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022226case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22227 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022228 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22229echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022230 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22231echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22232 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022233 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022234 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022235 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22236echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022237 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22238echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22239 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22240echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22241 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22242echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022243 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22244echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022245 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22246echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022247 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022248## ------------------------------------------------ ##
22249## Report this to http://www.python.org/python-bugs ##
22250## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022251_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000022252 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022253 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022254esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000022255{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22256echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022257if test "${ac_cv_header_wchar_h+set}" = set; then
22258 echo $ECHO_N "(cached) $ECHO_C" >&6
22259else
22260 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022262{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22263echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022264
22265fi
22266if test $ac_cv_header_wchar_h = yes; then
22267
22268
22269cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022270#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022271_ACEOF
22272
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022273 wchar_h="yes"
22274
Guido van Rossumef2255b2000-03-10 22:30:29 +000022275else
Martin v. Löwis11437992002-04-12 09:54:03 +000022276 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022277
22278fi
22279
Michael W. Hudson54241132001-12-07 15:38:26 +000022280
Martin v. Löwis11437992002-04-12 09:54:03 +000022281
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022282# determine wchar_t size
22283if test "$wchar_h" = yes
22284then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022285 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22286echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022287if test "${ac_cv_type_wchar_t+set}" = set; then
22288 echo $ECHO_N "(cached) $ECHO_C" >&6
22289else
22290 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022291/* confdefs.h. */
22292_ACEOF
22293cat confdefs.h >>conftest.$ac_ext
22294cat >>conftest.$ac_ext <<_ACEOF
22295/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022296#include <wchar.h>
22297
Martin v. Löwiseba40652007-08-30 20:10:57 +000022298typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022299int
22300main ()
22301{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022302if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022303 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022304if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022305 return 0;
22306 ;
22307 return 0;
22308}
22309_ACEOF
22310rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022311if { (ac_try="$ac_compile"
22312case "(($ac_try" in
22313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22314 *) ac_try_echo=$ac_try;;
22315esac
22316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22317 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022319 grep -v '^ *+' conftest.er1 >conftest.err
22320 rm -f conftest.er1
22321 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022323 (exit $ac_status); } && {
22324 test -z "$ac_c_werror_flag" ||
22325 test ! -s conftest.err
22326 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022327 ac_cv_type_wchar_t=yes
22328else
22329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022330sed 's/^/| /' conftest.$ac_ext >&5
22331
Martin v. Löwiseba40652007-08-30 20:10:57 +000022332 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022333fi
Brett Cannon19fab762007-06-02 03:02:29 +000022334
Martin v. Löwiseba40652007-08-30 20:10:57 +000022335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22336fi
22337{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22338echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22339
22340# The cast to long int works around a bug in the HP C Compiler
22341# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22342# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22343# This bug is HP SR number 8606223364.
22344{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22345echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022346if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22347 echo $ECHO_N "(cached) $ECHO_C" >&6
22348else
Martin v. Löwis11437992002-04-12 09:54:03 +000022349 if test "$cross_compiling" = yes; then
22350 # Depending upon the size, compute the lo and hi bounds.
22351cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022352/* confdefs.h. */
22353_ACEOF
22354cat confdefs.h >>conftest.$ac_ext
22355cat >>conftest.$ac_ext <<_ACEOF
22356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022357#include <wchar.h>
22358
Martin v. Löwiseba40652007-08-30 20:10:57 +000022359 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022360int
22361main ()
22362{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022363static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022364test_array [0] = 0
22365
22366 ;
22367 return 0;
22368}
22369_ACEOF
22370rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022371if { (ac_try="$ac_compile"
22372case "(($ac_try" in
22373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22374 *) ac_try_echo=$ac_try;;
22375esac
22376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22377 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022379 grep -v '^ *+' conftest.er1 >conftest.err
22380 rm -f conftest.er1
22381 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022383 (exit $ac_status); } && {
22384 test -z "$ac_c_werror_flag" ||
22385 test ! -s conftest.err
22386 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022387 ac_lo=0 ac_mid=0
22388 while :; do
22389 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022390/* confdefs.h. */
22391_ACEOF
22392cat confdefs.h >>conftest.$ac_ext
22393cat >>conftest.$ac_ext <<_ACEOF
22394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022395#include <wchar.h>
22396
Martin v. Löwiseba40652007-08-30 20:10:57 +000022397 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022398int
22399main ()
22400{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022401static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022402test_array [0] = 0
22403
22404 ;
22405 return 0;
22406}
22407_ACEOF
22408rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022409if { (ac_try="$ac_compile"
22410case "(($ac_try" in
22411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22412 *) ac_try_echo=$ac_try;;
22413esac
22414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022417 grep -v '^ *+' conftest.er1 >conftest.err
22418 rm -f conftest.er1
22419 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022421 (exit $ac_status); } && {
22422 test -z "$ac_c_werror_flag" ||
22423 test ! -s conftest.err
22424 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022425 ac_hi=$ac_mid; break
22426else
22427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022428sed 's/^/| /' conftest.$ac_ext >&5
22429
Martin v. Löwiseba40652007-08-30 20:10:57 +000022430 ac_lo=`expr $ac_mid + 1`
22431 if test $ac_lo -le $ac_mid; then
22432 ac_lo= ac_hi=
22433 break
22434 fi
22435 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022437
22438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022439 done
22440else
22441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022442sed 's/^/| /' conftest.$ac_ext >&5
22443
Martin v. Löwiseba40652007-08-30 20:10:57 +000022444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022445/* confdefs.h. */
22446_ACEOF
22447cat confdefs.h >>conftest.$ac_ext
22448cat >>conftest.$ac_ext <<_ACEOF
22449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022450#include <wchar.h>
22451
Martin v. Löwiseba40652007-08-30 20:10:57 +000022452 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022453int
22454main ()
22455{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022456static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022457test_array [0] = 0
22458
22459 ;
22460 return 0;
22461}
22462_ACEOF
22463rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022464if { (ac_try="$ac_compile"
22465case "(($ac_try" in
22466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22467 *) ac_try_echo=$ac_try;;
22468esac
22469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022472 grep -v '^ *+' conftest.er1 >conftest.err
22473 rm -f conftest.er1
22474 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022476 (exit $ac_status); } && {
22477 test -z "$ac_c_werror_flag" ||
22478 test ! -s conftest.err
22479 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022480 ac_hi=-1 ac_mid=-1
22481 while :; do
22482 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022483/* confdefs.h. */
22484_ACEOF
22485cat confdefs.h >>conftest.$ac_ext
22486cat >>conftest.$ac_ext <<_ACEOF
22487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022488#include <wchar.h>
22489
Martin v. Löwiseba40652007-08-30 20:10:57 +000022490 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022491int
22492main ()
22493{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022495test_array [0] = 0
22496
22497 ;
22498 return 0;
22499}
22500_ACEOF
22501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022502if { (ac_try="$ac_compile"
22503case "(($ac_try" in
22504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22505 *) ac_try_echo=$ac_try;;
22506esac
22507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022510 grep -v '^ *+' conftest.er1 >conftest.err
22511 rm -f conftest.er1
22512 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022514 (exit $ac_status); } && {
22515 test -z "$ac_c_werror_flag" ||
22516 test ! -s conftest.err
22517 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022518 ac_lo=$ac_mid; break
22519else
22520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022521sed 's/^/| /' conftest.$ac_ext >&5
22522
Martin v. Löwiseba40652007-08-30 20:10:57 +000022523 ac_hi=`expr '(' $ac_mid ')' - 1`
22524 if test $ac_mid -le $ac_hi; then
22525 ac_lo= ac_hi=
22526 break
22527 fi
22528 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022530
22531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022532 done
22533else
22534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022535sed 's/^/| /' conftest.$ac_ext >&5
22536
Martin v. Löwiseba40652007-08-30 20:10:57 +000022537 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022539
22540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022542
22543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022544# Binary search between lo and hi bounds.
22545while test "x$ac_lo" != "x$ac_hi"; do
22546 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022548/* confdefs.h. */
22549_ACEOF
22550cat confdefs.h >>conftest.$ac_ext
22551cat >>conftest.$ac_ext <<_ACEOF
22552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022553#include <wchar.h>
22554
Martin v. Löwiseba40652007-08-30 20:10:57 +000022555 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022556int
22557main ()
22558{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022559static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022560test_array [0] = 0
22561
22562 ;
22563 return 0;
22564}
22565_ACEOF
22566rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022567if { (ac_try="$ac_compile"
22568case "(($ac_try" in
22569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22570 *) ac_try_echo=$ac_try;;
22571esac
22572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22573 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022575 grep -v '^ *+' conftest.er1 >conftest.err
22576 rm -f conftest.er1
22577 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022579 (exit $ac_status); } && {
22580 test -z "$ac_c_werror_flag" ||
22581 test ! -s conftest.err
22582 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022583 ac_hi=$ac_mid
22584else
22585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022586sed 's/^/| /' conftest.$ac_ext >&5
22587
Martin v. Löwiseba40652007-08-30 20:10:57 +000022588 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022590
22591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022592done
22593case $ac_lo in
22594?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022595'') if test "$ac_cv_type_wchar_t" = yes; then
22596 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022597See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022598echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022599See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022600 { (exit 77); exit 77; }; }
22601 else
22602 ac_cv_sizeof_wchar_t=0
22603 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022604esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022605else
Martin v. Löwis11437992002-04-12 09:54:03 +000022606 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022607/* confdefs.h. */
22608_ACEOF
22609cat confdefs.h >>conftest.$ac_ext
22610cat >>conftest.$ac_ext <<_ACEOF
22611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022612#include <wchar.h>
22613
Martin v. Löwiseba40652007-08-30 20:10:57 +000022614 typedef wchar_t ac__type_sizeof_;
22615static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22616static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022617#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022618#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022619int
22620main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022621{
Martin v. Löwis11437992002-04-12 09:54:03 +000022622
22623 FILE *f = fopen ("conftest.val", "w");
22624 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022625 return 1;
22626 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022627 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022628 long int i = longval ();
22629 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22630 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022631 fprintf (f, "%ld\n", i);
22632 }
22633 else
22634 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022635 unsigned long int i = ulongval ();
22636 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22637 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022638 fprintf (f, "%lu\n", i);
22639 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022640 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022641
22642 ;
22643 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022644}
Martin v. Löwis11437992002-04-12 09:54:03 +000022645_ACEOF
22646rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022647if { (ac_try="$ac_link"
22648case "(($ac_try" in
22649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22650 *) ac_try_echo=$ac_try;;
22651esac
22652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22653 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022654 ac_status=$?
22655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22656 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022657 { (case "(($ac_try" in
22658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22659 *) ac_try_echo=$ac_try;;
22660esac
22661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22662 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022663 ac_status=$?
22664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22665 (exit $ac_status); }; }; then
22666 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022667else
Martin v. Löwis11437992002-04-12 09:54:03 +000022668 echo "$as_me: program exited with status $ac_status" >&5
22669echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022670sed 's/^/| /' conftest.$ac_ext >&5
22671
Martin v. Löwis11437992002-04-12 09:54:03 +000022672( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000022673if test "$ac_cv_type_wchar_t" = yes; then
22674 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022675See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022676echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022677See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022678 { (exit 77); exit 77; }; }
22679 else
22680 ac_cv_sizeof_wchar_t=0
22681 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022683rm -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 +000022684fi
22685rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022687{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22688echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
22689
22690
22691
Martin v. Löwis11437992002-04-12 09:54:03 +000022692cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022693#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022694_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022695
Michael W. Hudson54241132001-12-07 15:38:26 +000022696
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022697fi
22698
Martin v. Löwiseba40652007-08-30 20:10:57 +000022699{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22700echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022701have_ucs4_tcl=no
22702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022703/* confdefs.h. */
22704_ACEOF
22705cat confdefs.h >>conftest.$ac_ext
22706cat >>conftest.$ac_ext <<_ACEOF
22707/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022708
22709#include <tcl.h>
22710#if TCL_UTF_MAX != 6
22711# error "NOT UCS4_TCL"
22712#endif
22713int
22714main ()
22715{
22716
22717 ;
22718 return 0;
22719}
22720_ACEOF
22721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022722if { (ac_try="$ac_compile"
22723case "(($ac_try" in
22724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22725 *) ac_try_echo=$ac_try;;
22726esac
22727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022730 grep -v '^ *+' conftest.er1 >conftest.err
22731 rm -f conftest.er1
22732 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022734 (exit $ac_status); } && {
22735 test -z "$ac_c_werror_flag" ||
22736 test ! -s conftest.err
22737 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022738
22739
22740cat >>confdefs.h <<\_ACEOF
22741#define HAVE_UCS4_TCL 1
22742_ACEOF
22743
22744 have_ucs4_tcl=yes
22745
22746else
22747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022748sed 's/^/| /' conftest.$ac_ext >&5
22749
Martin v. Löwiseba40652007-08-30 20:10:57 +000022750
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022752
22753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22754{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
22755echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022756
Skip Montanaro6dead952003-09-25 14:50:04 +000022757# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022758if test "$wchar_h" = yes
22759then
22760 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000022761 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
22762echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022763 if test "${ac_cv_wchar_t_signed+set}" = set; then
22764 echo $ECHO_N "(cached) $ECHO_C" >&6
22765else
22766
22767 if test "$cross_compiling" = yes; then
22768 ac_cv_wchar_t_signed=yes
22769else
22770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022771/* confdefs.h. */
22772_ACEOF
22773cat confdefs.h >>conftest.$ac_ext
22774cat >>conftest.$ac_ext <<_ACEOF
22775/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022776
22777 #include <wchar.h>
22778 int main()
22779 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000022780 /* Success: exit code 0 */
22781 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022782 }
22783
22784_ACEOF
22785rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022786if { (ac_try="$ac_link"
22787case "(($ac_try" in
22788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22789 *) ac_try_echo=$ac_try;;
22790esac
22791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22792 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022793 ac_status=$?
22794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22795 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022796 { (case "(($ac_try" in
22797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22798 *) ac_try_echo=$ac_try;;
22799esac
22800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22801 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022802 ac_status=$?
22803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22804 (exit $ac_status); }; }; then
22805 ac_cv_wchar_t_signed=yes
22806else
22807 echo "$as_me: program exited with status $ac_status" >&5
22808echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022809sed 's/^/| /' conftest.$ac_ext >&5
22810
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022811( exit $ac_status )
22812ac_cv_wchar_t_signed=no
22813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022814rm -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 +000022815fi
22816
Martin v. Löwiseba40652007-08-30 20:10:57 +000022817
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022818fi
22819
Martin v. Löwiseba40652007-08-30 20:10:57 +000022820 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
22821echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
22822fi
22823
22824{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
22825echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
22826# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022827if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022828 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022829else
22830 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000022831fi
22832
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022833
22834if test $enable_unicode = yes
22835then
Martin v. Löwisfd917792001-06-27 20:22:04 +000022836 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022837 case "$have_ucs4_tcl" in
22838 yes) enable_unicode="ucs4"
22839 ;;
22840 *) enable_unicode="ucs2"
22841 ;;
22842 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022843fi
22844
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022845
22846
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022847case "$enable_unicode" in
22848ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000022849 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022850#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000022851_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022852
22853 ;;
22854ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000022855 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022856#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000022857_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022858
22859 ;;
22860esac
22861
Michael W. Hudson54241132001-12-07 15:38:26 +000022862
Martin v. Löwis11437992002-04-12 09:54:03 +000022863
22864
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022865
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022866if test "$enable_unicode" = "no"
22867then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022868 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000022869 { echo "$as_me:$LINENO: result: not used" >&5
22870echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022871else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022872 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000022873
22874cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022875#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022876_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022877
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022878
22879 # wchar_t is only usable if it maps to an unsigned type
22880 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000022881 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022882 then
22883 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022884
Martin v. Löwis11437992002-04-12 09:54:03 +000022885cat >>confdefs.h <<\_ACEOF
22886#define HAVE_USABLE_WCHAR_T 1
22887_ACEOF
22888
22889 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022890#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022891_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022892
22893 elif test "$ac_cv_sizeof_short" = "$unicode_size"
22894 then
22895 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000022896 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022897#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000022898_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022899
22900 elif test "$ac_cv_sizeof_long" = "$unicode_size"
22901 then
22902 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000022903 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022904#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000022905_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022906
22907 else
22908 PY_UNICODE_TYPE="no type found"
22909 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022910 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
22911echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022912fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022913
22914# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000022915{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
22916echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022917if test "${ac_cv_c_bigendian+set}" = set; then
22918 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000022919else
Martin v. Löwis11437992002-04-12 09:54:03 +000022920 # See if sys/param.h defines the BYTE_ORDER macro.
22921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022922/* confdefs.h. */
22923_ACEOF
22924cat confdefs.h >>conftest.$ac_ext
22925cat >>conftest.$ac_ext <<_ACEOF
22926/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022927#include <sys/types.h>
22928#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022929
Martin v. Löwis11437992002-04-12 09:54:03 +000022930int
22931main ()
22932{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022933#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
22934 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000022935 bogus endian macros
22936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022937
22938 ;
22939 return 0;
22940}
22941_ACEOF
22942rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022943if { (ac_try="$ac_compile"
22944case "(($ac_try" in
22945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22946 *) ac_try_echo=$ac_try;;
22947esac
22948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022951 grep -v '^ *+' conftest.er1 >conftest.err
22952 rm -f conftest.er1
22953 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022955 (exit $ac_status); } && {
22956 test -z "$ac_c_werror_flag" ||
22957 test ! -s conftest.err
22958 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022959 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022960cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022961/* confdefs.h. */
22962_ACEOF
22963cat confdefs.h >>conftest.$ac_ext
22964cat >>conftest.$ac_ext <<_ACEOF
22965/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022966#include <sys/types.h>
22967#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022968
Martin v. Löwis11437992002-04-12 09:54:03 +000022969int
22970main ()
22971{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022972#if BYTE_ORDER != BIG_ENDIAN
22973 not big endian
22974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022975
22976 ;
22977 return 0;
22978}
22979_ACEOF
22980rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022981if { (ac_try="$ac_compile"
22982case "(($ac_try" in
22983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22984 *) ac_try_echo=$ac_try;;
22985esac
22986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022989 grep -v '^ *+' conftest.er1 >conftest.err
22990 rm -f conftest.er1
22991 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022993 (exit $ac_status); } && {
22994 test -z "$ac_c_werror_flag" ||
22995 test ! -s conftest.err
22996 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022997 ac_cv_c_bigendian=yes
22998else
Martin v. Löwis11437992002-04-12 09:54:03 +000022999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023000sed 's/^/| /' conftest.$ac_ext >&5
23001
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023004
23005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023006else
Martin v. Löwis11437992002-04-12 09:54:03 +000023007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023008sed 's/^/| /' conftest.$ac_ext >&5
23009
Martin v. Löwiseba40652007-08-30 20:10:57 +000023010 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000023011if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023012 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000023013 ac_cv_c_bigendian=unknown
23014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023015/* confdefs.h. */
23016_ACEOF
23017cat confdefs.h >>conftest.$ac_ext
23018cat >>conftest.$ac_ext <<_ACEOF
23019/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023020short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23021short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023022void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023023short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23024short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023025void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023026int
23027main ()
23028{
23029 _ascii (); _ebcdic ();
23030 ;
23031 return 0;
23032}
23033_ACEOF
23034rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023035if { (ac_try="$ac_compile"
23036case "(($ac_try" in
23037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23038 *) ac_try_echo=$ac_try;;
23039esac
23040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23041 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023042 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023043 grep -v '^ *+' conftest.er1 >conftest.err
23044 rm -f conftest.er1
23045 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023047 (exit $ac_status); } && {
23048 test -z "$ac_c_werror_flag" ||
23049 test ! -s conftest.err
23050 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023051 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023052 ac_cv_c_bigendian=yes
23053fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023054if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023055 if test "$ac_cv_c_bigendian" = unknown; then
23056 ac_cv_c_bigendian=no
23057 else
23058 # finding both strings is unlikely to happen, but who knows?
23059 ac_cv_c_bigendian=unknown
23060 fi
23061fi
23062else
23063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023064sed 's/^/| /' conftest.$ac_ext >&5
23065
Martin v. Löwiseba40652007-08-30 20:10:57 +000023066
Martin v. Löwis11437992002-04-12 09:54:03 +000023067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023068
23069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023070else
23071 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023072/* confdefs.h. */
23073_ACEOF
23074cat confdefs.h >>conftest.$ac_ext
23075cat >>conftest.$ac_ext <<_ACEOF
23076/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023077$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023078int
23079main ()
23080{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023081
Guido van Rossumef2255b2000-03-10 22:30:29 +000023082 /* Are we little or big endian? From Harbison&Steele. */
23083 union
23084 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023085 long int l;
23086 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000023087 } u;
23088 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023089 return u.c[sizeof (long int) - 1] == 1;
23090
23091 ;
23092 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023093}
Martin v. Löwis11437992002-04-12 09:54:03 +000023094_ACEOF
23095rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023096if { (ac_try="$ac_link"
23097case "(($ac_try" in
23098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23099 *) ac_try_echo=$ac_try;;
23100esac
23101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23102 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023103 ac_status=$?
23104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023106 { (case "(($ac_try" in
23107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23108 *) ac_try_echo=$ac_try;;
23109esac
23110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23111 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023112 ac_status=$?
23113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23114 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023115 ac_cv_c_bigendian=no
23116else
Martin v. Löwis11437992002-04-12 09:54:03 +000023117 echo "$as_me: program exited with status $ac_status" >&5
23118echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023119sed 's/^/| /' conftest.$ac_ext >&5
23120
Martin v. Löwis11437992002-04-12 09:54:03 +000023121( exit $ac_status )
23122ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023124rm -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 +000023125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023126
23127
Martin v. Löwis11437992002-04-12 09:54:03 +000023128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023129
23130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023132{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23133echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023134case $ac_cv_c_bigendian in
23135 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023136
Martin v. Löwis11437992002-04-12 09:54:03 +000023137cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023138#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023139_ACEOF
23140 ;;
23141 no)
23142 ;;
23143 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023144 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023145presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023146echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023147presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23148 { (exit 1); exit 1; }; } ;;
23149esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023150
Michael W. Hudson54241132001-12-07 15:38:26 +000023151
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023152# Check whether right shifting a negative integer extends the sign bit
23153# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000023154{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23155echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023156if test "${ac_cv_rshift_extends_sign+set}" = set; then
23157 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023158else
Martin v. Löwis11437992002-04-12 09:54:03 +000023159
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023160if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023161 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023162else
Martin v. Löwis11437992002-04-12 09:54:03 +000023163 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023164/* confdefs.h. */
23165_ACEOF
23166cat confdefs.h >>conftest.$ac_ext
23167cat >>conftest.$ac_ext <<_ACEOF
23168/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023169
23170int main()
23171{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023172 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023173}
23174
Martin v. Löwis11437992002-04-12 09:54:03 +000023175_ACEOF
23176rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023177if { (ac_try="$ac_link"
23178case "(($ac_try" in
23179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23180 *) ac_try_echo=$ac_try;;
23181esac
23182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23183 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023184 ac_status=$?
23185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23186 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023187 { (case "(($ac_try" in
23188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23189 *) ac_try_echo=$ac_try;;
23190esac
23191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23192 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023193 ac_status=$?
23194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23195 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023196 ac_cv_rshift_extends_sign=yes
23197else
Martin v. Löwis11437992002-04-12 09:54:03 +000023198 echo "$as_me: program exited with status $ac_status" >&5
23199echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023200sed 's/^/| /' conftest.$ac_ext >&5
23201
Martin v. Löwis11437992002-04-12 09:54:03 +000023202( exit $ac_status )
23203ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023205rm -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 +000023206fi
23207
Martin v. Löwiseba40652007-08-30 20:10:57 +000023208
23209fi
23210
23211{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23212echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023213if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023214then
Martin v. Löwis11437992002-04-12 09:54:03 +000023215
23216cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023217#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023218_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023219
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023220fi
23221
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023222# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000023223{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23224echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023225if test "${ac_cv_have_getc_unlocked+set}" = set; then
23226 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023227else
Martin v. Löwis11437992002-04-12 09:54:03 +000023228
23229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023230/* confdefs.h. */
23231_ACEOF
23232cat confdefs.h >>conftest.$ac_ext
23233cat >>conftest.$ac_ext <<_ACEOF
23234/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023235#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023236int
23237main ()
23238{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023239
23240 FILE *f = fopen("/dev/null", "r");
23241 flockfile(f);
23242 getc_unlocked(f);
23243 funlockfile(f);
23244
Martin v. Löwis11437992002-04-12 09:54:03 +000023245 ;
23246 return 0;
23247}
23248_ACEOF
23249rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023250if { (ac_try="$ac_link"
23251case "(($ac_try" in
23252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23253 *) ac_try_echo=$ac_try;;
23254esac
23255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23256 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023258 grep -v '^ *+' conftest.er1 >conftest.err
23259 rm -f conftest.er1
23260 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023262 (exit $ac_status); } && {
23263 test -z "$ac_c_werror_flag" ||
23264 test ! -s conftest.err
23265 } && test -s conftest$ac_exeext &&
23266 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023267 ac_cv_have_getc_unlocked=yes
23268else
Martin v. Löwis11437992002-04-12 09:54:03 +000023269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023270sed 's/^/| /' conftest.$ac_ext >&5
23271
Martin v. Löwiseba40652007-08-30 20:10:57 +000023272 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023274
23275rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023276 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023277fi
23278
Martin v. Löwiseba40652007-08-30 20:10:57 +000023279{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23280echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023281if test "$ac_cv_have_getc_unlocked" = yes
23282then
Martin v. Löwis11437992002-04-12 09:54:03 +000023283
23284cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023285#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023286_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023287
23288fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023289
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023290# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023291# save the value of LIBS so we don't actually link Python with readline
23292LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023293
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023294# On some systems we need to link readline to a termcap compatible
23295# library. NOTE: Keep the precedence of listed libraries synchronised
23296# with setup.py.
23297py_cv_lib_readline=no
23298{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23299echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
23300for py_libtermcap in "" ncursesw ncurses curses termcap; do
23301 if test -z "$py_libtermcap"; then
23302 READLINE_LIBS="-lreadline"
23303 else
23304 READLINE_LIBS="-lreadline -l$py_libtermcap"
23305 fi
23306 LIBS="$READLINE_LIBS $LIBS_no_readline"
23307 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023308/* confdefs.h. */
23309_ACEOF
23310cat confdefs.h >>conftest.$ac_ext
23311cat >>conftest.$ac_ext <<_ACEOF
23312/* end confdefs.h. */
23313
Martin v. Löwiseba40652007-08-30 20:10:57 +000023314/* Override any GCC internal prototype to avoid an error.
23315 Use char because int might match the return type of a GCC
23316 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023317#ifdef __cplusplus
23318extern "C"
23319#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023320char readline ();
23321int
23322main ()
23323{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023324return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023325 ;
23326 return 0;
23327}
23328_ACEOF
23329rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023330if { (ac_try="$ac_link"
23331case "(($ac_try" in
23332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23333 *) ac_try_echo=$ac_try;;
23334esac
23335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23336 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023337 ac_status=$?
23338 grep -v '^ *+' conftest.er1 >conftest.err
23339 rm -f conftest.er1
23340 cat conftest.err >&5
23341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023342 (exit $ac_status); } && {
23343 test -z "$ac_c_werror_flag" ||
23344 test ! -s conftest.err
23345 } && test -s conftest$ac_exeext &&
23346 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023347 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023348else
23349 echo "$as_me: failed program was:" >&5
23350sed 's/^/| /' conftest.$ac_ext >&5
23351
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023352
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023354
23355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023356 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023357 if test $py_cv_lib_readline = yes; then
23358 break
23359 fi
23360done
23361# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23362#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000023363if test $py_cv_lib_readline = no; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023364 { echo "$as_me:$LINENO: result: none" >&5
23365echo "${ECHO_T}none" >&6; }
23366else
23367 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23368echo "${ECHO_T}$READLINE_LIBS" >&6; }
23369
23370cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023371#define HAVE_LIBREADLINE 1
23372_ACEOF
23373
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023374fi
23375
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023376# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023377{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23378echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023379if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23380 echo $ECHO_N "(cached) $ECHO_C" >&6
23381else
23382 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023383LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023384cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023385/* confdefs.h. */
23386_ACEOF
23387cat confdefs.h >>conftest.$ac_ext
23388cat >>conftest.$ac_ext <<_ACEOF
23389/* end confdefs.h. */
23390
Martin v. Löwiseba40652007-08-30 20:10:57 +000023391/* Override any GCC internal prototype to avoid an error.
23392 Use char because int might match the return type of a GCC
23393 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023394#ifdef __cplusplus
23395extern "C"
23396#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023397char rl_callback_handler_install ();
23398int
23399main ()
23400{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023401return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023402 ;
23403 return 0;
23404}
23405_ACEOF
23406rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023407if { (ac_try="$ac_link"
23408case "(($ac_try" in
23409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23410 *) ac_try_echo=$ac_try;;
23411esac
23412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23413 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023415 grep -v '^ *+' conftest.er1 >conftest.err
23416 rm -f conftest.er1
23417 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023419 (exit $ac_status); } && {
23420 test -z "$ac_c_werror_flag" ||
23421 test ! -s conftest.err
23422 } && test -s conftest$ac_exeext &&
23423 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023424 ac_cv_lib_readline_rl_callback_handler_install=yes
23425else
23426 echo "$as_me: failed program was:" >&5
23427sed 's/^/| /' conftest.$ac_ext >&5
23428
Martin v. Löwiseba40652007-08-30 20:10:57 +000023429 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023431
23432rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023433 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023434LIBS=$ac_check_lib_save_LIBS
23435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023436{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23437echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023438if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23439
23440cat >>confdefs.h <<\_ACEOF
23441#define HAVE_RL_CALLBACK 1
23442_ACEOF
23443
23444fi
23445
23446
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023447# check for readline 2.2
23448cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023449/* confdefs.h. */
23450_ACEOF
23451cat confdefs.h >>conftest.$ac_ext
23452cat >>conftest.$ac_ext <<_ACEOF
23453/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023454#include <readline/readline.h>
23455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023456if { (ac_try="$ac_cpp conftest.$ac_ext"
23457case "(($ac_try" in
23458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23459 *) ac_try_echo=$ac_try;;
23460esac
23461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23462 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023463 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023464 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023465 rm -f conftest.er1
23466 cat conftest.err >&5
23467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023468 (exit $ac_status); } >/dev/null && {
23469 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23470 test ! -s conftest.err
23471 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023472 have_readline=yes
23473else
23474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023475sed 's/^/| /' conftest.$ac_ext >&5
23476
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023477 have_readline=no
23478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023479
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023480rm -f conftest.err conftest.$ac_ext
23481if test $have_readline = yes
23482then
23483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023484/* confdefs.h. */
23485_ACEOF
23486cat confdefs.h >>conftest.$ac_ext
23487cat >>conftest.$ac_ext <<_ACEOF
23488/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023489#include <readline/readline.h>
23490
23491_ACEOF
23492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023493 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023494
23495cat >>confdefs.h <<\_ACEOF
23496#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23497_ACEOF
23498
23499fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000023500rm -f conftest*
Antoine Pitrou632e93f2009-10-27 12:30:12 +000023501
23502 cat >conftest.$ac_ext <<_ACEOF
23503/* confdefs.h. */
23504_ACEOF
23505cat confdefs.h >>conftest.$ac_ext
23506cat >>conftest.$ac_ext <<_ACEOF
23507/* end confdefs.h. */
23508#include <readline/readline.h>
23509
23510_ACEOF
23511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23512 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
23513
23514cat >>confdefs.h <<\_ACEOF
23515#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
23516_ACEOF
23517
23518fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000023519rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023520
23521fi
23522
Martin v. Löwis0daad592001-09-30 21:09:59 +000023523# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023524{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23525echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023526if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23527 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023528else
Martin v. Löwis11437992002-04-12 09:54:03 +000023529 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023530LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023531cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023532/* confdefs.h. */
23533_ACEOF
23534cat confdefs.h >>conftest.$ac_ext
23535cat >>conftest.$ac_ext <<_ACEOF
23536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023537
Martin v. Löwiseba40652007-08-30 20:10:57 +000023538/* Override any GCC internal prototype to avoid an error.
23539 Use char because int might match the return type of a GCC
23540 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023541#ifdef __cplusplus
23542extern "C"
23543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023544char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023545int
23546main ()
23547{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023548return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023549 ;
23550 return 0;
23551}
23552_ACEOF
23553rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023554if { (ac_try="$ac_link"
23555case "(($ac_try" in
23556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23557 *) ac_try_echo=$ac_try;;
23558esac
23559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23560 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023562 grep -v '^ *+' conftest.er1 >conftest.err
23563 rm -f conftest.er1
23564 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023566 (exit $ac_status); } && {
23567 test -z "$ac_c_werror_flag" ||
23568 test ! -s conftest.err
23569 } && test -s conftest$ac_exeext &&
23570 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023571 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023572else
Martin v. Löwis11437992002-04-12 09:54:03 +000023573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023574sed 's/^/| /' conftest.$ac_ext >&5
23575
Martin v. Löwiseba40652007-08-30 20:10:57 +000023576 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023578
23579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023580 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023581LIBS=$ac_check_lib_save_LIBS
23582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023583{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23584echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023585if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023586
Martin v. Löwis11437992002-04-12 09:54:03 +000023587cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023588#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023589_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023590
Martin v. Löwis0daad592001-09-30 21:09:59 +000023591fi
23592
Michael W. Hudson54241132001-12-07 15:38:26 +000023593
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023594# also in 4.0
23595{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23596echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23597if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23598 echo $ECHO_N "(cached) $ECHO_C" >&6
23599else
23600 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023601LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023602cat >conftest.$ac_ext <<_ACEOF
23603/* confdefs.h. */
23604_ACEOF
23605cat confdefs.h >>conftest.$ac_ext
23606cat >>conftest.$ac_ext <<_ACEOF
23607/* end confdefs.h. */
23608
23609/* Override any GCC internal prototype to avoid an error.
23610 Use char because int might match the return type of a GCC
23611 builtin and then its argument prototype would still apply. */
23612#ifdef __cplusplus
23613extern "C"
23614#endif
23615char rl_completion_display_matches_hook ();
23616int
23617main ()
23618{
23619return rl_completion_display_matches_hook ();
23620 ;
23621 return 0;
23622}
23623_ACEOF
23624rm -f conftest.$ac_objext conftest$ac_exeext
23625if { (ac_try="$ac_link"
23626case "(($ac_try" in
23627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23628 *) ac_try_echo=$ac_try;;
23629esac
23630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23631 (eval "$ac_link") 2>conftest.er1
23632 ac_status=$?
23633 grep -v '^ *+' conftest.er1 >conftest.err
23634 rm -f conftest.er1
23635 cat conftest.err >&5
23636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23637 (exit $ac_status); } && {
23638 test -z "$ac_c_werror_flag" ||
23639 test ! -s conftest.err
23640 } && test -s conftest$ac_exeext &&
23641 $as_test_x conftest$ac_exeext; then
23642 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23643else
23644 echo "$as_me: failed program was:" >&5
23645sed 's/^/| /' conftest.$ac_ext >&5
23646
23647 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23648fi
23649
23650rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23651 conftest$ac_exeext conftest.$ac_ext
23652LIBS=$ac_check_lib_save_LIBS
23653fi
23654{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23655echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23656if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
23657
23658cat >>confdefs.h <<\_ACEOF
23659#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23660_ACEOF
23661
23662fi
23663
23664
Martin v. Löwis0daad592001-09-30 21:09:59 +000023665# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000023666{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23667echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023668if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
23669 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023670else
Martin v. Löwis11437992002-04-12 09:54:03 +000023671 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023672LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023673cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023674/* confdefs.h. */
23675_ACEOF
23676cat confdefs.h >>conftest.$ac_ext
23677cat >>conftest.$ac_ext <<_ACEOF
23678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023679
Martin v. Löwiseba40652007-08-30 20:10:57 +000023680/* Override any GCC internal prototype to avoid an error.
23681 Use char because int might match the return type of a GCC
23682 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023683#ifdef __cplusplus
23684extern "C"
23685#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023686char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023687int
23688main ()
23689{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023690return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023691 ;
23692 return 0;
23693}
23694_ACEOF
23695rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023696if { (ac_try="$ac_link"
23697case "(($ac_try" in
23698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23699 *) ac_try_echo=$ac_try;;
23700esac
23701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23702 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023704 grep -v '^ *+' conftest.er1 >conftest.err
23705 rm -f conftest.er1
23706 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023708 (exit $ac_status); } && {
23709 test -z "$ac_c_werror_flag" ||
23710 test ! -s conftest.err
23711 } && test -s conftest$ac_exeext &&
23712 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023713 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023714else
Martin v. Löwis11437992002-04-12 09:54:03 +000023715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023716sed 's/^/| /' conftest.$ac_ext >&5
23717
Martin v. Löwiseba40652007-08-30 20:10:57 +000023718 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023720
23721rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023722 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023723LIBS=$ac_check_lib_save_LIBS
23724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023725{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23726echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023727if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023728
Martin v. Löwis11437992002-04-12 09:54:03 +000023729cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023730#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023731_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023732
Guido van Rossum353ae582001-07-10 16:45:32 +000023733fi
23734
Jack Jansendd19cf82001-12-06 22:36:17 +000023735
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023736# also in readline 4.2
23737cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023738/* confdefs.h. */
23739_ACEOF
23740cat confdefs.h >>conftest.$ac_ext
23741cat >>conftest.$ac_ext <<_ACEOF
23742/* end confdefs.h. */
23743#include <readline/readline.h>
23744_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023745if { (ac_try="$ac_cpp conftest.$ac_ext"
23746case "(($ac_try" in
23747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23748 *) ac_try_echo=$ac_try;;
23749esac
23750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23751 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023752 ac_status=$?
23753 grep -v '^ *+' conftest.er1 >conftest.err
23754 rm -f conftest.er1
23755 cat conftest.err >&5
23756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023757 (exit $ac_status); } >/dev/null && {
23758 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23759 test ! -s conftest.err
23760 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023761 have_readline=yes
23762else
23763 echo "$as_me: failed program was:" >&5
23764sed 's/^/| /' conftest.$ac_ext >&5
23765
23766 have_readline=no
23767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023768
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023769rm -f conftest.err conftest.$ac_ext
23770if test $have_readline = yes
23771then
23772 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023773/* confdefs.h. */
23774_ACEOF
23775cat confdefs.h >>conftest.$ac_ext
23776cat >>conftest.$ac_ext <<_ACEOF
23777/* end confdefs.h. */
23778#include <readline/readline.h>
23779
23780_ACEOF
23781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23782 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
23783
23784cat >>confdefs.h <<\_ACEOF
23785#define HAVE_RL_CATCH_SIGNAL 1
23786_ACEOF
23787
23788fi
Mark Dickinsond19e1432009-12-31 21:17:29 +000023789rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023790
23791fi
23792
Martin v. Löwis82bca632006-02-10 20:49:30 +000023793# End of readline checks: restore LIBS
23794LIBS=$LIBS_no_readline
23795
Martin v. Löwiseba40652007-08-30 20:10:57 +000023796{ echo "$as_me:$LINENO: checking for broken nice()" >&5
23797echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023798if test "${ac_cv_broken_nice+set}" = set; then
23799 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000023800else
Martin v. Löwis11437992002-04-12 09:54:03 +000023801
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023802if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023803 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023804else
Martin v. Löwis11437992002-04-12 09:54:03 +000023805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023806/* confdefs.h. */
23807_ACEOF
23808cat confdefs.h >>conftest.$ac_ext
23809cat >>conftest.$ac_ext <<_ACEOF
23810/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023811
23812int main()
23813{
23814 int val1 = nice(1);
23815 if (val1 != -1 && val1 == nice(2))
23816 exit(0);
23817 exit(1);
23818}
23819
Martin v. Löwis11437992002-04-12 09:54:03 +000023820_ACEOF
23821rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023822if { (ac_try="$ac_link"
23823case "(($ac_try" in
23824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23825 *) ac_try_echo=$ac_try;;
23826esac
23827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23828 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023829 ac_status=$?
23830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23831 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023832 { (case "(($ac_try" in
23833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23834 *) ac_try_echo=$ac_try;;
23835esac
23836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23837 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023838 ac_status=$?
23839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23840 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023841 ac_cv_broken_nice=yes
23842else
Martin v. Löwis11437992002-04-12 09:54:03 +000023843 echo "$as_me: program exited with status $ac_status" >&5
23844echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023845sed 's/^/| /' conftest.$ac_ext >&5
23846
Martin v. Löwis11437992002-04-12 09:54:03 +000023847( exit $ac_status )
23848ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023850rm -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 +000023851fi
23852
Martin v. Löwiseba40652007-08-30 20:10:57 +000023853
23854fi
23855
23856{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
23857echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023858if test "$ac_cv_broken_nice" = yes
23859then
Martin v. Löwis11437992002-04-12 09:54:03 +000023860
23861cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023862#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023863_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023864
23865fi
23866
Martin v. Löwiseba40652007-08-30 20:10:57 +000023867{ echo "$as_me:$LINENO: checking for broken poll()" >&5
23868echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023869if test "$cross_compiling" = yes; then
23870 ac_cv_broken_poll=no
23871else
23872 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023873/* confdefs.h. */
23874_ACEOF
23875cat confdefs.h >>conftest.$ac_ext
23876cat >>conftest.$ac_ext <<_ACEOF
23877/* end confdefs.h. */
23878
23879#include <poll.h>
23880
23881int main (void)
23882 {
23883 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
23884
23885 close (42);
23886
23887 int poll_test = poll (&poll_struct, 1, 0);
23888
23889 if (poll_test < 0)
23890 {
23891 exit(0);
23892 }
23893 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23894 {
23895 exit(0);
23896 }
23897 else
23898 {
23899 exit(1);
23900 }
23901 }
23902
23903_ACEOF
23904rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023905if { (ac_try="$ac_link"
23906case "(($ac_try" in
23907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23908 *) ac_try_echo=$ac_try;;
23909esac
23910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23911 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023912 ac_status=$?
23913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23914 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023915 { (case "(($ac_try" in
23916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23917 *) ac_try_echo=$ac_try;;
23918esac
23919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23920 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023921 ac_status=$?
23922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23923 (exit $ac_status); }; }; then
23924 ac_cv_broken_poll=yes
23925else
23926 echo "$as_me: program exited with status $ac_status" >&5
23927echo "$as_me: failed program was:" >&5
23928sed 's/^/| /' conftest.$ac_ext >&5
23929
23930( exit $ac_status )
23931ac_cv_broken_poll=no
23932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023933rm -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 +000023934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023935
23936
23937{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23938echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023939if test "$ac_cv_broken_poll" = yes
23940then
23941
23942cat >>confdefs.h <<\_ACEOF
23943#define HAVE_BROKEN_POLL 1
23944_ACEOF
23945
23946fi
23947
Brett Cannon43802422005-02-10 20:48:03 +000023948# 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 +000023949# (which is not required by ISO C or UNIX spec) and/or if we support
23950# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023951{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23952echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023953if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23954 echo $ECHO_N "(cached) $ECHO_C" >&6
23955else
23956 cat >conftest.$ac_ext <<_ACEOF
23957/* confdefs.h. */
23958_ACEOF
23959cat confdefs.h >>conftest.$ac_ext
23960cat >>conftest.$ac_ext <<_ACEOF
23961/* end confdefs.h. */
23962#include <sys/types.h>
23963#include <$ac_cv_struct_tm>
23964
23965
23966int
23967main ()
23968{
23969static struct tm ac_aggr;
23970if (ac_aggr.tm_zone)
23971return 0;
23972 ;
23973 return 0;
23974}
23975_ACEOF
23976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023977if { (ac_try="$ac_compile"
23978case "(($ac_try" in
23979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23980 *) ac_try_echo=$ac_try;;
23981esac
23982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23983 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023984 ac_status=$?
23985 grep -v '^ *+' conftest.er1 >conftest.err
23986 rm -f conftest.er1
23987 cat conftest.err >&5
23988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023989 (exit $ac_status); } && {
23990 test -z "$ac_c_werror_flag" ||
23991 test ! -s conftest.err
23992 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023993 ac_cv_member_struct_tm_tm_zone=yes
23994else
23995 echo "$as_me: failed program was:" >&5
23996sed 's/^/| /' conftest.$ac_ext >&5
23997
Martin v. Löwiseba40652007-08-30 20:10:57 +000023998 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023999/* confdefs.h. */
24000_ACEOF
24001cat confdefs.h >>conftest.$ac_ext
24002cat >>conftest.$ac_ext <<_ACEOF
24003/* end confdefs.h. */
24004#include <sys/types.h>
24005#include <$ac_cv_struct_tm>
24006
24007
24008int
24009main ()
24010{
24011static struct tm ac_aggr;
24012if (sizeof ac_aggr.tm_zone)
24013return 0;
24014 ;
24015 return 0;
24016}
24017_ACEOF
24018rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024019if { (ac_try="$ac_compile"
24020case "(($ac_try" in
24021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24022 *) ac_try_echo=$ac_try;;
24023esac
24024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24025 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024026 ac_status=$?
24027 grep -v '^ *+' conftest.er1 >conftest.err
24028 rm -f conftest.er1
24029 cat conftest.err >&5
24030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024031 (exit $ac_status); } && {
24032 test -z "$ac_c_werror_flag" ||
24033 test ! -s conftest.err
24034 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024035 ac_cv_member_struct_tm_tm_zone=yes
24036else
24037 echo "$as_me: failed program was:" >&5
24038sed 's/^/| /' conftest.$ac_ext >&5
24039
Martin v. Löwiseba40652007-08-30 20:10:57 +000024040 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024042
24043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024045
24046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024048{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24049echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024050if test $ac_cv_member_struct_tm_tm_zone = yes; then
24051
24052cat >>confdefs.h <<_ACEOF
24053#define HAVE_STRUCT_TM_TM_ZONE 1
24054_ACEOF
24055
24056
24057fi
24058
24059if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24060
24061cat >>confdefs.h <<\_ACEOF
24062#define HAVE_TM_ZONE 1
24063_ACEOF
24064
24065else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024066 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24067echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
24068if test "${ac_cv_have_decl_tzname+set}" = set; then
24069 echo $ECHO_N "(cached) $ECHO_C" >&6
24070else
24071 cat >conftest.$ac_ext <<_ACEOF
24072/* confdefs.h. */
24073_ACEOF
24074cat confdefs.h >>conftest.$ac_ext
24075cat >>conftest.$ac_ext <<_ACEOF
24076/* end confdefs.h. */
24077#include <time.h>
24078
24079int
24080main ()
24081{
24082#ifndef tzname
24083 (void) tzname;
24084#endif
24085
24086 ;
24087 return 0;
24088}
24089_ACEOF
24090rm -f conftest.$ac_objext
24091if { (ac_try="$ac_compile"
24092case "(($ac_try" in
24093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24094 *) ac_try_echo=$ac_try;;
24095esac
24096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24097 (eval "$ac_compile") 2>conftest.er1
24098 ac_status=$?
24099 grep -v '^ *+' conftest.er1 >conftest.err
24100 rm -f conftest.er1
24101 cat conftest.err >&5
24102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24103 (exit $ac_status); } && {
24104 test -z "$ac_c_werror_flag" ||
24105 test ! -s conftest.err
24106 } && test -s conftest.$ac_objext; then
24107 ac_cv_have_decl_tzname=yes
24108else
24109 echo "$as_me: failed program was:" >&5
24110sed 's/^/| /' conftest.$ac_ext >&5
24111
24112 ac_cv_have_decl_tzname=no
24113fi
24114
24115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24116fi
24117{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24118echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24119if test $ac_cv_have_decl_tzname = yes; then
24120
24121cat >>confdefs.h <<_ACEOF
24122#define HAVE_DECL_TZNAME 1
24123_ACEOF
24124
24125
24126else
24127 cat >>confdefs.h <<_ACEOF
24128#define HAVE_DECL_TZNAME 0
24129_ACEOF
24130
24131
24132fi
24133
24134
24135 { echo "$as_me:$LINENO: checking for tzname" >&5
24136echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024137if test "${ac_cv_var_tzname+set}" = set; then
24138 echo $ECHO_N "(cached) $ECHO_C" >&6
24139else
24140 cat >conftest.$ac_ext <<_ACEOF
24141/* confdefs.h. */
24142_ACEOF
24143cat confdefs.h >>conftest.$ac_ext
24144cat >>conftest.$ac_ext <<_ACEOF
24145/* end confdefs.h. */
24146#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000024147#if !HAVE_DECL_TZNAME
24148extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024149#endif
24150
24151int
24152main ()
24153{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024154return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024155 ;
24156 return 0;
24157}
24158_ACEOF
24159rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024160if { (ac_try="$ac_link"
24161case "(($ac_try" in
24162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24163 *) ac_try_echo=$ac_try;;
24164esac
24165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24166 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024167 ac_status=$?
24168 grep -v '^ *+' conftest.er1 >conftest.err
24169 rm -f conftest.er1
24170 cat conftest.err >&5
24171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024172 (exit $ac_status); } && {
24173 test -z "$ac_c_werror_flag" ||
24174 test ! -s conftest.err
24175 } && test -s conftest$ac_exeext &&
24176 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024177 ac_cv_var_tzname=yes
24178else
24179 echo "$as_me: failed program was:" >&5
24180sed 's/^/| /' conftest.$ac_ext >&5
24181
Martin v. Löwiseba40652007-08-30 20:10:57 +000024182 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024184
24185rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024186 conftest$ac_exeext conftest.$ac_ext
24187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024188{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24189echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024190 if test $ac_cv_var_tzname = yes; then
24191
24192cat >>confdefs.h <<\_ACEOF
24193#define HAVE_TZNAME 1
24194_ACEOF
24195
24196 fi
24197fi
24198
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024199
Martin v. Löwis1d459062005-03-14 21:23:33 +000024200# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000024201{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24202echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024203if test "${ac_cv_working_tzset+set}" = set; then
24204 echo $ECHO_N "(cached) $ECHO_C" >&6
24205else
24206
24207if test "$cross_compiling" = yes; then
24208 ac_cv_working_tzset=no
24209else
24210 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024211/* confdefs.h. */
24212_ACEOF
24213cat confdefs.h >>conftest.$ac_ext
24214cat >>conftest.$ac_ext <<_ACEOF
24215/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024216
24217#include <stdlib.h>
24218#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024219#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024220
24221#if HAVE_TZNAME
24222extern char *tzname[];
24223#endif
24224
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024225int main()
24226{
Brett Cannon18367812003-09-19 00:59:16 +000024227 /* Note that we need to ensure that not only does tzset(3)
24228 do 'something' with localtime, but it works as documented
24229 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024230 This includes making sure that tzname is set properly if
24231 tm->tm_zone does not exist since it is the alternative way
24232 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024233
24234 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024235 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024236 */
24237
Martin v. Löwis1d459062005-03-14 21:23:33 +000024238 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024239 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24240
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024241 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024242 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024243 if (localtime(&groundhogday)->tm_hour != 0)
24244 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024245#if HAVE_TZNAME
24246 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24247 if (strcmp(tzname[0], "UTC") ||
24248 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24249 exit(1);
24250#endif
Brett Cannon18367812003-09-19 00:59:16 +000024251
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024252 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024253 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024254 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024255 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024256#if HAVE_TZNAME
24257 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24258 exit(1);
24259#endif
Brett Cannon18367812003-09-19 00:59:16 +000024260
24261 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24262 tzset();
24263 if (localtime(&groundhogday)->tm_hour != 11)
24264 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024265#if HAVE_TZNAME
24266 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24267 exit(1);
24268#endif
24269
24270#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024271 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24272 exit(1);
24273 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24274 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024275#endif
Brett Cannon18367812003-09-19 00:59:16 +000024276
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024277 exit(0);
24278}
24279
24280_ACEOF
24281rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024282if { (ac_try="$ac_link"
24283case "(($ac_try" in
24284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24285 *) ac_try_echo=$ac_try;;
24286esac
24287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24288 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024289 ac_status=$?
24290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24291 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024292 { (case "(($ac_try" in
24293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24294 *) ac_try_echo=$ac_try;;
24295esac
24296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24297 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024298 ac_status=$?
24299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24300 (exit $ac_status); }; }; then
24301 ac_cv_working_tzset=yes
24302else
24303 echo "$as_me: program exited with status $ac_status" >&5
24304echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024305sed 's/^/| /' conftest.$ac_ext >&5
24306
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024307( exit $ac_status )
24308ac_cv_working_tzset=no
24309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024310rm -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 +000024311fi
24312
Martin v. Löwiseba40652007-08-30 20:10:57 +000024313
24314fi
24315
24316{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24317echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024318if test "$ac_cv_working_tzset" = yes
24319then
24320
24321cat >>confdefs.h <<\_ACEOF
24322#define HAVE_WORKING_TZSET 1
24323_ACEOF
24324
24325fi
24326
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024327# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024328{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24329echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024330if test "${ac_cv_stat_tv_nsec+set}" = set; then
24331 echo $ECHO_N "(cached) $ECHO_C" >&6
24332else
24333 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024334/* confdefs.h. */
24335_ACEOF
24336cat confdefs.h >>conftest.$ac_ext
24337cat >>conftest.$ac_ext <<_ACEOF
24338/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024339#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024340int
24341main ()
24342{
24343
24344struct stat st;
24345st.st_mtim.tv_nsec = 1;
24346
24347 ;
24348 return 0;
24349}
24350_ACEOF
24351rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024352if { (ac_try="$ac_compile"
24353case "(($ac_try" in
24354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24355 *) ac_try_echo=$ac_try;;
24356esac
24357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24358 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024360 grep -v '^ *+' conftest.er1 >conftest.err
24361 rm -f conftest.er1
24362 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024364 (exit $ac_status); } && {
24365 test -z "$ac_c_werror_flag" ||
24366 test ! -s conftest.err
24367 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024368 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024369else
24370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024371sed 's/^/| /' conftest.$ac_ext >&5
24372
Martin v. Löwiseba40652007-08-30 20:10:57 +000024373 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024374fi
24375
Martin v. Löwiseba40652007-08-30 20:10:57 +000024376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24377fi
24378
24379{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24380echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024381if test "$ac_cv_stat_tv_nsec" = yes
24382then
24383
24384cat >>confdefs.h <<\_ACEOF
24385#define HAVE_STAT_TV_NSEC 1
24386_ACEOF
24387
24388fi
24389
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024390# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024391{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24392echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024393if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24394 echo $ECHO_N "(cached) $ECHO_C" >&6
24395else
24396 cat >conftest.$ac_ext <<_ACEOF
24397/* confdefs.h. */
24398_ACEOF
24399cat confdefs.h >>conftest.$ac_ext
24400cat >>conftest.$ac_ext <<_ACEOF
24401/* end confdefs.h. */
24402#include <sys/stat.h>
24403int
24404main ()
24405{
24406
24407struct stat st;
24408st.st_mtimespec.tv_nsec = 1;
24409
24410 ;
24411 return 0;
24412}
24413_ACEOF
24414rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024415if { (ac_try="$ac_compile"
24416case "(($ac_try" in
24417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24418 *) ac_try_echo=$ac_try;;
24419esac
24420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024422 ac_status=$?
24423 grep -v '^ *+' conftest.er1 >conftest.err
24424 rm -f conftest.er1
24425 cat conftest.err >&5
24426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024427 (exit $ac_status); } && {
24428 test -z "$ac_c_werror_flag" ||
24429 test ! -s conftest.err
24430 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024431 ac_cv_stat_tv_nsec2=yes
24432else
24433 echo "$as_me: failed program was:" >&5
24434sed 's/^/| /' conftest.$ac_ext >&5
24435
Martin v. Löwiseba40652007-08-30 20:10:57 +000024436 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024437fi
24438
Martin v. Löwiseba40652007-08-30 20:10:57 +000024439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24440fi
24441
24442{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24443echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024444if test "$ac_cv_stat_tv_nsec2" = yes
24445then
24446
24447cat >>confdefs.h <<\_ACEOF
24448#define HAVE_STAT_TV_NSEC2 1
24449_ACEOF
24450
24451fi
24452
Jack Jansen666b1e72001-10-31 12:11:48 +000024453# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024454{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24455echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024456if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24457 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024458else
Martin v. Löwis11437992002-04-12 09:54:03 +000024459 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024460/* confdefs.h. */
24461_ACEOF
24462cat confdefs.h >>conftest.$ac_ext
24463cat >>conftest.$ac_ext <<_ACEOF
24464/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024465#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024466int
24467main ()
24468{
Jack Jansen666b1e72001-10-31 12:11:48 +000024469
24470 int rtn;
24471 rtn = mvwdelch(0,0,0);
24472
Martin v. Löwis11437992002-04-12 09:54:03 +000024473 ;
24474 return 0;
24475}
24476_ACEOF
24477rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024478if { (ac_try="$ac_compile"
24479case "(($ac_try" in
24480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24481 *) ac_try_echo=$ac_try;;
24482esac
24483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024486 grep -v '^ *+' conftest.er1 >conftest.err
24487 rm -f conftest.er1
24488 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024490 (exit $ac_status); } && {
24491 test -z "$ac_c_werror_flag" ||
24492 test ! -s conftest.err
24493 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024494 ac_cv_mvwdelch_is_expression=yes
24495else
Martin v. Löwis11437992002-04-12 09:54:03 +000024496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024497sed 's/^/| /' conftest.$ac_ext >&5
24498
Martin v. Löwiseba40652007-08-30 20:10:57 +000024499 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024500fi
24501
Martin v. Löwiseba40652007-08-30 20:10:57 +000024502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24503fi
24504
24505{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24506echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024507
24508if test "$ac_cv_mvwdelch_is_expression" = yes
24509then
Martin v. Löwis11437992002-04-12 09:54:03 +000024510
24511cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024512#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024513_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024514
24515fi
24516
Martin v. Löwiseba40652007-08-30 20:10:57 +000024517{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24518echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024519if test "${ac_cv_window_has_flags+set}" = set; then
24520 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024521else
Martin v. Löwis11437992002-04-12 09:54:03 +000024522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024523/* confdefs.h. */
24524_ACEOF
24525cat confdefs.h >>conftest.$ac_ext
24526cat >>conftest.$ac_ext <<_ACEOF
24527/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024528#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024529int
24530main ()
24531{
Jack Jansen666b1e72001-10-31 12:11:48 +000024532
24533 WINDOW *w;
24534 w->_flags = 0;
24535
Martin v. Löwis11437992002-04-12 09:54:03 +000024536 ;
24537 return 0;
24538}
24539_ACEOF
24540rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024541if { (ac_try="$ac_compile"
24542case "(($ac_try" in
24543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24544 *) ac_try_echo=$ac_try;;
24545esac
24546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24547 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024549 grep -v '^ *+' conftest.er1 >conftest.err
24550 rm -f conftest.er1
24551 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024553 (exit $ac_status); } && {
24554 test -z "$ac_c_werror_flag" ||
24555 test ! -s conftest.err
24556 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024557 ac_cv_window_has_flags=yes
24558else
Martin v. Löwis11437992002-04-12 09:54:03 +000024559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024560sed 's/^/| /' conftest.$ac_ext >&5
24561
Martin v. Löwiseba40652007-08-30 20:10:57 +000024562 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024563fi
24564
Martin v. Löwiseba40652007-08-30 20:10:57 +000024565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24566fi
24567
24568{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24569echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024570
Jack Jansen666b1e72001-10-31 12:11:48 +000024571
24572if test "$ac_cv_window_has_flags" = yes
24573then
Martin v. Löwis11437992002-04-12 09:54:03 +000024574
24575cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024576#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024577_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024578
24579fi
24580
Martin v. Löwiseba40652007-08-30 20:10:57 +000024581{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24582echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024583cat >conftest.$ac_ext <<_ACEOF
24584/* confdefs.h. */
24585_ACEOF
24586cat confdefs.h >>conftest.$ac_ext
24587cat >>conftest.$ac_ext <<_ACEOF
24588/* end confdefs.h. */
24589#include <curses.h>
24590int
24591main ()
24592{
24593void *x=is_term_resized
24594 ;
24595 return 0;
24596}
24597_ACEOF
24598rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024599if { (ac_try="$ac_compile"
24600case "(($ac_try" in
24601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24602 *) ac_try_echo=$ac_try;;
24603esac
24604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24605 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024606 ac_status=$?
24607 grep -v '^ *+' conftest.er1 >conftest.err
24608 rm -f conftest.er1
24609 cat conftest.err >&5
24610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024611 (exit $ac_status); } && {
24612 test -z "$ac_c_werror_flag" ||
24613 test ! -s conftest.err
24614 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024615
24616cat >>confdefs.h <<\_ACEOF
24617#define HAVE_CURSES_IS_TERM_RESIZED 1
24618_ACEOF
24619
Martin v. Löwiseba40652007-08-30 20:10:57 +000024620 { echo "$as_me:$LINENO: result: yes" >&5
24621echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024622else
24623 echo "$as_me: failed program was:" >&5
24624sed 's/^/| /' conftest.$ac_ext >&5
24625
Martin v. Löwiseba40652007-08-30 20:10:57 +000024626 { echo "$as_me:$LINENO: result: no" >&5
24627echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024628
24629fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024630
Martin v. Löwiseba40652007-08-30 20:10:57 +000024631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24632
24633{ echo "$as_me:$LINENO: checking for resize_term" >&5
24634echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024635cat >conftest.$ac_ext <<_ACEOF
24636/* confdefs.h. */
24637_ACEOF
24638cat confdefs.h >>conftest.$ac_ext
24639cat >>conftest.$ac_ext <<_ACEOF
24640/* end confdefs.h. */
24641#include <curses.h>
24642int
24643main ()
24644{
24645void *x=resize_term
24646 ;
24647 return 0;
24648}
24649_ACEOF
24650rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024651if { (ac_try="$ac_compile"
24652case "(($ac_try" in
24653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24654 *) ac_try_echo=$ac_try;;
24655esac
24656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24657 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024658 ac_status=$?
24659 grep -v '^ *+' conftest.er1 >conftest.err
24660 rm -f conftest.er1
24661 cat conftest.err >&5
24662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024663 (exit $ac_status); } && {
24664 test -z "$ac_c_werror_flag" ||
24665 test ! -s conftest.err
24666 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024667
24668cat >>confdefs.h <<\_ACEOF
24669#define HAVE_CURSES_RESIZE_TERM 1
24670_ACEOF
24671
Martin v. Löwiseba40652007-08-30 20:10:57 +000024672 { echo "$as_me:$LINENO: result: yes" >&5
24673echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024674else
24675 echo "$as_me: failed program was:" >&5
24676sed 's/^/| /' conftest.$ac_ext >&5
24677
Martin v. Löwiseba40652007-08-30 20:10:57 +000024678 { echo "$as_me:$LINENO: result: no" >&5
24679echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024680
24681fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024682
Martin v. Löwiseba40652007-08-30 20:10:57 +000024683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24684
24685{ echo "$as_me:$LINENO: checking for resizeterm" >&5
24686echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024687cat >conftest.$ac_ext <<_ACEOF
24688/* confdefs.h. */
24689_ACEOF
24690cat confdefs.h >>conftest.$ac_ext
24691cat >>conftest.$ac_ext <<_ACEOF
24692/* end confdefs.h. */
24693#include <curses.h>
24694int
24695main ()
24696{
24697void *x=resizeterm
24698 ;
24699 return 0;
24700}
24701_ACEOF
24702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024703if { (ac_try="$ac_compile"
24704case "(($ac_try" in
24705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24706 *) ac_try_echo=$ac_try;;
24707esac
24708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24709 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024710 ac_status=$?
24711 grep -v '^ *+' conftest.er1 >conftest.err
24712 rm -f conftest.er1
24713 cat conftest.err >&5
24714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024715 (exit $ac_status); } && {
24716 test -z "$ac_c_werror_flag" ||
24717 test ! -s conftest.err
24718 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024719
24720cat >>confdefs.h <<\_ACEOF
24721#define HAVE_CURSES_RESIZETERM 1
24722_ACEOF
24723
Martin v. Löwiseba40652007-08-30 20:10:57 +000024724 { echo "$as_me:$LINENO: result: yes" >&5
24725echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024726else
24727 echo "$as_me: failed program was:" >&5
24728sed 's/^/| /' conftest.$ac_ext >&5
24729
Martin v. Löwiseba40652007-08-30 20:10:57 +000024730 { echo "$as_me:$LINENO: result: no" >&5
24731echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024732
24733fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024734
Martin v. Löwiseba40652007-08-30 20:10:57 +000024735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24736
24737{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
24738echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024739
24740if test -r /dev/ptmx
24741then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024742 { echo "$as_me:$LINENO: result: yes" >&5
24743echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024744
24745cat >>confdefs.h <<\_ACEOF
24746#define HAVE_DEV_PTMX 1
24747_ACEOF
24748
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024749else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024750 { echo "$as_me:$LINENO: result: no" >&5
24751echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024752fi
24753
Martin v. Löwiseba40652007-08-30 20:10:57 +000024754{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
24755echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024756
24757if test -r /dev/ptc
24758then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024759 { echo "$as_me:$LINENO: result: yes" >&5
24760echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024761
24762cat >>confdefs.h <<\_ACEOF
24763#define HAVE_DEV_PTC 1
24764_ACEOF
24765
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024766else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024767 { echo "$as_me:$LINENO: result: no" >&5
24768echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024769fi
24770
Martin v. Löwiseba40652007-08-30 20:10:57 +000024771{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
24772echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024773if test "$cross_compiling" = yes; then
24774 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
24775See \`config.log' for more details." >&5
24776echo "$as_me: error: cannot run test program while cross compiling
24777See \`config.log' for more details." >&2;}
24778 { (exit 1); exit 1; }; }
24779else
24780 cat >conftest.$ac_ext <<_ACEOF
24781/* confdefs.h. */
24782_ACEOF
24783cat confdefs.h >>conftest.$ac_ext
24784cat >>conftest.$ac_ext <<_ACEOF
24785/* end confdefs.h. */
24786#include <stdio.h>
24787#include <stddef.h>
24788#include <string.h>
24789
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024790#ifdef HAVE_SYS_TYPES_H
24791#include <sys/types.h>
24792#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024793
24794#ifdef HAVE_SSIZE_T
24795typedef ssize_t Py_ssize_t;
24796#elif SIZEOF_VOID_P == SIZEOF_LONG
24797typedef long Py_ssize_t;
24798#else
24799typedef int Py_ssize_t;
24800#endif
Brett Cannon09d12362006-05-11 05:11:33 +000024801
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024802int main()
24803{
24804 char buffer[256];
24805
Brett Cannon09d12362006-05-11 05:11:33 +000024806 if(sprintf(buffer, "%zd", (size_t)123) < 0)
24807 return 1;
24808
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024809 if (strcmp(buffer, "123"))
24810 return 1;
24811
24812 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
24813 return 1;
24814
24815 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000024816 return 1;
24817
24818 return 0;
24819}
24820_ACEOF
24821rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024822if { (ac_try="$ac_link"
24823case "(($ac_try" in
24824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24825 *) ac_try_echo=$ac_try;;
24826esac
24827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24828 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024829 ac_status=$?
24830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24831 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024832 { (case "(($ac_try" in
24833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24834 *) ac_try_echo=$ac_try;;
24835esac
24836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24837 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024838 ac_status=$?
24839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24840 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024841 { echo "$as_me:$LINENO: result: yes" >&5
24842echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024843
24844cat >>confdefs.h <<\_ACEOF
24845#define PY_FORMAT_SIZE_T "z"
24846_ACEOF
24847
24848else
24849 echo "$as_me: program exited with status $ac_status" >&5
24850echo "$as_me: failed program was:" >&5
24851sed 's/^/| /' conftest.$ac_ext >&5
24852
24853( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024854{ echo "$as_me:$LINENO: result: no" >&5
24855echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024857rm -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 +000024858fi
24859
Martin v. Löwiseba40652007-08-30 20:10:57 +000024860
24861
24862{ echo "$as_me:$LINENO: checking for socklen_t" >&5
24863echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024864if test "${ac_cv_type_socklen_t+set}" = set; then
24865 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000024866else
Martin v. Löwis11437992002-04-12 09:54:03 +000024867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024868/* confdefs.h. */
24869_ACEOF
24870cat confdefs.h >>conftest.$ac_ext
24871cat >>conftest.$ac_ext <<_ACEOF
24872/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000024873
24874#ifdef HAVE_SYS_TYPES_H
24875#include <sys/types.h>
24876#endif
24877#ifdef HAVE_SYS_SOCKET_H
24878#include <sys/socket.h>
24879#endif
24880
24881
Martin v. Löwiseba40652007-08-30 20:10:57 +000024882typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024883int
24884main ()
24885{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024886if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024887 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024888if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000024889 return 0;
24890 ;
24891 return 0;
24892}
24893_ACEOF
24894rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024895if { (ac_try="$ac_compile"
24896case "(($ac_try" in
24897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24898 *) ac_try_echo=$ac_try;;
24899esac
24900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024903 grep -v '^ *+' conftest.er1 >conftest.err
24904 rm -f conftest.er1
24905 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024907 (exit $ac_status); } && {
24908 test -z "$ac_c_werror_flag" ||
24909 test ! -s conftest.err
24910 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024911 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024912else
Martin v. Löwis11437992002-04-12 09:54:03 +000024913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024914sed 's/^/| /' conftest.$ac_ext >&5
24915
Martin v. Löwiseba40652007-08-30 20:10:57 +000024916 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024918
24919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024921{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24922echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024923if test $ac_cv_type_socklen_t = yes; then
24924 :
24925else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024926
Martin v. Löwis01c04012002-11-11 14:58:44 +000024927cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024928#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024929_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024930
24931fi
24932
Michael W. Hudson54241132001-12-07 15:38:26 +000024933
Michael W. Hudson54241132001-12-07 15:38:26 +000024934
24935
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024936for h in `(cd $srcdir;echo Python/thread_*.h)`
24937do
24938 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24939done
24940
Ronald Oussoren55114422009-11-19 16:37:33 +000024941if test $ac_sys_system = Darwin
24942then
24943 LIBS="$LIBS -framework CoreFoundation"
24944fi
24945
24946
24947
Michael W. Hudson54241132001-12-07 15:38:26 +000024948
Neal Norwitzd24499d2005-12-18 21:36:39 +000024949SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024950{ echo "$as_me:$LINENO: checking for build directories" >&5
24951echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024952for dir in $SRCDIRS; do
24953 if test ! -d $dir; then
24954 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024955 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024956done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024957{ echo "$as_me:$LINENO: result: done" >&5
24958echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024959
Guido van Rossum627b2d71993-12-24 10:39:16 +000024960# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024961ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024962
Martin v. Löwis11437992002-04-12 09:54:03 +000024963cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024964# This file is a shell script that caches the results of configure
24965# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024966# scripts and configure runs, see configure's option --config-cache.
24967# It is not useful on other systems. If it contains results you don't
24968# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024969#
Martin v. Löwis11437992002-04-12 09:54:03 +000024970# config.status only pays attention to the cache file if you give it
24971# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024972#
Skip Montanaro6dead952003-09-25 14:50:04 +000024973# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024974# loading this file, other *unset* `ac_cv_foo' will be assigned the
24975# following values.
24976
24977_ACEOF
24978
Guido van Rossumf78abae1997-01-21 22:02:36 +000024979# The following way of writing the cache mishandles newlines in values,
24980# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024981# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024982# Ultrix sh set writes to stderr and can't be redirected directly,
24983# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024984(
24985 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24986 eval ac_val=\$$ac_var
24987 case $ac_val in #(
24988 *${as_nl}*)
24989 case $ac_var in #(
24990 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24991echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24992 esac
24993 case $ac_var in #(
24994 _ | IFS | as_nl) ;; #(
24995 *) $as_unset $ac_var ;;
24996 esac ;;
24997 esac
24998 done
24999
Martin v. Löwis11437992002-04-12 09:54:03 +000025000 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025001 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25002 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025003 # `set' does not quote correctly, so add quotes (double-quote
25004 # substitution turns \\\\ into \\, and sed turns \\ into \).
25005 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025006 "s/'/'\\\\''/g;
25007 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000025008 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025009 *)
25010 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025011 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025012 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025013 esac |
25014 sort
25015) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025016 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025017 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025018 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000025019 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025020 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25021 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000025022 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25023 :end' >>confcache
25024if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25025 if test -w "$cache_file"; then
25026 test "x$cache_file" != "x/dev/null" &&
25027 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25028echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025029 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025030 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025031 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25032echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025033 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025034fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025035rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025036
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025037test "x$prefix" = xNONE && prefix=$ac_default_prefix
25038# Let make expand exec_prefix.
25039test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025040
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025041DEFS=-DHAVE_CONFIG_H
25042
Skip Montanaro6dead952003-09-25 14:50:04 +000025043ac_libobjs=
25044ac_ltlibobjs=
25045for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25046 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025047 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25048 ac_i=`echo "$ac_i" | sed "$ac_script"`
25049 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25050 # will be set to the directory where LIBOBJS objects are built.
25051 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25052 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025053done
25054LIBOBJS=$ac_libobjs
25055
25056LTLIBOBJS=$ac_ltlibobjs
25057
25058
Martin v. Löwis11437992002-04-12 09:54:03 +000025059
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025060: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025061ac_clean_files_save=$ac_clean_files
25062ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25063{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25064echo "$as_me: creating $CONFIG_STATUS" >&6;}
25065cat >$CONFIG_STATUS <<_ACEOF
25066#! $SHELL
25067# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025068# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025069# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025070# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025071
Martin v. Löwis11437992002-04-12 09:54:03 +000025072debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025073ac_cs_recheck=false
25074ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025075SHELL=\${CONFIG_SHELL-$SHELL}
25076_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025077
Martin v. Löwis11437992002-04-12 09:54:03 +000025078cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025079## --------------------- ##
25080## M4sh Initialization. ##
25081## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025082
Martin v. Löwiseba40652007-08-30 20:10:57 +000025083# Be more Bourne compatible
25084DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025085if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25086 emulate sh
25087 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025088 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25089 # is contrary to our usage. Disable this feature.
25090 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025091 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025092else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025093 case `(set -o) 2>/dev/null` in
25094 *posix*) set -o posix ;;
25095esac
25096
Martin v. Löwis11437992002-04-12 09:54:03 +000025097fi
Michael W. Hudson54241132001-12-07 15:38:26 +000025098
Skip Montanaro6dead952003-09-25 14:50:04 +000025099
Martin v. Löwis11437992002-04-12 09:54:03 +000025100
25101
Martin v. Löwiseba40652007-08-30 20:10:57 +000025102# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025103# Avoid depending upon Character Ranges.
25104as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25105as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25106as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25107as_cr_digits='0123456789'
25108as_cr_alnum=$as_cr_Letters$as_cr_digits
25109
25110# The user is always right.
25111if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000025112 echo "#! /bin/sh" >conf$$.sh
25113 echo "exit 0" >>conf$$.sh
25114 chmod +x conf$$.sh
25115 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025116 PATH_SEPARATOR=';'
25117 else
25118 PATH_SEPARATOR=:
25119 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000025120 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025121fi
25122
Martin v. Löwiseba40652007-08-30 20:10:57 +000025123# Support unset when possible.
25124if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25125 as_unset=unset
25126else
25127 as_unset=false
25128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025129
Martin v. Löwiseba40652007-08-30 20:10:57 +000025130
25131# IFS
25132# We need space, tab and new line, in precisely that order. Quoting is
25133# there to prevent editors from complaining about space-tab.
25134# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25135# splitting by setting IFS to empty value.)
25136as_nl='
25137'
25138IFS=" "" $as_nl"
25139
25140# Find who we are. Look in the path if we contain no directory separator.
25141case $0 in
25142 *[\\/]* ) as_myself=$0 ;;
25143 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025144for as_dir in $PATH
25145do
25146 IFS=$as_save_IFS
25147 test -z "$as_dir" && as_dir=.
25148 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25149done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025150IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025151
Martin v. Löwiseba40652007-08-30 20:10:57 +000025152 ;;
25153esac
25154# We did not find ourselves, most probably we were run as `sh COMMAND'
25155# in which case we are not to be found in the path.
25156if test "x$as_myself" = x; then
25157 as_myself=$0
25158fi
25159if test ! -f "$as_myself"; then
25160 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25161 { (exit 1); exit 1; }
25162fi
25163
25164# Work around bugs in pre-3.0 UWIN ksh.
25165for as_var in ENV MAIL MAILPATH
25166do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25167done
25168PS1='$ '
25169PS2='> '
25170PS4='+ '
25171
25172# NLS nuisances.
25173for as_var in \
25174 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25175 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25176 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000025177do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025178 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25179 eval $as_var=C; export $as_var
25180 else
25181 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25182 fi
25183done
25184
25185# Required to use basename.
25186if expr a : '\(a\)' >/dev/null 2>&1 &&
25187 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25188 as_expr=expr
25189else
25190 as_expr=false
25191fi
25192
25193if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25194 as_basename=basename
25195else
25196 as_basename=false
25197fi
25198
25199
25200# Name of the executable.
25201as_me=`$as_basename -- "$0" ||
25202$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25203 X"$0" : 'X\(//\)$' \| \
25204 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25205echo X/"$0" |
25206 sed '/^.*\/\([^/][^/]*\)\/*$/{
25207 s//\1/
25208 q
25209 }
25210 /^X\/\(\/\/\)$/{
25211 s//\1/
25212 q
25213 }
25214 /^X\/\(\/\).*/{
25215 s//\1/
25216 q
25217 }
25218 s/.*/./; q'`
25219
25220# CDPATH.
25221$as_unset CDPATH
25222
25223
25224
Martin v. Löwis11437992002-04-12 09:54:03 +000025225 as_lineno_1=$LINENO
25226 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025227 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025228 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025229
Martin v. Löwis11437992002-04-12 09:54:03 +000025230 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25231 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000025232 # line-number line after each line using $LINENO; the second 'sed'
25233 # does the real work. The second script uses 'N' to pair each
25234 # line-number line with the line containing $LINENO, and appends
25235 # trailing '-' during substitution so that $LINENO is not a special
25236 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025237 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025238 # scripts with optimization help from Paolo Bonzini. Blame Lee
25239 # E. McMahon (1931-1989) for sed's syntax. :-)
25240 sed -n '
25241 p
25242 /[$]LINENO/=
25243 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025244 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025245 s/[$]LINENO.*/&-/
25246 t lineno
25247 b
25248 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025249 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000025250 :loop
25251 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025252 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000025253 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025254 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025255 chmod +x "$as_me.lineno" ||
25256 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025257 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025258
Martin v. Löwis11437992002-04-12 09:54:03 +000025259 # Don't try to exec as it changes $[0], causing all sort of problems
25260 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025261 # original and so on. Autoconf is especially sensitive to this).
25262 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025263 # Exit status is that of the last command.
25264 exit
25265}
25266
25267
Martin v. Löwiseba40652007-08-30 20:10:57 +000025268if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25269 as_dirname=dirname
25270else
25271 as_dirname=false
25272fi
25273
25274ECHO_C= ECHO_N= ECHO_T=
25275case `echo -n x` in
25276-n*)
25277 case `echo 'x\c'` in
25278 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25279 *) ECHO_C='\c';;
25280 esac;;
25281*)
25282 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025283esac
25284
Martin v. Löwiseba40652007-08-30 20:10:57 +000025285if expr a : '\(a\)' >/dev/null 2>&1 &&
25286 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025287 as_expr=expr
25288else
25289 as_expr=false
25290fi
25291
25292rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025293if test -d conf$$.dir; then
25294 rm -f conf$$.dir/conf$$.file
25295else
25296 rm -f conf$$.dir
25297 mkdir conf$$.dir
25298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025299echo >conf$$.file
25300if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025301 as_ln_s='ln -s'
25302 # ... but there are two gotchas:
25303 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25304 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25305 # In both cases, we have to default to `cp -p'.
25306 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025307 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025308elif ln conf$$.file conf$$ 2>/dev/null; then
25309 as_ln_s=ln
25310else
25311 as_ln_s='cp -p'
25312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025313rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25314rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025315
Skip Montanaro6dead952003-09-25 14:50:04 +000025316if mkdir -p . 2>/dev/null; then
25317 as_mkdir_p=:
25318else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025319 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025320 as_mkdir_p=false
25321fi
25322
Martin v. Löwiseba40652007-08-30 20:10:57 +000025323if test -x / >/dev/null 2>&1; then
25324 as_test_x='test -x'
25325else
25326 if ls -dL / >/dev/null 2>&1; then
25327 as_ls_L_option=L
25328 else
25329 as_ls_L_option=
25330 fi
25331 as_test_x='
25332 eval sh -c '\''
25333 if test -d "$1"; then
25334 test -d "$1/.";
25335 else
25336 case $1 in
25337 -*)set "./$1";;
25338 esac;
25339 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25340 ???[sx]*):;;*)false;;esac;fi
25341 '\'' sh
25342 '
25343fi
25344as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025345
25346# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025347as_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 +000025348
25349# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025350as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025351
25352
Martin v. Löwis11437992002-04-12 09:54:03 +000025353exec 6>&1
25354
Martin v. Löwiseba40652007-08-30 20:10:57 +000025355# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025356# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025357# values after options handling.
25358ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000025359This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025360generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025361
25362 CONFIG_FILES = $CONFIG_FILES
25363 CONFIG_HEADERS = $CONFIG_HEADERS
25364 CONFIG_LINKS = $CONFIG_LINKS
25365 CONFIG_COMMANDS = $CONFIG_COMMANDS
25366 $ $0 $@
25367
Martin v. Löwiseba40652007-08-30 20:10:57 +000025368on `(hostname || uname -n) 2>/dev/null | sed 1q`
25369"
25370
Martin v. Löwis11437992002-04-12 09:54:03 +000025371_ACEOF
25372
Martin v. Löwiseba40652007-08-30 20:10:57 +000025373cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025374# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025375config_files="$ac_config_files"
25376config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025377
Martin v. Löwiseba40652007-08-30 20:10:57 +000025378_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025379
25380cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025381ac_cs_usage="\
25382\`$as_me' instantiates files from templates according to the
25383current configuration.
25384
25385Usage: $0 [OPTIONS] [FILE]...
25386
25387 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025388 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025389 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025390 -d, --debug don't remove temporary files
25391 --recheck update $as_me by reconfiguring in the same conditions
25392 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025393 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025394 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025395 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025396
25397Configuration files:
25398$config_files
25399
25400Configuration headers:
25401$config_headers
25402
25403Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025404
Martin v. Löwiseba40652007-08-30 20:10:57 +000025405_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025406cat >>$CONFIG_STATUS <<_ACEOF
25407ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000025408python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025409configured by $0, generated by GNU Autoconf 2.61,
25410 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025411
Martin v. Löwiseba40652007-08-30 20:10:57 +000025412Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025413This config.status script is free software; the Free Software Foundation
25414gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025415
25416ac_pwd='$ac_pwd'
25417srcdir='$srcdir'
25418INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025419_ACEOF
25420
25421cat >>$CONFIG_STATUS <<\_ACEOF
25422# If no file are specified by the user, then we need to provide default
25423# value. By we need to know if files were specified by the user.
25424ac_need_defaults=:
25425while test $# != 0
25426do
25427 case $1 in
25428 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025429 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25430 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025431 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025432 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025433 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025434 ac_option=$1
25435 ac_optarg=$2
25436 ac_shift=shift
25437 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025438 esac
25439
Skip Montanaro6dead952003-09-25 14:50:04 +000025440 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025441 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025442 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25443 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025444 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25445 echo "$ac_cs_version"; exit ;;
25446 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025447 debug=: ;;
25448 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025449 $ac_shift
25450 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025451 ac_need_defaults=false;;
25452 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025453 $ac_shift
25454 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025455 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025456 --he | --h)
25457 # Conflict between --help and --header
25458 { echo "$as_me: error: ambiguous option: $1
25459Try \`$0 --help' for more information." >&2
25460 { (exit 1); exit 1; }; };;
25461 --help | --hel | -h )
25462 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025463 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25464 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25465 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025466
25467 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025468 -*) { echo "$as_me: error: unrecognized option: $1
25469Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025470 { (exit 1); exit 1; }; } ;;
25471
Martin v. Löwiseba40652007-08-30 20:10:57 +000025472 *) ac_config_targets="$ac_config_targets $1"
25473 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025474
25475 esac
25476 shift
25477done
25478
Skip Montanaro6dead952003-09-25 14:50:04 +000025479ac_configure_extra_args=
25480
25481if $ac_cs_silent; then
25482 exec 6>/dev/null
25483 ac_configure_extra_args="$ac_configure_extra_args --silent"
25484fi
25485
25486_ACEOF
25487cat >>$CONFIG_STATUS <<_ACEOF
25488if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025489 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25490 CONFIG_SHELL=$SHELL
25491 export CONFIG_SHELL
25492 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025493fi
25494
Martin v. Löwis11437992002-04-12 09:54:03 +000025495_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025496cat >>$CONFIG_STATUS <<\_ACEOF
25497exec 5>>config.log
25498{
25499 echo
25500 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25501## Running $as_me. ##
25502_ASBOX
25503 echo "$ac_log"
25504} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025505
Martin v. Löwiseba40652007-08-30 20:10:57 +000025506_ACEOF
25507cat >>$CONFIG_STATUS <<_ACEOF
25508_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025509
25510cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025511
25512# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025513for ac_config_target in $ac_config_targets
25514do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025515 case $ac_config_target in
25516 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25517 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25518 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25519 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025520 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25521 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025522 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25523 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25524
Martin v. Löwis11437992002-04-12 09:54:03 +000025525 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25526echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25527 { (exit 1); exit 1; }; };;
25528 esac
25529done
25530
Martin v. Löwiseba40652007-08-30 20:10:57 +000025531
Martin v. Löwis11437992002-04-12 09:54:03 +000025532# If the user did not use the arguments to specify the items to instantiate,
25533# then the envvar interface is used. Set only those that are not.
25534# We use the long form for the default assignment because of an extremely
25535# bizarre bug on SunOS 4.1.3.
25536if $ac_need_defaults; then
25537 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25538 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25539fi
25540
Skip Montanaro6dead952003-09-25 14:50:04 +000025541# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025542# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025543# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025544# Hook for its removal unless debugging.
25545# Note that there is a small window in which the directory will not be cleaned:
25546# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025547$debug ||
25548{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025549 tmp=
25550 trap 'exit_status=$?
25551 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25552' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025553 trap '{ (exit 1); exit 1; }' 1 2 13 15
25554}
Martin v. Löwis11437992002-04-12 09:54:03 +000025555# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025556
Martin v. Löwis11437992002-04-12 09:54:03 +000025557{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025558 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025559 test -n "$tmp" && test -d "$tmp"
25560} ||
25561{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025562 tmp=./conf$$-$RANDOM
25563 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025564} ||
25565{
Skip Montanaro6dead952003-09-25 14:50:04 +000025566 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025567 { (exit 1); exit 1; }
25568}
25569
Martin v. Löwis11437992002-04-12 09:54:03 +000025570#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025571# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025572#
25573
25574# No need to generate the scripts if there are no CONFIG_FILES.
25575# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025576if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025577
25578_ACEOF
25579
Martin v. Löwiseba40652007-08-30 20:10:57 +000025580
25581
25582ac_delim='%!_!# '
25583for ac_last_try in false false false false false :; do
25584 cat >conf$$subs.sed <<_ACEOF
25585SHELL!$SHELL$ac_delim
25586PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25587PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25588PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25589PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25590PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25591PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25592exec_prefix!$exec_prefix$ac_delim
25593prefix!$prefix$ac_delim
25594program_transform_name!$program_transform_name$ac_delim
25595bindir!$bindir$ac_delim
25596sbindir!$sbindir$ac_delim
25597libexecdir!$libexecdir$ac_delim
25598datarootdir!$datarootdir$ac_delim
25599datadir!$datadir$ac_delim
25600sysconfdir!$sysconfdir$ac_delim
25601sharedstatedir!$sharedstatedir$ac_delim
25602localstatedir!$localstatedir$ac_delim
25603includedir!$includedir$ac_delim
25604oldincludedir!$oldincludedir$ac_delim
25605docdir!$docdir$ac_delim
25606infodir!$infodir$ac_delim
25607htmldir!$htmldir$ac_delim
25608dvidir!$dvidir$ac_delim
25609pdfdir!$pdfdir$ac_delim
25610psdir!$psdir$ac_delim
25611libdir!$libdir$ac_delim
25612localedir!$localedir$ac_delim
25613mandir!$mandir$ac_delim
25614DEFS!$DEFS$ac_delim
25615ECHO_C!$ECHO_C$ac_delim
25616ECHO_N!$ECHO_N$ac_delim
25617ECHO_T!$ECHO_T$ac_delim
25618LIBS!$LIBS$ac_delim
25619build_alias!$build_alias$ac_delim
25620host_alias!$host_alias$ac_delim
25621target_alias!$target_alias$ac_delim
25622VERSION!$VERSION$ac_delim
25623SOVERSION!$SOVERSION$ac_delim
25624CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25625UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025626ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025627PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025628PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025629PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25630PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25631PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25632FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25633FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25634FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25635FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25636FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25637MACHDEP!$MACHDEP$ac_delim
25638SGI_ABI!$SGI_ABI$ac_delim
25639EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25640EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25641CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25642EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25643CC!$CC$ac_delim
25644CFLAGS!$CFLAGS$ac_delim
25645LDFLAGS!$LDFLAGS$ac_delim
25646CPPFLAGS!$CPPFLAGS$ac_delim
25647ac_ct_CC!$ac_ct_CC$ac_delim
25648EXEEXT!$EXEEXT$ac_delim
25649OBJEXT!$OBJEXT$ac_delim
25650CXX!$CXX$ac_delim
25651MAINCC!$MAINCC$ac_delim
25652CPP!$CPP$ac_delim
25653GREP!$GREP$ac_delim
25654EGREP!$EGREP$ac_delim
25655BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25656LIBRARY!$LIBRARY$ac_delim
25657LDLIBRARY!$LDLIBRARY$ac_delim
25658DLLLIBRARY!$DLLLIBRARY$ac_delim
25659BLDLIBRARY!$BLDLIBRARY$ac_delim
25660LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
25661INSTSONAME!$INSTSONAME$ac_delim
25662RUNSHARED!$RUNSHARED$ac_delim
25663LINKCC!$LINKCC$ac_delim
25664RANLIB!$RANLIB$ac_delim
25665AR!$AR$ac_delim
25666SVNVERSION!$SVNVERSION$ac_delim
25667INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25668INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25669INSTALL_DATA!$INSTALL_DATA$ac_delim
25670LN!$LN$ac_delim
25671OPT!$OPT$ac_delim
25672BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025673UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025674OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
25675LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
25676SO!$SO$ac_delim
25677LDSHARED!$LDSHARED$ac_delim
25678BLDSHARED!$BLDSHARED$ac_delim
25679CCSHARED!$CCSHARED$ac_delim
25680LINKFORSHARED!$LINKFORSHARED$ac_delim
25681CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025682_ACEOF
25683
25684 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25685 break
25686 elif $ac_last_try; then
25687 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25688echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25689 { (exit 1); exit 1; }; }
25690 else
25691 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000025692 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025693done
25694
25695ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25696if test -n "$ac_eof"; then
25697 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25698 ac_eof=`expr $ac_eof + 1`
25699fi
25700
25701cat >>$CONFIG_STATUS <<_ACEOF
25702cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25703/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25704_ACEOF
25705sed '
25706s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25707s/^/s,@/; s/!/@,|#_!!_#|/
25708:n
25709t n
25710s/'"$ac_delim"'$/,g/; t
25711s/$/\\/; p
25712N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25713' >>$CONFIG_STATUS <conf$$subs.sed
25714rm -f conf$$subs.sed
25715cat >>$CONFIG_STATUS <<_ACEOF
25716CEOF$ac_eof
25717_ACEOF
25718
25719
25720ac_delim='%!_!# '
25721for ac_last_try in false false false false false :; do
25722 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025723SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025724USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025725SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025726USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
25727LDLAST!$LDLAST$ac_delim
25728THREADOBJ!$THREADOBJ$ac_delim
25729DLINCLDIR!$DLINCLDIR$ac_delim
25730DYNLOADFILE!$DYNLOADFILE$ac_delim
25731MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
25732TRUE!$TRUE$ac_delim
25733LIBOBJS!$LIBOBJS$ac_delim
25734HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
25735HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
25736HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
25737HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
25738HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
25739LIBM!$LIBM$ac_delim
25740LIBC!$LIBC$ac_delim
25741UNICODE_OBJS!$UNICODE_OBJS$ac_delim
25742THREADHEADERS!$THREADHEADERS$ac_delim
25743SRCDIRS!$SRCDIRS$ac_delim
25744LTLIBOBJS!$LTLIBOBJS$ac_delim
25745_ACEOF
25746
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025747 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025748 break
25749 elif $ac_last_try; then
25750 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25751echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25752 { (exit 1); exit 1; }; }
25753 else
25754 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25755 fi
25756done
25757
25758ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25759if test -n "$ac_eof"; then
25760 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25761 ac_eof=`expr $ac_eof + 1`
25762fi
25763
25764cat >>$CONFIG_STATUS <<_ACEOF
25765cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25766/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25767_ACEOF
25768sed '
25769s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25770s/^/s,@/; s/!/@,|#_!!_#|/
25771:n
25772t n
25773s/'"$ac_delim"'$/,g/; t
25774s/$/\\/; p
25775N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25776' >>$CONFIG_STATUS <conf$$subs.sed
25777rm -f conf$$subs.sed
25778cat >>$CONFIG_STATUS <<_ACEOF
25779:end
25780s/|#_!!_#|//g
25781CEOF$ac_eof
25782_ACEOF
25783
25784
25785# VPATH may cause trouble with some makes, so we remove $(srcdir),
25786# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25787# trailing colons and then remove the whole line if VPATH becomes empty
25788# (actually we leave an empty line to preserve line numbers).
25789if test "x$srcdir" = x.; then
25790 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25791s/:*\$(srcdir):*/:/
25792s/:*\${srcdir}:*/:/
25793s/:*@srcdir@:*/:/
25794s/^\([^=]*=[ ]*\):*/\1/
25795s/:*$//
25796s/^[^=]*=[ ]*$//
25797}'
25798fi
25799
25800cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025801fi # test -n "$CONFIG_FILES"
25802
Martin v. Löwiseba40652007-08-30 20:10:57 +000025803
25804for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
25805do
25806 case $ac_tag in
25807 :[FHLC]) ac_mode=$ac_tag; continue;;
25808 esac
25809 case $ac_mode$ac_tag in
25810 :[FHL]*:*);;
25811 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25812echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25813 { (exit 1); exit 1; }; };;
25814 :[FH]-) ac_tag=-:-;;
25815 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25816 esac
25817 ac_save_IFS=$IFS
25818 IFS=:
25819 set x $ac_tag
25820 IFS=$ac_save_IFS
25821 shift
25822 ac_file=$1
25823 shift
25824
25825 case $ac_mode in
25826 :L) ac_source=$1;;
25827 :[FH])
25828 ac_file_inputs=
25829 for ac_f
25830 do
25831 case $ac_f in
25832 -) ac_f="$tmp/stdin";;
25833 *) # Look for the file first in the build tree, then in the source tree
25834 # (if the path is not absolute). The absolute path cannot be DOS-style,
25835 # because $ac_f cannot contain `:'.
25836 test -f "$ac_f" ||
25837 case $ac_f in
25838 [\\/$]*) false;;
25839 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25840 esac ||
25841 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25842echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25843 { (exit 1); exit 1; }; };;
25844 esac
25845 ac_file_inputs="$ac_file_inputs $ac_f"
25846 done
25847
25848 # Let's still pretend it is `configure' which instantiates (i.e., don't
25849 # use $as_me), people would be surprised to read:
25850 # /* config.h. Generated by config.status. */
25851 configure_input="Generated from "`IFS=:
25852 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25853 if test x"$ac_file" != x-; then
25854 configure_input="$ac_file. $configure_input"
25855 { echo "$as_me:$LINENO: creating $ac_file" >&5
25856echo "$as_me: creating $ac_file" >&6;}
25857 fi
25858
25859 case $ac_tag in
25860 *:-:* | *:-) cat >"$tmp/stdin";;
25861 esac
25862 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025863 esac
25864
Martin v. Löwiseba40652007-08-30 20:10:57 +000025865 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025866$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025867 X"$ac_file" : 'X\(//\)[^/]' \| \
25868 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025869 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025870echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025871 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25872 s//\1/
25873 q
25874 }
25875 /^X\(\/\/\)[^/].*/{
25876 s//\1/
25877 q
25878 }
25879 /^X\(\/\/\)$/{
25880 s//\1/
25881 q
25882 }
25883 /^X\(\/\).*/{
25884 s//\1/
25885 q
25886 }
25887 s/.*/./; q'`
25888 { as_dir="$ac_dir"
25889 case $as_dir in #(
25890 -*) as_dir=./$as_dir;;
25891 esac
25892 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000025893 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000025894 while :; do
25895 case $as_dir in #(
25896 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25897 *) as_qdir=$as_dir;;
25898 esac
25899 as_dirs="'$as_qdir' $as_dirs"
25900 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025901$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025902 X"$as_dir" : 'X\(//\)[^/]' \| \
25903 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025904 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025905echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025906 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25907 s//\1/
25908 q
25909 }
25910 /^X\(\/\/\)[^/].*/{
25911 s//\1/
25912 q
25913 }
25914 /^X\(\/\/\)$/{
25915 s//\1/
25916 q
25917 }
25918 /^X\(\/\).*/{
25919 s//\1/
25920 q
25921 }
25922 s/.*/./; q'`
25923 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025924 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025925 test -z "$as_dirs" || eval "mkdir $as_dirs"
25926 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25927echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025928 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025929 ac_builddir=.
25930
Martin v. Löwiseba40652007-08-30 20:10:57 +000025931case "$ac_dir" in
25932.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25933*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025934 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025935 # A ".." for each directory in $ac_dir_suffix.
25936 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25937 case $ac_top_builddir_sub in
25938 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25939 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25940 esac ;;
25941esac
25942ac_abs_top_builddir=$ac_pwd
25943ac_abs_builddir=$ac_pwd$ac_dir_suffix
25944# for backward compatibility:
25945ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025946
25947case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025948 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025949 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025950 ac_top_srcdir=$ac_top_builddir_sub
25951 ac_abs_top_srcdir=$ac_pwd ;;
25952 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025953 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025954 ac_top_srcdir=$srcdir
25955 ac_abs_top_srcdir=$srcdir ;;
25956 *) # Relative name.
25957 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25958 ac_top_srcdir=$ac_top_build_prefix$srcdir
25959 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025960esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025961ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025962
Martin v. Löwis11437992002-04-12 09:54:03 +000025963
Martin v. Löwiseba40652007-08-30 20:10:57 +000025964 case $ac_mode in
25965 :F)
25966 #
25967 # CONFIG_FILE
25968 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025969
25970 case $INSTALL in
25971 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025972 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025973 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025974_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025975
25976cat >>$CONFIG_STATUS <<\_ACEOF
25977# If the template does not know about datarootdir, expand it.
25978# FIXME: This hack should be removed a few years after 2.60.
25979ac_datarootdir_hack=; ac_datarootdir_seen=
25980
25981case `sed -n '/datarootdir/ {
25982 p
25983 q
25984}
25985/@datadir@/p
25986/@docdir@/p
25987/@infodir@/p
25988/@localedir@/p
25989/@mandir@/p
25990' $ac_file_inputs` in
25991*datarootdir*) ac_datarootdir_seen=yes;;
25992*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25993 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25994echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25995_ACEOF
25996cat >>$CONFIG_STATUS <<_ACEOF
25997 ac_datarootdir_hack='
25998 s&@datadir@&$datadir&g
25999 s&@docdir@&$docdir&g
26000 s&@infodir@&$infodir&g
26001 s&@localedir@&$localedir&g
26002 s&@mandir@&$mandir&g
26003 s&\\\${datarootdir}&$datarootdir&g' ;;
26004esac
26005_ACEOF
26006
26007# Neutralize VPATH when `$srcdir' = `.'.
26008# Shell code in configure.ac might set extrasub.
26009# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000026010cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026011 sed "$ac_vpsub
26012$extrasub
26013_ACEOF
26014cat >>$CONFIG_STATUS <<\_ACEOF
26015:t
26016/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000026017s&@configure_input@&$configure_input&;t t
26018s&@top_builddir@&$ac_top_builddir_sub&;t t
26019s&@srcdir@&$ac_srcdir&;t t
26020s&@abs_srcdir@&$ac_abs_srcdir&;t t
26021s&@top_srcdir@&$ac_top_srcdir&;t t
26022s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26023s&@builddir@&$ac_builddir&;t t
26024s&@abs_builddir@&$ac_abs_builddir&;t t
26025s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26026s&@INSTALL@&$ac_INSTALL&;t t
26027$ac_datarootdir_hack
26028" $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 +000026029
Martin v. Löwiseba40652007-08-30 20:10:57 +000026030test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26031 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26032 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26033 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26034which seems to be undefined. Please make sure it is defined." >&5
26035echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26036which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026037
Martin v. Löwiseba40652007-08-30 20:10:57 +000026038 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026039 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026040 -) cat "$tmp/out"; rm -f "$tmp/out";;
26041 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026042 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026043 ;;
26044 :H)
26045 #
26046 # CONFIG_HEADER
26047 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026048_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026049
Martin v. Löwiseba40652007-08-30 20:10:57 +000026050# Transform confdefs.h into a sed script `conftest.defines', that
26051# substitutes the proper values into config.h.in to produce config.h.
26052rm -f conftest.defines conftest.tail
26053# First, append a space to every undef/define line, to ease matching.
26054echo 's/$/ /' >conftest.defines
26055# Then, protect against being on the right side of a sed subst, or in
26056# an unquoted here document, in config.status. If some macros were
26057# called several times there might be several #defines for the same
26058# symbol, which is useless. But do not sort them, since the last
26059# AC_DEFINE must be honored.
26060ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26061# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26062# NAME is the cpp macro being defined, VALUE is the value it is being given.
26063# PARAMS is the parameter list in the macro definition--in most cases, it's
26064# just an empty string.
26065ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26066ac_dB='\\)[ (].*,\\1define\\2'
26067ac_dC=' '
26068ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026069
Martin v. Löwiseba40652007-08-30 20:10:57 +000026070uniq confdefs.h |
26071 sed -n '
26072 t rset
26073 :rset
26074 s/^[ ]*#[ ]*define[ ][ ]*//
26075 t ok
26076 d
26077 :ok
26078 s/[\\&,]/\\&/g
26079 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26080 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26081 ' >>conftest.defines
26082
26083# Remove the space that was appended to ease matching.
26084# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026085# example, in the case of _POSIX_SOURCE, which is predefined and required
26086# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026087# (The regexp can be short, since the line contains either #define or #undef.)
26088echo 's/ $//
26089s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000026090
Martin v. Löwiseba40652007-08-30 20:10:57 +000026091# Break up conftest.defines:
26092ac_max_sed_lines=50
26093
26094# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26095# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26096# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26097# et cetera.
26098ac_in='$ac_file_inputs'
26099ac_out='"$tmp/out1"'
26100ac_nxt='"$tmp/out2"'
26101
26102while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000026103do
Martin v. Löwiseba40652007-08-30 20:10:57 +000026104 # Write a here document:
26105 cat >>$CONFIG_STATUS <<_ACEOF
26106 # First, check the format of the line:
26107 cat >"\$tmp/defines.sed" <<\\CEOF
26108/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26109/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26110b
26111:def
26112_ACEOF
26113 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000026114 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026115 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26116 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26117 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26118 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000026119 rm -f conftest.defines
26120 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000026121done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026122rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000026123
Martin v. Löwiseba40652007-08-30 20:10:57 +000026124echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026125cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026126 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026127 echo "/* $configure_input */" >"$tmp/config.h"
26128 cat "$ac_result" >>"$tmp/config.h"
26129 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026130 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26131echo "$as_me: $ac_file is unchanged" >&6;}
26132 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026133 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000026134 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026135 fi
26136 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026137 echo "/* $configure_input */"
26138 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026139 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026140 rm -f "$tmp/out12"
26141 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026142
Martin v. Löwiseba40652007-08-30 20:10:57 +000026143
26144 esac
26145
26146done # for ac_tag
26147
Guido van Rossum627b2d71993-12-24 10:39:16 +000026148
Martin v. Löwis11437992002-04-12 09:54:03 +000026149{ (exit 0); exit 0; }
26150_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026151chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026152ac_clean_files=$ac_clean_files_save
26153
26154
26155# configure is writing to config.log, and then calls config.status.
26156# config.status does its own redirection, appending to config.log.
26157# Unfortunately, on DOS this fails, as config.log is still kept open
26158# by configure, so config.status won't be able to write to it; its
26159# output is simply discarded. So we exec the FD to /dev/null,
26160# effectively closing config.log, so it can be properly (re)opened and
26161# appended to by config.status. When coming back to configure, we
26162# need to make the FD available again.
26163if test "$no_create" != yes; then
26164 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026165 ac_config_status_args=
26166 test "$silent" = yes &&
26167 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026168 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026169 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026170 exec 5>>config.log
26171 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26172 # would make configure fail if this is the last instruction.
26173 $ac_cs_success || { (exit 1); exit 1; }
26174fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026175
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026176
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026177echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026178if test ! -f Modules/Setup
26179then
26180 cp $srcdir/Modules/Setup.dist Modules/Setup
26181fi
26182
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026183echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026184if test ! -f Modules/Setup.local
26185then
26186 echo "# Edit this file for local setup changes" >Modules/Setup.local
26187fi
26188
26189echo "creating Makefile"
26190$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26191 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026192 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000026193
26194case $ac_sys_system in
26195BeOS)
26196 { echo "$as_me:$LINENO: WARNING:
26197
26198 Support for BeOS is deprecated as of Python 2.6.
26199 See PEP 11 for the gory details.
26200 " >&5
26201echo "$as_me: WARNING:
26202
26203 Support for BeOS is deprecated as of Python 2.6.
26204 See PEP 11 for the gory details.
26205 " >&2;}
26206 ;;
26207*) ;;
26208esac
26209
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026210mv config.c Modules